/* Витрина DEMO store.
 * Макет фиксированной ширины: кадр 1920, белое полотно 1280 по центру,
 * контент 1200. Полотно не тянется, а центрируется на сером фоне страницы.
 */

:root {
  --page:      #f4f5f7;   /* фон вокруг полотна */
  --sheet:     #ffffff;   /* белое полотно 1280 */
  --ink:       #14181d;   /* заголовок карточки */
  --ink-title: #1f2937;   /* заголовок секции */
  --ink-label: #363636;   /* подписи иконок сервисов */
  --ink-muted: #76829b;   /* плейсхолдер поиска */
  --ink-soft:  #8a94a6;   /* неактивный чип, «еще 841» */
  --ink-old:   #9ca3af;   /* зачёркнутая цена */
  --field:     #f4f5f7;   /* поля и неактивные чипы */
  --field-alt: #e8eaed;   /* неактивная кнопка валюты, разделитель */
  --fav-bg:    #eff1f5;
  --acct-bg:   #f2f4f7;
  --green:     #4c9a2a;   /* цена */
  --green-bg:  #6eb83f;   /* бейдж 5% */
  --promo-bg:  rgb(38 139 243 / .1);
  --danger:    #d9342b;

  /* Фон и разделители служебных страниц (заказ, админка). */
  --canvas:    #f4f5f7;
  --line:      #e6e8ec;

  /* Скругления. Значения те же, что и в макете первого этапа. */
  --r-sm:      10px;
  --r-md:      12px;
  --r-lg:      16px;

  --sheet-w:   1280px;
  --content-w: 1200px;
  --inset:     40px;

  /* Тень карточки товара. */
  --shadow-card:  0 11.5px 24.7px rgb(20 40 80 / .10);
  --shadow-hover: 0 16px 30px rgb(20 40 80 / .16);
  --shadow-icon:  0 4px 8px rgb(209 217 228);
  --shadow-pop:   0 12px 40px rgb(20 40 80 / .14);

  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 600 14px/1.35 Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* Белое полотно 1280 по центру серого фона — как в макете. */
.sheet {
  width: var(--sheet-w);
  margin-inline: auto;
  background: var(--sheet);
  min-height: 100vh;
  /* Волосяная рамка полотна. */
  box-shadow: inset 0 0 0 1px #f2f4f7;
}

/* Контент 1200 внутри полотна. */
.shell {
  width: var(--content-w);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #000; color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus-visible { top: 12px; }

:focus-visible { outline: 2px solid #000; outline-offset: 2px; border-radius: 6px; }

/* ── Шапка: 1920x80, полотно белое ─────────────────────────────────── */

.header {
  position: sticky; top: 0; z-index: 40;
  background: var(--sheet);
}

.header__inner {
  display: flex; align-items: center;
  height: 80px;
}

/* Логотип занимает место слева от кнопки «Каталог». */
.logo {
  width: 192px; flex: none;
  display: flex; align-items: center; gap: 7px;
  font-size: 19px; font-weight: 800; letter-spacing: -.02em;
}
.logo__mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: #000; color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: .02em;
}
.logo__text { font-weight: 700; }

.btn-catalog {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  width: 120px; height: 44px; padding-left: 16.5px;
  background: #000; color: #fff;
  border: 0; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  transition: background .18s var(--ease);
}
.btn-catalog:hover,
.btn-catalog[aria-expanded="true"] { background: #23262e; }
.btn-catalog__icon { fill: currentColor; flex: none; }

/* Поиск 688x44: чёрная подложка r=10, белое поле 642x40 с отступом 2,
   справа остаётся чёрная полоса 44 — это и есть кнопка поиска. */
.search {
  width: 688px; height: 44px; flex: none;
  margin-left: 76px;
  display: flex; padding: 2px 0 2px 2px;
  background: #000; border-radius: 10px;
}
.search__field {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 0 4px 0 12px;
  background: #fff; border-radius: 8px;
}
.search__input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none;
  font-size: 12px; font-weight: 600; color: var(--ink-label);
}
.search__input::placeholder { color: var(--ink-muted); }
.search__input::-webkit-search-cancel-button { display: none; }

.search__fav {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px;
  background: var(--fav-bg); border: 0; border-radius: 6px;
  transition: background .18s var(--ease);
}
.search__fav svg { fill: var(--ink-muted); transition: fill .18s var(--ease); }
.search__fav:hover { background: #e3e7ee; }
.search__fav:hover svg { fill: var(--danger); }

.search__go {
  display: grid; place-items: center; flex: none;
  width: 44px;
  background: none; border: 0; color: #fff;
}

.icon-btn {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; margin-left: 80px;
  background: var(--acct-bg); border: 0; border-radius: 10px;
  transition: background .18s var(--ease);
}
.icon-btn svg { fill: #a9b2c1; transition: fill .18s var(--ease); }
.icon-btn:hover { background: #e6eaf1; }
.icon-btn:hover svg { fill: var(--ink-muted); }

/* ── Выпадающее меню каталога: 1280x585, сайдбар 320 + контент 880 ─── */

.catalog {
  position: absolute; left: 50%; transform: translateX(-50%);
  top: 100%;
  width: var(--sheet-w);
  background: var(--sheet);
  border-top: 1px solid var(--field-alt);
  box-shadow: var(--shadow-pop);
  animation: menu-in .18s var(--ease);
}
.catalog[hidden] { display: none; }

@keyframes menu-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translateX(-50%); }
}

.catalog__inner {
  display: grid; grid-template-columns: 320px 880px;
  min-height: 584px;
}

.catalog__rail { display: flex; flex-direction: column; padding-block: 16px; }
.rail__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; text-align: left;
  background: none; border: 0; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  transition: background .16s var(--ease);
}
.rail__item span { color: var(--ink-soft); }
.rail__item:hover { background: var(--field); }
.rail__item.is-active { background: var(--field); }

.catalog__cols {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px 24px;
  align-content: start;
  padding: 32px;
  border-left: 1px solid var(--field-alt);
}
.catalog__col { display: flex; flex-direction: column; gap: 12px; font-size: 13px; font-weight: 600; }
.catalog__col--wide { grid-column: 1; }
.catalog__col a { color: var(--ink-title); transition: color .14s var(--ease); }
.catalog__col a:not(.catalog__head):hover { color: #268bf3; }
.catalog__head { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.catalog__head span { color: var(--ink-soft); font-weight: 500; }

/* ── Баннер 1200x263, r=12, с вырезом под стрелки в правом верхнем ─── */

.hero {
  position: relative;
  width: 1200px; height: 263px; margin-top: 16px;
}

/* Вырез под блок стрелок имеет три скругления: r=12 сверху, r=22 во внутреннем
   углу и r=12 на выходе к правому краю. Накладкой такую форму не собрать,
   поэтому режем сам баннер по контуру. */
.hero__clip {
  position: absolute; inset: 0;
  background: #000;
  overflow: hidden;
  clip-path: path("M 1090 0 C 1096.63 0 1102 5.37 1102 12 L 1102 26 C 1102 38.15 1111.85 48 1124 48 L 1188 48 C 1194.63 48 1200 53.37 1200 60 L 1200 251 C 1200 257.63 1194.63 263 1188 263 L 12 263 C 5.37 263 0 257.63 0 251 L 0 12 C 0 5.37 5.37 0 12 0 Z");
}


.hero__track {
  display: flex; height: 100%; margin: 0; padding: 0; list-style: none;
  transition: transform .5s var(--ease);
}
/* Уважаем системную настройку «меньше движения». */
@media (prefers-reduced-motion: reduce) { .hero__track { transition: none; } }

.hero__slide {
  flex: 0 0 100%; position: relative;
  display: flex; align-items: center;
  padding: 40px 48px;
  background: #000; color: #fff; overflow: hidden;
}
.hero__art {
  position: absolute; inset-block: 0; right: 0; width: 46%;
  height: 100%; object-fit: cover;
  mask-image: linear-gradient(to right, transparent, #000 40%);
}
.hero__copy { position: relative; max-width: 54%; }
.hero__tag {
  display: inline-block; margin-bottom: 12px; padding: 5px 11px;
  background: rgb(255 255 255 / .14); border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.hero__headline { margin: 0 0 8px; font-size: 30px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.hero__sub { margin: 0; font-size: 14px; font-weight: 500; color: rgb(255 255 255 / .72); max-width: 36ch; }

.hero__arrows {
  position: absolute; top: 0; right: 0; z-index: 3;
  width: 90px; height: 40px;
  display: flex; align-items: center; gap: 2px; padding: 0 4px;
  background: var(--field); border-radius: 48px;
  /* Волосяная рамка пилюли. */
  box-shadow: inset 0 0 0 1px #e5e9f1;
}
.hero__arrow {
  flex: none;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 40px; color: #000;
  transition: background .16s var(--ease);
}
.hero__arrow:hover { background: #e3e7ee; }

/* Точки: 6 штук по 20x4, отступ 16 от правого и нижнего края. */
.hero__dots { position: absolute; right: 16px; bottom: 16px; display: flex; gap: 4px; }
.hero__dot {
  width: 20px; height: 4px; padding: 0;
  background: rgb(255 255 255 / .45); border: 0; border-radius: 12px;
  transition: background .2s var(--ease);
}
.hero__dot:hover { background: rgb(255 255 255 / .7); }
.hero__dot.is-active { background: #fff; }

/* ── Панель сервисов и пополнения: 1200x253, r=16, padding 20 ──────── */

.panel {
  margin-top: 16px; padding: 20px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 10px 34px rgb(20 40 80 / .08);
}

/* 11 плиток по 76 с шагом 108.4 — ровно как в макете. */
.services {
  display: grid; grid-template-columns: repeat(11, 76px);
  justify-content: space-between;
  height: 108px; margin: 0; padding: 0; list-style: none;
}

.service {
  width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; background: none; border: 0;
}
.service__icon {
  /* Плитка 76x76, иконка 72x72 с отступом 2: подпись встаёт на 84. */
  width: 72px; height: 72px; margin: 2px 0; border-radius: 16px;
  /* Обводки не меняют размер плитки: внутренняя — outline со сдвигом внутрь,
     внешнее кольцо — тень с разбросом. */
  --ring: transparent; --edge: transparent; --edge-w: 2px;
  outline: var(--edge-w) solid var(--edge); outline-offset: calc(-1 * var(--edge-w));
  object-fit: cover;
  box-shadow: var(--shadow-icon);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.service__name {
  font-size: 16px; font-weight: 700; color: var(--ink-label);
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.service__icon { box-shadow: var(--shadow-icon), 0 0 0 2px var(--ring); }
.service:hover .service__icon { transform: translateY(-4px) scale(1.05); box-shadow: 0 10px 18px rgb(20 40 80 / .22), 0 0 0 2px var(--ring); }
.service:hover .service__name { color: #268bf3; }
.service:active .service__icon { transform: translateY(-1px) scale(1.01); }

.service--more .service__icon {
  display: grid; place-items: center;
  background: var(--field); box-shadow: none;
  --edge: #dfe5ef;
}
.service--more .service__icon svg { fill: #76829b; }
.service--more .service__name { color: var(--ink-soft); }

.panel__rule { margin: 16px 0; border: 0; border-top: 1px solid var(--field-alt); height: 0; }

/* Блок пополнения Steam: 1160x72, четыре зоны по координатам макета. */
.topup { display: flex; align-items: center; height: 72px; }

.topup__app { width: 290px; flex: none; display: flex; align-items: center; gap: 12px; }
.topup__logo { width: 72px; height: 72px; border-radius: 16px; flex: none; box-shadow: var(--shadow-icon); }
.topup__meta { display: flex; flex-direction: column; gap: 4px; }
.topup__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: var(--ink-label); white-space: nowrap;
}

.badge-green {
  display: inline-grid; place-items: center;
  height: 20px; padding: 0 8px; border-radius: 9999px;
  background: var(--green-bg); color: #fff;
  font-size: 11px; font-weight: 700;
}

.promo-toggle {
  align-self: flex-start;
  display: inline-flex; align-items: center; justify-content: space-between;
  width: 154px; height: 26px; padding: 0 12px;
  background: var(--promo-bg); color: #000; border: 0; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  transition: background .16s var(--ease);
}
.promo-toggle:hover { background: rgb(38 139 243 / .18); }
.promo-toggle svg { transition: transform .2s var(--ease); }
.promo-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.field {
  height: 64px; flex: none;
  display: flex; align-items: center;
  background: var(--field); border-radius: 12px;
}
.field--login { width: 284.8px; margin-left: 11.5px; padding: 0 20px; gap: 12px; }
.field__icon { fill: var(--ink-muted); flex: none; }
.field__input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font-size: 15px; font-weight: 700; color: var(--ink-label);
}
.field__input::placeholder { color: var(--ink-soft); }
.field__hint {
  display: grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 6px;
  background: #a0a8b5; color: #fff;
  /* Georgia Bold Italic: засечка у «i» заметна. */
  font: italic 700 12px/1 Georgia, "Times New Roman", serif;
}

.field--amount { width: 341.7px; margin-left: 16px; padding: 0 16px; justify-content: space-between; }
.field__badge {
  display: grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--ink-muted); color: #fff;
}
/* Вектор центрируется по рамке, в отличие от текста на базовой линии. */
.field__badge svg { display: block; }
.field__group { display: flex; align-items: center; gap: 12px; }
.field__stack { display: flex; flex-direction: column; line-height: 1.2; }
.field__label { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.field__value { font-size: 18px; font-weight: 700; color: var(--ink-label); }

.currency { display: flex; gap: 6px; flex: none; }
.currency__btn {
  width: 36px; height: 36px;
  background: var(--field-alt); color: var(--ink-soft);
  border: 0; border-radius: 8px;
  font-size: 16px; font-weight: 700;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.currency__btn:hover { background: #dcdfe4; color: var(--ink-title); }
.currency__btn.is-active { background: #000; color: #fff; }
.currency__btn.is-active:hover { background: #23262e; }
.currency__btn:active { transform: scale(.94); }

.btn-pay {
  width: 200px; height: 64px; flex: none; margin-left: auto;
  background: #000; color: #fff; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 700;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn-pay:hover { background: #23262e; }
.btn-pay:active { transform: translateY(1px); }
.btn-pay--wide { width: 100%; height: 52px; margin: 18px 0 0; }
.btn-pay[disabled] { opacity: .55; pointer-events: none; }

/* Промокод */
.promo { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--field-alt); }
.promo[hidden] { display: none; }
.promo__row { display: flex; gap: 10px; }
.promo__input {
  flex: 1; min-width: 0; height: 44px; padding: 0 16px;
  background: var(--field); border: 1px solid transparent; border-radius: 10px;
  outline: none; font-size: 14px; font-weight: 700; text-transform: uppercase;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.promo__input::placeholder { color: var(--ink-soft); font-weight: 600; text-transform: none; }
.promo__input:focus { background: #fff; border-color: #000; }
.promo__apply {
  height: 44px; padding: 0 20px;
  background: #000; color: #fff; border: 0; border-radius: 10px; font-weight: 700;
  transition: background .18s var(--ease);
}
.promo__apply:hover { background: #23262e; }
.promo__apply[disabled] { opacity: .5; pointer-events: none; }

.promo__result { margin: 10px 0 0; font-size: 12px; font-weight: 700; min-height: 16px; }
.promo__result.is-ok   { color: var(--green); }
.promo__result.is-bad  { color: var(--danger); }
.promo__result.is-idle { color: var(--ink-muted); }

/* ── Ряды карточек: заголовок 34 + отступ 16 + карточки 296 ────────── */

.row { margin-top: 16px; }
.row__head { display: flex; align-items: center; height: 34px; margin-bottom: 16px; }
.row__title { margin: 0; font-size: 20px; font-weight: 700; color: var(--ink-title); letter-spacing: -.01em; }

.chips { display: flex; gap: 8px; margin-left: auto; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  background: var(--field); color: var(--ink-soft);
  border: 0; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.chip svg { fill: #b4bccb; flex: none; transition: fill .18s var(--ease); }
.chip:hover svg { fill: #97a1b2; }
.chip.is-active svg { fill: #fff; }
.chip:hover { background: #e6eaf1; color: var(--ink-title); }
.chip.is-active {
  background: #000; color: #fff;
  box-shadow: 0 1px 2px rgb(59 130 246 / .2);
}

.btn-ghost {
  margin-left: auto; height: 34px; padding: 0 20px;
  background: var(--field); color: var(--ink-title); border: 0; border-radius: 10px;
  font-size: 13px; font-weight: 700;
  transition: background .18s var(--ease);
}
.btn-ghost:hover { background: #e6eaf1; }

/* 5 карточек по 227.3 с зазором 16 — ровно 1200. */
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

.card {
  display: flex; flex-direction: column;
  /* Геометрия из макета: картинка 151.7 + тело 142.9. Высота задана минимумом,
     а не жёстким значением: во втором этапе в тело добавилась строка продавца
     и остатка, которой в макете не было. С жёсткой высотой кнопка «Купить»
     уезжала за нижний край и срезалась overflow: hidden. */
  min-height: 294.6px;
  background: #fff; border-radius: 16.5px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card:hover .card__img { transform: scale(1.05); }

/* Картинка во всю ширину карточки, без полей — как в макете. */
.card__media { position: relative; height: 151.7px; flex: none; overflow: hidden; background: var(--field); }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }

.card__body {
  display: flex; flex-direction: column; gap: 11.5px;
  padding: 12.2px 13.2px;
  flex: 1;
}

.card__title {
  margin: 0;
  font-size: 10.7px; font-weight: 800; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  height: 30px;
}

.card__prices { display: flex; align-items: baseline; gap: 8.2px; height: 20px; }
.card__price { font-size: 19.8px; font-weight: 700; color: var(--green); line-height: 1; }
.card__old { font-size: 11.5px; font-weight: 700; color: var(--ink-old); text-decoration: line-through; }

.card__buy {
  /* Не прижимаем к низу: кнопка стоит на 236.9 от верха карточки,
     свободные 14.9px остаются снизу. */
  height: 42.8px;
  background: #000; color: #fff; border: 0; border-radius: 11.5px;
  font-size: 12.4px; font-weight: 800;
  transition: background .18s var(--ease), transform .12s var(--ease);
}
.card__buy:hover { background: #23262e; }
.card__buy:active { transform: scale(.98); }
.card__buy[disabled] { opacity: .6; pointer-events: none; }

.card__demo {
  position: absolute; left: 8px; top: 8px; z-index: 1;
  padding: 4px 9px; border-radius: 8px;
  background: var(--green-bg); color: #fff;
  font-size: 10px; font-weight: 800;
}

.main { padding-bottom: 40px; }

/* ── Модалка ───────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgb(20 24 29 / .45); animation: fade-in .18s var(--ease); }

@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop-in { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }

.modal__box {
  position: relative; width: min(440px, 100%);
  padding: 28px; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-pop);
  animation: pop-in .22s var(--ease);
  max-height: 90vh; overflow-y: auto;
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  background: var(--field); border: 0; border-radius: 8px;
  font-size: 20px; line-height: 1; color: var(--ink-muted);
  transition: background .16s var(--ease);
}
.modal__close:hover { background: #e6eaf1; color: var(--ink-title); }
.modal__title { margin: 0 0 20px; font-size: 20px; font-weight: 700; color: var(--ink-title); }

.checkout__product { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--field-alt); }
.checkout__img { width: 72px; height: 48px; border-radius: 10px; object-fit: cover; }
.checkout__name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.checkout__sku { margin-top: 3px; font-size: 12px; color: var(--ink-muted); font-weight: 600; }

.checkout__label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }

.checkout__total { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--field-alt); display: grid; gap: 9px; }
.checkout__total div { display: flex; justify-content: space-between; align-items: baseline; }
.checkout__total dt { color: var(--ink-muted); font-size: 14px; font-weight: 600; }
.checkout__total dd { margin: 0; font-weight: 700; }
.checkout__total--final dt { color: var(--ink-title); font-size: 15px; font-weight: 700; }
.checkout__total--final dd { font-size: 20px; font-weight: 700; color: var(--green); }

.checkout__note { margin: 12px 0 0; font-size: 11px; color: var(--ink-soft); font-weight: 500; line-height: 1.45; }

/* ── Тост ──────────────────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 40px));
  padding: 13px 20px;
  background: #14181d; color: #fff;
  border-radius: 12px; box-shadow: var(--shadow-pop);
  font-size: 13px; font-weight: 600;
  animation: toast-in .22s var(--ease);
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px) } to { opacity: 1; transform: translateX(-50%) } }

/* На узких экранах полотно сжимается; отдельная мобильная вёрстка не делалась. */
@media (max-width: 1320px) {
  :root { --sheet-w: 100%; --content-w: 100%; }
  .sheet { padding-inline: 20px; }
  .shell { width: 100%; }
  .catalog { left: 0; transform: none; width: 100%; }
  @keyframes menu-in { from { opacity: 0 } to { opacity: 1 } }
  .catalog__inner { grid-template-columns: 280px 1fr; }
  .services { grid-template-columns: repeat(11, 1fr); }
  .service, .service__icon { width: 100%; max-width: 76px; }
  .search { width: auto; flex: 1; margin-left: 24px; }
  .icon-btn { margin-left: 24px; }
  .logo { width: auto; margin-right: 24px; }
  .field--login, .field--amount { flex: 1; width: auto; }
  /* Контур рассчитан на ширину 1200; на узких экранах — обычное скругление. */
  .hero { width: auto; }
  .hero__clip { clip-path: none; border-radius: 12px; }
}

/* ── Второй этап: живая витрина, бронь, поиск ──────────────────────── */

/* Продавец и остаток в карточке */
.card__seller {
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  margin: -4px 0 0;
  font-size: 10.5px; font-weight: 700; color: var(--ink-soft);
}
.card__stock { color: var(--green); }
.card__stock.is-out { color: var(--danger); }

/* Цена меняется в реальном времени — короткая подсветка показывает, что
   изменение только что прилетело, а не было тут всегда. */
.card__price { transition: color .2s var(--ease); }
.card__price.is-flash { animation: price-flash 1.1s var(--ease); }
@keyframes price-flash {
  0%   { color: #d97706; transform: scale(1.06); }
  100% { color: var(--green); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .card__price.is-flash { animation: none; }
}

/* Раскупленная карточка гаснет у всех одновременно */
.card.is-sold-out { opacity: .55; }
.card.is-sold-out .card__img { filter: grayscale(1); }
.card__buy[disabled] { background: var(--field-alt); color: var(--ink-soft); }

.card__buy--link {
  display: grid; place-items: center; text-decoration: none;
}

/* Модалка «раскупили» */
.soldout__sub { margin: 0 0 12px; font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.soldout__product { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.soldout__list { display: grid; gap: 8px; }
.soldout__offer {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px;
  padding: 12px 14px; text-align: left;
  background: var(--field); border: 0; border-radius: var(--r-sm);
  transition: background .16s var(--ease);
}
.soldout__offer:hover { background: #e6eaf1; }
.soldout__seller { font-size: 13px; font-weight: 700; }
.soldout__price  { font-size: 15px; font-weight: 800; color: var(--green); }
.soldout__stock  { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.soldout__empty  { margin: 0; font-size: 13px; color: var(--ink-soft); }

.checkout__hint {
  margin: -12px 0 18px; font-size: 12px; font-weight: 600; color: var(--ink-muted);
}

/* ── Поиск ─────────────────────────────────────────────────────────── */

.srp__head { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 14px; }
.srp__count { font-size: 13px; font-weight: 700; color: var(--ink-soft); }

.filters {
  display: flex; flex-wrap: wrap; align-items: end; gap: 12px;
  padding: 16px 18px; margin-bottom: 14px;
  background: #fff; border-radius: var(--r-md);
  box-shadow: 0 4px 16px rgb(20 40 80 / .06);
}
.filters__field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.filters__field select, .filters__field input {
  height: 36px; padding: 0 10px; min-width: 150px;
  background: var(--field); border: 1px solid transparent; border-radius: 8px;
  font: 600 13px Montserrat, system-ui, sans-serif; color: var(--ink-title); outline: none;
}
.filters__field--num select, .filters__field--num input { min-width: 96px; }
.filters__field select:focus, .filters__field input:focus { border-color: #000; background: #fff; }
.filters__check {
  display: flex; align-items: center; gap: 7px; height: 36px;
  font-size: 13px; font-weight: 700; color: var(--ink-title);
}

/* Полоска загрузки вместо подмены списка спиннером: выдача не мигает */
/* Полоска всегда занимает своё место в потоке. Если показывать её только на
   время запроса, выдача дёргается вверх-вниз на каждой нажатой клавише. */
.srp__bar { height: 2px; margin-bottom: 12px; border-radius: 2px; overflow: hidden; background: transparent; }
.srp__bar.is-loading { background: var(--field-alt); }
.srp__bar::after {
  content: ''; display: block; height: 100%; width: 40%;
  background: #000; border-radius: 2px;
  animation: srp-run 1s infinite var(--ease);
  opacity: 0; transition: opacity .12s var(--ease);
}
.srp__bar.is-loading::after { opacity: 1; }
@keyframes srp-run { 0% { transform: translateX(-100%) } 100% { transform: translateX(320%) } }
@media (prefers-reduced-motion: reduce) { .srp__bar::after { animation: none; } }

.cards--srp { grid-template-columns: repeat(5, 1fr); gap: 16px; }
.srp__more { display: grid; place-items: center; padding: 24px 0 40px; }
.srp__empty { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); }

@media (max-width: 1320px) {
  .cards--srp { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
