/* ============================================================
   Оформление витрины в духе apple.com (правила — CLAUDE.md в корне проекта).
   Простор, типографическая иерархия, сдержанная палитра тёмной темы Apple:
   графитовый фон, карточки темнее фона, чёрные плитки для акцентных блоков,
   синий — только для действий. Скругления 12–20px, мягкие двухслойные тени, кнопки-таблетки.

   Прежние имена переменных (--bg, --surface, --accent…) сохранены: на них
   держатся admin.css и встроенные стили в разметке.
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---- токены Apple, тёмная тема ---- */
  --apple-bg-white: #FFFFFF;
  --apple-bg-dark: #1D1D1F;
  --apple-bg-page: #232326;
  --apple-bg-card: #19191B;
  --apple-bg-fill: #2C2C2F;
  --apple-bg-elevated: #242427;

  --apple-text-primary: #F5F5F7;
  --apple-text-secondary: #A1A1A6;
  --apple-text-tertiary: #86868B;
  --apple-text-on-dark: #F5F5F7;
  --apple-text-white: #FFFFFF;

  --apple-link-blue: #2997FF;
  --apple-link-blue-hover: #47A6FF;
  --apple-button-blue: #0071E3;
  --apple-button-blue-hover: #0077ED;
  --apple-accent-green: #30D158;
  --apple-accent-orange: #FF9F0A;
  --apple-accent-red: #FF453A;

  --apple-section-gap: 100px;
  --apple-section-gap-sm: 80px;
  --apple-component-gap-sm: 16px;
  --apple-component-gap-md: 32px;
  --apple-component-gap-lg: 48px;
  --apple-card-padding: 32px;
  --apple-card-padding-sm: 24px;

  --apple-weight-title: 600;
  --apple-weight-title-bold: 700;
  --apple-weight-body: 400;
  --apple-weight-body-medium: 500;

  --apple-radius-card: 18px;
  --apple-radius-card-sm: 12px;
  --apple-radius-card-lg: 28px;
  --apple-radius-button: 980px;
  --apple-radius-badge: 8px;

  /* На тёмном фоне одной тени мало: тонкая светлая кромка отделяет карточку от фона. */
  --apple-shadow-card: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.28), 0 8px 24px rgba(0, 0, 0, 0.32);
  --apple-shadow-hover: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.34), 0 16px 40px rgba(0, 0, 0, 0.45);
  --apple-shadow-sm: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 1px 4px rgba(0, 0, 0, 0.24), 0 4px 12px rgba(0, 0, 0, 0.26);
  --apple-shadow-modal: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 20px rgba(0, 0, 0, 0.4), 0 24px 70px rgba(0, 0, 0, 0.6);

  --apple-gradient-text-blue: linear-gradient(90deg, #2997FF, #5AC8FA);
  --apple-gradient-text-purple: linear-gradient(90deg, #A855F7, #E040A0);
  --apple-gradient-bg-dark: linear-gradient(180deg, #1D1D1F 0%, #000000 100%);

  --apple-tracking-title: -0.022em;
  --apple-tracking-title-loose: -0.01em;
  --apple-leading-title: 1.08;
  --apple-leading-body: 1.53;

  /* SF — на устройствах Apple, Inter — на остальных (Helvetica и Arial на Windows
     выглядят заметно хуже, поэтому Inter стоит раньше них). */
  --apple-font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --apple-font-text: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* ---- прежние имена: псевдонимы на токены Apple ---- */
  --bg: var(--apple-bg-page);
  --bg-soft: var(--apple-bg-elevated);
  --surface: var(--apple-bg-card);
  --surface-2: var(--apple-bg-fill);
  --surface-3: #3A3A3D;
  --line: #424246;
  --line-soft: #2F2F33;
  --text: var(--apple-text-primary);
  --muted: var(--apple-text-secondary);
  --muted-2: var(--apple-text-tertiary);

  --accent: var(--apple-button-blue);
  --accent-2: var(--apple-link-blue);
  --accent-deep: #0058B0;
  --accent-soft: rgba(41, 151, 255, 0.14);
  --accent-glow: rgba(41, 151, 255, 0.3);

  --blood: #FF453A;
  --blood-2: #D70015;
  --ember: #FF9F0A;

  --green: var(--apple-accent-green);
  --red: var(--apple-accent-red);
  --amber: var(--apple-accent-orange);

  --radius: var(--apple-radius-card);
  --radius-sm: var(--apple-radius-card-sm);
  --shadow: var(--apple-shadow-modal);
  --shadow-sm: var(--apple-shadow-sm);

  --font: var(--apple-font-text);
  --font-display: var(--apple-font-display);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* Страница никогда не едет вбок. clip, а не hidden: hidden сделал бы body
   контейнером прокрутки и сломал бы прилипающую шапку. */
html { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: var(--apple-leading-body);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: var(--apple-weight-title);
  letter-spacing: var(--apple-tracking-title);
  line-height: var(--apple-leading-title);
}

h1 { font-weight: var(--apple-weight-title-bold); }

::selection { background: rgba(0, 113, 227, 0.2); }

:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.45); outline-offset: 2px; }

.container {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}

.corners { position: relative; }

/* ---------------- шапка ---------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(29, 29, 31, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 64px;
  min-width: 0;
}

.header__inner > * { min-width: 0; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--text);
}

.logo__mark { width: 34px; height: 34px; flex-shrink: 0; }

.nav { display: flex; gap: 2px; margin-left: 10px; }

.nav a {
  padding: 8px 12px;
  border-radius: var(--apple-radius-button);
  color: var(--text);
  opacity: 0.72;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover { opacity: 1; }
.nav a.is-active { opacity: 1; background: rgba(255, 255, 255, 0.1); }

.header__search { flex: 1; max-width: 320px; position: relative; margin-left: auto; }

.header__search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border-radius: var(--apple-radius-button);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  outline: none;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.header__search input::placeholder { color: var(--muted-2); }

.header__search input:focus {
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(41, 151, 255, 0.22), inset 0 0 0 1px var(--accent);
}

.header__search::before {
  content: '⌕';
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-52%);
  color: var(--muted-2);
  font-size: 17px;
  pointer-events: none;
}

.header__actions { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* В кнопке справа стоит имя покупателя, а оно любой длины. Даём ей ужиматься
   с многоточием, иначе длинное имя выталкивает шапку за край экрана. */
.header__actions .btn {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Кабинет в шапке: рядом с именем всегда видна сумма на балансе. Она
   списывается при оформлении заказа и пополняется возвратами, поэтому нужна
   на любой странице, а не только в кабинете. Ужимается только имя —
   сумма должна читаться целиком. */
.header__actions .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(320px, 46vw);
}

.user-chip__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip__balance {
  flex: none;
  padding: 2px 9px;
  border-radius: var(--apple-radius-button);
  background: rgba(48, 209, 88, 0.16);
  color: var(--green);
  font-weight: var(--apple-weight-title);
  font-variant-numeric: tabular-nums;
}

/* Пустой баланс не подсвечиваем зелёным: хвастаться нечем. */
.user-chip__balance--zero {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.user-chip__discount { flex: none; color: var(--muted); }

/* Кнопка меню: на широком экране ссылки видны и так, она не нужна.
   Селектор с .header — иначе правило .icon-btn ниже перебивает display. */
.header .header__burger { display: none; }

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.2s var(--ease);
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }

.badge {
  position: absolute;
  top: 1px;
  right: -1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--apple-radius-button);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---------------- кнопки ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--apple-radius-button);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.12s var(--ease), color 0.2s var(--ease);
}

