/* =============================================================
   LeakBox — публичный магазин.
   Дизайн-система построена только на переменных темы (--site-*),
   поэтому смена цветов в админке продолжает работать как раньше.
   ============================================================= */

/* ---------- 1. Производные токены ---------- */
:root {
  --accent: var(--site-primary);
  --accent-soft: var(--site-primary-hover);

  --accent-04: color-mix(in srgb, var(--site-primary) 4%, transparent);
  --accent-08: color-mix(in srgb, var(--site-primary) 8%, transparent);
  --accent-12: color-mix(in srgb, var(--site-primary) 12%, transparent);
  --accent-18: color-mix(in srgb, var(--site-primary) 18%, transparent);
  --accent-28: color-mix(in srgb, var(--site-primary) 28%, transparent);
  --accent-45: color-mix(in srgb, var(--site-primary) 45%, transparent);
  --accent-70: color-mix(in srgb, var(--site-primary) 70%, transparent);

  --line: color-mix(in srgb, var(--site-border) 70%, transparent);
  --line-soft: color-mix(in srgb, var(--site-border) 42%, transparent);
  --line-accent: color-mix(in srgb, var(--site-primary) 38%, var(--site-border));

  --surface: var(--site-surface);
  --surface-alt: var(--site-surface-alt);
  --deep: var(--site-bg-deep);

  --panel: linear-gradient(165deg,
            color-mix(in srgb, var(--site-surface) 96%, transparent) 0%,
            color-mix(in srgb, var(--site-bg-deep) 96%, transparent) 100%);
  --panel-glass: linear-gradient(165deg,
            color-mix(in srgb, var(--site-surface) 78%, transparent) 0%,
            color-mix(in srgb, var(--site-bg-deep) 82%, transparent) 100%);

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, .28);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, .42);
  --shadow-lg: 0 34px 80px rgba(0, 0, 0, .55);
  --glow-sm: 0 0 24px var(--accent-12);
  --glow-md: 0 12px 44px var(--accent-18);
  --glow-lg: 0 22px 70px var(--accent-28);

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-2xl: 34px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, .68, .34, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --header-h: 76px;
  --container: 1280px;

  --font-ui: 'Manrope', 'Segoe UI', 'Roboto', system-ui, sans-serif;
  --font-display: 'Unbounded', 'Manrope', 'Segoe UI', sans-serif;
}

