/* Добавка к market.css — только то, чего нет в маркетплейсе.
   Сам market.css не трогаем: он должен оставаться общим для обоих сайтов,
   иначе «один в один» разъедется при первом же обновлении дизайна. */

/* ─────────────────── Плитки быстрого доступа в сайдбаре ──────────────── */
/* Каталог / Пополнение / Поддержка / Корзина — квадратом 2×2, см. og.js */

.side-quick-grid {
  display: none;
}

@media (min-width: 861px) {
  .side-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .side-quick-tile {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; aspect-ratio: 1; padding: 10px 6px;
    border-radius: var(--r-sm); border: 1px solid var(--line);
    background: var(--surface); color: var(--muted);
    font-size: 12px; font-weight: 700; text-align: center;
    transition: color .15s, border-color .15s, background .15s;
  }
  .side-quick-tile svg { width: 20px; height: 20px; }
  .side-quick-tile:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
  .side-quick-tile.is-active { color: var(--text); border-color: var(--accent); background: var(--surface-2); }
  .side-quick-badge {
    position: absolute; top: 6px; right: 6px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--accent); color: #06210a;
    font-size: 10px; font-weight: 800; line-height: 17px;
  }
  .side-quick-badge:empty, .side-quick-badge[data-zero="1"] { display: none; }

  /* ─────────── Карточка профиля внизу сайдбара ───────────────────────── */
  /* Раньше здесь была мелкая пилюля баланса + отдельная кнопка-аватар с
     выпадающим меню, которое обрезалось узким сайдбаром и не открывалось.
     Теперь это один большой квадратный блок — сразу и профиль, и баланс,
     целиком кликабельный, без всплывающего меню. */
  .side-profile-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px; border-radius: var(--r-sm);
    border: 1px solid var(--line); background: var(--surface);
    transition: border-color .15s, background .15s, transform .15s;
  }
  .side-profile-card:hover {
    border-color: var(--accent); background: var(--surface-2); transform: translateY(-1px);
  }
  .side-profile-head { display: flex; align-items: center; justify-content: space-between; }
  .side-profile-head .user-avatar { width: 40px; height: 40px; font-size: 15px; }
  .side-profile-plus {
    width: 24px; height: 24px; border-radius: 8px; background: var(--grad);
    display: grid; place-items: center; font-size: 15px; color: #fff; font-weight: 800; line-height: 1;
  }
  .side-profile-name {
    font-size: 14.5px; font-weight: 800; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .side-profile-balance {
    font-size: 20px; font-weight: 800; color: var(--accent);
    font-variant-numeric: tabular-nums;
  }
  .side-text-link {
    display: block; padding: 8px 4px; font-size: 12.5px; font-weight: 700;
    color: var(--muted); text-align: left; background: none; border: none; cursor: pointer;
    width: 100%;
  }
  .side-text-link:hover { color: var(--text); }
  .side-logout-btn { color: var(--bad); }
  .side-logout-btn:hover { color: var(--bad); opacity: .8; }
}

/* ─────────────────────── Шторка корзины ──────────────────────────────── */

.cart-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--overlay); backdrop-filter: blur(3px);
}
.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(420px, 100%); transform: translateX(101%);
  background: var(--bg-soft); border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .24s ease;
}
.cart-drawer.open { transform: none; }

.cart-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 16px 20px; display: grid; gap: 10px; align-content: start; }
.cart-drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; }

/* Строка товара в корзине — тем же языком, что карточки маркетплейса */
.cart-drawer-items .cart-row,
.cart-drawer-items .cart-item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
}
.cart-drawer-items .cart-empty { color: var(--faint); text-align: center; padding: 30px 12px; font-weight: 600; }

@media (max-width: 560px) {
  .cart-drawer { width: 100%; }
}



/* ─────────────────────── Плитка товара магазина ──────────────────────── */

/* Товар отличается от игры маркетплейса ценой и категорией, но выглядеть
   должен так же — поэтому наследуемся от .game-tile и добавляем только цену. */