.btn:hover { background: var(--apple-button-blue-hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }

.btn--soft { background: var(--accent-soft); color: var(--accent-2); }
.btn--soft:hover { background: rgba(0, 113, 227, 0.15); }

.btn--danger {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.45);
  color: var(--red);
}

.btn--danger:hover { background: rgba(255, 69, 58, 0.14); }

.btn--block { width: 100%; }
.btn--sm { padding: 7px 14px; font-size: 13px; }
.btn--lg { padding: 13px 26px; font-size: 17px; }

.btn--tg { background: #229ED9; color: #fff; }
.btn--tg:hover { background: #1B8CC2; }

/* ---------------- тёмные плитки: главная и поддержка ---------------- */

.hero,
.support-hero {
  position: relative;
  overflow: hidden;
  color: var(--apple-text-white);
  background:
    radial-gradient(60% 90% at 88% 18%, rgba(41, 151, 255, 0.34) 0%, transparent 60%),
    radial-gradient(55% 80% at 12% 110%, rgba(168, 85, 247, 0.26) 0%, transparent 62%),
    var(--apple-gradient-bg-dark);
  border-radius: var(--apple-radius-card-lg);
}

/* Кнопки и ссылки на тёмном фоне. */
.hero .btn--ghost,
.support-hero .btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }

.hero .btn--ghost:hover,
.support-hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.22); }