/* Personal prices and event offers */
.shop-start { display: grid; gap: 16px; margin-top: 18px; scroll-margin-top: calc(var(--header-h) + 16px); }
.shop-start [hidden], .shop-bundle-checkout[hidden], #variantPicker[hidden] { display: none; }
.shop-profile, .shop-sale-banner, .shop-offer__head, .shop-offer__footer, .shop-offer__total,
.shop-profile__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.shop-profile, .shop-sale-banner, .shop-offer__head { justify-content: space-between; }
.shop-profile, .shop-sale-banner { border: 1px solid var(--line-accent); border-radius: var(--r-lg); padding: 14px 18px; background: var(--panel); }
.shop-profile { border-color: var(--accent-45); background: linear-gradient(120deg, var(--accent-08), transparent 65%), var(--panel); }
#shopProfileName { font-size: 18px; }
.shop-profile p, .shop-offer__occasion, .shop-profile-dialog > p { margin: 3px 0 0; color: var(--site-muted); }
.shop-profile .shop-offer__label { margin: 0 0 3px; color: var(--accent-soft); }
.shop-sale-banner { background: var(--accent-18); color: var(--accent-soft); font-weight: 800; }
.shop-offers { display: grid; gap: 16px; }
.shop-offers:empty { display: none; }
.shop-offer { padding: clamp(15px, 2.7vw, 28px); border: 2px solid var(--accent-70); border-radius: var(--r-xl); background: linear-gradient(150deg, var(--accent-12), transparent 68%), var(--panel); box-shadow: var(--glow-md); }
.shop-offer__head { margin-bottom: 15px; }
.shop-offer__label { font-size: 12px; font-weight: 800; color: var(--accent-soft); }
.shop-offer__title { margin: 4px 0; font-family: var(--font-display); font-size: clamp(19px, 3vw, 30px); overflow-wrap: anywhere; }
.shop-offer__timer { border: 1px solid var(--line-accent); border-radius: var(--r-pill); padding: 6px 11px; color: var(--accent-soft); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shop-offer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 9px; }
.shop-offer-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); color: var(--site-text); background: var(--surface); cursor: pointer; }
.shop-offer-item:not(:disabled):hover { border-color: var(--accent); }
.shop-offer-item:disabled { opacity: .68; cursor: default; }
.shop-offer-item img { width: 52px; height: 52px; flex: none; object-fit: contain; }
.shop-offer-item__text { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.shop-offer-item__category { color: var(--site-muted); font-size: 11px; }
.shop-offer-item__name { font-size: 14px; overflow-wrap: anywhere; }
.shop-offer__footer { margin-top: 16px; justify-content: flex-end; }
.shop-offer__total s { color: var(--site-muted); }
.shop-card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.shop-card-badges:empty, .shop-card-breakdown:empty { display: none; }
.shop-price-tag { display: inline-block; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.shop-price-tag--upgrade { padding: 5px 9px; border-color: var(--accent); background: var(--accent-18); box-shadow: var(--glow-sm); color: var(--accent-soft); font-size: 14px; }
.shop-price-tag--sale { border-color: var(--line-accent); background: var(--accent-12); color: var(--accent-soft); }
.shop-price-tag--owned { border-color: #30ab84; color: #8de3c1; background: #154135; }
.shop-card-breakdown, .shop-checkout-breakdown, .shop-bundle-checkout { color: var(--site-muted); font-size: 13px; line-height: 1.45; }
.shop-card-breakdown { margin: 4px 0 0; }
.shop-checkout-breakdown:empty { display: none; }
.shop-checkout-breakdown p { margin: 0; }
.shop-bundle-checkout { margin: 0; padding-left: 19px; }
.shop-profile-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(460px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: clamp(20px, 5vw, 28px);
  border: 1px solid var(--line-accent);
  border-radius: var(--r-xl);
  background: var(--surface);
  background: radial-gradient(90% 70% at 0% 0%, var(--accent-12), transparent 70%), var(--panel);
  color: var(--site-text);
  box-shadow: var(--shadow-lg), var(--glow-sm);
}
.shop-profile-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(8px); }
.shop-profile-dialog h2 { margin: 0; padding-right: 45px; font-family: var(--font-display); font-size: clamp(20px, 5vw, 25px); }
.shop-profile-dialog > p { margin-top: 12px; font-size: 14px; }
.shop-profile-dialog > p strong { color: var(--site-text); }
.shop-profile-dialog .form { margin-top: 20px; }
.shop-profile-dialog .form-note { margin: 0; }
.shop-profile-dialog .form-note:empty { display: none; }

@media (max-width: 480px) {
  .shop-offer__footer .btn { width: 100%; }
  .shop-profile__actions { width: 100%; }
}

/* ---------- 2. База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 96px);
  -webkit-text-size-adjust: 100%;
  background: var(--site-bg);
}

/* Прозрачный <body>, чтобы слой .ambient просвечивал сквозь него. */
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--site-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }

::selection {
  background: var(--accent-45);
  color: var(--site-text);
}

/* Скроллбар в стиле магазина. */
* { scrollbar-color: var(--accent-45) transparent; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--deep); }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--site-primary) 34%, var(--site-border));
  border-radius: var(--r-pill);
  border: 2px solid var(--deep);
}
*::-webkit-scrollbar-thumb:hover { background: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.icon { width: 20px; height: 20px; flex: none; fill: currentColor; }
.icon-sm { width: 16px; height: 16px; flex: none; fill: currentColor; }
.icon-lg { width: 26px; height: 26px; flex: none; fill: currentColor; }

/* ---------- 3. Атмосферный фон ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.ambient__grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--site-text) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--site-text) 4%, transparent) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 0%, transparent 78%);
  opacity: .5;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.ambient__orb--1 {
  width: 620px; height: 620px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, var(--accent-28) 0%, transparent 70%);
  animation: drift-a 26s var(--ease) infinite alternate;
}

.ambient__orb--2 {
  width: 540px; height: 540px;
  top: 8%; right: -200px;
  background: radial-gradient(circle, var(--accent-18) 0%, transparent 70%);
  animation: drift-b 32s var(--ease) infinite alternate;
}

.ambient__orb--3 {
  width: 700px; height: 700px;
  bottom: -340px; left: 26%;
  background: radial-gradient(circle, var(--accent-08) 0%, transparent 70%);
  animation: drift-a 38s var(--ease) infinite alternate-reverse;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(80px, 60px, 0) scale(1.14); }
}
@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.08); }
  to   { transform: translate3d(-70px, 90px, 0) scale(.95); }
}

/* Индикатор прогресса прокрутки. */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  box-shadow: 0 0 12px var(--accent-45);
  z-index: 90;
  pointer-events: none;
}

/* ---------- 4. Кнопки ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  transition: transform .25s var(--ease-out),
              box-shadow .25s var(--ease-out),
              background-color .25s var(--ease),
              border-color .25s var(--ease),
              color .25s var(--ease);
}

.btn:disabled { cursor: not-allowed; }

/* Блик, пробегающий по основной кнопке при наведении. */
.btn--primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: var(--site-button-text);
  box-shadow: var(--glow-md), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0; left: -140%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  transition: left .65s var(--ease-out);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--glow-lg), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn--primary:hover:not(:disabled)::after { left: 140%; }