.tile-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; }
.tile-price-row .from { font-size: 12px; color: var(--faint); }
.tile-price-row .price { font-size: 16px; font-weight: 800; color: var(--accent); }
.tile-cat { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .02em; }

/* ─────────────────── Быстрые суммы пополнения ────────────────────────── */

/* main.js перерисовывает этот блок своей разметкой с классом .quick-btn,
   поэтому стилизуем именно его — иначе кнопки слипаются в строку. */
.quick-btn {
  height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 13.5px; font-weight: 700; color: var(--muted);
}
.quick-btn:hover { color: var(--text); border-color: var(--line-strong); }
.quick-btn.is-active, .quick-btn.active { background: var(--grad); color: #fff; border-color: transparent; }

#quickAmounts { display: flex; flex-wrap: wrap; gap: 8px; }

/* Кнопки выбора режима, если их перерисует скрипт */
.topup-btn {
  height: 36px; padding: 0 18px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.topup-btn.is-active, .topup-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
#topupButtons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ═══════════════ Компактное пополнение Steam ═══════════════════════════ */

/* Блок стоит первым экраном, поэтому он обязан быть низким: каталог должен
   попадать в поле зрения сразу, без прокрутки. */
.topup-strip {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.topup-strip-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.topup-strip-head h2 { font-size: 18px; }
.topup-strip-head .chips { margin: 0; }
.topup-strip-badge { margin-left: auto; }

.topup-strip-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(120px, .8fr) minmax(120px, .8fr) auto;
  gap: 12px;
  align-items: end;
}

.topup-strip-pay { display: flex; align-items: center; gap: 10px; }
.topup-strip-price {
  font-family: "Unbounded", sans-serif; font-size: 21px; font-weight: 700;
  color: var(--accent); white-space: nowrap; margin-right: 2px;
}

.topup-strip-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.topup-strip-hint { font-size: 12.5px; color: var(--faint); }
.topup-strip-error { font-size: 12.5px; color: var(--bad); font-weight: 600; }
.topup-strip-error:empty { display: none; }

@media (max-width: 900px) {
  .topup-strip-row { grid-template-columns: 1fr 1fr; }
  .topup-strip-pay { grid-column: 1 / -1; }
}

/* На телефоне блок обязан быть низким: иначе каталог уезжает за экран,
   а ради него человек и пришёл. Поэтому поля в две колонки, подписи короче,
   вспомогательный текст скрыт. */
@media (max-width: 560px) {
  .topup-strip { padding: 13px 14px; margin-top: 12px; }
  .topup-strip-head { gap: 9px; margin-bottom: 11px; }
  .topup-strip-head h2 { font-size: 16px; width: 100%; }
  .topup-strip-badge { display: none; }
  .topup-strip-row { grid-template-columns: 1fr 1fr; gap: 9px; }
  .topup-strip-row > .field:first-child { grid-column: 1 / -1; }
  .topup-strip-pay { flex-wrap: wrap; justify-content: space-between; }
  .topup-strip-pay .btn-lg { flex: 1; min-width: 140px; }
  .topup-strip-price { font-size: 18px; }
  .topup-strip-foot { gap: 8px; margin-top: 9px; }
  .topup-strip-hint { display: none; }
  .catalog-search { min-width: 0; width: 100%; }
  .catalog-bar-tools { width: 100%; }
  .catalog-sort { flex: 1; min-width: 0; }
}

/* ═══════════════ Панель каталога ═══════════════════════════════════════ */

.catalog-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 26px 0 14px;
}
.catalog-bar-title { display: flex; align-items: baseline; gap: 10px; }
.catalog-count { font-size: 13.5px; color: var(--faint); font-weight: 600; }
.catalog-bar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Поиск оформлен как единое поле с кнопкой внутри — как в шапке маркетплейса */
.catalog-search {
  display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 6px 0 13px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 11px; min-width: 280px;
  transition: border-color .15s;
}
.catalog-search:focus-within { border-color: var(--accent); }
.catalog-search svg { color: var(--faint); flex: none; }
.catalog-search input {
  flex: 1; background: none; border: 0; outline: none;
  font-size: 14.5px; color: var(--text); min-width: 0;
}
.catalog-search input::placeholder { color: var(--faint); }

.catalog-sort { height: 42px; width: auto; min-width: 170px; }

/* ═══════════════ Лента категорий ═══════════════════════════════════════ */

.cat-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 14px; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.cat-strip::-webkit-scrollbar { display: none; }

.cat-pill {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  height: 40px; padding: 0 15px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
  scroll-snap-align: start;
  transition: color .15s, border-color .15s, background .15s, transform .12s;
}
.cat-pill svg { width: 17px; height: 17px; flex: none; }
.cat-pill:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.cat-pill.is-active { background: var(--grad); color: #fff; border-color: transparent; }

/* ═══════════════ Дополнительные фильтры ════════════════════════════════ */

.filters-more { margin-bottom: 16px; }
.filters-more > summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  height: 38px; padding: 0 14px; border-radius: 10px; list-style: none;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 700; color: var(--muted); width: fit-content;
}
.filters-more > summary::-webkit-details-marker { display: none; }
.filters-more > summary:hover { color: var(--text); border-color: var(--line-strong); }
.filters-more[open] > summary { color: var(--text); border-color: var(--accent); }

.filters-more-body {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; align-items: end; margin-top: 12px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.filters-more-body .status-strip { grid-column: 1 / -1; }

/* ═══════════════ Бесконечная лента ═════════════════════════════════════ */

#catalogSentinel { height: 1px; }

.load-more {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap; padding: 26px 0 10px;
}

/* У ленты категорий справа — мягкое затухание: подсказывает, что она
   прокручивается, и обрезанное название не выглядит браком вёрстки. */
.cat-strip-wrap { position: relative; }
.cat-strip-wrap::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 4px; width: 54px;
  pointer-events: none; background: linear-gradient(90deg, transparent, var(--bg) 78%);
}


/* Ничто не должно расширять страницу вбок: поля в гридах по умолчанию не
   ужимаются меньше содержимого, отсюда и появлялся горизонтальный скролл. */
.topup-strip .field, .topup-strip .input { min-width: 0; }
.topup-strip-pay { flex-wrap: wrap; }

/* ═══════════════ Категории: все сразу, без прокрутки ═══════════════════ */

/* Была лента с горизонтальным скроллом — часть жанров пряталась за краем.
   Теперь переносим на несколько строк: видно всё сразу. */
.cat-strip {
  flex-wrap: wrap;
  overflow: visible;
  row-gap: 8px;
}
.cat-strip-wrap::after { content: none; }

/* ═══════════════ Новости баннерами ═════════════════════════════════════ */

/* Баннеры — карусель по одному слайду за раз (не витрина из трёх сразу):
   так фон-фото не приходится ужимать до плитки, и на любом экране виден
   ровно один заголовок. Фон-фото + градиент + обычный HTML-текст поверх
   (не картинка с вшитой надписью — так текст всегда чёткий). */
.news-row {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.news-row::-webkit-scrollbar { display: none; }

.news-banner {
  position: relative;
  display: block; overflow: hidden;
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  height: 320px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 20%, var(--bg-soft)) 0%, var(--bg-1, var(--bg-soft)) 100%);
  transition: border-color .16s, box-shadow .16s;
}
.news-banner:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow);
}