.hero {
  margin: 24px 0 20px;
  padding: 76px 64px 60px;
}

.hero > * { position: relative; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.4vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 13ch;
}

/* Длинный заголовок с названиями игр (он же H1 для поиска) — мельче и шире,
   иначе крупным шрифтом он растягивается на полэкрана. */
.hero h1.hero__title--long {
  font-size: clamp(32px, 3.9vw, 54px);
  line-height: 1.06;
  max-width: 20ch;
}

.hero h1 em {
  font-style: normal;
  background: var(--apple-gradient-text-blue);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.45;
  letter-spacing: -0.012em;
  max-width: 44ch;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__grid { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; }

.hero__logo {
  width: 100%;
  max-width: 240px;
  margin-inline: auto;
  filter: drop-shadow(0 24px 60px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 40px rgba(41, 151, 255, 0.25));
  animation: float 7s ease-in-out infinite;
}

@keyframes float { 50% { transform: translateY(-12px); } }

.hero__facts {
  display: flex;
  gap: 0;
  margin-top: 52px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}

.fact { padding-right: 32px; margin-right: 32px; border-right: 1px solid rgba(255, 255, 255, 0.12); }
.fact:last-child { border-right: 0; }

.fact strong {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}

.fact span { color: rgba(255, 255, 255, 0.56); font-size: 13px; }

.hero__proof {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.hero__proof b { color: #fff; font-weight: 600; }

/* ---------------- разделы ---------------- */

.section { margin-bottom: 88px; }

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section__head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section__head a {
  color: var(--accent-2);
  font-size: 15px;
  white-space: nowrap;
}

.section__head a:hover { text-decoration: underline; }

/* ---------------- сетки и карточки ---------------- */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
}

.grid--cats { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.cat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.cat-card:hover { box-shadow: var(--apple-shadow-hover); transform: translateY(-3px); }
.cat-card__icon { font-size: 26px; }
.cat-card strong { display: block; font-size: 16px; font-weight: 600; }
.cat-card span { color: var(--muted); font-size: 13px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-card);
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--apple-shadow-hover);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card__media img { transform: scale(1.04); }

.card__tags {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: none;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--apple-radius-button);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: rgba(29, 29, 31, 0.72);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tag--sale { color: var(--red); }
.tag--eta { color: var(--accent-2); }
.tag--hit,
.tag--new,
.tag--custom { color: var(--text); }
.tag--out { color: var(--muted); margin-left: auto; }

.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; gap: 6px; }

.card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.018em;
  transition: color 0.2s var(--ease);
}

.card__title:hover { color: var(--accent-2); }
.card__sub { color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.card__note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.price strong {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.price s { color: var(--muted-2); font-size: 14px; }

.stock { font-size: 13px; color: var(--muted); }
.stock--low { color: var(--amber); }
.stock--out { color: var(--red); }

.save-badge,
.low-stock {
  color: var(--amber);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.save-badge { color: var(--green); }

/* ---------------- каталог ---------------- */

.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; margin-top: 8px; }

.filters {
  position: sticky;
  top: 88px;
  padding: 20px 14px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
}

.filters h3 {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted-2);
}

.filters__list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }

.filters__list button {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  transition: background 0.2s var(--ease);
}

.filters__list button:hover { background: var(--surface-2); }
.filters__list button.is-active { background: var(--accent-soft); color: var(--accent-2); font-weight: 500; }

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 22px;
  flex-wrap: wrap;
}

.toolbar h1 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.toolbar__meta { color: var(--muted); font-size: 14px; margin-top: 6px; }

select.input, input.input, textarea.input {
  padding: 11px 14px;
  border-radius: var(--apple-radius-card-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}

select.input:focus, input.input:focus, textarea.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

input.input::placeholder, textarea.input::placeholder { color: var(--muted-2); }
input.input[readonly] { background: var(--surface-2); color: var(--muted); }

select.input { width: auto; cursor: pointer; }
textarea.input { resize: vertical; min-height: 96px; font-family: inherit; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--apple-radius-button);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.chip-btn:hover { box-shadow: inset 0 0 0 1px var(--muted-2); }
.chip-btn.is-active { background: var(--text); color: var(--bg); box-shadow: none; }
.chip-btn.is-sale.is-active { background: var(--red); color: #fff; }
.chip-btn span { color: var(--muted-2); font-size: 12px; }
.chip-btn.is-active span { color: rgba(0, 0, 0, 0.55); }

/* ---------------- страница категорий ---------------- */

.cat-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 230px;
  padding: 24px;
  border-radius: var(--apple-radius-card);
  background: var(--apple-bg-dark);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--apple-shadow-card);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--apple-shadow-hover); }

.cat-tile__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.75;
  transition: transform 0.6s var(--ease), opacity 0.3s var(--ease);
}

.cat-tile:hover .cat-tile__bg { opacity: 0.85; transform: scale(1.05); }

.cat-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.78) 100%);
}

.cat-tile > :not(.cat-tile__bg) { position: relative; z-index: 1; }
.cat-tile__icon { font-size: 28px; margin-bottom: auto; }
.cat-tile h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.cat-tile p { margin: 0 0 12px; color: rgba(255, 255, 255, 0.75); font-size: 14px; }

.cat-tile__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.cat-tile__meta b { color: #fff; font-weight: 600; }

.cat-tile__sale {
  padding: 3px 10px;
  border-radius: var(--apple-radius-button);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
}

/* ---------------- выбор игры для подбора аккаунта ---------------- */

.game-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.game-tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  border-radius: var(--apple-radius-card-lg);
  background: var(--apple-bg-dark);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--apple-shadow-card);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.game-tile:hover { transform: translateY(-4px); box-shadow: var(--apple-shadow-hover); }

.game-tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.game-tile:hover .game-tile__bg { transform: scale(1.05); }

.game-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.82) 100%);
}

.game-tile__body {
  position: relative;
  z-index: 1;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game-tile__body strong {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.game-tile__body span { font-size: 14px; color: rgba(255, 255, 255, 0.75); }

/* ---------------- полоса акций ---------------- */

.sale-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px 32px;
  margin-bottom: 20px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
}

.sale-banner h2 { margin: 0 0 6px; font-size: 26px; font-weight: 700; letter-spacing: -0.025em; }
.sale-banner p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------------- страница товара ---------------- */

.product { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 44px; align-items: start; margin: 32px 0 56px; }

.product__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--apple-radius-card-lg);
  background: var(--surface);
  box-shadow: var(--apple-shadow-card);
}

.product__media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.product h1 { margin: 0 0 10px; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.028em; line-height: 1.1; }
.product__sub { color: var(--muted); font-size: 17px; margin: 0 0 24px; }

.product__buy {
  padding: 26px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-card);
  margin-bottom: 18px;
}