.btn--primary:active:not(:disabled) { transform: translateY(0); }

.btn--ghost {
  background: color-mix(in srgb, var(--site-surface-alt) 70%, transparent);
  border-color: var(--line);
  color: var(--site-text);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover:not(:disabled) {
  border-color: var(--line-accent);
  background: var(--accent-08);
  transform: translateY(-2px);
  box-shadow: var(--glow-sm);
}

.btn--lg { padding: 16px 28px; font-size: 16px; border-radius: var(--r-lg); }
.btn--block { width: 100%; }

.btn--muted {
  background: color-mix(in srgb, var(--site-muted) 22%, var(--deep));
  color: color-mix(in srgb, var(--site-muted) 90%, var(--site-text));
  box-shadow: none;
  opacity: .75;
}

/* Живая рамка у главных кнопок: по контуру бежит светящаяся грань.
   Угол анимируем через @property — там, где его нет, кнопка просто
   остаётся статичной, ничего не ломается. */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.btn--glow.btn--primary {
  border-width: 2px;
  border-color: transparent;
  background:
    linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%) padding-box,
    conic-gradient(from var(--angle),
      color-mix(in srgb, var(--site-button-text) 85%, transparent) 0deg,
      var(--accent-soft) 55deg,
      color-mix(in srgb, var(--accent) 30%, transparent) 150deg,
      color-mix(in srgb, var(--accent) 30%, transparent) 250deg,
      color-mix(in srgb, var(--site-button-text) 85%, transparent) 360deg) border-box;
  animation: spin-angle 4.5s linear infinite, glow-breathe 3.2s ease-in-out infinite;
}

@keyframes spin-angle {
  to { --angle: 360deg; }
}
@keyframes glow-breathe {
  0%, 100% { box-shadow: var(--glow-md), inset 0 1px 0 rgba(255, 255, 255, .22); }
  50% { box-shadow: var(--glow-lg), inset 0 1px 0 rgba(255, 255, 255, .3); }
}

/* ---------- 5. Шапка ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 80;
  padding: 14px 20px 0;
  transition: padding .35s var(--ease);
}
.site-header.is-scrolled { padding-top: 8px; }

.header-bar {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel-glass);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease);
}
.header-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--accent-12), transparent 55%);
  pointer-events: none;
}
.site-header.is-scrolled .header-bar {
  border-color: var(--line-accent);
  box-shadow: var(--shadow-lg), var(--glow-sm);
}

.header-bar__left { position: relative; display: flex; align-items: center; min-width: 0; }
.header-bar__right { position: relative; display: flex; align-items: center; gap: 10px; }

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand__mark {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-alt);
  box-shadow: inset 0 0 22px var(--accent-08);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .4s var(--ease-out);
}
.brand__mark img { width: 30px; height: 30px; }
.brand:hover .brand__mark {
  border-color: var(--line-accent);
  box-shadow: inset 0 0 26px var(--accent-18), 0 0 22px var(--accent-18);
  transform: rotate(-6deg) scale(1.06);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.01em;
  background: linear-gradient(120deg, var(--site-text) 8%, var(--accent) 55%, var(--accent-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 14px;
}
.site-nav a {
  position: relative;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--site-muted);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-70);
  transform: translateX(-50%);
  transition: width .3s var(--ease-out);
}
.site-nav a:hover { color: var(--site-text); background: var(--accent-08); }
.site-nav a:hover::after { width: 22px; }

/* Блок с IP сервера. */
.ip-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--site-bg-deep) 72%, transparent);
}
.ip-card__label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--site-muted);
}
.ip-card__value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--site-text);
  user-select: all;
}

.copy-btn { min-width: 168px; flex-direction: column; gap: 4px; padding: 9px 18px; }
.copy-label { display: inline-flex; align-items: center; gap: 8px; line-height: 1; }

/* Индикатор онлайна. */
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: .92;
}
.server-status-dot {
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--site-text) 55%, transparent);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
.server-status-dot.is-online { background: var(--site-success); }
.server-status-dot.is-offline { background: var(--site-danger); animation: none; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  color: var(--site-text);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.burger:hover { border-color: var(--line-accent); background: var(--accent-12); }
.burger__box { position: relative; width: 20px; height: 14px; }
.burger__box span {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease-out), opacity .2s var(--ease);
}
.burger__box span:nth-child(1) { top: 0; }
.burger__box span:nth-child(2) { top: 6px; }
.burger__box span:nth-child(3) { top: 12px; }
.burger.is-open .burger__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open .burger__box span:nth-child(2) { opacity: 0; }
.burger.is-open .burger__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 6. Мобильное меню ---------- */
.mobile-menu {
  position: fixed;
  top: calc(var(--header-h) + 14px);
  right: 14px;
  left: 14px;
  z-index: 79;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--panel-glass);
  backdrop-filter: blur(20px) saturate(140%);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-14px) scale(.98);
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; transform: none; pointer-events: auto; }