.news-banner-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.news-banner-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,10,20,0) 35%, rgba(8,8,16,0.78) 100%);
}
.news-banner-copy {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 24px 28px;
}
.news-banner-eyebrow {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  background: var(--grad); color: #fff;
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.news-banner-copy h3 {
  margin: 0; color: #fff; font-size: 28px; line-height: 1.15;
  font-family: "Unbounded", "Manrope", sans-serif;
}
.news-banner-copy p { margin: 6px 0 0; color: rgba(255,255,255,0.78); font-size: 14px; font-weight: 600; }

@media (max-width: 640px) {
  .news-banner { height: 240px; }
  .news-banner-copy { padding: 16px 18px; }
  .news-banner-copy h3 { font-size: 20px; }
}

/* ═══════════════ Завершение каталога ═══════════════════════════════════ */

/* Плитки разной высоты дают рваный нижний край, и каталог выглядел
   оборванным на полуслове. Закрывающий блок подводит черту и заодно
   предлагает, что делать дальше. */
.catalog-end { margin-top: 26px; }

.catalog-end-line {
  display: flex; align-items: center; gap: 16px;
  color: var(--faint); font-size: 13.5px; font-weight: 600;
  margin-bottom: 18px;
}
.catalog-end-line::before,
.catalog-end-line::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.catalog-end-line b { color: var(--text); }

.catalog-end-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}