.product__price { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

.product__price strong {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.product__price s { color: var(--muted-2); font-size: 19px; }

.product__price .save {
  padding: 4px 11px;
  border-radius: var(--apple-radius-button);
  background: rgba(48, 209, 88, 0.14);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.qty {
  display: flex;
  align-items: center;
  border-radius: var(--apple-radius-button);
  background: var(--surface-2);
  overflow: hidden;
}

.qty button {
  /* flex: none — иначе на узком экране кнопки ужимаются до 25px,
     и в «плюс» уже не попасть пальцем. */
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 19px;
  transition: background 0.2s var(--ease);
}

.qty button:hover { background: rgba(255, 255, 255, 0.1); }
.qty input { width: 48px; height: 42px; border: 0; background: transparent; text-align: center; outline: none; font-weight: 600; }

.meta-list { display: grid; }

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}

.meta-list div:last-child { border-bottom: 0; }
.meta-list span:first-child { color: var(--muted); }

.prose { color: #D2D2D7; line-height: 1.7; white-space: pre-wrap; }

.panel {
  position: relative;
  padding: 28px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
}

.panel + .panel { margin-top: 18px; }

/* В сетке панели уже разложены с отступом grid: вертикальный запас лишний,
   из-за него соседние плитки съезжают вниз и выглядят разной высоты. */
.grid .panel + .panel { margin-top: 0; }
.panel h2 { margin: 0 0 18px; font-size: 22px; font-weight: 600; letter-spacing: -0.022em; }
.panel h3 { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -0.018em; }

.eta-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--apple-radius-card-sm);
  background: var(--accent-soft);
}

.eta-note__icon { font-size: 18px; line-height: 1.35; }
.eta-note strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; color: var(--text); }
.eta-note p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------------- корзина и оформление ---------------- */

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; margin: 32px 0 56px; }

.cart-row {
  display: grid;
  grid-template-columns: 88px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 88px; height: 58px; object-fit: cover; border-radius: 10px; }
.cart-row__title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.cart-row__meta { color: var(--muted); font-size: 13px; }

.summary { position: sticky; top: 88px; }
.summary__row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 15px; color: var(--muted); }
.summary__row strong { color: var(--text); font-weight: 500; }
.summary__row--accent span, .summary__row--accent strong { color: var(--green); }

.summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.summary__total strong {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.028em;
  color: var(--text);
}

.promo-form { display: flex; gap: 8px; margin: 6px 0 16px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.field .hint { margin-top: 7px; font-size: 13px; color: var(--muted-2); }

/* ---------------- заказ ---------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: var(--apple-radius-button);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--muted);
}

.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.status--paid, .status--delivered { background: rgba(48, 209, 88, 0.14); color: var(--green); }
.status--pending { background: rgba(255, 159, 10, 0.14); color: var(--amber); }
.status--processing { background: var(--accent-soft); color: var(--accent-2); }
.status--canceled, .status--failed, .status--refunded { background: rgba(255, 69, 58, 0.14); color: var(--red); }
.status--ticket-open { background: rgba(255, 159, 10, 0.14); color: var(--amber); }
.status--ticket-answered { background: rgba(48, 209, 88, 0.14); color: var(--green); }
.status--ticket-closed { background: var(--surface-3); color: var(--muted); }

.secret {
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 14px;
  padding: 13px 16px;
  border-radius: var(--apple-radius-card-sm);
  background: var(--surface-2);
  color: var(--text);
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.secret + .secret { margin-top: 8px; }

.secret button {
  flex-shrink: 0;
  padding: 5px 12px;
  border: 0;
  border-radius: var(--apple-radius-button);
  background: var(--surface);
  color: var(--accent-2);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--apple-shadow-sm);
}

.secret button:hover { background: var(--surface-3); color: var(--apple-link-blue-hover); }

/* ---------------- личный кабинет ---------------- */

.account { display: grid; grid-template-columns: 250px 1fr; gap: 28px; align-items: start; margin: 32px 0 56px; }

.account__nav { display: flex; flex-direction: column; gap: 2px; }

.account__nav button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: 15px;
  transition: background 0.2s var(--ease);
}

.account__nav button:hover { background: rgba(255, 255, 255, 0.08); }
.account__nav button.is-active { background: var(--surface); font-weight: 600; box-shadow: var(--apple-shadow-sm); }