.mobile-menu__ip {
  border: 1px solid var(--line-accent);
  border-radius: var(--r-lg);
  background: var(--accent-08);
  padding: 14px;
  margin-bottom: 6px;
}
.mobile-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.mobile-menu__status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--site-bg-deep) 55%, transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--site-muted);
}
.mobile-menu a {
  padding: 13px 16px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-weight: 700;
  color: var(--site-muted);
  transition: all .25s var(--ease);
}
.mobile-menu a:hover {
  color: var(--site-text);
  background: var(--accent-08);
  border-color: var(--line-accent);
}

/* ---------- 7. Герой ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 26px);
  padding-bottom: 10px;
}

.hero__frame {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), 0 0 90px var(--accent-12);
  isolation: isolate;
}

.hero__media {
  position: relative;
  height: clamp(340px, 42vw, 540px);
  overflow: hidden;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 1.6s var(--ease-out) both;
  will-change: transform;
}
@keyframes hero-zoom {
  from { transform: scale(1.12); opacity: .35; }
  to   { transform: scale(1); opacity: 1; }
}

/* Затемнение снизу, чтобы текст и панель читались поверх баннера. */
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
        var(--site-bg) 1%,
        color-mix(in srgb, var(--site-bg) 88%, transparent) 22%,
        color-mix(in srgb, var(--site-bg) 42%, transparent) 42%,
        transparent 66%),
    linear-gradient(to right, color-mix(in srgb, var(--site-bg-deep) 55%, transparent), transparent 58%);
  pointer-events: none;
}
.hero__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 140px 20px color-mix(in srgb, var(--site-bg-deep) 70%, transparent);
  pointer-events: none;
}

/* Угольки над баннером. Элементы создаёт JS, случайные параметры
   приходят через CSS-переменные на каждом угольке. */
.hero__embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ember {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 9px 2px var(--accent-45);
  opacity: 0;
  will-change: transform, opacity;
  animation: ember-rise var(--dur) linear var(--delay) infinite;
}

@keyframes ember-rise {
  0%   { transform: translate3d(0, 0, 0) scale(.5); opacity: 0; }
  14%  { opacity: .9; }
  72%  { opacity: .5; }
  100% { transform: translate3d(var(--drift), calc(-1 * var(--rise)), 0) scale(1.1); opacity: 0; }
}

.hero__content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px clamp(20px, 4vw, 46px) clamp(30px, 4vw, 46px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-accent);
  background: color-mix(in srgb, var(--site-bg-deep) 62%, transparent);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 800;
  color: var(--site-text);
}

.hero__tagline {
  max-width: 640px;
  font-size: clamp(16px, 2.1vw, 21px);
  font-weight: 700;
  line-height: 1.35;
  color: color-mix(in srgb, var(--site-text) 88%, transparent);
  text-shadow: 0 2px 24px rgba(0, 0, 0, .85);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Панель с IP, наезжающая на нижний край баннера. */
.hero-bar {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 3vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--panel-glass);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--accent-12), transparent 60%);
  pointer-events: none;
}
.hero-bar > * { position: relative; }

.hero-bar__ip { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hero-bar__ip .brand__mark { width: 48px; height: 48px; }

/* ---------- 9. Навигация по категориям ---------- */
.cat-nav {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 40;
  margin: 44px 0 8px;
}
.cat-nav__inner {
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel-glass);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }

.cat-btn {
  position: relative;
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: transparent;
  font-weight: 800;
  font-size: 14.5px;
  color: var(--site-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: color .28s var(--ease), background-color .28s var(--ease),
              border-color .28s var(--ease), box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.cat-btn:hover {
  color: var(--site-text);
  background: var(--accent-08);
  border-color: var(--line-accent);
  transform: translateY(-1px);
}
.cat-btn.is-active {
  color: var(--site-button-text);
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border-color: transparent;
  box-shadow: var(--glow-md);
}

/* ---------- 10. Каталог ---------- */
.catalog { padding: 10px 0 40px; }

/* Категория, скрытая фильтром. Класс is-first вешает JS на первую видимую,
   чтобы у неё не было лишнего отступа сверху. */
.catalog-group[hidden] { display: none !important; }
.catalog-group.is-first .section-head { margin-top: 30px; }

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin: 58px 0 26px;
}
.section-head__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--site-text) 20%, color-mix(in srgb, var(--site-text) 45%, var(--accent)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head__rule {
  flex: 1;
  height: 1px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* Карточка товара. Наклон и позицию блика задаёт JS через переменные
   --tilt-x, --tilt-y, --mx и --my, поэтому transform собран из них. */
.card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --lift: 0px;
  --mx: 100%;
  --my: 0%;

  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 178px;
  padding: 20px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y))
             translateY(calc(var(--lift) + var(--reveal-y, 0px)));
  transition: transform .5s var(--ease-out), border-color .35s var(--ease), box-shadow .4s var(--ease-out);
}