.end-card {
  display: flex; align-items: flex-start; gap: 13px; text-align: left;
  padding: 18px; border-radius: var(--r); cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit;
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.end-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: var(--shadow);
}
.end-card svg { width: 24px; height: 24px; flex: none; color: var(--accent); margin-top: 2px; }
.end-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.end-card p { font-size: 13px; color: var(--muted); line-height: 1.45; }

.end-card-accent {
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 60%),
    var(--surface);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

@media (max-width: 900px) { .catalog-end-cards { grid-template-columns: 1fr; } }

/* ═══════════════ Частые вопросы ════════════════════════════════════════ */

.faq-search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 13px; transition: border-color .15s;
}
.faq-search:focus-within { border-color: var(--accent); }
.faq-search svg { color: var(--faint); flex: none; }
.faq-search input {
  flex: 1; background: none; border: 0; outline: none;
  font-size: 15px; color: var(--text); min-width: 0;
}
.faq-search input::placeholder { color: var(--faint); }

.faq-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

.faq-layout {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 22px; align-items: start; padding-bottom: 60px;
}

.faq-group + .faq-group { margin-top: 26px; }
.faq-group-title {
  font-size: 13px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 10px;
}

.faq-item {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-bottom: 8px; overflow: hidden;
}
.faq-item > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 17px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 700;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--accent); }
.faq-item > summary svg { flex: none; color: var(--faint); transition: transform .2s; }
.faq-item[open] > summary svg { transform: rotate(180deg); }
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 34%, transparent); }

.faq-answer {
  padding: 0 17px 17px; font-size: 14.2px; line-height: 1.62; color: var(--muted);
}
.faq-answer b { color: var(--text); }

.faq-empty { text-align: center; padding: 40px 24px; }