.profile-card {
  padding: 22px;
  border-radius: var(--apple-radius-card);
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(41, 151, 255, 0.35), transparent 60%),
    var(--apple-gradient-bg-dark);
  margin-bottom: 18px;
  box-shadow: var(--apple-shadow-card);
}

.profile-card .muted,
.profile-card .small { color: rgba(255, 255, 255, 0.7); }

.profile-card > div:nth-child(2) { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }

.discount-pct { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: #fff; }

.order-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.order-row:last-child { border-bottom: 0; }
.order-row__id { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 14px; color: var(--accent-2); }
.order-row__meta { color: var(--muted); font-size: 14px; flex: 1; }

/* ---------------- модальные окна ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade 0.22s var(--ease);
}

@keyframes fade { from { opacity: 0; } }

.modal {
  position: relative;
  width: min(440px, 100%);
  border-radius: 22px;
  background: #2A2A2D;
  box-shadow: var(--apple-shadow-modal);
  padding: 32px;
  animation: rise 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes rise { from { transform: translateY(16px) scale(0.98); opacity: 0; } }

.modal h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.028em; }
.modal p.modal__sub { margin: 0 0 24px; color: var(--muted); font-size: 15px; }

.modal__close {
  float: right;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin: -10px -10px 0 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.modal__close:hover { background: var(--surface-3); color: var(--text); }

.social-row { display: grid; gap: 10px; margin-bottom: 20px; }

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px;
  border: 0;
  border-radius: var(--apple-radius-card-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.social-btn:hover { background: var(--surface-2); }
.social-btn--vk { color: #0077FF; }
.social-btn--google { color: var(--text); }
.social-btn--tg { color: #229ED9; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted-2); font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

.code-input { letter-spacing: 14px; text-align: center; font-size: 26px; font-weight: 600; padding: 16px; color: var(--text); }

/* ---------------- уведомления ---------------- */

.alert { padding: 13px 16px; border-radius: var(--apple-radius-card-sm); font-size: 14px; margin-bottom: 14px; }
.alert--error { background: rgba(255, 69, 58, 0.14); color: #FF6961; }
.alert--ok { background: rgba(48, 209, 88, 0.14); color: #4CD964; }
.alert--info { background: var(--surface-2); color: var(--text); }
/* Не ошибка, но требует внимания: например, игра без наценки скрыта от покупателей. */
.alert--warn { background: rgba(255, 159, 10, 0.14); color: #FFB340; }

.empty { text-align: center; padding: 72px 20px; color: var(--muted); }
.empty__icon { font-size: 48px; margin-bottom: 14px; }
.empty h2, .empty h3 { color: var(--text); font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.empty p { margin: 0 0 22px; }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: 14px;
  background: rgba(44, 44, 46, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--apple-shadow-modal);
  font-size: 14px;
  animation: rise 0.28s var(--ease);
  max-width: 340px;
}

.toast::before { content: ''; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--accent); }
.toast--error::before { background: var(--red); }
.toast--ok::before { background: var(--green); }

.skeleton {
  border-radius: var(--apple-radius-card);
  background: linear-gradient(90deg, #252528 25%, #2F2F33 37%, #252528 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  min-height: 280px;
}

@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.stack { display: grid; gap: 12px; }

/* ---------------- подвал ---------------- */

.footer {
  margin-top: 88px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer a { color: var(--text); }
.footer a:hover { text-decoration: underline; }

.footer-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.footer-docs a {
  padding: 7px 14px;
  border-radius: var(--apple-radius-button);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--text);
  font-size: 13px;
  transition: box-shadow 0.2s var(--ease);
}

.footer-docs a:hover { text-decoration: none; box-shadow: inset 0 0 0 1px var(--muted-2); }

.footer-code { margin-top: 10px; color: var(--muted-2); font-size: 12px; }

/* ---------------- страница поддержки ---------------- */

.support-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 48px 48px;
  margin: 24px 0 28px;
}

.support-hero > * { position: relative; z-index: 1; }
.support-hero h1 { margin: 0 0 12px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.03em; }
.support-hero p { margin: 0 0 18px; color: rgba(255, 255, 255, 0.72); font-size: 17px; max-width: 52ch; }
.support-hero__meta { display: flex; gap: 22px; flex-wrap: wrap; color: rgba(255, 255, 255, 0.6); font-size: 14px; }
.support-hero__meta a { color: #fff; }
.support-hero__actions { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }

.support-grid { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.support-tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.85; }
.support-tips li::marker { color: var(--muted-2); }

.faq { display: grid; gap: 10px; }

.faq__item { border-radius: 14px; background: var(--surface-2); overflow: hidden; }

.faq__item summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.012em;
  list-style: none;
}

.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; float: right; color: var(--muted-2); font-weight: 400; font-size: 18px; line-height: 1; }
.faq__item[open] summary::after { content: '−'; }
.faq__answer { padding: 0 18px 18px; color: var(--muted); font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; }

.ticket-row {
  display: block;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface-2);
  transition: background 0.2s var(--ease);
}

.ticket-row:hover { background: var(--surface-3); }
.ticket-row__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ticket-row strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }

.ticket-row__dot {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: var(--apple-radius-button);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.chat { display: grid; gap: 12px; margin: 16px 0; }

.chat__msg { max-width: 78%; padding: 14px 18px; border-radius: 20px; background: var(--surface-2); }

.chat__msg--user { margin-left: auto; background: rgba(41, 151, 255, 0.16); border-bottom-right-radius: 6px; }
.chat__msg--admin { margin-right: auto; border-bottom-left-radius: 6px; }

.chat__meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted-2);
}

.chat__meta strong { color: var(--text); font-size: 13px; font-weight: 600; }
.chat__text { white-space: pre-wrap; line-height: 1.6; font-size: 15px; }

/* ---------------- блок доверия ---------------- */

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.trust__item {
  display: flex;
  gap: 14px;
  padding: 22px 22px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
}

.trust__icon { font-size: 22px; line-height: 1.25; }
.trust__item strong { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.012em; margin-bottom: 4px; }
.trust__item span { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

/* ---------------- промокод на главной ---------------- */

.promo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 28px;
  margin: 0 0 88px;
  border-radius: var(--apple-radius-card);
  background:
    radial-gradient(70% 140% at 0% 50%, rgba(0, 113, 227, 0.1), transparent 70%),
    var(--surface);
  box-shadow: var(--apple-shadow-sm);
}

.promo-strip__text strong { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.promo-strip__text p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.promo-strip__code {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1.5px dashed rgba(0, 113, 227, 0.5);
  border-radius: var(--apple-radius-button);
  background: var(--accent-soft);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.promo-strip__code:hover { background: rgba(0, 113, 227, 0.15); }
.promo-strip__code span { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--muted); }

/* ---------------- гарантия ---------------- */

.guarantee {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(48, 209, 88, 0.1);
}

.guarantee__icon { font-size: 20px; line-height: 1.3; }
.guarantee strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.guarantee p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }


/* ---------------- документы и контакты ---------------- */