/* Свечение, следующее за курсором. */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), var(--accent-28), transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
/* Блик, пробегающий по карточке. */
.card::after {
  content: '';
  position: absolute;
  top: -60%; left: -80%;
  width: 45%; height: 220%;
  background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--site-text) 8%, transparent), transparent);
  transform: rotate(12deg);
  transition: left .75s var(--ease-out);
  pointer-events: none;
}
.card:hover {
  --lift: -6px;
  border-color: var(--line-accent);
  box-shadow: var(--shadow-md), var(--glow-lg);
}
.card:hover::before { opacity: 1; }
.card:hover::after { left: 130%; }

.card__media {
  position: relative;
  flex: none;
  width: 112px; height: 112px;
  display: grid;
  place-items: center;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--site-bg-deep) 60%, transparent);
  border: 1px solid var(--line-soft);
  transition: border-color .35s var(--ease), box-shadow .4s var(--ease-out);
}
/* Ореол за иконкой товара. */
.card__media::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-28), transparent 70%);
  filter: blur(18px);
  opacity: .45;
  transition: opacity .4s var(--ease), transform .5s var(--ease-out);
}
.card:hover .card__media { border-color: var(--line-accent); box-shadow: inset 0 0 30px var(--accent-12); }
.card:hover .card__media::before { opacity: 1; transform: scale(1.15); }

.card__media img {
  position: relative;
  width: 86px; height: 86px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .55));
  transition: transform .45s var(--ease-out);
}
.card:hover .card__media img { transform: scale(1.09) translateY(-3px); }

.card__body { position: relative; display: flex; flex-direction: column; min-width: 0; padding-right: 42px; }

.chip {
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--site-surface-alt) 80%, transparent);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--site-muted);
  white-space: nowrap;
}

/* Длинные названия («Ключ от ящика с мега донатом») переносим на две
   строки. Шрифт здесь узкий — широкий Unbounded в карточку не влезает,
   иерархию держим начертанием. */
.card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-top: 10px;
  font-size: 17.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--site-text);
  overflow: hidden;
}

.card__bonus {
  align-self: flex-start;
  margin-top: 8px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--site-success) 45%, transparent);
  background: color-mix(in srgb, var(--site-success) 14%, transparent);
  font-size: 12px;
  font-weight: 800;
  color: var(--site-success);
}

.card__price { margin-top: 12px; display: flex; align-items: baseline; gap: 7px; }
.card__price-from { font-size: 12px; font-weight: 700; color: var(--site-muted); }
.card__price-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 26px var(--accent-45);
}

.card__cta {
  position: absolute;
  top: 20px; right: 20px;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  background: var(--surface-alt);
  color: color-mix(in srgb, var(--site-text) 78%, transparent);
  transition: all .35s var(--ease-out);
}
.card:hover .card__cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  border-color: transparent;
  color: var(--site-button-text);
  box-shadow: var(--glow-md);
  transform: rotate(-8deg) scale(1.08);
}

.empty-note {
  padding: 34px;
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  text-align: center;
  color: var(--site-muted);
  font-weight: 600;
}