.side-links { display: grid; gap: 2px; }
.side-links a { padding: 8px 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.side-links a:hover { color: var(--accent); }

@media (max-width: 1000px) {
  .faq-layout { grid-template-columns: 1fr; }
  .faq-side { order: -1; }
}


/* ═══════════════ Ширина страницы ═══════════════════════════════════════ */

/* Каталог — товарная витрина, ему нужна вся ширина экрана: при ограничении
   в 1240px по бокам оставались широкие поля, а плитки раздувались. */
.container { width: min(1720px, 100% - 36px); }

/* ═══════════════ Мозаика каталога ══════════════════════════════════════ */

/* Базовая плитка повторяет пропорции постера 2:3 — обложка видна целиком,
   и игра узнаётся с одного взгляда. Высоту ряда считает main.js от ширины
   колонки, поэтому пропорция держится на любом экране.
   Крупные блоки кратны базовому (2×2 и 2×1), значит плотная укладка
   заполняет сетку без дыр. */
.games-grid {
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  grid-auto-rows: var(--row-h, 258px);
  grid-auto-flow: dense;
  gap: 12px;
}

.games-grid > .game-tile { grid-column: span 1; grid-row: span 1; }
.games-grid > .game-tile.t-wide { grid-column: span 2; grid-row: span 1; }
.games-grid > .game-tile.t-hero { grid-column: span 2; grid-row: span 2; }

/* Классы маркетплейса тут не действуют: там размер зависел от пропорций файла */
.games-grid > .game-tile.t-p-big,
.games-grid > .game-tile.t-sq,
.games-grid > .game-tile.t-land { grid-column: span 1; grid-row: span 1; }
.games-grid > .game-tile.t-hero.t-p-big,
.games-grid > .game-tile.t-hero.t-sq,
.games-grid > .game-tile.t-hero.t-land { grid-column: span 2; grid-row: span 2; }
.games-grid > .game-tile.t-wide.t-p-big,
.games-grid > .game-tile.t-wide.t-sq,
.games-grid > .game-tile.t-wide.t-land { grid-column: span 2; grid-row: span 1; }

/* Подпись поверх обложки — компактная, чтобы не перекрывать картинку */
.games-grid > .game-tile .tile-body { padding: 11px 12px; }
.games-grid > .game-tile .tile-title { font-size: 14px; line-height: 1.25; }
.games-grid > .game-tile .tile-cat { font-size: 11px; }
.games-grid > .game-tile .tile-price-row .price { font-size: 14.5px; }
.games-grid > .game-tile.t-hero .tile-title { font-size: 21px; }
.games-grid > .game-tile.t-hero .tile-price-row .price { font-size: 18px; }
.games-grid > .game-tile.t-wide .tile-title { font-size: 16px; }

@media (max-width: 760px) {
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
  .games-grid > .game-tile .tile-title { font-size: 13px; }
}

/* ═══════════════ Шапка на телефоне ═════════════════════════════════════ */

/* На узком экране в строку не помещались логотип, тема, корзина и две кнопки
   входа — «Регистрация» уезжала за край и тянула всю страницу вширь.
   Оставляем одну кнопку: со страницы входа регистрация всё равно доступна. */
@media (max-width: 620px) {
  .side-inner { gap: 8px; }
  .topbar-actions { gap: 6px; min-width: 0; }

  /* Регистрация уходит — вход ведёт на ту же страницу с обеими вкладками */
  .topbar-actions .btn-main.btn-sm { display: none; }

  .topbar-actions .btn-ghost.btn-sm { padding: 0 12px; }
  .theme-switch { transform: scale(.9); transform-origin: right center; }

  /* Логотип: на самых узких оставляем только знак */
  .brand-name { font-size: 15px; }
}

@media (max-width: 380px) {
  .brand-name { display: none; }
}

/* Ничто не должно расширять страницу вбок */
.side-inner, .topbar-actions { max-width: 100%; }

/* ═══════════════ Точки карусели новостей ══════════════════════════════ */

.news-dots { display: flex; gap: 7px; justify-content: center; margin-top: 10px; }
.news-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line-strong); cursor: pointer;
  transition: width .2s, background .2s;
}
.news-dots button.is-active { width: 22px; border-radius: 4px; background: var(--accent); }

/* ═══════════════ Кнопка входа на телефоне ═════════════════════════════ */

@media (max-width: 620px) {
  /* Раз «Регистрация» скрыта, вход должен выглядеть как главное действие,
     а не как второстепенная серая кнопка. */
  .topbar-actions .btn-ghost.btn-sm {
    background: var(--grad);
    color: #fff;
    border-color: transparent;
    font-weight: 800;
    height: 38px;
    padding: 0 16px;
  }
  .topbar-actions .btn-ghost.btn-sm:hover { filter: brightness(1.06); }
}

/* ═══════════════ Корзина над нижней навигацией ════════════════════════ */

/* На телефоне снизу висит панель навигации, и кнопка оплаты уходила под неё —
   человек видел «Итого», но не мог нажать «Оплатить». Поднимаем подвал
   шторки на высоту панели. */
@media (max-width: 860px) {
  .cart-drawer-foot {
    padding-bottom: calc(16px + 64px + env(safe-area-inset-bottom));
  }
  .cart-drawer { z-index: 95; }   /* шторка выше нижней навигации */
  .cart-overlay { z-index: 94; }
}

/* ═══════════════ Страница товара ══════════════════════════════════════ */

/* Атмосферная витрина: обложка растянута фоном на всю ширину под градиентом,
   постер и заголовок лежат поверх — вместо трёх параллельных колонок
   типового магазина (постер / характеристики / покупка). */