.legal { max-width: 820px; margin: 40px auto 64px; line-height: 1.7; }
.legal h1 { margin: 0 0 8px; font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.03em; }
.legal h2 { margin: 36px 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.legal p,
.legal li { color: #D2D2D7; font-size: 16px; }
.legal ul { margin: 6px 0 12px; padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent-2); }
.legal a:hover { text-decoration: underline; }
.legal__date { margin: 0 0 22px; color: var(--muted-2) !important; font-size: 14px !important; }

.legal__intro {
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
  color: var(--text) !important;
}

.legal__accent { margin-top: 28px; color: var(--text) !important; font-weight: 600; }
.legal__nav { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line-soft); }

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px;
  border-radius: var(--apple-radius-card);
  background: var(--surface);
  box-shadow: var(--apple-shadow-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.contact-card:hover { box-shadow: var(--apple-shadow-hover); transform: translateY(-3px); }
.contact-card span { color: var(--muted-2); font-size: 13px; }
.contact-card strong { color: var(--accent-2); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; word-break: break-all; }
.contact-card em { color: var(--muted); font-size: 14px; font-style: normal; }

/* ---------------- текст о магазине для поиска ---------------- */

.seo-text { max-width: 880px; }
.seo-text h2 { margin: 0 0 16px; font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.025em; }
.seo-text p { color: var(--muted); line-height: 1.7; margin: 0 0 14px; }

/* Разметка, которую сервер отдаёт до запуска витрины (src/seo.js). */
.seo-static { max-width: 880px; padding: 40px 0 64px; }
.seo-static h1 { font-size: clamp(32px, 4.4vw, 48px); letter-spacing: -0.03em; }
.seo-static p { color: var(--muted); line-height: 1.7; }
.seo-static ul { padding-left: 18px; line-height: 1.9; }
.seo-static a { color: var(--accent-2); }

/* ---------------- адаптив ---------------- */

/* Шапка перестаёт помещаться раньше остальной вёрстки: считаем по ней.
   Ссылки и поиск не пропадают совсем, а уезжают под кнопку меню. */
@media (max-width: 1067px) {
  .header__inner { flex-wrap: wrap; }
  .header__search { display: none; }
  .nav { display: none; }
  .header .header__burger { display: grid; margin-left: auto; }
  .header__actions { margin-left: 0; }

  /* Высота шапки фиксированная — для раскрытого меню отпускаем её,
     иначе ссылки вылезают за подложку и ложатся поверх страницы. */
  .header__inner.is-menu-open { height: auto; padding-bottom: 6px; }

  .header__inner.is-menu-open .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    order: 5;
    flex-basis: 100%;
    margin: 12px 0 4px;
  }

  .header__inner.is-menu-open .nav a {
    padding: 13px 16px;
    border-radius: var(--apple-radius-card-sm);
    background: var(--surface-2);
    font-size: 16px;
  }

  .header__inner.is-menu-open .header__search {
    display: block;
    order: 6;
    flex-basis: 100%;
    max-width: none;
    margin: 0 0 14px;
  }
}

@media (max-width: 980px) {
  .catalog, .product, .cart-layout, .account, .support-grid { grid-template-columns: 1fr; }
  .filters, .summary { position: static; }
  .hero { padding: 52px 32px 44px; }
  .hero h1, .hero h1.hero__title--long { max-width: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__logo { max-width: 120px; order: -1; margin: 0; }
  .form-row { grid-template-columns: 1fr; }
  .chat__msg { max-width: 92%; }
  .section { margin-bottom: 72px; }
  .promo-strip { margin-bottom: 72px; }
}

@media (max-width: 733px) {
  .container { width: calc(100% - 32px); }
  .hero { margin-top: 16px; padding: 40px 24px 36px; border-radius: 22px; }
  .hero p { margin-bottom: 26px; }
  /* На узком экране цифры не помещаются в строку: сетка 2×2 без разделителей,
     иначе третья цифра одиноко уезжает вниз с висящей чертой. */
  .hero__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 34px; padding-top: 20px; }
  .fact { padding-right: 0; margin-right: 0; border-right: 0; }
  .fact strong { font-size: 24px; }
  .support-hero { padding: 32px 24px; border-radius: 22px; }
  .panel { padding: 22px; }
  .product__buy { padding: 22px; }
  .game-tile { min-height: 210px; }
  .section { margin-bottom: 60px; }
  .promo-strip { margin-bottom: 60px; padding: 20px; }
  .modal { padding: 26px 22px; }
}

@media (max-width: 560px) {
  /* На телефоне в шапке помещаются только корзина и одна короткая кнопка. */
  .header__actions .btn { max-width: 120px; }
  /* Кабинету даём больше: в нём кроме имени стоит сумма на балансе. */
  .header__actions .user-chip { max-width: 190px; }
  .user-chip__discount { display: none; }
  .logo { font-size: 17px; }
  .logo__mark { width: 30px; height: 30px; }
  .cart-row { grid-template-columns: 64px 1fr; }
  .cart-row img { width: 64px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo { animation: none; }
  .card, .card__media img, .game-tile, .game-tile__bg, .cat-tile, .cat-tile__bg, .contact-card { transition: none; }
}