/* ---------- 11. Модальные окна ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  background: color-mix(in srgb, var(--site-bg-deep) 78%, transparent);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal.is-open { opacity: 1; pointer-events: auto; }

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--panel);
  box-shadow: var(--shadow-lg), 0 0 100px var(--accent-12);
  overflow: hidden;
  transform: translateY(24px) scale(.96);
  opacity: 0;
  transition: transform .4s var(--ease-out), opacity .3s var(--ease);
}
.modal.is-open .modal__dialog { transform: none; opacity: 1; }

.modal__dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 0% 0%, var(--accent-12), transparent 60%);
  pointer-events: none;
}

.modal__close {
  position: absolute;
  top: 18px; right: 18px;
  z-index: 3;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-alt);
  color: var(--site-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all .28s var(--ease);
}
.modal__close:hover {
  color: var(--site-button-text);
  background: var(--accent);
  border-color: transparent;
  transform: rotate(90deg);
}

.modal__grid {
  position: relative;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 26px;
  padding: 26px;
}

.modal__preview {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--site-bg-deep) 62%, transparent);
  overflow: hidden;
}
.modal__preview::before {
  content: '';
  position: absolute;
  top: 40%; left: 50%;
  width: 260px; height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-28), transparent 68%);
  filter: blur(38px);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: .95; transform: translate(-50%, -50%) scale(1.12); }
}

.modal__preview .chip { position: absolute; top: 18px; left: 18px; z-index: 2; }

.modal__image {
  position: relative;
  width: 228px; height: 228px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .6));
  animation: float-idle 5.5s ease-in-out infinite;
}
@keyframes float-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.modal__title {
  position: relative;
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -.02em;
}
.modal__hint { position: relative; margin-top: 6px; font-size: 13.5px; color: var(--site-muted); text-align: center; }

.modal__form-side { display: flex; flex-direction: column; justify-content: center; }

.field-label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--site-muted);
}

.variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.variant-btn {
  position: relative;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--site-bg-deep) 55%, transparent);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: all .3s var(--ease-out);
}
.variant-btn:hover { border-color: var(--line-accent); transform: translateY(-2px); }
.variant-btn__title {
  display: block;
  padding-right: 14px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--site-text);
}
.variant-btn__price {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
}
.variant-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-12);
  box-shadow: var(--glow-md), inset 0 0 24px var(--accent-08);
}
.variant-btn.is-active::after {
  content: '';
  position: absolute;
  top: 10px; right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

/* Итоговая цена. */
.total-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-accent);
  border-radius: var(--r-xl);
  background: linear-gradient(100deg, var(--accent-18), color-mix(in srgb, var(--site-bg-deep) 80%, transparent) 62%);
  box-shadow: var(--glow-md);
  overflow: hidden;
}
.total-bar__side { display: flex; align-items: center; gap: 14px; min-width: 0; }
.total-bar__icon {
  width: 46px; height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line-accent);
  background: var(--accent-18);
  color: var(--accent);
}
.total-bar__title { font-size: 16px; font-weight: 800; }
.total-bar__sub { font-size: 12.5px; color: var(--site-muted); }
.total-bar__price {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-45);
}
.total-bar__price.is-bumped { animation: price-bump .45s var(--ease-out); }
@keyframes price-bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.total-bar__cur { display: block; margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--site-muted); text-align: right; }

/* ---------- 12. Формы ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon {
  position: absolute;
  left: 16px;
  color: var(--site-muted);
  pointer-events: none;
  transition: color .25s var(--ease);
}
.input-wrap:focus-within > .icon { color: var(--accent); }

.input {
  width: 100%;
  padding: 15px 16px 15px 46px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--site-bg-deep) 62%, transparent);
  color: var(--site-text);
  font-weight: 600;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.input::placeholder { color: color-mix(in srgb, var(--site-muted) 78%, transparent); font-weight: 500; }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-18);
}
.input.is-valid { border-color: var(--site-success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-success) 18%, transparent); }
.input.is-invalid { border-color: var(--site-danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-danger) 18%, transparent); }

.form-note { min-height: 18px; margin-top: 7px; font-size: 12.5px; font-weight: 700; color: var(--site-danger); }
.form-note.is-ok { color: var(--site-success); }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--site-bg-deep) 45%, transparent);
  font-size: 13.5px;
  color: var(--site-muted);
  cursor: pointer;
  transition: border-color .25s var(--ease);
}
.agree:hover { border-color: var(--line-accent); }
.agree input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; }
.agree a { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.agree a:hover { color: var(--accent-soft); }

.buy-btn { margin-top: 6px; padding: 17px 24px; font-size: 16.5px; border-radius: var(--r-lg); }

/* ---------- 13. Выбор оплаты ---------- */
.pay-dialog { max-width: 620px; }
.pay-dialog__inner { position: relative; padding: 34px 28px 30px; text-align: center; }
.pay-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.pay-sub { margin-top: 10px; font-size: 14px; color: var(--site-muted); }

.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.pay-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--site-bg-deep) 55%, transparent);
  cursor: pointer;
  overflow: hidden;
  transition: all .35s var(--ease-out);
}
.pay-option:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--line-accent);
  background: var(--accent-08);
  box-shadow: var(--glow-md);
}
.pay-option img { width: 88px; height: 88px; object-fit: contain; transition: transform .4s var(--ease-out); }
.pay-option:hover:not(:disabled) img { transform: scale(1.07); }
.pay-option__brands { height: 88px; display: grid; align-content: center; gap: 6px; }
.pay-option__brands img { width: 72px; height: 28px; padding: 5px 8px; border-radius: 6px; background: #fff; }
.pay-option span { font-size: 14px; font-weight: 700; color: var(--site-text); }
.pay-option:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 14. Подвал ---------- */
.site-footer { padding: 60px 0 36px; }

.footer-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.footer-card::before {
  content: '';
  position: absolute;
  right: -140px; bottom: -160px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-18), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}