.product-hero {
  position: relative;
  margin-top: 18px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 300px;
  display: flex;
  align-items: flex-end;
}
.product-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(3px) saturate(1.2) brightness(.5);
  transform: scale(1.06);
}
.product-hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(8,8,14,.94) 8%, rgba(8,8,14,.6) 50%, rgba(8,8,14,.18) 100%),
    linear-gradient(0deg, rgba(6,6,10,.8) 0%, transparent 55%);
}
.product-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 26px;
  padding: 30px; width: 100%;
}
.product-hero-poster {
  position: relative; flex: none; overflow: hidden;
  width: 140px; aspect-ratio: 2 / 3;
  border-radius: var(--r); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 22px 50px -14px rgba(0,0,0,.75);
}
.product-hero-poster .product-shot-img {
  width: 100%; height: 100%; object-fit: cover; box-shadow: none;
}
.product-shot-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 11px; font-weight: 800; letter-spacing: .04em;
  padding: 5px 9px; border-radius: 7px;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.16);
}
html[data-theme="light"] .product-shot-tag { background: rgba(255,255,255,.82); color: #1d2214; border-color: rgba(0,0,0,.1); }

.product-hero-info { min-width: 0; padding-bottom: 4px; }
.product-hero-info h1 { font-size: clamp(24px, 3.2vw, 38px); margin-bottom: 10px; color: #fff; }
.product-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13.5px; }
.product-rating .stars { color: var(--accent); letter-spacing: 2px; }
.product-hero-info .muted { color: rgba(255,255,255,.62); }

/* Характеристики — плашками поверх обложки, не списком точек */
.spec-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 7px 13px; border-radius: 10px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}
.spec-chip b { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: rgba(255,255,255,.5); }
.spec-chip span:last-child { color: #fff; font-weight: 700; font-size: 13.5px; }

.product-page {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 330px;
  gap: 22px; align-items: start; padding: 22px 0 34px;
}

.option-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.option-btn {
  height: 38px; padding: 0 15px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-soft);
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.option-btn:hover { color: var(--text); border-color: var(--line-strong); }
.option-btn.is-active { background: var(--grad); color: #fff; border-color: transparent; }

/* Покупка едет за прокруткой: цена и кнопка всегда на виду */
.product-buy { position: sticky; top: calc(var(--header-h) + 14px); }
.buy-price { margin-bottom: 14px; }
.buy-price-now { font-family: "Unbounded", sans-serif; font-size: 30px; font-weight: 800; color: var(--accent); }

.delivery-list { display: grid; gap: 12px; }
.delivery-list li { display: grid; gap: 2px; font-size: 13.5px; }
.delivery-list b { font-size: 14px; }
.delivery-list span { color: var(--muted); }

.seller-panel { display: flex; align-items: center; gap: 12px; }
.seller-panel .seller-name { font-weight: 800; }

/* Описание и гарантии — теперь панель внутри левой колонки */
.steps-list { display: grid; gap: 9px; padding-left: 18px; color: var(--muted); font-size: 14px; }
.steps-list li { line-height: 1.5; }

@media (max-width: 1100px) {
  .product-page { grid-template-columns: 1fr; }
  .product-buy { position: static; }
}
@media (max-width: 720px) {
  .product-hero-inner { flex-direction: column; align-items: flex-start; }
  .product-hero-poster { width: 108px; }
  .spec-chips { max-width: 100%; }
  .spec-chip { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .spec-chip span:last-child { white-space: normal; word-break: break-word; }
}

/* Мобильная шапка: .side-bottom (профиль+баланс+выход) стилизован только
   для десктопного сайдбара (min-width:861px в блоке выше). На мобильном он
   рендерится без стилей поверх топбара — весь функционал профиля и так
   доступен через нижнюю навигацию (вкладка «Профиль»), поэтому просто
   скрываем дублирующий и неоформленный блок. */
@media (max-width: 860px) {
  .side-bottom { display: none; }
}

/* На мобильном в .side-inner остаются только brand и theme-switch (поиск,
   плитки и жанры скрыты) — без выравнивания переключатель темы липнет
   к логотипу, а справа пустует вся ширина шапки. Прижимаем его к краю. */
@media (max-width: 860px) {
  .side-inner .theme-switch { margin-left: auto; }
}