.footer-col { position: relative; display: flex; flex-direction: column; gap: 14px; }
.footer-col--end { align-items: flex-start; }
.footer-col h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.footer-text { font-size: 13.5px; line-height: 1.7; color: var(--site-muted); }
.footer-text strong { color: var(--site-text); font-weight: 800; }

.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--site-bg-deep) 62%, transparent);
  font-size: 13px;
  font-weight: 600;
  color: var(--site-muted);
  transition: all .25s var(--ease);
}
a.footer-pill:hover { color: var(--site-text); border-color: var(--line-accent); background: var(--accent-08); }

.footer-contacts { display: flex; flex-wrap: wrap; gap: 10px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links a {
  padding: 10px 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 800;
  transition: all .25s var(--ease);
}
.footer-links a:hover { border-color: var(--line-accent); background: var(--accent-08); color: var(--accent); }
.footer-links a.is-accent { border-color: var(--line-accent); background: var(--accent-08); color: var(--accent); }
.footer-links a.is-accent:hover { background: var(--accent-18); color: var(--accent-soft); }

.pay-logos { display: flex; flex-wrap: wrap; gap: 10px; }
.pay-logos div {
  height: 54px;
  min-width: 84px;
  padding-inline: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--site-bg-deep) 62%, transparent);
  transition: all .3s var(--ease-out);
}
.pay-logos div:hover { border-color: var(--line-accent); transform: translateY(-3px); box-shadow: var(--glow-sm); }
.pay-logos img { height: 28px; object-fit: contain; }
.pay-logos .pay-logo-international { display: flex; gap: 7px; color: var(--site-text); font-size: 12px; font-weight: 700; }
.pay-logo-international svg { width: 24px; height: 24px; color: var(--accent); }

.support-card {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line-accent);
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, var(--accent-18), color-mix(in srgb, var(--site-bg-deep) 78%, transparent) 70%);
  box-shadow: var(--glow-sm);
}
.support-card__title { font-weight: 800; margin-bottom: 6px; }
.support-card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-weight: 800;
  color: var(--accent);
  transition: gap .25s var(--ease), color .25s var(--ease);
}
.support-card__link:hover { gap: 12px; color: var(--accent-soft); }

.footer-bottom {
  max-width: var(--container);
  margin: 20px auto 0;
  padding-inline: 20px;
  text-align: center;
  font-size: 12.5px;
  color: color-mix(in srgb, var(--site-muted) 80%, transparent);
}

/* ---------- 15. Уведомления ---------- */
.flash-stack {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(520px, calc(100% - 32px));
}
.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel-glass);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  font-weight: 700;
  animation: slide-down .4s var(--ease-out) both;
}
.flash--success { border-left: 3px solid var(--site-success); }
.flash--error { border-left: 3px solid var(--site-danger); }
.flash button { background: none; border: 0; color: var(--site-muted); font-size: 20px; line-height: 1; cursor: pointer; }
.flash button:hover { color: var(--site-text); }
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 16. Кнопка «наверх» ---------- */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 70;
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-accent);
  border-radius: var(--r-md);
  background: var(--panel-glass);
  backdrop-filter: blur(14px);
  color: var(--accent);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: all .35s var(--ease-out);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: var(--site-button-text);
  box-shadow: var(--glow-md);
  transform: translateY(-3px);
}

/* ---------- 17. Появление при прокрутке ---------- */
.reveal {
  --reveal-y: 26px;
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { --reveal-y: 0px; opacity: 1; }

/* У карточки transform уже занят наклоном, поэтому сдвиг появления
   подмешивается в него, а не перебивает целиком. */
.card.reveal {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y))
             translateY(calc(var(--lift) + var(--reveal-y)));
  transition: transform .6s var(--ease-out) var(--reveal-delay, 0ms),
              opacity .7s var(--ease-out) var(--reveal-delay, 0ms),
              border-color .35s var(--ease),
              box-shadow .4s var(--ease-out);
}
/* Появление отыграно — задержка больше не нужна. */
.card.reveal.is-visible {
  transition: transform .5s var(--ease-out),
              opacity .7s var(--ease-out),
              border-color .35s var(--ease),
              box-shadow .4s var(--ease-out);
}
/* Пока курсор внутри — реагируем почти мгновенно. */
.card.reveal.is-tilting {
  transition: transform .12s linear,
              border-color .35s var(--ease),
              box-shadow .4s var(--ease-out);
}

/* ---------- 18. Адаптив ---------- */
@media (max-width: 1180px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-nav a { padding: 9px 11px; font-size: 13px; }
  .footer-card { grid-template-columns: 1fr 1fr; }
  .footer-col--end { grid-column: span 2; }
}

@media (max-width: 980px) {
  .modal__grid { grid-template-columns: 1fr; }
  .modal__preview { min-height: 300px; }
  .site-nav { display: none; }
}

@media (max-width: 760px) {
  :root { --header-h: 68px; }
  .container { padding-inline: 14px; }
  .site-header { padding-inline: 14px; }
  .burger { display: inline-flex; }
  .header-bar .ip-card { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .card { gap: 16px; padding: 16px; min-height: 0; }
  .card__media { width: 96px; height: 96px; }
  .card__media img { width: 74px; height: 74px; }
  .card__body { padding-right: 8px; }
  .card__cta { position: static; margin-left: auto; align-self: center; }
  .hero__media { height: 380px; }
  .hero__content { padding: 20px 16px 24px; gap: 12px; }
  .hero__tagline { font-size: 15px; line-height: 1.4; }
  .hero__badge { padding: 7px 13px; font-size: 12px; }
  .hero__actions { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .hero__actions .btn { flex: 1 1 auto; padding: 13px 10px; font-size: 13.5px; gap: 7px; }
  .hero-bar { flex-direction: column; align-items: stretch; margin-top: -20px; }
  .hero-bar__ip { justify-content: space-between; }
  .copy-btn { width: 100%; }
  .variant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-card { grid-template-columns: 1fr; padding: 24px; }
  .footer-col--end { grid-column: auto; }
  .pay-grid { grid-template-columns: 1fr; }
  .section-head { margin: 40px 0 20px; }
  .cat-nav__inner { padding: 6px; }
  .cat-btn { min-width: 0; padding: 11px 16px; font-size: 13.5px; }
  .modal { padding: 14px 10px; }
  .modal__grid { padding: 18px; gap: 18px; }
  .total-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .total-bar__cur { text-align: left; }
}

@media (max-width: 420px) {
  .brand__name { font-size: 18px; }
}

/* ---------- 19. Уважение к настройкам доступности ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .ambient__orb { animation: none; }
}

/* Cart: uses the same theme tokens, surfaces and buttons as the catalog. */
.cart-trigger { gap: 7px; padding: 11px 13px; white-space: nowrap; }
.cart-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: var(--r-pill); background: var(--accent); color: var(--site-button-text); font-size: 12px; font-weight: 800; }
.cart-count.is-bumped { animation: cart-bump .32s var(--ease-out); }
@keyframes cart-bump { 50% { transform: scale(1.25); } }
#modal [hidden], .cart-toast[hidden] { display: none !important; }
#modal:not(.is-cart) .modal__dialog { max-width: 850px; }
#modal:not(.is-cart) .modal__grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
#modal.is-cart .modal__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
#modal.is-cart .modal__preview { align-items: stretch; justify-content: flex-start; padding: 20px; }
#modal.is-cart .modal__preview::before { opacity: .25; pointer-events: none; }
#modal.is-cart .modal__title { text-align: left; margin: 0; }
#modal.is-cart .modal__hint { text-align: left; margin-bottom: 12px; }
.cart-list { position: relative; display: grid; gap: 9px; max-height: 53vh; overflow-y: auto; overscroll-behavior: contain; padding: 2px 3px 4px; }
.cart-line { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r-md); }
.cart-line img { width: 48px; height: 48px; object-fit: contain; }
.cart-line__info { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.cart-line__info strong { font-size: 14px; }
.cart-line__info small { color: var(--site-muted); font-size: 12px; }
.cart-line__price { color: var(--accent-soft); font-weight: 800; font-size: 14px; }
.cart-line__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; grid-column: 2 / -1; }
.cart-line__actions button { padding: 5px 10px; min-width: 30px; min-height: 30px; border-radius: var(--r-sm); font-size: 12px; }
.cart-line__actions button:disabled { opacity: .45; }
.cart-line__remove { margin-left: auto; }
.cart-clear { position: relative; align-self: flex-end; padding: 8px 12px; margin-top: 8px; font-size: 12px; }
.cart-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 13px 15px; background: var(--panel); border: 1px solid var(--line-accent); border-radius: var(--r-lg); box-shadow: var(--shadow-md), var(--glow-md); font-size: 13px; }
.cart-toast .btn { flex: none; padding: 8px 12px; font-size: 12px; }
@media (max-width: 950px) { #modal.is-cart .modal__grid, #modal:not(.is-cart) .modal__grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cart-trigger { padding: 9px; } .cart-trigger__label { display: none; } .cart-list { max-height: 45vh; } #modal.is-cart .modal__preview { padding: 16px; } .cart-toast { bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .cart-count.is-bumped { animation: none; } }
@media (max-width: 980px) { #modal.is-cart .modal__grid, #modal:not(.is-cart) .modal__grid { grid-template-columns: 1fr; } }
#modal.is-cart .modal__preview { min-height: 0; }
