/* LILIPUTIYA V2 — дизайн-система витрины и кабинета (перенос визуального
   концепта легаси-витрины; тёплая палитра детского маркетплейса). */

/* ============ Токены ============ */
:root {
  color-scheme: light dark;
  --radius: 1rem;
  --radius-sm: calc(var(--radius) - 6px);
  --radius-lg: calc(var(--radius) + 4px);

  /* v1.99: единый бренд-motion — токены длительностей вместо разрозненных
     значений и кривая бренда --ease-brand (прецедент — тосты v1.3:
     cubic-bezier(.2, .8, .2, 1)). Ниже — современный формат linear()
     (точная математическая развёртка той же кривой) через @supports:
     без поддержки браузер продолжает на бэзье-фолбэке. */
  --motion-snap: .12s;
  --motion-fast: .15s;
  --motion-base: .16s;
  --motion-gentle: .18s;
  --motion-slow: .22s;
  --motion-stately: .25s;
  --ease-brand: cubic-bezier(.2, .8, .2, 1);

  --background: oklch(0.99 0.008 85);
  --foreground: oklch(0.28 0.025 40);
  --card: #ffffff;
  --muted: oklch(0.955 0.012 85);
  --muted-foreground: oklch(0.5 0.02 45);
  --border: oklch(0.915 0.015 80);

  --primary: oklch(0.67 0.17 45);
  --primary-foreground: oklch(0.99 0.01 85);
  --secondary: oklch(0.94 0.03 80);
  --secondary-foreground: oklch(0.33 0.05 40);
  --accent: oklch(0.9 0.05 180);
  --accent-foreground: oklch(0.35 0.06 180);
  --destructive: oklch(0.58 0.2 25);

  --mint: oklch(0.66 0.11 180);
  --mint-soft: oklch(0.94 0.04 180);
  --berry: oklch(0.63 0.19 350);
  --berry-soft: oklch(0.94 0.04 350);
  --cream: oklch(0.97 0.02 85);
  --peach: oklch(0.92 0.06 70);

  /* v1.73: легаси-фолбэки стали настоящими токенами (тёмная тема
     переопределяет их ниже); --tint — ховер-тёнка поверх поверхностей. */
  --cream-2: oklch(0.915 0.015 80);
  --ink-soft: oklch(0.5 0.02 45);
  --danger: oklch(0.58 0.2 25);
  --tint: rgb(0 0 0 / 6%);

  /* v2.23.5: тон-палитра бренда получила настоящие токены (раньше значения
     жили в fallback-хексах var(--x, #hex)): --brand-soft — линия уровня
     бренда (таблицы опта), --brand-wash — тёплая подложка оптовых блоков,
     --scrim — скрим нативных диалогов (модалка входа, палитра поиска docs),
     тёмная тема переопределяет оба ниже. */
  --brand-soft: oklch(0.915 0.04 75);
  --brand-wash: oklch(0.985 0.01 85);
  --scrim: rgb(43 32 21 / 55%);


  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  --container: 80rem;
}

/* ============================================================
   v1.73 — Тёмная тема (авто): палитра под prefers-color-scheme.
   Токены переворачиваются, компоненты следуют за var(): градиенты,
   скримы и декор уже построены на токенах. Светлая тема не изменена —
   блок срабатывает только при системной dark. Контраст по правилам:
   текст 0.93 на фоне 0.185; текст на primary — тёмный (0.21) на ярком
   (0.72); бейджи сохраняют белый текст на сдержанной насыщенности.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.185 0.014 55);
    --foreground: oklch(0.93 0.015 80);
    --card: oklch(0.23 0.018 55);
    --muted: oklch(0.27 0.02 55);
    --muted-foreground: oklch(0.71 0.02 75);
    --border: oklch(0.33 0.02 55);
    --primary: oklch(0.72 0.16 45);
    --primary-foreground: oklch(0.21 0.02 45);
    --secondary: oklch(0.295 0.025 55);
    --secondary-foreground: oklch(0.92 0.02 80);
    --accent: oklch(0.32 0.05 180);
    --accent-foreground: oklch(0.88 0.06 180);
    --destructive: oklch(0.62 0.19 25);
    --mint: oklch(0.70 0.11 180);
    --mint-soft: oklch(0.30 0.045 180);
    --berry: oklch(0.68 0.17 350);
    --berry-soft: oklch(0.30 0.045 350);
    --cream: oklch(0.215 0.018 55);
    --peach: oklch(0.38 0.055 70);
    --cream-2: oklch(0.33 0.02 55);
    --ink-soft: oklch(0.71 0.02 75);
    --danger: oklch(0.62 0.19 25);
    --tint: rgb(255 255 255 / 7%);
    --brand-soft: oklch(0.34 0.03 60);
    --brand-wash: oklch(0.255 0.02 60);
    --scrim: rgb(0 0 0 / 62%);
  }
  /* Нейтральный свотч без hex: в темноте не слепит (цветные свотчи
     заданы inline из данных и не трогаются). */
  .swatch-chip__dot { background: oklch(0.45 0.012 55); }
  /* v1.92: линия прилипания шапок читает var(--border) — тёмная тема
     подхватывает её автоматически, отдельных переопределений не нужно. */
}


@font-face {
  font-family: "Nunito";
  src: url("../vendor/fonts/nunito-var-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito";
  src: url("../vendor/fonts/nunito-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F;
}

/* ============ База ============ */
* { box-sizing: border-box; }
/* Правило бренда: scrollbar-gutter stable — колонка контента не «скачет»
   при переходе между страницами разной высоты (появление/скрытие скроллбара). */
html { scrollbar-gutter: stable; }
/* Плавный скролл — только тем, кто не просил «меньше движения» (WCAG 2.3.3):
   раньше smooth включался безусловно. scroll-driven анимации ниже — под тем же гейтом. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; }
hr { border: 0; border-top: 1px solid var(--border); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
.site-main { min-height: 60vh; padding-bottom: 2.5rem; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; }
.shop-footer { flex-shrink: 0; }

.icon { vertical-align: -0.18em; }

/* ============ Шапка ============ */
.shop-header {
  position: sticky; top: 0; z-index: 40;
  /* без серой линии снизу — разделение даёт полупрозрачный фон с блюром */
  background: color-mix(in oklab, var(--background) 97%, transparent);
  /* v1.83: премиальное стекло — сатурация подложки делает блюр сочнее */
  backdrop-filter: blur(8px) saturate(1.3);
}
.shop-header__inner { display: flex; flex-direction: column; }
.shop-header__row--top { display: flex; align-items: center; gap: .5rem; min-height: 4rem; }
.shop-header__actions { display: flex; align-items: center; gap: .35rem; margin-left: .25rem; }

.logo { display: flex; align-items: center; gap: .6rem; border-radius: var(--radius-sm); }
.logo__mark {
  width: 2.5rem; height: 2.5rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--primary); color: var(--primary-foreground);
}
.logo__mark--sm { width: 2rem; height: 2rem; }
.logo__text { display: none; flex-direction: column; line-height: 1.1; }
@media (min-width: 640px) { .logo__text { display: flex; } }
.logo__name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.logo__tagline { font-size: .72rem; color: var(--muted-foreground); }

/* Этап 23: поиск усилен — шире, выше, с кнопкой-«лупой» внутри капсулы */
.search { position: relative; flex: 1 1 auto; margin-left: .25rem; max-width: 42rem; }
.search__input {
  width: 100%; height: 2.9rem; border: 0; border-radius: 999px;
  background: var(--muted); padding: 0 3.6rem 0 1.25rem; font: inherit; color: inherit;
}
.search__input::placeholder { color: var(--muted-foreground); }
.search__input:focus { outline: 2px solid var(--primary); outline-offset: 0; background: var(--card); }
.search__submit {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%);
  width: 2.35rem; height: 2.35rem; flex: 0 0 auto; border: 0; border-radius: 999px;
  cursor: pointer; background: var(--primary); color: var(--primary-foreground);
  display: inline-flex; align-items: center; justify-content: center;
}
.search__submit:hover { filter: brightness(.94); }
.search__submit:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Этап 23: на мобильных поиск получает собственную строку под лого —
   не юлиться в узкой строке, а дышать на всю ширину */
@media (max-width: 639.9px) {
  .shop-header__row--top { flex-wrap: wrap; padding-bottom: .45rem; }
  .shop-header__actions { margin-left: auto; }
  .search { order: 10; flex: 0 0 100%; margin: .15rem 0 0; max-width: none; }
}
.search__suggest {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0; z-index: 50;
  background: var(--card); border: 0; border-radius: var(--radius); overflow: hidden; max-height: 24rem; overflow-y: auto;
}
.search--page { flex: 1 1 auto; }

.suggest-list { padding: .35rem; }
.suggest-item {
  display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem;
  border-radius: var(--radius-sm);
}
.suggest-item:hover { background: var(--secondary); }
.suggest-item__img { width: 2.4rem; height: 2.4rem; border-radius: .5rem; object-fit: cover; }
.suggest-item__img--empty { display: inline-flex; align-items: center; justify-content: center; background: var(--peach); color: var(--primary); }
.suggest-item__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.suggest-item__price { font-weight: 700; color: var(--primary); font-size: .92rem; white-space: nowrap; }
.suggest-item--all { color: var(--muted-foreground); font-size: .88rem; }
.suggest-item--empty { color: var(--muted-foreground); }
.suggest-item--heading { font-weight: 800; color: var(--foreground); font-size: .85rem; text-transform: none; }
.suggest-item__count { color: var(--muted-foreground); font-size: .8rem; white-space: nowrap; }

.icon-btn {
  width: 2.75rem; height: 2.75rem; flex: 0 0 auto; border: 0; background: transparent;
  border-radius: 999px; color: color-mix(in oklab, var(--foreground) 80%, transparent);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--secondary); color: var(--primary); }

.shop-header__row--nav { display: none; align-items: center; gap: .2rem; min-height: 2.75rem; }
/* Этап 9 (D9): полоса категорий 768–1023px переполняла страницу (1135px) —
   прокрутка внутри полосы быстрых чипов вместо скролла документа.
   Мега-панель живёт ВНЕ прокручиваемого контейнера, чтобы не обрезаться. */
@media (min-width: 768px) {
  .shop-header__row--nav { display: flex; }
}
.chip-link {
  display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .75rem;
  border-radius: .6rem; font-size: .88rem; white-space: nowrap;
}
.chip-link:hover { background: var(--secondary); }
.chip-link--active { background: var(--secondary); color: var(--primary); font-weight: 700; }
.chip-link__count { color: var(--muted-foreground); font-size: .78rem; }

/* Мега-меню категорий (приёмка витрины) — панель как в легаси-витрине */
.mega-menu { position: relative; flex: 0 0 auto; }
.mega-menu__trigger {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem;
  border-radius: .6rem; font-size: .88rem; font-weight: 700; cursor: pointer;
  user-select: none; white-space: nowrap;
  appearance: none; background: none; border: 0; font-family: inherit; color: inherit;
  anchor-name: --mega-menu-trigger;
}
.mega-menu__trigger:hover { background: var(--secondary); color: var(--primary); }
.mega-menu__chevron { display: inline-flex; transition: transform var(--motion-fast) var(--ease-brand); }
.mega-menu:has(.mega-menu__panel:popover-open) .mega-menu__chevron { transform: rotate(180deg); }
.mega-menu:has(.mega-menu__panel:popover-open) .mega-menu__trigger { background: var(--secondary); color: var(--primary); }
.mega-menu__panel {
  position: absolute; left: 0; top: calc(100% + .5rem); z-index: 60;
  width: min(40rem, calc(100vw - 2rem));
  /* v1.92: канон плавающих панелей — чистая карточная поверхность без тени
     и рамки (border: 0 заодно сбрасывает UA-рамку нативного [popover]) */
  background: var(--card); border: 0; border-radius: var(--radius); padding: .5rem;
}
.mega-menu__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .15rem;
  max-height: 28rem; overflow-y: auto; scrollbar-width: thin;
}
@media (min-width: 1200px) {
  /* 11 категорий → 3 колонки: всё видно без прокрутки панели */
  .mega-menu__panel { width: min(46rem, calc(100vw - 2rem)); }
  .mega-menu__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* v1.69: Popover API — панель в top-layer (не клиппится шапкой и z-index
   соседей), клик-вне/Esc/фокус-менеджмент — поведение платформы
   (light-dismiss), JS-стражи сняты. Гейт :popover-open: в браузерах без
   Popover API панель прячется, а shop.js ведёт её классом .mega-menu--open
   (фолбэк-блок ниже). inset-ресет против UA-дефолтов popover (fixed/inset:0),
   мягкое появление — @starting-style + allow-discrete. */
@supports selector(:popover-open) {
  /* v1.69.1: панель в top-layer — её containing block это вьюпорт
     (offsetParent === null), поэтому DOM-позиционирование absolute от
     обёртки .mega-menu не работает; координаты даёт CSS anchor positioning
     (top: anchor(...)) где поддерживается, иначе shop.js ставит
     fixed-координаты по rect триггера. */
  .mega-menu__panel {
    position: fixed; inset: auto; margin: 0; z-index: auto;
    transition: opacity var(--motion-base) var(--ease-brand), transform var(--motion-base) var(--ease-brand), display var(--motion-base) var(--ease-brand) allow-discrete, overlay var(--motion-base) var(--ease-brand) allow-discrete;
  }
  @supports (top: anchor(bottom)) {
    .mega-menu__panel {
      top: calc(anchor(--mega-menu-trigger bottom) + .5rem);
      left: max(anchor(--mega-menu-trigger left), .5rem);
    }
  }
  @starting-style { .mega-menu__panel:popover-open { opacity: 0; transform: translateY(-4px); } }
  .mega-menu__panel::backdrop { background: transparent; }
}
/* v1.82: Interest Invokers — нативный hover-intent на триггерах с interestfor
   (Chrome 143+): панели открываются наведением без JS-таймеров; задержки
   повторяют паттерн v1.81 (лёгкая инерция открытия 0.15 с, грейс закрытия
   0.15 с — панель не мигает при движении к ней). В браузерах без поддержки
   свойства неизвестны — правило инертно. */
.mega-menu__trigger,
.city-picker__trigger,
.user-menu__trigger {
  interest-delay-start: var(--motion-fast);
  interest-delay-end: var(--motion-fast);
}

@supports not selector(:popover-open) {
  .mega-menu__panel { display: none; }
  .mega-menu--open .mega-menu__panel { display: block; }
}
.mega-menu__item {
  display: flex; align-items: flex-start; gap: .6rem; padding: .6rem;
  border-radius: var(--radius-sm);
}
.mega-menu__item:hover { background: var(--secondary); }
.mega-menu__item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.mega-menu__icon {
  width: 2.5rem; height: 2.5rem; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--secondary); color: var(--primary);
}
.mega-menu__item:hover .mega-menu__icon { background: var(--primary); color: var(--primary-foreground); }
.mega-menu__body { min-width: 0; display: flex; flex-direction: column; }
.mega-menu__name { font-size: .9rem; font-weight: 700; }
.mega-menu__meta { font-size: .74rem; color: var(--muted-foreground); }
.mega-menu__desc {
  font-size: .74rem; color: var(--muted-foreground); margin-top: .15rem;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
/* v1.76: группы категорий с подкатегориями — колонка: ссылка-корень +
   список детей мелким кеглем с отступом под текст корня (иконка 2.5rem) */
.mega-menu__group { min-width: 0; padding-bottom: .35rem; }
.mega-menu__group .mega-menu__item { padding: .5rem .6rem; }
.mega-menu__subs {
  display: flex; flex-direction: column; align-items: flex-start;
  margin: 0 .6rem 0 3.1rem; gap: .05rem;
}
.mega-menu__sub {
  font-size: .78rem; color: var(--muted-foreground); text-decoration: none;
  padding: .18rem .4rem; border-radius: var(--radius-sm); max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mega-menu__sub:hover { color: var(--primary); background: var(--secondary); }
.mega-menu__sub:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

.user-menu, .mobile-menu { position: relative; }

/* Этап 23: единый триггер профиля (иконка + подпись) — вход, регистрация
   и «Продавцам» живут в одной панели, вместо россыпи кнопок в шапке */
.user-menu__trigger {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem;
  border-radius: 999px; cursor: pointer; list-style: none; user-select: none;
  color: color-mix(in oklab, var(--foreground) 80%, transparent);
  white-space: nowrap;
  /* v1.70: триггер — настоящий button (ресет вместо summary) */
  appearance: none; background: none; border: 0; font-family: inherit;
}
.user-menu__trigger { anchor-name: --user-trig; }
.user-menu__trigger:hover,
.user-menu:has(.user-menu__panel:popover-open) .user-menu__trigger { background: var(--secondary); color: var(--primary); }
.user-menu__trigger-label { display: none; font-size: .84rem; font-weight: 700; }
@media (min-width: 640px) { .user-menu__trigger-label { display: inline; } }
.user-menu__panel--guest { min-width: 13.5rem; }
.user-menu__cta { margin: .2rem 0 .15rem; }
.user-menu__cta + .user-menu__cta { margin-top: 0; }
.user-menu__sep { border: 0; margin: .4rem 0; height: 0; }
.user-menu__link-icon { display: inline-flex; color: var(--primary); }
.user-menu__link-body { display: flex; flex-direction: column; line-height: 1.25; }
.user-menu__link-desc { font-size: .74rem; color: var(--muted-foreground); }

/* v1.71: flex-раскладка панели задаётся только в видимых состояниях
   (:popover-open / .user-menu--open ниже). Причина: авторский
   display: flex в этом общем правиле перебивал UA-скрытие
   [popover]:not(:popover-open) { display: none } (author > UA в каскаде,
   UA-правило без !important) — панель профиля была видимой на всех
   страницах при закрытом popover (v1.70-регрессия, найдено browser-приёмкой).
   mobile-menu__panel — не popover (details), flex ему нужен всегда. */
.user-menu__panel, .mobile-menu__panel {
  position: absolute; right: 0; top: calc(100% + .5rem); z-index: 60; min-width: 15rem;
  /* v1.92: канон плавающих панелей — чистая карточная поверхность; border: 0
     сбрасывает UA-рамку [popover] (урок v1.89), тени сняты (ноль теней) */
  background: var(--card); border: 0; border-radius: var(--radius); padding: .5rem;
}
.mobile-menu__panel { display: flex; flex-direction: column; gap: .15rem; }
/* v1.70: меню профиля — панель popover (top-layer). Выравнивание по правому
   краю триггера: left: anchor(right) + translate -100% (сдвиг на собственную
   ширину панели), на малых экранах — clamp через min(); фолбэк place()
   в shop.js. Браузеры без Popover API — класс .user-menu--open. */
@supports selector(:popover-open) {
  .user-menu__panel[popover] {
    position: fixed; inset: auto; margin: 0; z-index: auto;
    transition: opacity var(--motion-base) var(--ease-brand), transform var(--motion-base) var(--ease-brand), display var(--motion-base) var(--ease-brand) allow-discrete, overlay var(--motion-base) var(--ease-brand) allow-discrete;
  }
  @supports (top: anchor(bottom)) {
    .user-menu__panel[popover] {
      top: calc(anchor(--user-trig bottom) + .5rem);
      left: min(anchor(--user-trig right), calc(100% - .5rem));
      translate: -100% 0;
    }
  }
  /* v1.71: flex-раскладка — только в открытом состоянии (иначе
     авторский display перебивает UA-скрытие закрытого popover) */
  .user-menu__panel[popover]:popover-open { display: flex; flex-direction: column; gap: .15rem; }
  @starting-style { .user-menu__panel[popover]:popover-open { opacity: 0; transform: translateY(-4px); } }
  .user-menu__panel[popover]::backdrop { background: transparent; }
}
@supports not selector(:popover-open) {
  .user-menu__panel[popover] { display: none; }
  .user-menu--open .user-menu__panel[popover] { display: flex; flex-direction: column; gap: .15rem; }
}
.user-menu__email { padding: .4rem .6rem; font-size: .82rem; color: var(--muted-foreground); word-break: break-all; }
.user-menu__link, .user-menu__link--button {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem; border-radius: var(--radius-sm);
  border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.user-menu__link:hover { background: var(--secondary); }

.mobile-menu__panel {
  left: 0; right: auto; width: min(19rem, 85vw); max-height: 70vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.mobile-menu__title { padding: .4rem .6rem .5rem; font-weight: 800; margin-bottom: .3rem; }
.mobile-menu__link { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius-sm); font-size: .92rem; }
.mobile-menu__link:hover { background: var(--secondary); }
.mobile-menu__icon { width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--secondary); color: var(--primary); }
.mobile-menu__name { flex: 1 1 auto; min-width: 0; }
.mobile-menu__count { color: var(--muted-foreground); font-size: .78rem; }
/* v1.76: аккордеон категорий в мобильном меню (details/summary без JS) */
.mobile-menu__acc > summary { list-style: none; cursor: pointer; }
.mobile-menu__acc > summary::-webkit-details-marker { display: none; }
.mobile-menu__chevron { margin-left: auto; color: var(--muted-foreground); transition: transform var(--motion-fast) var(--ease-brand); }
.mobile-menu__acc[open] .mobile-menu__chevron { transform: rotate(180deg); }
.mobile-menu__acc > summary .mobile-menu__count { margin-left: 0; }
.mobile-menu__subs { display: flex; flex-direction: column; padding: .1rem 0 .3rem .5rem; }
.mobile-menu__link--sub {
  padding: .45rem .6rem .45rem 1.6rem; font-size: .85rem; color: var(--muted-foreground);
}
.mobile-menu__link--sub:hover { color: var(--primary); }
/* разделитель групп в мобильном меню — только отступ, без серой линии */
.mobile-menu__sep { border: 0; margin: .35rem 0; height: 0; }
.mobile-menu summary::-webkit-details-marker { display: none; }
@media (min-width: 768px) { .mobile-menu { display: none; } }

/* Этап 23: кнопки «Вход для продавцов»/«Кабинет продавца» и пара
   Войти+Регистрация убраны из шапки — теперь всё в меню профиля,
   доступном на любой ширине (правило «без дублей») */

/* ============ Кнопки ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700;
  padding: .6rem 1.15rem; cursor: pointer; transition: filter var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand);
}
.btn:hover { filter: brightness(.97); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn--ghost { background: var(--muted); border-color: transparent; color: inherit; }
.btn--ghost:hover { background: var(--secondary); }
.btn--danger { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.btn--sm { padding: .35rem .7rem; font-size: .85rem; }
.btn--lg { padding: .8rem 1.5rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ============ Хиро / секции (Этап 22: премиум-редизайн) ============ */
.hero { position: relative; padding: 3rem 0 1.5rem; overflow: hidden; isolation: isolate; }
/* Премиум-фон: мягкие цветные «ауроры» (чистый CSS, без картинок) */
.hero__aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero__blob--peach {
  width: 34rem; height: 34rem; left: -10rem; top: -12rem;
  background: radial-gradient(circle at 35% 35%, var(--peach), transparent 70%);
  animation: heroFloat 14s ease-in-out infinite alternate;
}
.hero__blob--mint {
  width: 28rem; height: 28rem; right: -8rem; top: -6rem;
  background: radial-gradient(circle at 60% 40%, var(--mint-soft), transparent 70%);
  animation: heroFloat 17s ease-in-out infinite alternate-reverse;
}
.hero__blob--berry {
  width: 22rem; height: 22rem; left: 42%; bottom: -12rem;
  background: radial-gradient(circle at 50% 50%, var(--berry-soft), transparent 70%);
  animation: heroFloat 20s ease-in-out infinite alternate;
}
@keyframes heroFloat { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(2.5rem, 1.5rem, 0) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .hero__blob { animation: none; } }

.hero__inner { display: grid; gap: 2rem; }
@media (min-width: 960px) { .hero__inner { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem; } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .85rem; border-radius: 999px;
  background: color-mix(in oklab, var(--card) 72%, transparent);
  border: 0;
  backdrop-filter: blur(6px);
  color: var(--primary); font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em;
}
.hero__title {
  margin-top: 1rem;
  font-size: clamp(2rem, 4.6vw, 3.15rem);
  font-weight: 900; line-height: 1.08; letter-spacing: -.025em;
}
.hero__accent {
  background: linear-gradient(100deg, var(--primary), var(--berry));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--primary);
}
.hero__subtitle { margin-top: .9rem; color: var(--muted-foreground); font-size: 1.05rem; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.3rem; }

/* Медиа: крупная карточка с мягким свечением и плавающими стеклянными бейджами */
.hero__media { position: relative; animation: heroUp .55s var(--ease-brand) both; }
.hero__media-glow {
  position: absolute; inset: -8% -6%; z-index: -1; border-radius: 2rem;
  background: radial-gradient(circle at 30% 20%, color-mix(in oklab, var(--peach) 65%, transparent), transparent 65%);
  filter: blur(40px);
}
.hero__img {
  width: 100%; height: auto; display: block; border-radius: 1.75rem;
}
.hero__float {
  position: absolute; display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .85rem; border-radius: .9rem;
  background: color-mix(in oklab, var(--card) 82%, transparent);
  border: 0; backdrop-filter: blur(8px);
  font-size: .82rem; font-weight: 800; color: var(--foreground);
}
.hero__float .icon { color: var(--mint); }
.hero__float--br .icon { color: var(--primary); }
.hero__float--tl { top: 1rem; left: -.6rem; animation: heroBob 5.5s ease-in-out infinite alternate; }
.hero__float--br { bottom: 1.2rem; right: -.6rem; animation: heroBob 6.5s ease-in-out infinite alternate-reverse; }
@keyframes heroBob { from { transform: translateY(-3px); } to { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .hero__float { animation: none; } }
@media (max-width: 640px) { .hero__float--tl { left: .5rem; } .hero__float--br { right: .5rem; } }
@keyframes heroUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero__text > * { animation: heroUp .5s var(--ease-brand) both; animation-delay: calc(sibling-index() * 70ms); }
.hero__text > :nth-child(2) { animation-delay: .07s; }
.hero__text > :nth-child(3) { animation-delay: .14s; }
.hero__text > :nth-child(4) { animation-delay: .21s; }
@media (prefers-reduced-motion: reduce) { .hero__text > *, .hero__media { animation: none; } }

/* Полоса доверия внутри хиро: цельный ряд фактов без серых линий и
   без отдельных плашек-карточек (без дублей и «AI-шаблонных» стикеров) */
.hero__trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.9rem;
  padding-top: 1.1rem;
}
@media (min-width: 640px) { .hero__trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .hero__trust { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .hero__trust-item { padding: 0 1.15rem; }
  .hero__trust-item:first-child { padding-left: 0; }
}
.hero__trust-item { display: flex; align-items: flex-start; gap: .65rem; min-width: 0; }
.hero__trust-icon {
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.hero__trust-icon--mint { background: var(--mint-soft); color: var(--mint); }
.hero__trust-icon--berry { background: var(--berry-soft); color: var(--berry); }
.hero__trust-icon--peach { background: var(--peach); color: var(--primary); }
.hero__trust-body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.hero__trust-title { font-weight: 800; font-size: .9rem; line-height: 1.25; }
.hero__trust-text { color: var(--muted-foreground); font-size: .8rem; line-height: 1.35; }

.section { padding: 1.6rem 0 0; }
.section--last { padding-bottom: 1rem; }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; }
.section__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; }
.section__link { display: inline-flex; align-items: center; gap: .2rem; color: var(--primary); font-weight: 700; font-size: .9rem; }

.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(4, 1fr); } }
/* 10 активных категорий → 2 ряда по 5; сетка не разваливается при изменении числа */
@media (min-width: 1024px) { .category-grid { grid-template-columns: repeat(5, 1fr); } }
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center;
  padding: 1rem .6rem; background: var(--card); border: 1px solid transparent;
  border-radius: var(--radius);
  /* v1.92: отклик — брендовая линия акцента; геометрия и тени сняты */
  transition: border-color var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand);
}
.category-card:hover { border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.category-card__icon { width: 3rem; height: 3rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--secondary); color: var(--primary); }
.category-card__name { font-weight: 700; font-size: .86rem; }
.category-card__count { color: var(--muted-foreground); font-size: .74rem; }

/* ============ Карточки товара ============ */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-card {
  background: var(--card); border: 1px solid transparent; border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  /* v1.92: отклик карточки — брендовая линия акцента (hover — только цвет);
     пружина и цветущая тень v1.83 сняты по правилу бренда «ноль теней» */
  transition: border-color var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand);
}
.product-card:hover { border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.product-card__media { position: relative; aspect-ratio: 1; background: var(--cream); display: block; }
.product-card__img { width: 100%; height: 100%; object-fit: cover; }
.product-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: color-mix(in oklab, var(--primary) 45%, var(--peach)); }
.product-card__body { padding: .7rem .8rem .85rem; display: flex; flex-direction: column; gap: .3rem; flex: 1 1 auto; }
.product-card__title { font-weight: 700; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.product-card__meta { display: flex; align-items: center; gap: .35rem; }
.product-card__reviews { color: var(--muted-foreground); font-size: .8rem; }
.product-card__price { display: flex; align-items: baseline; gap: .45rem; margin-top: auto; }
.price { font-weight: 800; color: var(--primary); }
.price--xl { font-size: 1.6rem; }
.price-old { color: var(--muted-foreground); font-size: .88rem; }
.product-card__seller { display: flex; align-items: center; gap: .3rem; color: var(--muted-foreground); font-size: .78rem; margin-top: .15rem; }
/* v1.10: имя продавца — ссылка на витрину магазина */
a.product-card__seller:hover { color: var(--primary); }
.star { color: var(--peach); }
.star--filled { color: var(--primary); }

.badge {
  position: absolute; top: .6rem; left: .6rem; padding: .18rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 800; color: #fff;
}
.badge--new { background: var(--mint); }
.badge--sale { background: var(--berry); }

/* ============ Страницы ============ */
/* v1.11: padding-block — горизонтальные отступы остаётся у .container,
   иначе контент main шире шапки/футора (дефект выравнивания) */
.page { padding-block: 1.2rem 2rem; }
.page__head { display: flex; align-items: baseline; gap: .8rem; margin-bottom: .8rem; }
.page__title { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.01em; }
.page__count { color: var(--muted-foreground); font-size: .9rem; }
.breadcrumbs { display: flex; align-items: center; gap: .35rem; color: var(--muted-foreground); font-size: .84rem; margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary); }
/* v1.64: mask-fade края горизонтального скролл-ряда — мягкое указание на прокрут.
   Fades проявляются, только когда контент доходит до края (на фоне страницы
   прозрачность невидима); универсальная поддержка (включая -webkit-префикс). */
.chips-row { display: flex; gap: .4rem; overflow-x: auto; padding: .35rem 0 .75rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%); }

.catalog-layout { display: grid; gap: 1.4rem; align-items: start; }
@media (min-width: 900px) { .catalog-layout { grid-template-columns: 16.5rem 1fr; } }
.filters {
  background: var(--card); border: 0; border-radius: var(--radius);
  padding: 1rem;
  display: none;
}
@media (min-width: 900px) { .filters { display: block; } }
.filters__group { margin-bottom: .9rem; }
.filters__group--check { margin-bottom: 1.1rem; }
.filters__label { display: block; font-size: .82rem; font-weight: 700; color: var(--muted-foreground); margin-bottom: .3rem; }
.filters__price { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
/* ---- v1.85: быстрые ценовые пресеты под двойным слайдером.
      Состояние — aria-pressed (программно читается скринридерами).
      Тёмная тема читает те же переменные; v1.92: отклик — фон и цвет,
      hover-геометрия и тени v1.83 сняты (правило бренда «ноль теней»). ---- */
.price-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.price-preset {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: .78rem; font-weight: 600;
  color: var(--foreground); background: var(--muted);
  border: 1px solid transparent; border-radius: 999px;
  padding: .3rem .72rem; cursor: pointer;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand);
}
.price-preset:hover { background: var(--secondary); color: var(--primary); }
.price-preset:active { transform: scale(.97); }
.price-preset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.price-preset[aria-pressed="true"] {
  background: var(--primary);
  color: var(--primary-foreground); font-weight: 700;
}
.sort-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .9rem; }
.sort-row__label { color: var(--muted-foreground); font-size: .86rem; }

.catalog-results { min-width: 0; }

/* ============ Формы ============ */
/* Канонический инпут платформы (единый класс .input; .form-input — легаси-алиас).
   Правило бренда: у полей НЕТ рамок — ни серых, ни двойных (border+outline).
   Поле — пилюля (999px): как поиск в hero, city-picker и все кнопки бренда.
   Мягкий фон; фокус — единственная outline-рамка (радиус наследует пилюлю). */
.input, .form-input {
  width: 100%; min-height: 2.6rem; padding: .55rem .8rem;
  border: 0; border-radius: 999px;
  background: var(--muted); font: inherit; color: var(--foreground);
}
.input:focus, .form-input:focus { outline: 2px solid var(--primary); outline-offset: 0; background-color: var(--card); }
/* Загрузка файлов: брендовый вид кнопки (без нативной) */
input[type="file"] { font: inherit; color: var(--foreground); }
input[type="file"]::file-selector-button {
  border: 0; background: var(--muted); color: var(--foreground);
  border-radius: 999px; padding: .45rem .85rem; margin-right: .7rem;
  cursor: pointer; font: inherit; font-weight: 700;
}
input[type="file"]::file-selector-button:hover { background: var(--cream); color: var(--primary); }
.input--auto { width: auto; }
/* Селекты: единый кастомный вид без нативной стрелки (одна стрелка на всю платформу) */
select.input, select.form-input {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23867a6d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center;
}
textarea.input, textarea.form-input { min-height: 6rem; resize: vertical; border-radius: var(--radius); }
.checkbox { display: inline-flex; align-items: flex-start; gap: .5rem; cursor: pointer; }
.checkbox input { width: 1.15rem; height: 1.15rem; margin-top: .14rem; }
.checkbox--sm { font-size: .82rem; }
.form-field { margin-bottom: .85rem; }
.form-field--check { margin-bottom: .85rem; }
.form-label { display: block; font-size: .88rem; font-weight: 700; margin-bottom: .3rem; }
.form-hint { color: var(--muted-foreground); font-size: .78rem; margin-top: .25rem; }
.form-hint--block { margin: -.2rem 0 .7rem; }
.form-error { color: var(--destructive); font-size: .8rem; margin-top: .25rem; }
.form-errors { background: color-mix(in oklab, var(--destructive) 8%, transparent); color: var(--destructive); border-radius: var(--radius-sm); padding: .7rem .9rem; margin-bottom: 1rem; font-size: .88rem; }
.form-field--error .input { outline: 2px solid var(--destructive); outline-offset: 0; }
.form-field--error .input:focus { outline-color: var(--destructive); }
.req { color: var(--destructive); }

/* ============ Кастомные чекбоксы и радио: единый бренд ============
   Базовый стиль через :where() — нулевая специфичность, поэтому локальные
   паттерны (скрытые input в .switch/.radio/.brand-option/.filter-chip)
   сохраняют своё поведение без исключений. */
:where(input[type="checkbox"]), :where(input[type="radio"]) {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  flex: none; width: 1.15rem; height: 1.15rem; margin: 0;
  border: 1.5px solid color-mix(in oklab, var(--foreground) 28%, transparent);
  background: var(--card); display: inline-grid; place-content: center;
  cursor: pointer; transition: background var(--motion-snap) var(--ease-brand), border-color var(--motion-snap) var(--ease-brand);
}
:where(input[type="checkbox"]) { border-radius: .4rem; }
:where(input[type="radio"]) { border-radius: 50%; }
:where(input[type="checkbox"])::before {
  content: ""; width: .62rem; height: .62rem; background: var(--primary-foreground);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0); transform-origin: center; transition: transform var(--motion-snap) var(--ease-brand);
}
:where(input[type="radio"])::before {
  content: ""; width: .55rem; height: .55rem; border-radius: 50%;
  background: var(--primary); transform: scale(0); transform-origin: center;
  transition: transform var(--motion-snap) var(--ease-brand);
}
:where(input[type="checkbox"]):checked, :where(input[type="radio"]):checked { border-color: var(--primary); }
:where(input[type="checkbox"]):checked { background: var(--primary); }
:where(input[type="checkbox"]):checked::before, :where(input[type="radio"]):checked::before { transform: scale(1); }
:where(input[type="checkbox"]):indeterminate { background: var(--primary); border-color: var(--primary); }
:where(input[type="checkbox"]):indeterminate::before {
  transform: scale(1); clip-path: polygon(0 42%, 100% 42%, 100% 58%, 0 58%);
}
:where(input[type="checkbox"]):focus-visible, :where(input[type="radio"]):focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
:where(input[type="checkbox"]):disabled, :where(input[type="radio"]):disabled { opacity: .45; cursor: not-allowed; }

:where(input[type="checkbox"]):hover, :where(input[type="radio"]):hover {
  border-color: var(--primary);
}

/* Секции многошаговых форм: заголовок-разделитель, без лишних рамок-плашек */
.form-section { margin-top: 1.15rem; }
.form-section:first-of-type { margin-top: 0; }
.form-section__title {
  font-size: .95rem; font-weight: 800; letter-spacing: -.01em;
  margin: 0 0 .75rem; padding-top: 1.05rem; border-top: 1px solid var(--border);
}
.form-section:first-of-type .form-section__title { padding-top: 0; border-top: 0; }
.form-section__title small {
  font-size: .78rem; font-weight: 700; color: var(--muted-foreground); margin-left: .5rem; letter-spacing: 0;
}
.form-req-note { font-size: .78rem; color: var(--muted-foreground); margin-top: .1rem; }

/* ============ Многошаговые формы (визард): прогресс + сводка ============
   Правило платформы: без теней и двойных рамок — только border и фон. */
/* Сегментированный прогресс: кремовая «дорожка», пилюли шагов —
   брендовые состояния (активный — персик, пройденный — мята). Без рамок. */
.wizard-progress {
  display: flex; align-items: stretch; gap: .4rem;
  list-style: none; margin: 0 0 1.25rem; padding: .35rem;
  background: var(--cream); border-radius: 14px;
}
.wizard-progress__step { flex: 1 1 auto; min-width: 0; display: flex; }
.wizard-progress__link {
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .55rem .6rem; border-radius: 11px;
  background: transparent; color: var(--muted-foreground);
  font-size: .82rem; font-weight: 700; text-decoration: none;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand);
}
.wizard-progress__num {
  display: inline-grid; place-content: center; flex: none;
  width: 1.65rem; height: 1.65rem; border-radius: 999px;
  background: var(--card); color: var(--muted-foreground);
  font-size: .8rem; font-weight: 800;
}
.wizard-progress__step.is-active .wizard-progress__link { background: var(--peach); color: var(--foreground); }
.wizard-progress__step.is-active .wizard-progress__num { background: var(--primary); color: var(--primary-foreground); }
.wizard-progress__step.is-done .wizard-progress__link { background: var(--mint-soft); color: var(--foreground); }
.wizard-progress__step.is-done .wizard-progress__num { background: var(--mint); color: #fff; }
a.wizard-progress__link:hover .wizard-progress__name { text-decoration: underline; }
.wizard-progress__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .wizard-progress__name { display: none; }
  .wizard-progress__link { padding: .5rem; gap: 0; }
}
/* Визарды с 4+ шагами: неактивные шаги сворачиваются в круги-пилюли,
   активный раскрывается с названием — всё помещается без обрезки. */
.wizard-progress:has(> .wizard-progress__step:nth-child(4)) { padding: .3rem; }
.wizard-progress:has(> .wizard-progress__step:nth-child(4)) .wizard-progress__link {
  padding: .45rem; gap: .45rem; font-size: .8rem;
}
.wizard-progress:has(> .wizard-progress__step:nth-child(4)) .wizard-progress__num {
  width: 1.5rem; height: 1.5rem; font-size: .76rem;
}
.wizard-progress:has(> .wizard-progress__step:nth-child(4)) .wizard-progress__step:not(.is-active) .wizard-progress__name { display: none; }
.wizard-progress:has(> .wizard-progress__step:nth-child(4)) .wizard-progress__step:not(.is-active) .wizard-progress__link { padding: .45rem; gap: 0; }

.wizard-nav { display: flex; gap: .7rem; margin-top: 1.15rem; }
.wizard-nav .btn--primary { flex: 1; }

.wizard-summary {
  margin: 0 0 1rem; border: 0;
  border-radius: var(--radius-sm); background: var(--cream);
  overflow: hidden;
}
.wizard-summary > div {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .45rem .9rem;
}
.wizard-summary > div + div { border-top: 1px solid var(--border); }
.wizard-summary dt { color: var(--muted-foreground); font-size: .82rem; flex: none; }
.wizard-summary dd {
  margin: 0; font-weight: 700; font-size: .88rem;
  text-align: right; overflow-wrap: anywhere; min-width: 0;
}

.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-field--full { grid-column: 1 / -1; } }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .form-grid--4 { grid-template-columns: repeat(4, 1fr); } .form-grid--5 { grid-template-columns: repeat(5, 1fr); } }

.form-card {
  background: var(--card); border: 0; border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.3rem; margin-bottom: 1rem;
}
.form-card__title { font-size: 1.05rem; font-weight: 800; margin-bottom: .8rem; }
.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.2rem 0 2rem; }

/* ============ Страница товара ============ */
.product-page { display: grid; gap: 1.6rem; margin-top: .4rem; }
/* v1.9.2: min-width:0 — грид-колонка не раздувается min-content содержимого
   (галерея/панель покупки переполняли вьюпорт на мобильных) */
.product-page > * { min-width: 0; }
@media (min-width: 960px) { .product-page { grid-template-columns: minmax(0, 34rem) 1fr; align-items: start; } }
.gallery__main {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--cream); border: 0;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: color-mix(in oklab, var(--primary) 45%, var(--peach)); }
.gallery__thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin-top: .6rem; }
.gallery__thumb { border: 2px solid transparent; border-radius: .7rem; overflow: hidden; padding: 0; background: var(--cream); cursor: pointer; aspect-ratio: 1; }
.gallery__thumb--active { border-color: var(--primary); }

/* --- Галерея v1.8: кликабельное главное фото + стрелки prev/next --- */
.gallery__main-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, var(--background) 84%, transparent);
  color: var(--foreground); cursor: pointer; z-index: 2;
}
.gallery__nav:hover { background: var(--background); }
.gallery__nav--prev { left: .55rem; }
.gallery__nav--next { right: .55rem; }
.gallery__hint {
  position: absolute; right: .6rem; bottom: .6rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .6rem; border-radius: 999px;
  background: color-mix(in oklab, var(--background) 84%, transparent);
  color: var(--muted-foreground); font-size: .72rem; font-weight: 700;
}

/* --- Лайтбокс v1.8 -> v1.71: нативный <dialog> --- */
/* showModal(): панель в top-layer (выше всех z-index), фокус-ловушка,
   инертность фона и Esc (cancel-событие) — платформа; в браузерах без
   showModal фолбэк-режим в shop.js ведёт тот же оверлей атрибутом open
   и ручным inert. Ресеты UA-дефолтов dialog (margin/padding/max-*),
   ::backdrop прозрачный — затемнение несёт сам оверлей. */
.lightbox {
  position: fixed; inset: 0; z-index: 1200;
  width: 100%; height: 100%;
  margin: 0; border: 0; padding: 0;
  max-width: none; max-height: none;
  background: color-mix(in oklab, #000 88%, transparent);
  opacity: 0; transition: opacity var(--motion-gentle) var(--ease-brand);
}
.lightbox::backdrop { background: transparent; }
.lightbox.is-open { opacity: 1; }
.lightbox__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox__img {
  max-width: min(92vw, 1200px); max-height: 86vh; border-radius: var(--radius);
  transition: transform var(--motion-gentle) var(--ease-brand); cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.lightbox__img.is-zoomed { transform: scale(2); cursor: zoom-out; }
.lightbox__close, .lightbox__nav {
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in oklab, #fff 14%, transparent);
  color: #fff; cursor: pointer;
}
.lightbox__close:hover, .lightbox__nav:hover { background: color-mix(in oklab, #fff 26%, transparent); }
.lightbox__close { position: absolute; top: .9rem; right: .9rem; z-index: 2; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lightbox__nav--prev { left: .9rem; }
.lightbox__nav--next { right: .9rem; }
.lightbox__counter {
  position: absolute; bottom: 1.1rem; left: 50%; transform: translateX(-50%);
  padding: .3rem .85rem; border-radius: 999px; background: color-mix(in oklab, #fff 14%, transparent);
  color: #fff; font-size: .85rem; font-variant-numeric: tabular-nums;
}
html.lb-lock, html.lb-lock body { overflow: hidden; }
@media (max-width: 640px) {
  .lightbox__img { max-width: 96vw; max-height: 78vh; }
  .lightbox__nav--prev { left: .4rem; }
  .lightbox__nav--next { right: .4rem; }
  .lightbox__close { top: .5rem; right: .5rem; }
}
.product-info__title { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -.01em; }
.product-info__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; color: var(--muted-foreground); font-size: .88rem; margin-bottom: .8rem; }
.product-info__price { display: flex; align-items: baseline; gap: .6rem; margin-bottom: 1rem; }
.product-info__subheading { font-size: 1rem; font-weight: 800; margin-bottom: .4rem; }
.product-info__desc p { color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.product-info__note { color: var(--muted-foreground); font-size: .8rem; margin: .5rem 0 0; }
.variants { margin-bottom: 1.1rem; }
.variants__label { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.variants__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.variant-chip {
  display: inline-flex; align-items: center; gap: .45rem; border: 0;
  border-radius: .8rem; padding: .45rem .75rem; background: var(--muted); font-size: .88rem;
}
.variant-chip--out { opacity: .55; background: var(--muted); }
.variant-chip__dot { width: .85rem; height: .85rem; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--foreground) 12%, transparent); display: inline-block; }
.variant-chip__stock { color: var(--muted-foreground); font-size: .78rem; }

.seller-card {
  display: flex; align-items: center; gap: .8rem; background: var(--cream);
  border: 0; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1.1rem;
  /* v1.9.2: равный отступ от панели покупки и перенос строки на узких экранах
     (раньше блоки слипались, когда нет секции «Этот товар у других продавцов») */
  margin-top: 1rem; flex-wrap: wrap;
}
.seller-card__body { min-width: 0; flex: 1 1 auto; }
.seller-card__icon { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; border-radius: var(--radius-sm); background: var(--secondary); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.seller-card__name { font-weight: 800; }
.seller-card__meta { color: var(--muted-foreground); font-size: .82rem; }
.seller-card__badge { margin-left: auto; display: inline-flex; align-items: center; gap: .3rem; background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 75%, black); font-weight: 700; font-size: .8rem; padding: .3rem .7rem; border-radius: 999px; white-space: nowrap; }
.seller-card__badge--warn { background: var(--peach); color: color-mix(in oklab, var(--primary) 70%, black); }
.seller-card__badge--blocked { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }

.product-attrs__list { margin: 0; }
.product-attrs__row { display: grid; grid-template-columns: 10rem 1fr; gap: .8rem; padding: .45rem 0; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.product-attrs__row dt { color: var(--muted-foreground); }
.product-attrs__row dd { margin: 0; }
.safety-note { display: flex; gap: .6rem; align-items: flex-start; background: var(--peach); border-radius: var(--radius-sm); padding: .7rem .9rem; font-size: .88rem; margin-top: 1rem; color: color-mix(in oklab, var(--foreground) 85%, transparent); }

/* ============ Поиск / пустые состояния ============ */
.search-page-form { display: flex; gap: .6rem; margin-bottom: 1.2rem; max-width: 38rem; }
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: var(--muted-foreground);
  border: 0; border-radius: var(--radius); background: var(--cream);
}
.empty-state--compact { padding: 1.8rem 1rem; }
.empty-state__hint { margin-top: .3rem; }
.empty-state .btn { margin-top: .9rem; }

/* ============ Пагинация ============ */
.pagination { display: flex; gap: .3rem; justify-content: center; margin: 1.4rem 0 .5rem; flex-wrap: wrap; }

/* v1.81: «Показать ещё» — догрузка выдачи (HTMX); постраничные ссылки ниже — фолбэк */
.load-more { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin: 1.1rem 0 .3rem; }
.load-more__btn { max-width: 26rem; }
.load-more__btn.htmx-request { opacity: .65; pointer-events: none; }
.load-more__hint { font-size: .8125rem; color: var(--muted-foreground); }
.pagination__item { min-width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .7rem; border: 0; background: var(--muted); font-size: .9rem; font-weight: 700; padding: 0 .5rem; }
.pagination__item:hover { background: var(--secondary); }
.pagination__item--current { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.pagination__item--dots { border: 0; background: transparent; }

/* ============ Флеш-сообщения (инлайн-фидбек в формах checkout/промокод) ============ */
.flash { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; border-radius: var(--radius-sm); padding: .6rem .9rem; font-size: .92rem; border: 0; margin-bottom: 1rem; }
.flash > .icon { flex-shrink: 0; }
.flash > span { flex: 1 1 0%; min-width: 0; }
.flash--success { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 70%, black); }
.flash--error { background: color-mix(in oklab, var(--destructive) 8%, transparent); color: var(--destructive); }
.flash--info, .flash--warning { background: var(--peach); color: color-mix(in oklab, var(--primary) 75%, black); }

/* ============ Тосты — единые алерты в правом верхнем углу (v1.5).
   Тёмная тёплая карточка без рамок/теней, цветная иконка по типу,
   полоска-таймер внизу, выезд справа. Серверные сообщения (messages),
   htmx-событие notify (корзина/избранное) и window.LPToast.show(). ==== */
.toasts { position: fixed; top: .9rem; right: .9rem; z-index: 1300; display: flex; flex-direction: column; align-items: flex-end; gap: .55rem; width: min(21rem, calc(100vw - 1.8rem)); pointer-events: none; }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: .65rem; width: 100%; padding: .8rem 2.4rem .9rem .85rem; border-radius: var(--radius-sm); background: oklch(0.27 0.02 45); color: oklch(0.97 0.008 85); font-size: .9rem; font-weight: 600; line-height: 1.4; }
.toast.is-in { animation: toast-in .32s var(--ease-brand) both; }
.toast.is-out { opacity: 0; transform: translateX(1.2rem); transition: opacity var(--motion-slow) var(--ease-brand), transform var(--motion-slow) var(--ease-brand); }
@keyframes toast-in { from { opacity: 0; transform: translateX(1.4rem); } to { opacity: 1; transform: none; } }
.toast__icon { flex: 0 0 auto; width: 1.75rem; height: 1.75rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; margin-top: .05rem; }
.toast--success .toast__icon { background: var(--mint); color: oklch(0.99 0.005 85); }
.toast--error .toast__icon { background: var(--destructive); color: oklch(0.99 0.005 85); }
.toast--warning .toast__icon, .toast--warn .toast__icon { background: var(--primary); color: var(--primary-foreground); }
.toast--info .toast__icon, .toast--debug .toast__icon { background: var(--accent); color: var(--accent-foreground); }
.toast__text { min-width: 0; overflow-wrap: break-word; }
.toast__close { position: absolute; top: .45rem; right: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: oklch(0.97 0.008 85 / .6); cursor: pointer; }
.toast__close:hover { background: oklch(0.97 0.008 85 / .15); color: oklch(0.97 0.008 85); }
.toast__close:focus-visible { outline: 2px solid oklch(0.97 0.008 85); outline-offset: 1px; }
.toast__timer { position: absolute; left: 0; bottom: 0; height: .18rem; width: 100%; transform-origin: left; background: var(--mint); }
.toast--error .toast__timer { background: var(--destructive); }
.toast--warning .toast__timer, .toast--warn .toast__timer { background: var(--primary); }
.toast--info .toast__timer, .toast--debug .toast__timer { background: var(--accent); }
.toast__timer.is-running { animation: toast-timer var(--toast-dur, 4.2s) linear forwards; }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) {
  .toasts { top: .7rem; left: .7rem; right: .7rem; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .toast.is-in { animation: none; }
  .toast__timer.is-running { animation: none; }
}

/* ============ Аутентификация ============ */
.auth-page {
  display: flex; justify-content: center; padding: 3rem 1rem;
  background: linear-gradient(180deg, var(--background) 0%, var(--cream) 100%);
}
/* Вход, оба визарда (покупатель/продавец), восстановление — ОДНА ширина
   и по центру панели: раз и навсегда. Без рамок на карточке. */
.auth-card {
  width: 100%; max-width: 27rem; margin-inline: auto; background: var(--card);
  border: 0; border-radius: var(--radius-lg); padding: 1.8rem 1.7rem;
}
.auth-card--wide { max-width: 27rem; }
/* v1.82: 404-страница-помощник — поиск, популярные разделы, действия */
.notfound-search { display: flex; gap: .5rem; margin-top: 1.25rem; }
.notfound-search .input { flex: 1; min-width: 0; }
.notfound-cats { margin-top: 1.25rem; text-align: left; }
.notfound-cats__label {
  display: block; font-size: .8125rem;
  color: var(--muted-foreground); margin-bottom: .5rem;
}
.notfound-cats__links { display: flex; flex-wrap: wrap; gap: .5rem; }
.notfound-cat {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .375rem .75rem; border-radius: 999px;
  background: var(--muted); color: var(--foreground);
  font-size: .8125rem; text-decoration: none;
  transition: color var(--motion-fast) var(--ease-brand), background-color var(--motion-fast) var(--ease-brand);
}
.notfound-cat:hover {
  color: var(--primary);
  background: color-mix(in oklab, var(--primary) 10%, transparent);
}
.notfound-actions { display: grid; gap: .5rem; margin-top: 1.25rem; }

.auth-card--error { max-width: 27rem; text-align: center; }
.auth-card__title { font-size: 1.35rem; font-weight: 800; }
.auth-card__subtitle { color: var(--muted-foreground); font-size: .92rem; margin: 0 0 1.2rem; }
.auth-card__footer { color: var(--muted-foreground); font-size: .88rem; margin: 1.1rem 0 0; }
.auth-card__footer a { color: var(--primary); font-weight: 700; }
.auth-card__error-icon { display: inline-flex; width: 4rem; height: 4rem; border-radius: 999px; background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); align-items: center; justify-content: center; margin-bottom: .8rem; }
.legal-note { font-size: .8rem; color: var(--muted-foreground); background: var(--cream); border-radius: var(--radius-sm); padding: .7rem .9rem; margin: .4rem 0 1rem; }
/* Кнопки «Войти/Регистрация через СберБизнес ID» (v1.34): фирменный бренд Сбера —
   зелёный #21A038 и белый текст; чистая геометрия, без иконок (требование владельца). */
/* v1.92: свечение-тень снято (ноль теней), hover — только цвет фона */
.sber-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; padding: 0 1.25rem; border-radius: var(--radius); background: #21A038; color: #ffffff; font-weight: 800; font-size: 1rem; text-decoration: none; transition: background-color var(--motion-fast) var(--ease-brand); }
/* Жёсткий запрет псевдоэлементов: исторический спиннер-круг не должен отрисоваться
   ни при каком кэше/наследовании; кнопка — чистый flex. */
.sber-btn::before, .sber-btn::after { content: none !important; display: none !important; }
.sber-btn .icon { animation: none !important; }
.sber-btn:hover { background: #1C9432; }
.sber-btn:active { background: #17902C; }
.sber-btn:focus-visible { outline: 2px solid var(--foreground); outline-offset: 3px; }
.sber-hint { margin: .45rem 0 .2rem; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.05rem 0; color: var(--muted-foreground); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ============ Кабинет ============ */
.cabinet-layout { display: grid; gap: 1.2rem; padding-top: 1.2rem; padding-bottom: 2rem; align-items: start; }
@media (min-width: 900px) { .cabinet-layout { grid-template-columns: 15rem 1fr; } }
.cabinet-nav { display: flex; gap: .3rem; overflow-x: auto; }
@media (min-width: 900px) { .cabinet-nav { flex-direction: column; position: sticky; top: 5rem; } }
.cabinet-nav__link {
  display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border-radius: var(--radius-sm);
  font-weight: 700; font-size: .92rem; white-space: nowrap; background: var(--muted); border: 0;
}
.cabinet-nav__link:hover { background: var(--secondary); }
.cabinet-nav__link--active { background: var(--primary); color: var(--primary-foreground); }
.cabinet-nav__seller { margin-top: .8rem; padding: .8rem .9rem; background: var(--cream); border: 0; border-radius: var(--radius); display: none; flex-direction: column; gap: .4rem; }
@media (min-width: 900px) { .cabinet-nav__seller { display: flex; } }
.cabinet-nav__seller-name { font-weight: 800; font-size: .92rem; }
.cabinet-content { min-width: 0; }
.cabinet-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 1rem; }
.cabinet-subtitle { font-size: 1.05rem; font-weight: 800; }
.cabinet-section { margin-top: 1.4rem; }
.cabinet-section__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; flex-wrap: wrap; }

.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 720px) { .stat-cards { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--card); border: 0; border-radius: var(--radius); padding: .95rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.stat-card__value { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-card--ok .stat-card__value { color: color-mix(in oklab, var(--mint) 80%, black); }
.stat-card__label { color: var(--muted-foreground); font-size: .84rem; }

.notice { display: flex; gap: .6rem; align-items: flex-start; border-radius: var(--radius); padding: .85rem 1rem; font-size: .9rem; border: 0; margin-bottom: 1.1rem; }
.notice--warn { background: var(--peach); color: color-mix(in oklab, var(--primary) 80%, black); }
.notice--info { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 75%, black); }

.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.recent-list__item { display: flex; align-items: center; gap: .7rem; background: var(--card); border: 0; border-radius: var(--radius-sm); padding: .5rem .7rem; }
.recent-list__img { width: 2.4rem; height: 2.4rem; border-radius: .5rem; object-fit: cover; }
.recent-list__img--empty { display: inline-flex; align-items: center; justify-content: center; background: var(--peach); color: var(--primary); }
.recent-list__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: .9rem; }

.status-pill { display: inline-block; padding: .16rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.status-pill--draft { background: var(--muted); color: var(--muted-foreground); }
.status-pill--pending { background: var(--peach); color: color-mix(in oklab, var(--primary) 80%, black); }
.status-pill--approved { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 75%, black); }
.status-pill--rejected { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
.status-pill--blocked { background: color-mix(in oklab, var(--destructive) 16%, transparent); color: var(--destructive); }
.status-pill--verified { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 75%, black); }
.status-pill--blocked_seller { background: color-mix(in oklab, var(--destructive) 16%, transparent); color: var(--destructive); }

.chips-row--cabinet { padding-bottom: .6rem; }

.table-wrap { background: var(--card); border: 0; border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 46rem; }
.table th { text-align: left; color: var(--muted-foreground); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding: .7rem .8rem; border-bottom: 1px solid var(--border); background: var(--cream); }
.table td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table__product { display: flex; align-items: center; gap: .65rem; min-width: 14rem; }
.table__thumb { width: 2.6rem; height: 2.6rem; border-radius: .55rem; object-fit: cover; flex: 0 0 auto; }
.table__thumb--empty { display: inline-flex; align-items: center; justify-content: center; background: var(--peach); color: var(--primary); }
.table__product-name a { font-weight: 700; }
.table__product-name a:hover { color: var(--primary); }
.table__nowrap { white-space: nowrap; }
.table__muted { color: var(--muted-foreground); }
.table__note { color: var(--muted-foreground); font-size: .78rem; margin-top: .15rem; }
.table__actions { display: flex; gap: .35rem; align-items: center; }
.table__actions form { display: inline-flex; }
.tag { display: inline-block; font-size: .68rem; font-weight: 800; padding: .1rem .45rem; border-radius: .4rem; background: var(--berry-soft); color: var(--berry); margin-top: .15rem; }

.back-link { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted-foreground); font-size: .86rem; margin-bottom: .5rem; transform: scaleX(-1); }
.back-link > * { transform: scaleX(-1); }
.status-line { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.inline-form { display: inline-flex; }
.variant-row { padding: .6rem 0; border-bottom: 1px dashed var(--border); display: flex; flex-wrap: wrap; align-items: flex-start; gap: .6rem; }
.variant-row:last-of-type { border-bottom: 0; }
.variant-row__grid { flex: 1 1 100%; }
/* Чекбокс удаления — равноправная ячейка сетки строки, а не плавающий контрол */
@media (min-width: 640px) {
  .variant-row .variant-row__grid { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; }
  .variant-row__delete { align-self: end; }
}
.image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: .6rem; }
@media (min-width: 720px) { .image-grid { grid-template-columns: repeat(4, 1fr); } }
.image-tile { border: 0; border-radius: var(--radius-sm); padding: .6rem; background: var(--cream); }
.image-tile input[type="file"] { font-size: .78rem; width: 100%; }
.image-tile__row { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: .4rem; }
.image-tile__order { color: var(--muted-foreground); font-size: .74rem; }

/* ============ Футер ============ */
/* футер без серой линии сверху — отделён фоном var(--card) */
.shop-footer { background: var(--card); margin-top: auto; }
/* v1.11: padding-block — ширина контента футера = шапке (горизонтальный
   отступ от .container) */
.shop-footer__inner { display: grid; gap: 1.2rem; padding-block: 1.6rem 1.8rem; }
@media (min-width: 860px) { .shop-footer__inner { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; } }
.shop-footer__brand { display: flex; gap: .7rem; align-items: flex-start; }
.shop-footer__name { font-weight: 800; }
.shop-footer__nav { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.shop-footer__nav a:hover { color: var(--primary); }
.shop-footer__legal { font-size: .82rem; color: var(--muted-foreground); }
/* Юридические ссылки (Этап 10): переносятся на мобильных, не переносят текст */
.shop-footer__legal-links { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-bottom: .35rem; }
.shop-footer__legal-links a { color: var(--muted-foreground); text-decoration: underline; text-underline-offset: 2px; }
.shop-footer__legal-links a:hover { color: var(--primary); }
.shop-footer__muted { color: var(--muted-foreground); font-size: .84rem; }

/* ============ Скроллбар ============ */
.custom-scrollbar, .chips-row, .mobile-menu__panel, .search__suggest {
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.custom-scrollbar::-webkit-scrollbar, .chips-row::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb, .chips-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* Два бейджа на карточке — без наложения */
.badge--new + .badge--sale { left: 4.6rem; }

/* v1.9.2: таймер акции на карточке — вниз слева: top-right занят кнопками
   «В избранное/Сравнить» (fav-slot), раньше они перекрывали бейдж */
.product-card__media .badge--promo { top: auto; bottom: .6rem; left: .6rem; right: auto; }

/* v1.9.2: платный баннер категории над выдачей */
.cat-banner { position: relative; display: block; margin: 0 0 1.1rem; border-radius: var(--radius-lg); overflow: hidden; }
.cat-banner__img { display: block; width: 100%; max-height: 13rem; object-fit: cover; }
.cat-banner__mark { position: absolute; left: .8rem; bottom: .8rem; display: inline-flex; align-items: center; background: color-mix(in oklab, var(--background) 85%, transparent); color: var(--muted-foreground); font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; }

/* ============ Этап 3: корзина, checkout, заказы ============ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.page-pad { padding-block: 1.5rem 3rem; }
.page-title { display: flex; align-items: center; gap: .6rem; font-size: 1.6rem; font-weight: 800; margin: 0 0 1.2rem; }

/* Мини-корзина */
.mini-cart__link { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .6rem; border-radius: var(--radius-sm); color: var(--foreground); text-decoration: none; font-weight: 700; }
.mini-cart__link:hover { background: var(--muted); }
.mini-cart__icon { position: relative; display: inline-flex; }
.mini-cart__badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.mini-cart__total { font-size: .9rem; color: var(--muted-foreground); }
.mini-cart__empty { font-size: .85rem; color: var(--muted-foreground); }

/* Корзина */
.cart-grid { display: grid; grid-template-columns: 1fr 20rem; gap: 1.25rem; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.cart-group { display: flex; flex-direction: column; gap: .75rem; }
.cart-group__header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--border); }
.cart-group__title { margin: 0; font-size: .95rem; font-weight: 800; color: var(--foreground); display: inline-flex; align-items: center; gap: .4rem; }
.cart-group__title svg { color: var(--primary); }
.cart-group__subtotal { font-size: .9rem; font-weight: 700; color: var(--muted-foreground); white-space: nowrap; }
/* v2.23.5: декоративный контур снят — глубину несёт тёплая подложка
   --brand-wash (правило бренда «ноль рамок»: глубину даёт фон) */
.cart-group__min-order { margin: .4rem 0 0; font-size: .82rem; color: var(--ink-soft);
  padding: .5rem .7rem; border-radius: var(--radius-sm);
  background: var(--brand-wash); }
.cart-item { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.cart-item:last-of-type { border-bottom: 0; padding-bottom: 0; }
.cart-item--unavailable { opacity: .55; }
.cart-item__title { font-weight: 700; color: var(--foreground); text-decoration: none; }
.cart-item__title:hover { color: var(--primary); }
.cart-item__meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .35rem; font-size: .85rem; color: var(--muted-foreground); }
.cart-item__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.cart-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; }
.cart-item__line-total { font-weight: 800; white-space: nowrap; }
.cart-item__gone { color: var(--destructive); font-size: .85rem; margin-top: .4rem; }
.cart-item__stock { color: var(--muted-foreground); font-size: .8rem; }
.qty-stepper { display: inline-flex; align-items: center; gap: .3rem; margin-top: .6rem; }
.qty-stepper__btn { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--muted); font-size: 1rem; cursor: pointer; }
.qty-stepper__btn:hover:not(:disabled) { background: var(--muted); }
.qty-stepper__btn:disabled { opacity: .4; cursor: default; }
.qty-stepper__value { min-width: 2ch; text-align: center; font-weight: 800; }
.cart-promo { border-top: 1px solid var(--border); padding-top: 1rem; }
.cart-promo__form { display: flex; gap: .5rem; align-items: end; flex-wrap: wrap; }
.cart-promo__label { display: block; font-size: .85rem; color: var(--muted-foreground); margin-bottom: .25rem; width: 100%; }
.cart-promo__applied { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; color: var(--mint); font-size: .9rem; }
.link-btn { background: none; border: 0; color: var(--primary); cursor: pointer; text-decoration: underline; font-size: .85rem; padding: 0; }
.cart-summary { padding: 1.25rem; position: sticky; top: 1rem; }
.cart-summary__title { margin: 0 0 .8rem; font-size: 1.15rem; font-weight: 800; }
.summary-rows { margin: 0; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.summary-row dt { color: var(--muted-foreground); }
.summary-row dd { margin: 0; font-weight: 700; }
.summary-row--discount dd { color: var(--mint); }
.summary-row--total { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .6rem; font-size: 1.1rem; }
.summary-row--total dd { font-weight: 800; }
.cart-summary .btn--block { margin-top: .9rem; }
.cart-summary__note { display: flex; align-items: center; gap: .4rem; color: var(--muted-foreground); font-size: .8rem; margin: .7rem 0 0; }
.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--muted-foreground); }
.cart-empty__icon { color: color-mix(in oklab, var(--primary) 45%, var(--muted-foreground)); margin-bottom: .5rem; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 21rem; gap: 1.25rem; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 1.25rem; }
.checkout-section { padding: 1.25rem; }
.checkout-section__title { display: flex; align-items: center; gap: .45rem; margin: 0 0 1rem; font-size: 1.05rem; font-weight: 800; }
/* Сетку полей чекаута скоупим к обёрткам чекаута — канонический .form-grid
   (2 колонки) больше не перебивается трёхколоночной легаси-версией */
.checkout-section .form-grid, .checkout-step-card .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 960px) { .checkout-section .form-grid, .checkout-step-card .form-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .checkout-section .form-grid, .checkout-step-card .form-grid { grid-template-columns: 1fr; } }
.form-grid--address { margin-top: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--muted-foreground); }
.field--wide { grid-column: 1 / -1; }
.field--small { min-width: 0; }
.checkout-lines { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.checkout-line { display: flex; justify-content: space-between; gap: .8rem; font-size: .88rem; }
.checkout-line__sum { white-space: nowrap; font-weight: 700; }
.delivery-options { display: flex; flex-direction: column; gap: .5rem; }
.delivery-option { display: flex; gap: .6rem; padding: .7rem .8rem; border: 1.5px solid transparent; border-radius: var(--radius-sm); cursor: pointer; background: var(--muted); }
.delivery-option:has(input:checked) { border-color: var(--primary); background: var(--cream); }
.delivery-option__body { display: flex; flex-direction: column; gap: .15rem; }
.delivery-option__name { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.delivery-option__meta { font-size: .85rem; color: var(--muted-foreground); }
.check-row { display: flex; gap: .5rem; align-items: start; font-size: .9rem; margin-bottom: 1rem; }
.check-row input { margin-top: .2rem; }

/* Checkout wizard (Этап 6) */
.checkout-progress { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; }
.checkout-progress__step { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted-foreground); padding: .3rem .7rem; border-radius: 999px; border: 0; background: var(--muted); }
.checkout-progress__step.is-active { color: var(--foreground); font-weight: 700; background: var(--cream); }
.checkout-progress__step.is-done { border-color: transparent; color: var(--primary); }
.checkout-progress__step a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.checkout-progress__step a:hover { text-decoration: underline; }
.checkout-steps-grid { display: grid; grid-template-columns: 1fr 21rem; gap: 1.25rem; align-items: start; }
.checkout-step-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.checkout-step-card__title { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.05rem; font-weight: 800; }
.checkout-step-actions { display: flex; justify-content: space-between; align-items: center; gap: .8rem; grid-column: 1 / -1; margin-top: .4rem; }
.checkout-issues { margin: .4rem 0 0; padding-left: 1.1rem; }
.checkout-review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.checkout-review-seller__name { display: flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .92rem; padding-bottom: .4rem; border-bottom: 1px dashed var(--border); }
.checkout-review-lines { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.checkout-review-line { display: flex; justify-content: space-between; gap: .8rem; font-size: .88rem; }
.checkout-review-line.is-unavailable { opacity: .55; }
.checkout-review-line__qty { color: var(--muted-foreground); white-space: nowrap; }
.checkout-review-line__total { font-weight: 700; white-space: nowrap; }
.checkout-promo { margin-top: .4rem; }
.checkout-city { display: inline-flex; align-items: center; gap: .4rem; margin: 0; color: var(--muted-foreground); }
.pickup-block { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.pickup-block__title { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .95rem; font-weight: 800; }
.pickup-block__empty { margin: 0; font-size: .85rem; color: var(--muted-foreground); }
.checkbox-field { flex-direction: row; align-items: center; gap: .5rem; }
.checkbox-field input { width: 1.15rem; height: 1.15rem; }
.field__hint { font-size: .78rem; color: var(--muted-foreground); }
.address-book { border: 0; padding: 0; margin: 0 0 .4rem; }
.address-book legend { font-weight: 800; font-size: .92rem; margin-bottom: .5rem; }
@media (max-width: 900px) {
  .checkout-steps-grid { grid-template-columns: 1fr; }
}

/* Заказы покупателя */
.order-list { display: flex; flex-direction: column; gap: .8rem; }
/* v1.63: карточка заказа в списке — контейнер: ссылка-номер растянута на всю
   площадь (::after-оверлей), кнопка копирования — вне ссылки (валидный HTML:
   вложенные интерактивные элементы сбивают экранные дикторы) и выше оверлея;
   :has() даёт фокус-кольцо на всей карточке при Tab-навигации (без поддержки
   :has() — как раньше); v1.92: hover — мягкая брендовая рамка, тень снята. */
.order-card { display: block; position: relative; padding: 1rem 1.25rem; text-decoration: none; color: inherit; }
.order-card__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.order-card__number { font-weight: 800; color: inherit; text-decoration: none; }
.order-card__number::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.order-card__meta { color: var(--muted-foreground); font-size: .85rem; margin-top: .3rem; }
.order-card__foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: .5rem; }
.order-card__foot-side { display: flex; align-items: center; gap: .55rem; }
.order-card .copy-number { position: relative; z-index: 2; }
.order-card:hover { border-color: color-mix(in oklab, var(--primary) 30%, transparent); }
.order-card:has(.order-card__number:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.order-card__total { font-weight: 800; }
.order-detail__head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.order-detail__date { color: var(--muted-foreground); margin: .2rem 0 1.2rem; }
.order-detail__grid { display: grid; grid-template-columns: 1fr 21rem; gap: 1.25rem; align-items: start; }
.order-detail__main { display: flex; flex-direction: column; gap: 1.25rem; }
.order-detail__side { display: flex; flex-direction: column; gap: 1.25rem; }
.order-part { padding: 1.25rem; }
.order-part__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.order-part__seller { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: 1.02rem; }
.order-part__reject { display: flex; gap: .4rem; align-items: start; background: var(--peach); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; margin-bottom: .8rem; }
.order-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.order-item { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.order-item:last-child { border-bottom: 0; }
.order-item__qty { color: var(--muted-foreground); white-space: nowrap; }
.order-item__sum { font-weight: 700; white-space: nowrap; }
.order-address { line-height: 1.5; font-size: .93rem; margin: 0; }
.order-actions { display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__item { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: baseline; padding: .3rem 0; font-size: .9rem; }
.timeline__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); display: inline-block; }
.timeline__time { color: var(--muted-foreground); font-size: .8rem; }
.cancel-box summary { list-style: none; cursor: pointer; }
.cancel-box summary::-webkit-details-marker { display: none; }
.cancel-box__form { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }

/* Статусы */
.status-badge { display: inline-flex; align-items: center; padding: .25rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--muted); color: var(--muted-foreground); white-space: nowrap; }
.status-badge--new, .status-badge--part-new { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--confirmed, .status-badge--part-confirmed { background: var(--mint-soft); color: var(--accent-foreground); }
.status-badge--assembling, .status-badge--part-preparing { background: var(--secondary); color: var(--secondary-foreground); }
.status-badge--shipped, .status-badge--part-handed_to_delivery { background: var(--accent); color: var(--accent-foreground); }
.status-badge--delivered, .status-badge--completed, .status-badge--part-completed { background: var(--mint); color: #fff; }
.status-badge--cancelled, .status-badge--part-cancelled { background: var(--muted); }
.status-badge--part-rejected { background: var(--destructive); color: #fff; }

/* Предложения в карточке товара */
.offers-list { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.offer-row { display: flex; align-items: center; gap: .8rem; padding: .65rem .8rem; border: 0; border-radius: var(--radius-sm); flex-wrap: wrap; background: var(--muted); }
.offer-row--out { opacity: .55; }
.offer-row__info { display: flex; flex-direction: column; gap: .1rem; flex: 1; min-width: 10rem; }
.offer-row__seller { display: inline-flex; gap: .35rem; align-items: center; font-weight: 700; font-size: .92rem; color: var(--foreground); }
/* v1.10: продавец оффера — ссылка на витрину магазина */
a.offer-row__seller:hover { color: var(--primary); }
.offer-row__variant { font-size: .8rem; color: var(--muted-foreground); }
.offer-row__price { font-weight: 800; white-space: nowrap; }
.offer-row__form { display: flex; gap: .4rem; align-items: center; }
.offer-row__out { font-size: .85rem; color: var(--muted-foreground); }

/* v1.9.1: кастомный степпер количества — без нативных спиннеров (ноль-бордер).
   v1.11: margin-top сброшен — степпер не съезжает вниз относительно кнопки
   «В корзину» в flex-формах (buy-panel / offer-row / возврат) */
.qty-stepper { display: inline-flex; align-items: stretch; border-radius: 999px; background: var(--secondary); overflow: hidden; margin-top: 0; }
/* Легаси-корзина (__value-степпер) сохраняет вертикальный отступ */
.cart-item .qty-stepper { margin-top: .6rem; }
.qty-stepper__btn { display: inline-flex; align-items: center; justify-content: center; width: 2.15rem; border: 0; background: transparent; color: var(--secondary-foreground); cursor: pointer; padding: 0; transition: background var(--motion-fast) var(--ease-brand); }
.qty-stepper__btn:hover:not(:disabled) { background: var(--tint); }
.qty-stepper__btn:disabled { opacity: .35; cursor: default; }
.qty-stepper__val { width: 2.6rem; text-align: center; border: 0; background: transparent; font: inherit; font-weight: 800; padding: .45rem 0; color: var(--secondary-foreground); }
.qty-stepper__val:focus { outline: none; background: var(--tint); }
.buy-panel .qty-stepper__btn { width: 2.5rem; }
.buy-panel .qty-stepper__val { width: 3.2rem; padding: .55rem 0; font-size: 1.05rem; }

/* Успех */
.success-card { max-width: 34rem; margin: 2rem auto; text-align: center; padding: 2.5rem 2rem; }
.success-card__icon { color: var(--mint); }
.success-card__total { font-size: 1.2rem; }
.success-card__hint { color: var(--muted-foreground); display: flex; gap: .4rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.success-card__actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }

/* Кабинет: заказы */
.cabinet-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cabinet-tab { padding: .4rem .8rem; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); text-decoration: none; font-size: .87rem; font-weight: 600; }
.cabinet-tab--active { background: var(--primary); color: var(--primary-foreground); }
.cabinet-table { overflow-x: auto; }
.cabinet-table table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cabinet-table th, .cabinet-table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cabinet-table th { color: var(--muted-foreground); font-weight: 700; }
.cabinet-table__strong { font-weight: 800; }

/* Адаптивность (§13) */
@media (max-width: 960px) {
  .cart-grid, .checkout-grid, .order-detail__grid { grid-template-columns: 1fr; }
  .cart-summary, .checkout-summary { position: static; order: -1; }
  /* Этап 23: на планшетах/телефонах действия в шапке — только иконки */
  .mini-cart__total, .mini-cart__empty { display: none; }
}
@media (max-width: 560px) {
  .cart-item { flex-direction: column; }
  .cart-item__right { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .order-item { grid-template-columns: 1fr auto; }
  .order-item__qty { grid-column: 1 / -1; order: 3; }
}

/* ============================================================
   ЭТАП 5 — кабинет продавца v2 (боковая навигация, разделы)
   ============================================================ */

/* --- Каркас: шапка + сайдбар + контент --- */
.cab-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.cab-burger { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm); border: 0; background: var(--muted); cursor: pointer; color: var(--foreground); }
.cab-burger:hover { background: var(--secondary); }

.cab-shell { display: block; padding-bottom: 2.5rem; }
.cab-sidebar { display: none; }
.cab-overlay { display: none; }
.cab-content { min-width: 0; padding-top: 1.2rem; padding-left: .8rem; padding-right: .8rem; }
.cab-sidebar__scroll { display: flex; flex-direction: column; gap: .25rem; position: sticky; top: 4.4rem; max-height: calc(100vh - 5rem); overflow-y: auto; padding: .4rem; }
.cab-sidebar__link { display: flex; align-items: center; gap: .6rem; padding: .58rem .8rem; border-radius: var(--radius-sm); color: var(--foreground); text-decoration: none; font-weight: 700; font-size: .92rem; }
.cab-sidebar__link:hover { background: var(--secondary); }
.cab-sidebar__link--active { background: var(--primary); color: var(--primary-foreground); }
.cab-sidebar__link--sub { padding-left: 1.6rem; font-weight: 600; }
.cab-sidebar__group { padding: .9rem .8rem .25rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); font-weight: 800; }
.cab-sidebar__badge { margin-left: auto; background: var(--destructive); color: #fff; border-radius: 999px; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; font-size: .7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.cab-sidebar__badge--accent { background: var(--primary); }
.cab-sidebar__cta { margin-top: .7rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--cream); border: 0; color: var(--primary); font-weight: 800; text-decoration: none; }
.cab-sidebar__cta:hover { background: var(--peach); }
.cab-sidebar__seller { margin-top: .9rem; padding: .8rem .9rem; background: var(--card); border: 0; border-radius: var(--radius); display: flex; flex-direction: column; gap: .4rem; }
.cab-sidebar__seller-name { font-weight: 800; font-size: .92rem; }

@media (min-width: 980px) {
  .cab-shell { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); gap: 1.4rem; padding-top: 1.2rem; max-width: var(--container); margin: 0 auto; }
  .cab-sidebar { display: block; }
  .cab-burger { display: none; }
  .cab-topbar-hide { display: inline-flex; }
  .cab-content { padding-top: 0; }
}
/* Мобильный off-canvas */
@media (max-width: 979px) {
  .cab-nav-toggle:checked ~ .cab-zone .cab-shell .cab-sidebar {
    display: block; position: fixed; inset: 0 auto 0 0; width: min(19rem, 86vw);
    background: var(--background); z-index: 60; padding: 1rem .6rem;
    border-right: 1px solid var(--border);
  }
  .cab-nav-toggle:checked ~ .cab-zone .cab-shell .cab-sidebar .cab-sidebar__scroll { position: static; max-height: none; }
  .cab-nav-toggle:checked ~ .cab-zone .cab-shell .cab-overlay {
    display: block; position: fixed; inset: 0; background: oklch(0.3 0.03 40 / 0.35); z-index: 55;
  }
}

/* --- Заголовки страниц и общие блоки --- */
.cab-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.cab-page-head .cabinet-title { margin-bottom: .2rem; }
.cab-page-head__sub { color: var(--muted-foreground); font-size: .9rem; }
.cab-backlink { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted-foreground); text-decoration: none; font-size: .86rem; font-weight: 700; margin-bottom: .6rem; }
.cab-backlink:hover { color: var(--primary); }
.cab-muted { color: var(--muted-foreground); }
.cab-footnote { margin-top: .7rem; font-size: .84rem; }

/* --- Период --- */
.cab-period { display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.cab-period__icon { color: var(--muted-foreground); display: inline-flex; }
.cab-period__chip { padding: .38rem .75rem; border-radius: 999px; background: var(--muted); border: 0; color: var(--muted-foreground); text-decoration: none; font-size: .84rem; font-weight: 700; }
.cab-period__chip:hover { background: var(--cream); color: var(--primary); }
.cab-period__chip--active { background: var(--primary); color: var(--primary-foreground); }

/* --- Поиск --- */
.cab-search { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; max-width: 28rem; }
.cab-search .form-input { flex: 1; }

/* --- Метрики --- */
.stat-cards--wide { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stat-cards--wide { grid-template-columns: repeat(5, 1fr); } }
.stat-cards--compact { margin-top: .2rem; }
.stat-card__hint { color: var(--muted-foreground); font-size: .78rem; }
.stat-card__hint--warn { color: var(--destructive); font-weight: 700; }
.stat-card--warn { background: color-mix(in oklab, var(--destructive) 7%, var(--card)); }

/* --- Сетки разделов --- */
.cab-grid { display: grid; gap: 1.1rem; margin-top: 1.2rem; }
.cab-grid--2-1 { grid-template-columns: 1fr; }
@media (min-width: 980px) { .cab-grid--2-1 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
.cab-grid--1-2 { grid-template-columns: 1fr; }
@media (min-width: 980px) { .cab-grid--1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }

/* --- Диаграмма выручки (server-side) --- */
.cab-chart { margin-top: .4rem; }
.cab-chart__bars { display: flex; align-items: flex-end; gap: 2px; height: 9.5rem; }
.cab-chart__col { flex: 1; display: flex; align-items: flex-end; height: 100%; min-width: 0; }
.cab-chart__bar { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--primary), color-mix(in oklab, var(--primary) 55%, white)); transition: opacity var(--motion-fast) var(--ease-brand); }
.cab-chart__col:hover .cab-chart__bar { opacity: .8; }
.cab-chart__bar--zero { background: var(--muted); }
.cab-chart__axis { display: flex; justify-content: space-between; margin-top: .45rem; color: var(--muted-foreground); font-size: .74rem; }

/* --- Список задач --- */
.cab-tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cab-tasklist__item { display: flex; align-items: center; gap: .75rem; padding: .7rem .2rem; border-bottom: 1px solid var(--border); }
.cab-tasklist__item:last-child { border-bottom: none; }
.cab-tasklist__item > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.cab-tasklist__item a { font-weight: 700; color: var(--foreground); text-decoration: none; }
.cab-tasklist__item a:hover { color: var(--primary); }
.cab-tasklist__note { color: var(--muted-foreground); font-size: .8rem; }
.cab-tasklist__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: var(--radius-sm); background: var(--cream); color: var(--primary); flex-shrink: 0; }
.cab-tasklist__icon--stock { background: var(--accent); color: var(--accent-foreground); }
.cab-tasklist__icon--moder { background: var(--berry-soft); color: var(--berry); }

/* --- Операции --- */
.cab-operations { list-style: none; margin: 0; padding: 0; }
.cab-operations__item { display: flex; align-items: center; gap: .75rem; padding: .65rem .2rem; border-bottom: 1px solid var(--border); }
.cab-operations__item:last-child { border-bottom: none; }
.cab-operations--lg .cab-operations__item { padding: .8rem .2rem; }
.cab-operations__icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 999px; flex-shrink: 0; background: var(--mint-soft); color: var(--mint); }
.cab-operations__icon--refund, .cab-operations__icon--payout { background: var(--berry-soft); color: var(--berry); }
.cab-operations__icon--settlement { background: var(--mint-soft); color: var(--mint); }
.cab-operations__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.cab-operations__label { font-weight: 700; font-size: .9rem; }
.cab-operations__date { color: var(--muted-foreground); font-size: .78rem; }
.cab-operations__amount { font-weight: 800; color: var(--mint); white-space: nowrap; }
.cab-operations__amount--minus { color: var(--berry); }

/* --- Топ товаров --- */
.cab-toplist { list-style: none; margin: 0; padding: 0; }
.cab-toplist__item { display: flex; align-items: center; gap: .7rem; padding: .6rem .2rem; border-bottom: 1px solid var(--border); }
.cab-toplist__item:last-child { border-bottom: none; }
.cab-toplist__pos { width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--cream); color: var(--primary); font-weight: 800; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cab-toplist__title { flex: 1; min-width: 0; font-weight: 700; color: var(--foreground); text-decoration: none; }
.cab-toplist__title:hover { color: var(--primary); }
.cab-toplist__meta { color: var(--muted-foreground); font-size: .8rem; white-space: nowrap; }

/* --- Уведомления --- */
.cab-notifications { list-style: none; margin: 0 0 .9rem; padding: 0; }
.cab-notifications__item { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem .3rem; border-bottom: 1px solid var(--border); }
.cab-notifications__item:last-child { border-bottom: none; }
.cab-notifications__item--unread { background: color-mix(in oklab, var(--peach) 30%, transparent); border-radius: var(--radius-sm); }
.cab-notifications__icon { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: var(--radius-sm); background: var(--cream); color: var(--primary); flex-shrink: 0; }
.cab-notifications__icon--returns { background: var(--berry-soft); color: var(--berry); }
.cab-notifications__icon--finance { background: var(--mint-soft); color: var(--mint); }
.cab-notifications__icon--stock { background: var(--accent); color: var(--accent-foreground); }
.cab-notifications__icon--moderation { background: var(--secondary); color: var(--secondary-foreground); }
.cab-notifications__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cab-notifications__title { font-weight: 800; }
.cab-notifications__text { font-size: .88rem; color: var(--foreground); }
.cab-notifications__date { color: var(--muted-foreground); font-size: .76rem; }
.cab-check { width: 1.15rem; height: 1.15rem; margin-top: .3rem; }

/* --- Переключатель (настройки уведомлений, офферы) --- */
.cab-switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.cab-switch input { position: absolute; opacity: 0; }
.cab-switch__track { width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--muted); border: 0; position: relative; transition: background var(--motion-fast) var(--ease-brand); flex-shrink: 0; }
.cab-switch__thumb { position: absolute; top: 50%; left: .15rem; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; border-radius: 999px; background: #fff; transition: left var(--motion-fast) var(--ease-brand); }
.cab-switch input:checked + .cab-switch__track { background: var(--primary); }
.cab-switch input:checked + .cab-switch__track .cab-switch__thumb { left: calc(100% - 1.25rem); }
.cab-switch input:focus-visible + .cab-switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }

.cab-checkline { display: flex; align-items: center; gap: .6rem; margin: .9rem 0; font-weight: 600; }
.cab-checkline--lg { align-items: flex-start; flex-direction: column; gap: .3rem; }
.cab-checkline input[type="checkbox"] { width: 1.15rem; height: 1.15rem; }
.cab-checkline--lg input[type="checkbox"] { margin-top: .2rem; }

/* --- Формы кабинета --- */
.cab-form { display: flex; flex-direction: column; gap: .9rem; }
.cab-form-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 760px) { .cab-form-grid { grid-template-columns: repeat(2, 1fr); } }
.form-field--wide { grid-column: 1 / -1; }
.cab-media-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: .6rem 0 1rem; }
@media (min-width: 760px) { .cab-media-grid { grid-template-columns: repeat(2, 1fr); } }
.cab-media-preview { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: var(--radius-sm); border: 0; margin-bottom: .5rem; }
.cab-media-preview--wide { width: 100%; max-width: 22rem; height: 7rem; }
.cab-inline-actions { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.cab-inline-form { display: inline-flex; align-items: center; gap: .35rem; }
.form-input--sm { min-width: 6.5rem; padding: .35rem .6rem; font-size: .88rem; }

/* --- Детали (dl) --- */
.cab-details { margin: .4rem 0 .8rem; display: flex; flex-direction: column; }
.cab-details > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--border); }
.cab-details dt { color: var(--muted-foreground); }
.cab-details dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }

/* --- Статусы возвратов/выплат/документов --- */
.status-badge--refund-created, .status-badge--payout-pending, .status-badge--document-uploaded { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--refund-processing, .status-badge--payout-processing { background: var(--secondary); color: var(--secondary-foreground); }
.status-badge--refund-completed, .status-badge--payout-completed, .status-badge--document-accepted { background: var(--mint); color: #fff; }
.status-badge--refund-failed, .status-badge--payout-failed, .status-badge--document-rejected { background: var(--destructive); color: #fff; }
.badge--muted { background: var(--muted); color: var(--muted-foreground); }

/* --- Этап 5: массовые операции, история, выбор --- */
.cab-bulkbar { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; margin-bottom: .8rem; flex-wrap: wrap; }
.cab-bulkbar__label { font-weight: 800; color: var(--muted-foreground); font-size: .88rem; }
.cab-bulkbar .form-select { max-width: 17rem; }
.cab-col-check { width: 2.2rem; text-align: center; }
.cab-col-check .cab-check { vertical-align: middle; }
.form-select { padding: .55rem .75rem; border-radius: 999px; border: 0; background: var(--muted); font: inherit; color: var(--foreground); }
.form-select:focus { outline: 2px solid var(--primary); outline-offset: 0; background: var(--card); }

.cab-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.cab-timeline__item { display: flex; gap: .8rem; padding: .55rem 0; }
.cab-timeline__dot { width: .7rem; height: .7rem; border-radius: 999px; background: var(--primary); margin-top: .45rem; flex-shrink: 0; }
.cab-timeline__dot--catalog.stock { background: var(--mint); }
.cab-timeline__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.cab-timeline__action { font-weight: 800; font-size: .9rem; }
.cab-timeline__details { color: var(--muted-foreground); font-size: .84rem; overflow-wrap: anywhere; }
.cab-timeline__meta { color: var(--muted-foreground); font-size: .76rem; }

/* --- Этап 5: обращения (диалог с платформой) --- */
.cab-dialog { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.cab-dialog__item { display: flex; }
.cab-dialog__item--platform { justify-content: flex-start; }
.cab-dialog__item--seller { justify-content: flex-end; }
.cab-dialog__bubble { max-width: min(34rem, 92%); padding: .7rem .95rem; border-radius: var(--radius); border: 0; background: var(--card); }
.cab-dialog__item--platform .cab-dialog__bubble { background: var(--secondary); }
.cab-dialog__meta { display: block; color: var(--muted-foreground); font-size: .74rem; margin-bottom: .25rem; }
.cab-dialog__text { margin: 0; font-size: .92rem; overflow-wrap: anywhere; }
.status-badge--ticket-open { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--ticket-in_progress { background: var(--accent); color: var(--accent-foreground); }
.status-badge--ticket-resolved { background: var(--mint); color: #fff; }
.status-badge--ticket-rejected { background: var(--muted); }

/* Пункты выдачи (Этап 6) */
.pickup-search { display: flex; gap: .6rem; margin-bottom: 1rem; max-width: 34rem; }
.pickup-list { display: flex; flex-direction: column; gap: .6rem; max-width: 40rem; }
.pickup-card { align-items: start; }
.pickup-card__marker { color: var(--primary); padding-top: .15rem; }
.pickup-empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2rem; color: var(--muted-foreground); text-align: center; }
.pickup-empty__note { font-size: .85rem; }
.pickup-map-link { margin-top: 1rem; }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge--muted { background: var(--muted); color: var(--muted-foreground); }
.pickup-map__note { font-size: .85rem; color: var(--muted-foreground); max-width: 44rem; }
.pickup-map-layout { display: grid; grid-template-columns: minmax(0, 30rem) minmax(16rem, 24rem); gap: 1.25rem; align-items: start; }
.pickup-map__canvas-wrap { padding: .75rem; position: relative; }
.pickup-map__canvas { width: 100%; height: auto; color: var(--muted-foreground); display: block; }
.pickup-map__dot { fill: var(--primary); opacity: .9; }
.pickup-map__dot:hover { opacity: 1; }
.pickup-map__num { font-size: 3px; font-weight: 700; fill: var(--foreground); }
.pickup-map__legend { padding: 1rem 1.25rem; }
.pickup-map__legend-title { margin: 0 0 .6rem; font-size: 1rem; font-weight: 800; }
.pickup-map__legend-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .6rem; font-size: .88rem; }
.pickup-map__legend-list span { display: block; color: var(--muted-foreground); font-size: .82rem; }
@media (max-width: 900px) {
  .pickup-map-layout { grid-template-columns: 1fr; }
}

/* Кабинет покупателя (Этап 6) */
.cabinet-section__title { display: flex; align-items: center; gap: .45rem; margin: 0 0 1rem; font-size: 1.02rem; font-weight: 800; }
.cab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cab-list__item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .2rem; border-bottom: 1px solid var(--border); }
.cab-list__item:last-child { border-bottom: none; }
.cab-list__link { display: flex; flex-direction: column; gap: .15rem; text-decoration: none; color: var(--foreground); min-width: 0; }
.cab-list__link:hover strong { color: var(--primary); }
.cab-list__meta { font-size: .8rem; color: var(--muted-foreground); }
.cab-list__value { font-weight: 800; white-space: nowrap; }
.cab-empty { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1.6rem 1rem; color: var(--muted-foreground); text-align: center; }
.cab-empty--sm { padding: 1rem; }
.cab-form--narrow { max-width: 40rem; }
.addresses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.address-card { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.address-card--default { background: var(--cream); }
.address-card__text { margin: 0; font-size: .9rem; line-height: 1.45; }
.address-card__note { margin: 0; font-size: .8rem; color: var(--muted-foreground); }
.address-card__actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin-top: auto; }
.badge--default { background: var(--cream); color: var(--primary); }
.address-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 .8rem; }
@media (max-width: 640px) { .address-form-grid { grid-template-columns: 1fr; } }
.link-btn--danger { color: var(--destructive); }
.cab-pref-col { text-align: center; width: 7rem; }
.cab-form-actions { margin-top: 1rem; display: flex; justify-content: flex-end; }
.status-badge--ticket-waiting_reply { background: var(--accent); color: var(--accent-foreground); }
.status-badge--ticket-closed { background: var(--muted); color: var(--muted-foreground); }
.cab-form--footer { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.shipment-block { margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: .45rem; }
.shipment-block__head { display: flex; align-items: center; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
.shipment-block__track { font-family: monospace; font-size: .82rem; color: var(--muted-foreground); }
.shipment-block__meta { font-size: .8rem; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: .3rem; }
.timeline--compact { margin: .3rem 0 0; }
.status-badge--shipment-created { background: var(--muted); color: var(--muted-foreground); }
.status-badge--shipment-accepted { background: var(--accent); color: var(--accent-foreground); }
.status-badge--shipment-in_transit { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--shipment-arrived_at_pickup { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 70%, black); }
.status-badge--shipment-delivered { background: var(--mint); color: #fff; }
.status-badge--shipment-returned { background: var(--berry-soft); color: var(--berry); }
.status-badge--shipment-cancelled { background: var(--muted); color: var(--muted-foreground); }
.status-badge--partially_shipped { background: var(--accent); color: var(--accent-foreground); }
.status-badge--refund_pending { background: var(--berry-soft); color: var(--berry); }
.status-badge--partially_refunded { background: var(--berry-soft); color: var(--berry); }
.status-badge--refunded { background: var(--berry); color: #fff; }

/* Отправления и статусы Этапа 6 */
.shipment-block { margin-top: .8rem; padding-top: .7rem; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: .45rem; }
.shipment-block__head { display: flex; align-items: center; gap: .5rem; font-size: .9rem; flex-wrap: wrap; }
.shipment-block__track { font-family: monospace; font-size: .82rem; color: var(--muted-foreground); }
.shipment-block__meta { font-size: .8rem; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: .3rem; }
.timeline--compact { margin: .3rem 0 0; }
.status-badge--shipment-created { background: var(--muted); color: var(--muted-foreground); }
.status-badge--shipment-accepted { background: var(--accent); color: var(--accent-foreground); }
.status-badge--shipment-in_transit { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--shipment-arrived_at_pickup { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 70%, black); }
.status-badge--shipment-delivered { background: var(--mint); color: #fff; }
.status-badge--shipment-returned { background: var(--berry-soft); color: var(--berry); }
.status-badge--shipment-cancelled { background: var(--muted); color: var(--muted-foreground); }
.status-badge--partially_shipped { background: var(--accent); color: var(--accent-foreground); }
.status-badge--refund_pending { background: var(--berry-soft); color: var(--berry); }
.status-badge--partially_refunded { background: var(--berry-soft); color: var(--berry); }
.status-badge--refunded { background: var(--berry); color: #fff; }
.input--qty { width: 4.6rem; text-align: center; }
.return-qty { flex-shrink: 0; }
.status-badge--return-requested { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--return-platform_review { background: var(--accent); color: var(--accent-foreground); }
.status-badge--return-approved { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 70%, black); }
.status-badge--return-rejected { background: var(--muted); color: var(--muted-foreground); }
.status-badge--return-refunded { background: var(--mint); color: #fff; }
.status-badge--return-closed { background: var(--muted); color: var(--muted-foreground); }
.cab-form-actions--start { justify-content: flex-start; }
.order-docs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.order-doc { display: flex; align-items: center; gap: .55rem; font-size: .88rem; }
.order-doc__icon { color: var(--primary); display: inline-flex; }
.order-doc__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.order-doc__meta { font-size: .78rem; color: var(--muted-foreground); }

/* --- Этап 6 (Блок 1): безопасность аккаунта — email, сессии, журнал --- */
.cab-status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .92rem; }
.cab-status--ok { color: color-mix(in oklab, var(--mint) 75%, black); }
.cab-status--warn { color: color-mix(in oklab, var(--primary) 80%, black); }
.cab-session-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.cab-session { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem .85rem; border: 0; border-radius: var(--radius-sm); background: var(--cream); }
.cab-session--current { background: var(--mint-soft); }
.cab-session__badge { flex-shrink: 0; display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 800; color: var(--muted-foreground); padding: .15rem .5rem; border-radius: 999px; background: var(--muted); }
.cab-session--current .cab-session__badge { background: color-mix(in oklab, var(--mint) 28%, transparent); color: color-mix(in oklab, var(--mint) 70%, black); }
.cab-session__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .82rem; color: var(--muted-foreground); min-width: 0; }
.cab-session__ip { font-weight: 800; color: var(--secondary-foreground); }
.cab-session__ua { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-table-wrap { overflow-x: auto; max-height: 26rem; overflow-y: auto; }
.cab-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.cab-table th { text-align: left; padding: .5rem .65rem; color: var(--muted-foreground); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--card); }
.cab-table td { padding: .55rem .65rem; border-bottom: 1px solid var(--border); }
.cab-table tr:last-child td { border-bottom: none; }
.cab-events .cab-table-wrap { margin-top: .8rem; }
.flash__form { display: inline-flex; }
@media (max-width: 640px) {
  .cab-session { flex-direction: column; gap: .35rem; }
  .cab-table th, .cab-table td { padding: .45rem .4rem; }
}

/* --- Этап 6 (Блок 3): избранное --- */
.fav-slot { position: absolute; top: .6rem; right: .6rem; z-index: 2; }
.product-card { position: relative; }
.fav-form { display: inline-flex; }
.fav-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 0; background: color-mix(in oklab, var(--card) 88%, transparent); color: var(--muted-foreground); cursor: pointer; transition: color var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand); backdrop-filter: blur(4px); }
.fav-btn:hover { color: var(--berry); background: var(--berry-soft); }
.fav-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fav-btn--active { color: #fff; background: var(--berry); }
.product-info__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.product-info__head .fav-btn { flex-shrink: 0; width: 2.5rem; height: 2.5rem; }
.cab-empty-state { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 3rem 1.5rem; text-align: center; }
.cab-empty-state__icon { color: var(--berry); opacity: .5; }
.cab-empty-state__text { color: var(--muted-foreground); max-width: 26rem; margin: 0 0 .6rem; }

/* Этап 11 (D20): принятие условий оферты продавца */
.legal-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .88rem; line-height: 1.45; cursor: pointer; }
.legal-check input[type="checkbox"] { margin-top: .18rem; flex: none; }
.legal-check a { color: var(--primary); text-decoration: underline; }
.review-form__field { margin-bottom: 1rem; }
.review-form__rating { flex-direction: row; flex-wrap: wrap; }

/* ============================================================
   Этап 16 (Блок 2): визуальная модернизация — добавки к системе.
   Принципы: те же токены, никаких новых цветов вне палитры.
   ============================================================ */

/* --- Единый видимый фокус (U16-14): клавиатурная навигация --- */
a:focus-visible,
summary:focus-visible,
.chip-link:focus-visible,
.category-card:focus-visible,
.product-card a:focus-visible,
.icon-btn:focus-visible,
.mini-cart:focus-visible,
.user-menu__btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Кнопки: ровный hover/active (без «прыжков») --- */
.btn { transition: filter var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand), transform .06s ease; }
.btn:hover { filter: brightness(.96); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }

/* --- Карточка товара: аккуратный плейсхолдер вместо «пустоты» (U16-02) --- */
.product-card__media { background: linear-gradient(160deg, var(--cream), var(--peach) 140%); }
.product-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: color-mix(in oklab, var(--primary) 40%, var(--peach));
}
.product-card__img { transition: transform var(--motion-stately) var(--ease-brand); }
.product-card:hover .product-card__img { transform: scale(1.03); }

/* --- Бейджи: недостающие статусы заказа/оплаты (U16-11) --- */
.status-badge--shipped { background: var(--accent); color: var(--accent-foreground); }
.status-badge--refund_pending { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--paid { background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 70%, black); }
.status-badge--failed { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }

/* --- Hero: иллюстрация (U16-10) --- */
.hero__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0;
  background: var(--cream);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; display: block; }

/* --- Промо-баннер (главная): статичная витринная плитка --- */
.promo-banner {
  position: relative; display: flex; align-items: center;
  border-radius: var(--radius-lg); overflow: hidden;
  border: 0;
  min-height: 12rem; isolation: isolate;
}
.promo-banner__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.promo-banner__scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in oklab, var(--card) 92%, transparent) 18%, color-mix(in oklab, var(--card) 45%, transparent) 55%, transparent 78%); }
.promo-banner__body { padding: 1.4rem 1.5rem; max-width: 30rem; display: grid; gap: .5rem; }
.promo-banner__tag { display: inline-flex; align-items: center; gap: .35rem; align-self: start; background: var(--berry-soft); color: var(--berry); font-size: .78rem; font-weight: 800; padding: .22rem .6rem; border-radius: 999px; }
.promo-banner__title { font-size: clamp(1.15rem, 2.6vw, 1.5rem); font-weight: 800; letter-spacing: -.01em; margin: 0; }
.promo-banner__text { color: var(--muted-foreground); font-size: .92rem; margin: 0; }
.promo-banner .btn { justify-self: start; margin-top: .3rem; }
/* слой v1.60: контраст промо-баннера на узких экранах + кнопка «Поделиться» */
@media (max-width: 640px) {
  .promo-banner__scrim {
    background: linear-gradient(180deg, color-mix(in oklab, var(--card) 96%, transparent) 30%, color-mix(in oklab, var(--card) 86%, transparent));
  }
  .promo-banner__body { max-width: none; }
}
.fav-btn.share-btn:hover { color: var(--foreground); background: var(--secondary); }


/* --- Секции главной: чуть больше воздуха --- */
.section__title { font-size: 1.4rem; }
@media (min-width: 1024px) { .section { padding-top: 2rem; } }

/* --- Заголовки страниц: единый ритм --- */
.page__head { flex-wrap: wrap; row-gap: .2rem; }

/* --- Скролл-отступ под sticky-шапкой при переходе по якорям --- */
[id] { scroll-margin-top: 5.5rem; }

/* --- Этап 16 (Блок 3): страница товара — секции и отзывы --- */
.product-info__subheading { font-size: 1.05rem; margin-top: 1.35rem; padding-top: 1.1rem; border-top: 1px solid var(--border); }
.product-info__subheading:first-of-type { border-top: 0; margin-top: .6rem; padding-top: 0; }
/* v1.9.2: отступ до карточки продавца даёт её margin-top — без дублирующего паддинга */
.seller-card { margin-bottom: 0; }
.review-list { display: grid; gap: .6rem; margin: .5rem 0 .9rem; }
.review-item { background: var(--muted); border-radius: var(--radius-sm); padding: .7rem .9rem; }
.review-item__head { display: flex; align-items: center; gap: .3rem; margin-bottom: .25rem; }
.review-item__text { font-size: .92rem; color: color-mix(in oklab, var(--foreground) 85%, transparent); }
/* компактные пилюли оценки в форме отзыва (U16-09) */
.review-form__rating { gap: .4rem; }
.review-form__rating .delivery-option { padding: 0 .9rem; border: 1.5px solid transparent; border-radius: 999px; background: var(--muted); }
.review-form__rating .delivery-option__body { padding: .42rem .85rem; }
.review-form__rating .delivery-option:has(input:checked) { border-color: var(--primary); background: var(--peach); }
.review-form__rating .delivery-option__name { font-size: .86rem; font-weight: 700; }
.review-form { background: var(--muted); border-radius: var(--radius); padding: 1rem 1.1rem; margin-top: .6rem; }
.review-form .btn { margin-top: .4rem; }
.gallery__main { background: linear-gradient(160deg, var(--cream), var(--peach) 140%); }
.product-attrs__list .product-attrs__row:last-child { border-bottom: none; }

/* --- Этап 16 (Блок 3): корзина — миниатюры (U16-07) --- */
.cart-item { align-items: flex-start; }
.cart-item__thumb {
  flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: var(--radius-sm);
  overflow: hidden; background: linear-gradient(160deg, var(--cream), var(--peach) 140%);
  border: 0; display: flex; align-items: center; justify-content: center;
}
.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__thumb-ph { color: color-mix(in oklab, var(--primary) 40%, var(--peach)); }
@media (max-width: 719.9px) {
  .cart-item { grid-template-columns: auto 1fr; display: grid; }
  .cart-item__thumb { width: 3.6rem; height: 3.6rem; }
  .cart-item__right { grid-column: 1 / -1; }
}
/* промокод компактнее (U16-07) */
.cart-promo__label { width: auto; margin-right: .4rem; }
.cart-promo__form .input { flex: 1 1 10rem; min-width: 0; }

/* --- Этап 16 (Блок 3): каталог — сворачиваемые фильтры (U16-06), сортировка --- */
.filters { display: block; padding: 0; }
.filters__summary {
  list-style: none; display: flex; align-items: center; gap: .5rem;
  font-weight: 800; padding: .9rem 1rem; cursor: pointer; user-select: none;
}
.filters__summary::-webkit-details-marker { display: none; }
.filters__summary .icon:last-of-type { margin-left: auto; transition: transform var(--motion-fast) var(--ease-brand); }
.filters[open] .filters__summary .icon:last-of-type { transform: rotate(180deg); }
.filters__form { padding: 0 1rem 1rem; margin: 0; }
@media (min-width: 900px) {
  /* v1.68: панель фильтров — обычный блок в потоке: вертикального скролла
     внутри панели больше нет (дефект «скролл в блоках фильтров»: внутренний
     ползунок + разный скроллбар в Chrome/Firefox), вся высота фильтров
     доступна прокруткой страницы. Sticky-режим (v1.63–v1.67) снят осознанно:
     при панели выше вьюпорта его низ был бы недостижим. На мобильных —
     прежняя details-раскладушка. */
  .filters__summary { display: none; }
  .filters__form { padding-top: 1rem; border-top: 0; }
}
.sort-row { justify-content: flex-start; }
.sort-row .input--auto { width: auto; min-width: 11rem; max-width: 20rem; }

/* --- Этап 16 (Блок 4): кабинет продавца --- */
/* U16-01: плитки изображений не распирают грид на мобильных */
.image-grid > *, .cab-media-grid > * { min-width: 0; }
.image-tile { min-width: 0; max-width: 100%; }
.image-tile input[type="file"] { width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* U16-08: таблицы кабинета — аккуратный скролл на мобильных */
.cab-table-wrap, .table-wrap { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.table th:first-child { position: sticky; left: 0; z-index: 2; background: var(--cream); }
.table td:first-child { position: sticky; left: 0; z-index: 2; background: var(--card); }
/* форма товара: стройные ряды формсетов на мобильных */
@media (max-width: 759.9px) {
  .cab-form-grid { gap: .7rem; }
  .offer-row-grid, .variant-row__grid { grid-template-columns: 1fr 1fr; }
}
/* подсказка bulk-операций */
.cab-bulkbar__hint { flex-basis: 100%; color: var(--muted-foreground); font-size: .8rem; }
/* грид-ячейки форм не распираются инпутами (min-width:auto → 0) */
.form-grid > *, .variant-row__grid > *, .address-form-grid > * { min-width: 0; }
.form-grid input, .form-grid select, .form-grid textarea { max-width: 100%; }
/* грид/флекс-контейнеры кабинета не распираются содержимым */
.cab-grid > *, .cab-grid--2-1 > *, .cab-grid--1-2 > *, .card { min-width: 0; }
.variant-row__grid { min-width: 0; }
.variant-row { min-width: 0; }
.cabinet-table table { min-width: 40rem; }
/* v1.44: таблица настроек уведомлений покупателя на узких экранах — колонки уплотняются,
   вместо принудительных 40rem страница остаётся без горизонтального скролла */
@media (max-width: 560px) {
  .cabinet-table--prefs table { min-width: 0; }
  .cabinet-table--prefs th, .cabinet-table--prefs td { padding: .6rem .5rem; }
  .cabinet-table--prefs th:first-child, .cabinet-table--prefs td:first-child { white-space: normal; }
  .cabinet-table--prefs .cab-pref-col { width: 4.2rem; }
  .flash__form { flex-basis: 100%; }
}
/* abspos-чекбокс свитча должен быть внутри label, а не html-контекста
   (иначе невидимый input распирает документ из переполненных таблиц) */
.cab-switch { position: relative; }
/* любые инпуты плитки изображений не выходят за её границы */
.image-tile input, .image-tile select, .image-tile textarea { width: 100%; max-width: 100%; }
/* длинные User-Agent в истории сессий переносятся (360px) */
.cab-session__ua, .cab-session__meta { overflow-wrap: anywhere; word-break: break-word; }
/* textarea по умолчанию имеет интринсивную ширину (cols) — клампим */
textarea { max-width: 100%; }
/* на узких экранах UA-строка переносится (ellipsis не работает в flex-min) */
@media (max-width: 640px) {
  .cab-session__ua { white-space: normal; overflow-wrap: anywhere; }
}

/* --- Этап 16 (Блок 6): системные состояния --- */
.form-hint--error { color: var(--destructive); font-weight: 600; }
/* глобальный индикатор htmx-запросов (тонкая полоса сверху) */
.page-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--primary), var(--berry));
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; transition: opacity var(--motion-fast) var(--ease-brand);
  pointer-events: none;
}
.page-progress.is-active { opacity: 1; animation: page-progress 1s ease-out forwards; }
@keyframes page-progress {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(.7); }
  100% { transform: scaleX(.9); }
}
@media (prefers-reduced-motion: reduce) {
  .page-progress { display: none; }
  .product-card, .product-card:hover { transition: none; transform: none; }
}

/* ============ Каталог: кастомные фильтры (дизайн-3) ============ */
/* Цена: поля с префиксом «от/до» внутри единого бордера */
/* Цена «от/до»: без рамок; на фокусе контейнера — единственная outline */
.price-input {
  display: flex; align-items: center; gap: .4rem; min-width: 0;
  background: var(--muted); border: 0; border-radius: 999px;
  padding: 0 .7rem; transition: background var(--motion-fast) var(--ease-brand);
}
.price-input > span { color: var(--muted-foreground); font-size: .82rem; white-space: nowrap; }
.price-input .input { border: 0; background: transparent; padding: .55rem 0; min-width: 0; }
.price-input .input:focus { outline: none; background: transparent; }
.price-input:focus-within { outline: 2px solid var(--primary); outline-offset: 0; background: var(--card); }

/* Чип-группы (Возраст / Для кого): радио, стилизованные под пилюли */
.filter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
/* v1.76: чипы подкатегорий над выдачей — горизонтальная лента с иконкой и
   счётчиком; текущая подкатегория залита primary, aria-current="page" */
.subcats { margin: .9rem 0 .2rem; }
.subcats__row {
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.subcat {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .8rem; border: 1px solid transparent; border-radius: 999px;
  background: var(--card); font-size: .84rem; font-weight: 600;
  color: var(--foreground); text-decoration: none;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand);
}
.subcat:hover { background: var(--secondary); color: var(--primary); }
.subcat:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.subcat__icon { display: inline-flex; color: var(--primary); }
.subcat__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subcat:hover .subcat__icon { color: inherit; }
.subcat__count {
  font-size: .72rem; font-weight: 500; color: var(--muted-foreground);
  background: var(--secondary); border-radius: 999px; padding: .05rem .4rem;
}
.subcat--current {
  background: var(--primary); color: var(--primary-foreground);
}
.subcat--current .subcat__icon,
.subcat--current .subcat__count { color: inherit; background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .subcat { transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand); }
}
/* v1.76: видимый SEO-блок описания категории под выдачей — сдержанная
   поверхность на токенах (тёмная тема сама), размер .88rem */
.cat-desc {
  margin-top: 1.6rem; padding: .9rem 1.1rem;
  background: var(--secondary); border-radius: var(--radius);
}
.cat-desc__title { font-size: .95rem; font-weight: 700; margin: 0 0 .3rem; }
.cat-desc__text { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--muted-foreground); }
/* v1.77: перенос строк новой волны — прогрессивное улучшение (браузеры
   без поддержки строку игнорируют, деградации нет) */
.cat-desc__title { text-wrap: balance; }
.cat-desc__text { text-wrap: pretty; }
.filter-chip { position: relative; display: inline-flex; }
.filter-chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.filter-chip span {
  display: inline-flex; align-items: center; padding: .36rem .7rem;
  border-radius: 999px; border: 1.5px solid transparent; background: var(--muted);
  font-size: .82rem; font-weight: 700; white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand), border-color var(--motion-fast) var(--ease-brand);
}
.filter-chip input:hover + span { color: var(--primary); }
.filter-chip input:checked + span {
  background: var(--primary); border-color: var(--primary); color: var(--primary-foreground);
}
.filter-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- v1.25: фасетные фильтры — размеры, цвета, EAV-характеристики ---- */
.filters__badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem;
  border-radius: 999px; background: var(--primary); color: var(--primary-foreground);
  font-size: .72rem; font-weight: 800;
}
.size-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(3.1rem, 1fr));
  gap: .4rem;
}
.size-chip { position: relative; display: inline-flex; }
.size-chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.size-chip span {
  display: inline-flex; flex-direction: column; align-items: center;
  width: 100%; padding: .38rem .2rem .3rem;
  border-radius: var(--radius-sm); border: 1.5px solid transparent; background: var(--muted);
  font-size: .8rem; font-weight: 700; text-align: center;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand), border-color var(--motion-fast) var(--ease-brand);
}
.size-chip__count { font-size: .64rem; font-weight: 600; opacity: .6; }
.size-chip input:hover + span { color: var(--primary); }
.size-chip input:checked + span {
  background: var(--primary); border-color: var(--primary); color: var(--primary-foreground);
}
.size-chip input:checked + span .size-chip__count { opacity: .85; }
.size-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.swatch-grid { display: grid; gap: .35rem; }
.swatch-chip { position: relative; display: inline-flex; cursor: pointer; }
.swatch-chip input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer;
}
.swatch-chip__body {
  display: inline-flex; align-items: center; gap: .45rem;
  width: 100%; padding: .3rem .45rem;
  border-radius: var(--radius-sm); border: 1.5px solid transparent; background: var(--muted);
  transition: background var(--motion-fast) var(--ease-brand), border-color var(--motion-fast) var(--ease-brand);
}
.swatch-chip__dot {
  width: 1.05rem; height: 1.05rem; border-radius: 50%; flex: none;
  /* v1.92: inset-кольцо заменено настоящей границей; v2.23.5: контур снят —
     нейтральный свотч #d4d4d4 читается самим фоном (тёмная тема —
     переопределение ниже и light-dark-блок в конце файла) */
  background: #d4d4d4;
}
.swatch-chip__name { font-size: .8rem; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch-chip__count { font-size: .64rem; font-weight: 600; opacity: .6; }
.swatch-chip input:hover + .swatch-chip__body { border-color: var(--primary); }
.swatch-chip input:checked + .swatch-chip__body {
  /* v1.92: дубль-кольцо снято — акцентная рамка 1.5px уже несёт состояние */
  border-color: var(--primary); background: var(--muted);
}
.swatch-chip input:focus-visible + .swatch-chip__body { outline: 2px solid var(--primary); outline-offset: 2px; }
.facet-list {
  display: grid; gap: .1rem; padding-right: .25rem;
}
/* точка цвета в таблице характеристик карточки; тонкий контур —
   функциональный, не декоративный (v2.23.5): белый/светлый свотч из данных
   не должен растворяться на карточке — граница интерактивных областей */
.attr-color-dot {
  display: inline-block; width: .8rem; height: .8rem; border-radius: 50%;
  vertical-align: -.1rem; border: 1px solid color-mix(in oklab, var(--foreground) 14%, transparent);
}

/* v1.88: перекрёстные счётчики фасетов — «фильтры считают друг друга».
   Обнулившиеся (не выбранные) значения гаснут и блокируются: честный
   уточняющий фасетный поиск без тупиков. Выбранные значения всегда
   остаются видимыми и активными — состояние пользователя не теряется. */
.brand-option--empty, .size-chip--empty, .swatch-chip--empty, .filter-chip--empty {
  opacity: .4;
}
.brand-option--empty input, .size-chip--empty input,
.swatch-chip--empty input, .filter-chip--empty input {
  cursor: not-allowed;
}

/* Переключатель «Только в наличии» */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.switch input {
  position: absolute; opacity: 0; width: 2.4rem; height: 1.35rem;
  margin: 0; cursor: pointer;
}
.switch__track {
  width: 2.4rem; height: 1.35rem; flex: 0 0 auto; position: relative;
  border-radius: 999px; background: var(--muted); border: 0;
  transition: background var(--motion-fast) var(--ease-brand);
}
.switch__thumb {
  position: absolute; top: 50%; left: .16rem; transform: translateY(-50%);
  width: .95rem; height: .95rem; border-radius: 999px; background: #fff; transition: left var(--motion-fast) var(--ease-brand);
}
.switch input:checked ~ .switch__track { background: var(--primary); }
.switch input:checked ~ .switch__track .switch__thumb { left: calc(100% - 1.13rem); }
.switch input:focus-visible ~ .switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch__label { font-size: .88rem; font-weight: 700; }

/* Кнопки формы фильтров: гарантированный зазор (дефект «слипаются») */
.filters__actions { display: grid; gap: .55rem; margin-top: 1.1rem; }
.btn--block + .btn--block { margin-top: .55rem; }

/* Пилюли активных фильтров над выдачей */
.active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  margin-bottom: .75rem;
}
.active-filter {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .65rem; border-radius: 999px;
  background: var(--secondary); color: var(--secondary-foreground);
  border: 1px solid transparent; font-size: .82rem; font-weight: 700;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand);
}
.active-filter:hover { color: var(--primary); background: color-mix(in oklab, var(--primary) 10%, transparent); }
.active-filter .icon { opacity: .65; }
.active-filter--reset { background: var(--muted); border: 0; color: var(--muted-foreground); }
.active-filter--reset:hover { background: var(--cream); color: var(--primary); }

/* v1.69: появление панели мега-меню — transition + @starting-style в слое
   Popover API (@supports selector(:popover-open) у .mega-menu__panel);
   keyframes megaIn и [open]-селекторы details сняты вместе с details-разметкой. */

/* ==== Этап 21: кастомные фильтры 2.0 — двойной слайдер цены, бренды ==== */
.range-dual { position: relative; height: 26px; margin: .3rem 0 .45rem; }
.range-dual__track {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px;
  transform: translateY(-50%); border-radius: 999px; background: var(--muted);
}
.range-dual__fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--primary); }
.range-dual__input {
  position: absolute; inset: 0; width: 100%; height: 26px; margin: 0;
  background: transparent; -webkit-appearance: none; appearance: none; pointer-events: none;
}
.range-dual__input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 18px; height: 18px; border-radius: 50%; background: var(--card);
  border: 2px solid var(--primary); cursor: pointer;
}
.range-dual__input::-moz-range-thumb {
  pointer-events: auto; width: 15px; height: 15px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--primary); cursor: pointer;
}
.range-dual__input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--primary); outline-offset: 2px; }
.range-dual__input:focus-visible::-moz-range-thumb { outline: 2px solid var(--primary); outline-offset: 2px; }
.range-dual__scale {
  display: flex; justify-content: space-between; gap: .5rem;
  font-size: .74rem; color: var(--muted-foreground); margin-top: -.15rem;
}
.range-dual__scale span { min-width: 3rem; }
.range-dual__scale span:last-child { text-align: right; }

/* Бренды: чекбокс-лист с поиском */
.brand-search { margin-bottom: .5rem; }
.brand-list {
  display: grid; gap: .1rem; padding-right: .25rem;
}
.brand-option {
  position: relative; display: flex; align-items: center; gap: .55rem;
  padding: .42rem .5rem; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .88rem; line-height: 1.25; color: var(--foreground);
  transition: background var(--motion-snap) var(--ease-brand);
}
.brand-option:hover { background: var(--muted); }
.brand-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.brand-option__box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex: 0 0 18px; border-radius: 6px;
  border: 1.5px solid color-mix(in oklab, var(--foreground) 28%, transparent); background: var(--card); color: transparent;
  transition: background var(--motion-snap) var(--ease-brand), border-color var(--motion-snap) var(--ease-brand), color var(--motion-snap) var(--ease-brand);
}
.brand-option input:checked + .brand-option__box {
  background: var(--primary); border-color: var(--primary); color: var(--primary-foreground);
}
.brand-option input:focus-visible + .brand-option__box { outline: 2px solid var(--primary); outline-offset: 2px; }
.brand-option__name { flex: 1 1 auto; min-width: 0; }
.brand-option__name small { color: var(--muted-foreground); font-size: .76rem; }
/* v1.77: счётчик товаров бренда в панели фильтров */
.brand-option__count {
  flex: 0 0 auto; min-width: 1.7rem; padding: .08rem .38rem;
  border-radius: 999px; text-align: center;
  font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums;
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted-foreground) 14%, transparent);
}
.brand-option[hidden] { display: none; }

/* Защита от «слипания» кнопок в любых рядах действий */
.filters__actions { gap: .6rem; }
.filters__actions .btn + .btn { margin-top: 0; }
.sort-row { gap: .65rem; }
.sort-row .input--auto { margin-left: 0; }
.hero__actions { gap: .75rem; }
.active-filters { gap: .5rem; }

/* ==== Этап 21: «Популярные бренды» на главной (вместо дубля категорий) ==== */
.brand-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .85rem;
}
.brand-card {
  display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem;
  background: var(--card); border: 1px solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--foreground);
  /* v1.92: отклик — фон и брендовая линия акцента (ноль теней, ноль пружин) */
  transition: background var(--motion-fast) var(--ease-brand), border-color var(--motion-fast) var(--ease-brand);
}
.brand-card:hover, .brand-card:focus-visible {
  background: var(--cream); border-color: color-mix(in oklab, var(--primary) 30%, transparent);
}
.brand-card__name { font-weight: 800; font-size: .95rem; }
.brand-card__country { font-size: .78rem; color: var(--muted-foreground); }
.brand-card__count { font-size: .78rem; color: var(--muted-foreground); margin-top: .3rem; }
@media (max-width: 640px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==== Этап 22: избранное в шапке, живой счётчик фильтров, seller-auth ==== */
.mini-cart__badge--fav { background: var(--berry); }
.mini-cart--fav .icon { transition: color var(--motion-fast) var(--ease-brand); }
.mini-cart--fav:hover .icon { color: var(--berry); }

.filters__live {
  margin: .1rem 0 .2rem; padding: .6rem .75rem;
  border-radius: var(--radius-sm); background: var(--muted);
  border: 0;
}
.filters-count { font-size: .85rem; color: var(--muted-foreground); }
.filters-count b { color: var(--primary); font-weight: 800; }

.radio-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.radio {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .8rem; border-radius: 999px; border: 1.5px solid transparent; background: var(--muted);
  cursor: pointer; font-size: .9rem; font-weight: 700; color: var(--muted-foreground);
  transition: border-color var(--motion-snap) var(--ease-brand), color var(--motion-snap) var(--ease-brand), background var(--motion-snap) var(--ease-brand);
}
.radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio:hover { border-color: var(--primary); color: var(--primary); }
.radio:has(input:checked) { border-color: var(--primary); color: var(--primary); background: color-mix(in oklab, var(--primary) 8%, var(--card)); }
.radio input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* Плашка-дубль «Кабинет продавца» удалена: роль страницы несёт h1,
   брендовый контекст — слева на сплит-экране. Дублей быть не должно. */
.auth-card__switch { margin-top: .7rem; font-size: .82rem; color: var(--muted-foreground); }
.form-label__req {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  color: var(--destructive); letter-spacing: .04em;
}

/* ============ Аутентификация v2: сплит-экран (фон слева, форма справа) ============ */
.auth-body { min-height: 100dvh; }
.auth-split { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); min-height: 100dvh; }
.auth-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background:
    radial-gradient(120% 90% at 85% -10%, color-mix(in oklab, var(--peach) 55%, transparent) 0%, transparent 60%),
    linear-gradient(158deg, var(--primary) 0%, color-mix(in oklab, var(--primary) 72%, var(--berry)) 62%, color-mix(in oklab, var(--berry) 62%, var(--primary)) 100%);
  color: var(--primary-foreground); padding: 2.2rem 2.6rem;
}
.auth-side__deco { position: absolute; inset: 0; pointer-events: none; }
.auth-side__blob { position: absolute; border-radius: 999px; background: #fff; }
.auth-side__blob--1 { width: 21rem; height: 21rem; right: -6rem; top: -7rem; opacity: .14; }
.auth-side__blob--2 { width: 13rem; height: 13rem; left: -4.5rem; bottom: 24%; opacity: .11; }
.auth-side__blob--3 { width: 8rem; height: 8rem; right: 16%; bottom: -2.5rem; opacity: .1; }
.auth-side__paw { position: absolute; right: -2.6rem; bottom: -3rem; opacity: .13; transform: rotate(-16deg); color: #fff; }
.auth-side__logo { position: relative; display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; width: fit-content; }
.auth-side__logo .logo__mark { background: color-mix(in oklab, #fff 24%, transparent); color: #fff; }
.auth-side__logo .logo__name { color: #fff; }
.auth-side__logo .logo__tagline { color: color-mix(in oklab, #fff 80%, transparent); }
.auth-side__content { position: relative; margin: auto 0; max-width: 27rem; }
.auth-side__pitch { font-size: clamp(1.5rem, 2.1vw, 2rem); font-weight: 800; line-height: 1.22; letter-spacing: -.01em; margin: 0 0 1.6rem; }
.auth-side__list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.auth-side__item { display: flex; gap: .7rem; align-items: flex-start; font-weight: 600; font-size: .95rem; line-height: 1.45; }
.auth-side__item-icon {
  flex: none; width: 2.15rem; height: 2.15rem; border-radius: .75rem; margin-top: -.05rem;
  background: color-mix(in oklab, #fff 20%, transparent);
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
}
.auth-side__foot { position: relative; margin-top: 1.6rem; font-size: .88rem; }
.auth-side__foot a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth-main {
  display: flex; align-items: center; justify-content: center; padding: 2.4rem 1.2rem;
  background: linear-gradient(180deg, var(--background) 0%, var(--cream) 100%);
}
.auth-panel { width: 100%; max-width: 27rem; margin-inline: auto; display: grid; gap: .8rem; }
@media (max-width: 880px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { padding: 1.5rem 1.3rem 1.7rem; }
  .auth-side__pitch { font-size: 1.22rem; margin-bottom: 0; }
  .auth-side__list, .auth-side__foot { display: none; }
  .auth-side__content { margin: .8rem 0 0; max-width: none; }
  .auth-main { padding: 1.5rem 1.1rem 2.4rem; align-items: flex-start; }
}
@media (prefers-reduced-motion: no-preference) {
  .auth-side__blob { animation: auth-float 11s ease-in-out infinite alternate; }
  .auth-side__blob--2 { animation-duration: 14s; animation-delay: -4s; }
  .auth-side__blob--3 { animation-duration: 9s; animation-delay: -2s; }
  @keyframes auth-float { from { transform: translateY(0); } to { transform: translateY(1.4rem); } }
}

/* ============ Документация (docs.liliputiya.ru) ============ */
.docs-body { background: var(--background); padding-bottom: 4.6rem; }
@media (min-width: 900px) { .docs-body { padding-bottom: 0; } }
/* v2.16.4: единая оболочка — шапка/футер витрины (shop-header/shop-footer);
   отдельные docs-топбар и docs-футер устранены как расходящиеся с брендом.
   Тулбар документации: триггер палитры поиска (Ctrl+K) + «Что нового». */
.docs-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; max-width: var(--container); margin: 1.1rem auto 0; padding: 0 1rem; }
.docs-layout {
  display: grid; gap: 1.6rem; max-width: var(--container); margin: 0 auto; padding: 1.4rem 1rem 3rem; align-items: start;
}
@media (min-width: 900px) {
  .docs-layout {
    /* Фиксированная ширина контента: колонка не «скачет» между страницами,
       пара колонок центрируется в контейнере. */
    grid-template-columns: 16rem minmax(0, 1fr);
    justify-content: center;
  }
}
.docs-sidebar { display: none; }
@media (min-width: 900px) { .docs-sidebar { display: block; position: sticky; top: 4.6rem; } }
.docs-sidebar__group { padding: .9rem .8rem .3rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); font-weight: 800; }
.docs-sidebar__group:first-child { padding-top: .2rem; }
.docs-sidebar__link {
  display: flex; align-items: center; gap: .55rem; padding: .5rem .8rem; border-radius: var(--radius-sm);
  color: var(--foreground); text-decoration: none; font-weight: 700; font-size: .9rem;
}
.docs-sidebar__link:hover { background: var(--secondary); }
.docs-sidebar__link--active { background: var(--peach); color: color-mix(in oklab, var(--primary) 70%, black); }
.docs-sidebar__articles { margin: .1rem 0 .3rem; padding-left: 1.4rem; }
.docs-sidebar__article {
  display: block; padding: .3rem .8rem; border-radius: .6rem; color: var(--muted-foreground);
  text-decoration: none; font-size: .86rem; font-weight: 600;
}
.docs-sidebar__article:hover { color: var(--primary); background: var(--secondary); }
.docs-sidebar__article--active { color: color-mix(in oklab, var(--primary) 70%, black); font-weight: 800; }
.docs-main { min-width: 0; }
.docs-crumb { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; color: var(--muted-foreground); margin-bottom: .7rem; }
.docs-crumb a { color: var(--muted-foreground); text-decoration: none; }
.docs-crumb a:hover { color: var(--primary); }
.docs-h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .5rem; text-wrap: balance; }
.docs-lead { color: var(--muted-foreground); margin: 0 0 1.2rem; }
.docs-updated { font-size: .8rem; color: var(--muted-foreground); margin-top: 1.4rem; padding-top: .9rem; border-top: 1px dashed var(--border); }
.docs-prose { line-height: 1.62; font-size: .95rem; }
.docs-prose h2 { font-size: 1.2rem; font-weight: 800; margin: 1.5rem 0 .5rem; }
.docs-prose h3 { font-size: 1.02rem; font-weight: 800; margin: 1.2rem 0 .4rem; }
.docs-prose p { margin: .5rem 0; text-wrap: pretty; }
.docs-prose ul, .docs-prose ol { margin: .5rem 0; padding-left: 1.4rem; display: grid; gap: .3rem; }
.docs-prose a:not(.btn) { color: var(--primary); font-weight: 700; }
.docs-prose code { background: var(--muted); border-radius: .4rem; padding: .1rem .4rem; font-size: .86em; }
.docs-prose pre { background: var(--muted); border-radius: var(--radius-sm); padding: .9rem 1rem; overflow-x: auto; }
.docs-prose pre code { background: transparent; padding: 0; }
.docs-prose table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .9rem; }
.docs-prose th { border-bottom: 2px solid color-mix(in oklab, var(--primary) 30%, transparent); }
.docs-prose td { border-bottom: 1px solid var(--muted); }
.docs-prose th, .docs-prose td { padding: .5rem .7rem; text-align: left; vertical-align: top; }
.docs-prose th { background: var(--cream); font-weight: 800; }
.docs-prose blockquote { margin: .8rem 0; padding: .6rem 1rem; border-left: 3px solid var(--primary); background: var(--cream); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted-foreground); }
.docs-prose img { max-width: 100%; }
.docs-section-cards { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin-top: 1.2rem; }
.docs-section-card { display: flex; flex-direction: column; gap: .5rem; background: var(--card); border: 0; border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--foreground); }
.docs-section-card__icon { width: 2.4rem; height: 2.4rem; border-radius: .8rem; background: var(--peach); color: color-mix(in oklab, var(--primary) 75%, black); display: inline-flex; align-items: center; justify-content: center; }
.docs-section-card__title { font-weight: 800; }
.docs-section-card__meta { font-size: .82rem; color: var(--muted-foreground); }
.docs-article-list { display: grid; gap: .5rem; margin-top: 1rem; }
.docs-article-list a { display: flex; align-items: center; gap: .6rem; padding: .65rem .85rem; border: 0; border-radius: var(--radius-sm); background: var(--card); color: var(--foreground); text-decoration: none; font-weight: 700; font-size: .92rem; } /* v2.16.7: белая карточка бренда вместо серой плашки */
.docs-article-list a:hover { background: var(--secondary); }
.docs-article-list__count { margin-left: auto; font-size: .8rem; color: var(--muted-foreground); font-weight: 600; }
.docs-audience-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.docs-audience-tab { padding: .35rem .8rem; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); text-decoration: none; font-size: .87rem; font-weight: 700; }
.docs-audience-tab--active { background: var(--primary); color: var(--primary-foreground); }
.docs-changelog { display: grid; gap: 1.1rem; }
.docs-change { background: var(--card); border: 0; border-radius: var(--radius-lg); padding: 1.2rem 1.3rem; }
.docs-change__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .4rem; }
.docs-change__version { font-weight: 800; }
.docs-change__date { color: var(--muted-foreground); font-size: .85rem; }
.docs-change__badge { padding: .15rem .6rem; border-radius: 999px; background: var(--mint-soft); color: color-mix(in oklab, var(--mint) 65%, black); font-size: .76rem; font-weight: 800; }
.docs-change__badge--seller { background: var(--peach); color: color-mix(in oklab, var(--primary) 70%, black); }
.docs-change__badge--general { background: var(--muted); color: var(--muted-foreground); }
.docs-empty { color: var(--muted-foreground); padding: 1rem 0; }
/* Структура доков: заголовок прямо в колонке (без внешней карточки-обёртки —
   меньше слоёв, нет двойных рамок вокруг списков). */
.docs-h2 {
  font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em;
  margin: 2rem 0 .3rem;
}
.docs-h2:first-child { margin-top: 0; }
.docs-more {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 800; color: var(--primary); text-decoration: none;
}
.docs-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.docs-change__title { font-size: 1rem; font-weight: 800; margin: .1rem 0 .3rem; }

@media (max-width: 640px) {
  .docs-toolbar { margin-top: .9rem; padding: 0 .8rem; }
}

/* ============ Кабинет: штрихи v2 ============ */
.cab-sidebar__doc { margin-top: .6rem; display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; border-radius: var(--radius-sm); color: var(--muted-foreground); text-decoration: none; font-weight: 700; font-size: .88rem; border: 0; background: var(--cream); }
.cab-sidebar__doc:hover { color: var(--primary); }

/* ==== Realtime-валидация форм (auth-realtime.js): статусы полей ==== */
.field-status {
  display: flex; align-items: baseline; gap: .45rem;
  font-size: .8rem; font-weight: 700; margin-top: .3rem;
  animation: rtFade var(--motion-gentle) var(--ease-brand) both;
}
/* Пустое поле = ноль обратной связи: строка скрыта целиком —
   «висящая» точка без текста невозможна (display:flex перебивает
   UA-стиль hidden, поэтому правило явное). */
.field-status[hidden] { display: none; animation: none; }
.field-status .field-status__dot {
  flex: 0 0 auto; width: .5rem; height: .5rem; border-radius: 999px;
  background: currentColor; position: relative; top: -.05rem;
}
.field-status--ok { color: color-mix(in oklab, var(--mint) 72%, black); }
.field-status--error { color: var(--destructive); }
.field-status--info, .field-status--checking { color: var(--muted-foreground); }
.field-status--checking .field-status__dot { animation: rtPulse 1s ease-in-out infinite; }
@keyframes rtFade { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
@keyframes rtPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.pwd-rules { list-style: none; display: grid; gap: .3rem; margin: .5rem 0 0; padding: 0; }
.pwd-rules li {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; color: var(--muted-foreground);
}
.pwd-rules li::before {
  content: ""; flex: 0 0 auto; width: .9rem; height: .9rem; border-radius: 999px;
  background: color-mix(in oklab, var(--muted-foreground) 25%, transparent);
}
.pwd-rules li.is-ok { color: color-mix(in oklab, var(--mint) 72%, black); }
.pwd-rules li.is-ok::before { background: var(--mint); }
.pwd-rules li.is-bad { color: var(--destructive); }
.pwd-rules li.is-bad::before { background: var(--destructive); }

/* ============ Юридические страницы (оферты, политика) ============ */
.policy-page { max-width: 52rem; }
.policy-page h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .45rem; line-height: 1.2; }
.policy-page h2 { font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; margin: 1.7rem 0 .55rem; }
.policy-page section p { line-height: 1.65; margin: .45rem 0; }
.policy-page a { color: var(--primary); font-weight: 700; text-decoration: none; }
.policy-page a:hover { text-decoration: underline; text-underline-offset: 3px; }
.policy-meta { color: var(--muted-foreground); font-size: .9rem; margin: 0 0 1.2rem; }

/* Реквизиты оператора: единый блок partials/legal_requisites.html —
   без рамок и теней, отделение фоном var(--cream) (правило бренда) */
.legal-requisites {
  margin: .9rem 0 .2rem; padding: 1.1rem 1.25rem;
  background: var(--cream); border-radius: var(--radius);
}
.legal-requisites__row { display: grid; grid-template-columns: 11.5rem minmax(0, 1fr); gap: .15rem 1rem; padding: .38rem 0; }
.legal-requisites__row dt { color: var(--muted-foreground); font-size: .86rem; padding-top: .08rem; }
.legal-requisites__row dd { margin: 0; font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.legal-requisites__row dd a { color: var(--primary); text-decoration: none; }
.legal-requisites__row dd a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) {
  .legal-requisites__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .legal-requisites__row dt { padding-top: .3rem; }
}

/* ============ Этап 23: селектор города доставки («Санкт-Петербург • Указать адрес») ============ */
.city-picker { position: relative; }
.city-picker__trigger {
  display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem;
  border-radius: .6rem; cursor: pointer; list-style: none; user-select: none;
  white-space: nowrap;
  /* v1.70: триггер — настоящий button (ресет вместо summary) */
  appearance: none; background: none; border: 0; font-family: inherit; color: inherit;
}
/* details-маркер нужен мобильному details-экземпляру */
.city-picker__trigger::-webkit-details-marker { display: none; }
.city-picker__trigger:hover,
.city-picker[open] .city-picker__trigger { background: var(--secondary); color: var(--primary); }
/* v1.70: десктопный экземпляр — панель popover; подсветка/chevron через :has(:popover-open) */
.shop-header__row--nav .city-picker__trigger { anchor-name: --city-trig-d; }
.city-picker:has(.city-picker__panel:popover-open) .city-picker__trigger { background: var(--secondary); color: var(--primary); }
.city-picker__pin { display: inline-flex; color: var(--primary); }
.city-picker__body { display: inline-flex; align-items: baseline; gap: .4rem; min-width: 0; }
.city-picker__city { font-size: .88rem; font-weight: 700; white-space: nowrap; }
.city-picker__hint { font-size: .78rem; color: var(--muted-foreground); white-space: nowrap; }
.city-picker__chevron { display: inline-flex; transition: transform var(--motion-fast) var(--ease-brand); color: var(--muted-foreground); }
.city-picker[open] .city-picker__chevron { transform: rotate(180deg); }
.city-picker:has(.city-picker__panel:popover-open) .city-picker__chevron { transform: rotate(180deg); }
.city-picker__panel {
  position: absolute; left: 0; top: calc(100% + .5rem); z-index: 60;
  width: min(22rem, calc(100vw - 2rem));
  /* border: 0 сбрасывает UA-рамку нативного [popover] (урок v1.89 — чёрная
     обводка панели города); v1.92: канон плавающих панелей — чистая
     карточная поверхность, тени сняты (правило бренда «ноль теней») */
  background: var(--card); border: 0; border-radius: var(--radius); padding: .6rem;
}
/* v1.70: десктопный экземпляр города — панель popover (top-layer):
   клик-вне/Esc/возврат фокуса — платформа; координаты — CSS anchor
   positioning, фолбэк place() в shop.js; браузеры без Popover API —
   класс .city-picker--open от shop.js (базовое absolute выше). */
@supports selector(:popover-open) {
  .city-picker__panel[popover] {
    position: fixed; inset: auto; margin: 0; z-index: auto;
    transition: opacity var(--motion-base) var(--ease-brand), transform var(--motion-base) var(--ease-brand), display var(--motion-base) var(--ease-brand) allow-discrete, overlay var(--motion-base) var(--ease-brand) allow-discrete;
  }
  @supports (top: anchor(bottom)) {
    .city-picker__panel[popover] {
      top: calc(anchor(--city-trig-d bottom) + .5rem);
      left: max(anchor(--city-trig-d left), .5rem);
    }
  }
  @starting-style { .city-picker__panel[popover]:popover-open { opacity: 0; transform: translateY(-4px); } }
  .city-picker__panel[popover]::backdrop { background: transparent; }
}
@supports not selector(:popover-open) {
  .city-picker__panel[popover] { display: none; }
  .city-picker--open .city-picker__panel[popover] { display: block; }
}
.city-picker__input {
  width: 100%; height: 2.6rem; border: 0; border-radius: 999px;
  background: var(--muted); padding: 0 1rem; font: inherit; color: inherit;
}
.city-picker__input::placeholder { color: var(--muted-foreground); }
.city-picker__input:focus { outline: 2px solid var(--primary); outline-offset: 0; background: var(--card); }
.city-suggest-list {
  margin-top: .4rem; max-height: 16rem; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: .1rem;
}
.city-suggest-item { display: block; }
.city-suggest-item--heading { font-weight: 800; font-size: .85rem; padding: .3rem .5rem; }
.city-suggest-item--note { font-size: .74rem; color: var(--muted-foreground); padding: .45rem .5rem; }
.city-suggest-item--empty { font-size: .85rem; color: var(--muted-foreground); padding: .5rem; }
.city-suggest__btn {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  border: 0; background: transparent; font: inherit; text-align: left;
  padding: .5rem .55rem; border-radius: var(--radius-sm); cursor: pointer;
}
.city-suggest__btn:hover { background: var(--secondary); }
.city-suggest__pin { display: inline-flex; color: var(--primary); }
.city-suggest__name { font-weight: 700; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-suggest__region { margin-left: auto; font-size: .76rem; color: var(--muted-foreground); white-space: nowrap; }
/* внутри мобильного меню панель города — в потоке, без абсолют-позиции */
.mobile-menu .city-picker { width: 100%; }
.mobile-menu .city-picker__trigger { width: 100%; justify-content: flex-start; }
.mobile-menu .city-picker__panel { position: static; width: 100%; }

/* Этап 23: география отгрузки в кабинете продавца */
.cab-shipping-geo { margin: 1.2rem 0; padding: 1rem; background: var(--cream); border-radius: var(--radius); }
.cab-shipping-geo .check-row { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .92rem; }
.cab-shipping-geo .check-row input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }
.cab-shipping-geo__regions { margin-top: .8rem; }
.cab-shipping-geo__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: .25rem .8rem; max-height: 16rem; overflow-y: auto; scrollbar-width: thin;
  padding: .5rem; margin-top: .4rem; background: var(--card); border-radius: var(--radius-sm);
}
.cab-shipping-geo__grid label { display: flex; gap: .45rem; align-items: center; font-size: .85rem; min-height: 1.6rem; }
.cab-shipping-geo__grid input { accent-color: var(--primary); }
.form-hint { font-size: .78rem; color: var(--muted-foreground); margin-top: .45rem; }

/* ============ Акции продавца (v1.7): живой таймер, цены со скидкой ============ */
.badge--promo { background: var(--primary); left: auto; right: .6rem; display: inline-flex; align-items: center; gap: .25rem; }
/* v1.74: индикатор остатка акции — типизированная переменная @property.
   До первого тика JS полоса полная (initial-value: 1); переход зарегистрированной
   переменной сглаживает шаги секундного тика (Chrome 85+, Safari 16.4+,
   Firefox 128+); без поддержки @property полоса шагает раз в секунду. */
@property --promo-left {
  syntax: "<number>";
  initial-value: 1;
  inherits: false;
}
.promo-timer {
  position: relative; /* v1.74: якорь полосы прогресса */
  display: inline-flex; align-items: center; gap: .3rem; width: max-content;
  font-size: .78rem; font-weight: 800; color: var(--primary);
  background: var(--mint-soft); border-radius: var(--radius-sm);
  padding: .22rem .55rem; margin-top: .35rem; font-variant-numeric: tabular-nums;
}
.promo-timer .icon { flex: none; }
.promo-timer--done { color: var(--muted-foreground); background: var(--cream); }
/* v1.74: тонкая полоса остатка акции под таймером; доля --promo-left (0..1)
   тикает из shop.js: доля оставшегося времени окна promo_starts_at..ends
   (без start — относительно первого рендера страницы). */
.promo-timer::after {
  content: "";
  position: absolute;
  left: .55rem; right: .55rem; bottom: .16rem;
  height: 2px; border-radius: 1px;
  background: linear-gradient(to right, var(--primary) calc(var(--promo-left) * 100%), transparent 0);
}
.promo-timer--done::after { visibility: hidden; }
.promo-timer--cabinet { margin-top: 0; font-size: .85rem; }
.promo-live {
  position: relative; /* v1.74: якорь полосы прогресса */
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin: .6rem 0 1rem; /* v1.9: нижний отступ — плашка не прижимается к блоку вариаций */
  background: var(--mint-soft); border-radius: var(--radius-sm); padding: .55rem .8rem;
  font-weight: 800; color: var(--primary); font-size: .92rem;
}
.promo-live__badge { background: var(--primary); color: #fff; border-radius: 999px; padding: .18rem .6rem; font-size: .78rem; }
.promo-live__timer { font-variant-numeric: tabular-nums; }
/* v1.74: полоса остатка акции на детальной — та же переменная, что у карточек;
   скрытие при завершении несёт общий класс promo-timer--done (его вешает JS). */
.promo-live::after {
  content: "";
  position: absolute;
  left: .8rem; right: .8rem; bottom: .22rem;
  height: 2px; border-radius: 1px;
  background: linear-gradient(to right, var(--primary) calc(var(--promo-left) * 100%), transparent 0);
}
@media (prefers-reduced-motion: no-preference) {
  .promo-timer::after, .promo-live::after { transition: --promo-left 1s linear; }
}

/* Кабинет продавца: управление акцией */
.promo-manage { display: flex; flex-direction: column; gap: .6rem; }
.promo-manage--active { background: var(--mint-soft); border-radius: var(--radius); padding: .9rem 1rem; }
.promo-manage__row { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .92rem; }
.promo-manage__row .badge { position: static; }
.promo-manage__form { display: flex; flex-direction: column; gap: .6rem; }
.offer-row__price-old { font-size: .8rem; }

/* ============ Фото в отзывах и заявках на возврат (v1.7) ============ */
.review-item__photos { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.review-photo { display: block; width: 76px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; background: var(--cream); border: 0; padding: 0; cursor: zoom-in; }
.review-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--motion-fast) var(--ease-brand); }
.review-photo:hover img { transform: scale(1.04); }
.return-photos { margin-top: .6rem; }
.review-form__photos { padding: .45rem; font-size: .85rem; }

/* ============ v1.10: ответ магазина на отзыв ============ */
.review-reply { margin-top: .55rem; background: var(--cream); border-radius: var(--radius-sm); padding: .55rem .7rem; }
.review-reply__who { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; font-size: .8rem; color: var(--primary); }
.review-reply__text { font-size: .88rem; color: color-mix(in oklab, var(--foreground) 85%, transparent); margin-top: .2rem; }
.review-reply__text p { margin: 0; }

/* ============ v1.10: публичная витрина магазина /shop/<slug>/ ============ */
.store-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; background: var(--cream); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.store-head__main { display: flex; gap: 1rem; align-items: flex-start; min-width: 0; }
.store-head__main .seller-card__icon { width: 3.4rem; height: 3.4rem; }
.store-head__info { min-width: 0; }
.store-head__info .page__title { margin-bottom: .2rem; }
.store-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; color: var(--muted-foreground); font-size: .88rem; }
.store-head__rating { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.store-head__desc { margin: .6rem 0 0; font-size: .92rem; color: color-mix(in oklab, var(--foreground) 80%, transparent); max-width: 46rem; }
.store-head__side { display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; }
.store-head__count { font-weight: 800; font-size: .9rem; color: var(--muted-foreground); white-space: nowrap; }
.seller-card__shop-link { display: inline-flex; align-items: center; gap: .25rem; font-size: .82rem; font-weight: 700; color: var(--primary); margin-top: .15rem; }
.seller-card__shop-link:hover { text-decoration: underline; }

/* ============ v1.10: отзывы в кабинете продавца ============ */
.review-admin-item { flex-wrap: wrap; align-items: flex-start; }
.review-admin-item__body { min-width: 0; flex: 1 1 20rem; }
.review-admin-item__text { font-size: .9rem; margin-top: .25rem; color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.review-admin-item__photos { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.review-admin-item__photos img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); }
.review-admin-item__reply { margin-top: .45rem; background: var(--cream); border-radius: var(--radius-sm); padding: .5rem .6rem; font-size: .85rem; }
.review-reply-form { display: flex; flex-direction: column; gap: .45rem; flex: 1 1 16rem; min-width: 0; }
.review-reply-form textarea { min-height: 3.4rem; resize: vertical; }
.review-reply-form .btn { align-self: flex-start; }


/* ============ v1.9: маркетплейс-контур ============ */

/* Панель покупки: вариация + количество + предложение продавца */
.buy-panel { border: 0; background: var(--cream); border-radius: var(--radius); padding: .8rem .9rem; margin-top: 1rem; margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
/* v1.11: зазор «Панель покупки ↔ Этот товар у других продавцов» — раньше блоки
   прижимались (margin-bottom отсутствовал, у .offers-block правил не было) */
.offers-block { margin-bottom: 1.1rem; }
.buy-panel__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.buy-panel__seller { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .92rem; }
.buy-panel__price { display: inline-flex; align-items: baseline; gap: .45rem; }
.buy-panel__price #buy-price { font-size: 1.25rem; font-weight: 800; }
.buy-panel__price-old { font-size: .85rem; color: var(--ink-soft); }
.buy-panel__form { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.buy-panel__hint { margin: 0; font-size: .82rem; color: var(--ink-soft); }
/* v2.5 (ТЗ §5.2): оптовые условия в панели покупки — без серых рамок/теней;
   v2.23.5: внешняя рамка снята — уровни читаются подложкой --brand-wash,
   внутренние линии таблицы (разделители) сохранены */
.buy-panel__tiers { display: grid; gap: .5rem; margin: 0; padding: .65rem .8rem;
  border-radius: 12px;
  background: var(--brand-wash); }
.buy-panel__tier-note { font-size: .8rem; color: var(--ink-soft); }
.buy-panel__tier-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.buy-panel__tier-table th { text-align: left; font-weight: 600; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
  padding: .25rem .4rem; border-bottom: 1px solid var(--brand-soft); }
.buy-panel__tier-table td { padding: .3rem .4rem; border-bottom: 1px solid var(--brand-soft); }
.buy-panel__tier-table tr:last-child td { border-bottom: none; }
@media (prefers-reduced-motion: no-preference) {
  .buy-panel__tiers { transition: opacity var(--motion-base) var(--ease-brand); }
}

/* Кликабельные чипы вариаций (выбор влияет на панель покупки) */
.variant-chip--selectable { cursor: pointer; transition: border-color var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand); user-select: none; }
.variant-chip--selectable:hover { border-color: var(--primary); }
.variant-chip--active { border-color: var(--primary); background: var(--mint-soft); font-weight: 800; }
.variant-chip--active .variant-chip__stock { color: var(--primary); }

/* Ссылка «У N продавцов» в метах карточки товара */
.product-info__sellers { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--primary); }
.product-card__others { display: inline-flex; align-items: center; gap: .3rem; margin-top: .45rem; font-size: .8rem; font-weight: 700; color: var(--primary); }
.product-card__others:hover { text-decoration: underline; }

/* Кнопка сравнения */
/* v1.9.2: кнопка сравнения — единый стиль с «В избранное» (размер/фон без рамки) */
.compare-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; border: 0; background: color-mix(in oklab, var(--card) 88%, transparent); cursor: pointer; color: var(--muted-foreground); transition: color var(--motion-fast) var(--ease-brand), background var(--motion-fast) var(--ease-brand); }
.compare-toggle:hover { color: var(--primary); background: var(--mint-soft); }
.compare-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.compare-toggle--on { color: var(--primary); background: var(--mint-soft); }
.product-info__head .compare-toggle { flex-shrink: 0; width: 2.5rem; height: 2.5rem; }
.fav-slot { display: flex; gap: .4rem; align-items: center; }

/* Индикатор сравнения в шапке */
.mini-cart--compare { position: relative; }

/* Таблица сравнения */
/* v1.92: тень снята — чистая карточная поверхность, как у сайдбара фильтров */
.compare-table-wrap { overflow-x: auto; border: 0; background: var(--card); border-radius: var(--radius); }
.compare-table { border-collapse: collapse; width: 100%; min-width: 520px; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--cream-2, #f0e6d8); padding: .55rem .7rem; text-align: left; font-size: .9rem; }
.compare-table thead th { border-bottom: 2px solid var(--cream-2, #f0e6d8); vertical-align: top; }
.compare-table__attr { width: 130px; font-weight: 800; color: var(--ink-soft); }
.compare-table__img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); display: block; margin-bottom: .4rem; }
.compare-table__placeholder { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; background: var(--cream); border-radius: var(--radius-sm); margin-bottom: .4rem; }
.compare-table__title { font-weight: 700; font-size: .88rem; }
.compare-table__title:hover { color: var(--primary); }
.compare-table__remove { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; border: 0; background: var(--muted); cursor: pointer; color: var(--ink-soft); margin-bottom: .35rem; }
.compare-table__remove:hover { color: var(--danger); background: var(--berry-soft); }
.compare-table__remove-form { margin: 0 0 .35rem; }

/* Q&A: вопросы о товаре */
.qa-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.qa-item__q { font-weight: 700; display: flex; gap: .4rem; align-items: baseline; }
.qa-item__q .icon { flex-shrink: 0; transform: translateY(2px); }
.qa-item__a { margin-top: .3rem; padding: .55rem .7rem; background: var(--mint-soft); border-radius: var(--radius-sm); font-size: .92rem; }
.qa-item__who { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; margin-right: .4rem; }
.qa-form { display: flex; flex-direction: column; gap: .5rem; margin-top: .8rem; max-width: 560px; }

/* Чат и споры */
.chat-page { max-width: 760px; }
.chat-page__head { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .8rem; }
.chat-page__topic { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; color: var(--primary); font-size: .92rem; }
.chat-thread { border: 0; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.chat-thread__messages { max-height: 420px; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .55rem; background: var(--card); }
.chat-msg { display: flex; max-width: 88%; }
.chat-msg--buyer { align-self: flex-start; }
.chat-msg--seller { align-self: flex-end; }
.chat-msg--buyer .chat-msg__bubble { background: var(--cream); }
.chat-msg--seller .chat-msg__bubble { background: var(--mint-soft); }
.chat-msg__bubble { border-radius: var(--radius-sm); padding: .5rem .65rem; }
.chat-msg__text { margin: 0; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-msg__meta { font-size: .72rem; color: var(--ink-soft); margin-top: .25rem; }
.chat-msg--empty { align-self: center; color: var(--ink-soft); font-size: .88rem; }
.chat-form { display: flex; gap: .5rem; padding: .7rem .8rem; border-top: 1px solid var(--cream-2, #f0e6d8); background: var(--card); align-items: flex-start; }
.chat-form__input { flex: 1; resize: vertical; }
.chat-form--secondary { border-top: 0; padding-top: 0; gap: .6rem; align-items: center; }
.thread-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.thread-row__link { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; color: inherit; background: var(--muted); }
.thread-row__link:hover { background: var(--secondary); }
.thread-row__icon { color: var(--primary); flex-shrink: 0; }
.thread-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.thread-row__seller { font-weight: 800; }
.thread-row__topic { font-size: .88rem; }
.thread-row__last { font-size: .78rem; color: var(--ink-soft); }

/* Споры */
.dispute-meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .4rem 0 .8rem; font-size: .88rem; }
.dispute-meta__item { color: var(--ink-soft); }

/* Лояльность */
.loyalty-card { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; padding: 1rem 1.1rem; }
.loyalty-card__balance { display: flex; flex-direction: column; align-items: center; background: var(--mint-soft); border-radius: var(--radius); padding: .8rem 1.2rem; min-width: 140px; }
.loyalty-card__amount { font-size: 2rem; font-weight: 800; color: var(--primary); }
.loyalty-card__unit { font-size: .82rem; color: var(--ink-soft); }
.loyalty-card__note { flex: 1; min-width: 220px; }
.loyalty-tx__amount { font-weight: 800; white-space: nowrap; }
.loyalty-tx__amount--plus { color: var(--primary); }
.summary-row--points .points-toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.summary-row--muted { color: var(--ink-soft); }

/* Реклама продавца */
.ads-packages { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ads-package { display: inline-flex; align-items: center; gap: .5rem; border: 1px solid transparent; border-radius: var(--radius-sm); padding: .45rem .7rem; font-size: .88rem; background: var(--muted); }
.ads-package__price { font-weight: 800; color: var(--primary); }
.ads-start { display: flex; gap: .4rem; align-items: center; }
.ads-start__select { max-width: 210px; }

/* v1.9.2: биллинг рекламы + баннеры категорий */
.ads-debt { display: flex; align-items: flex-start; gap: .6rem; }
.cabinet-title--section { font-size: 1.2rem; margin-top: 1.6rem; }
.banner-form__row { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: .8rem; }
.banner-form__field { display: flex; flex-direction: column; gap: .3rem; flex: 1 1 10rem; }
.banner-form__field--wide { flex: 2 1 14rem; }
.banner-thumb { width: 5.2rem; height: 3rem; object-fit: cover; border-radius: .5rem; flex: 0 0 auto; }

/* Q&A кабинет */
.qa-answer-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.qa-answer-row__product { font-weight: 800; color: inherit; }
.qa-answer-row__question { margin: 0; font-size: .92rem; }
.qa-answer-row__form { display: flex; flex-direction: column; gap: .4rem; margin-top: .2rem; }
.cab-tasklist__date { white-space: nowrap; font-size: .8rem; color: var(--ink-soft); }

/* Импорт карточек */
.card-import__spec { background: var(--cream); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .78rem; overflow-x: auto; white-space: pre; margin: .5rem 0; }
.card-import__form { display: flex; flex-direction: column; gap: .55rem; max-width: 480px; margin-top: .8rem; }
.card-import__errors { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.card-import__error { color: var(--danger); font-size: .88rem; display: flex; gap: .35rem; align-items: baseline; }

/* Рекомендации на карточке товара */
.related-block { margin-top: 1.6rem; }
.related-block__title { display: flex; align-items: center; gap: .45rem; font-size: 1.05rem; margin: 0 0 .7rem; }
.product-grid--related { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* 2FA */
.totp-form { display: flex; flex-direction: column; gap: .55rem; max-width: 340px; margin: .8rem 0; }
.totp-form__code { font-size: 1.3rem; letter-spacing: .35em; text-align: center; font-weight: 800; }
.totp-setup__steps { margin: .4rem 0 .6rem; padding-left: 1.2rem; font-size: .9rem; }
.totp-setup__qr { max-width: 200px; background: #fff; border-radius: var(--radius-sm); padding: .5rem; }
.totp-setup__key code { font-size: 1.05rem; font-weight: 800; letter-spacing: .08em; }
.totp-uri { font-size: .74rem; word-break: break-all; }
.totp-manage { display: flex; flex-direction: column; gap: .5rem; max-width: 340px; }

/* ============ v1.11: Оплата checkout.js (криптограмма на нашей форме) ============ */
.payment-card { max-width: 30rem; margin: 2rem auto; padding: 1.6rem 1.4rem; display: flex; flex-direction: column; gap: .8rem; }
.payment-card__total { margin: 0; font-size: 1.05rem; }
.payment-card__form { display: flex; flex-direction: column; gap: .8rem; }
.payment-card__row { display: flex; gap: .6rem; }
.payment-card__row .field { flex: 1; min-width: 0; }
/* v2.16.5: правило .payment-card__form input снято — мёртвый код (форме остался
   только submit, сырых полей нет; канонический инпут бренда — .input) */
/* Форма ПП на странице счёта — канонические поля бренда (были сырыми, UA-стиль) */
.pp-attach-form { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.pp-attach-form .input { flex: 1 1 9rem; width: auto; min-height: 2.6rem; }
.pp-attach-form .btn { flex: 0 0 auto; }
.payment-card__pay { width: 100%; }
.payment-card__error { margin: 0; color: var(--destructive); font-size: .88rem; }
.payment-card__hint { margin: 0; display: flex; gap: .4rem; align-items: baseline; color: var(--muted-foreground); font-size: .82rem; }
.payment-card__notice { display: flex; gap: .6rem; background: var(--muted); border-radius: var(--radius-sm); padding: .8rem .9rem; color: var(--muted-foreground); font-size: .9rem; }
.payment-card__notice p { margin: 0; }
.payment-card__widget { min-height: 1rem; }

/* ============ v1.11: группа «избранное/сравнить» в заголовке товара ============ */
/* space-between при трёх детях центрировал сердце посередине заголовка —
   теперь обе кнопки в одной группе, прижатой к правому краю */
.head-actions { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; flex-shrink: 0; }

/* ============ v1.12: подписка «Сообщить о поступлении» ============ */
.stock-alert-form { margin-top: .5rem; }
.stock-alert-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .625rem 1rem; border-radius: var(--radius); border: 0; background: var(--muted); color: var(--foreground); font-size: .875rem; font-weight: 600; cursor: pointer; transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand); }
.stock-alert-btn:hover { background: var(--berry-soft); color: var(--berry); }
.stock-alert-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.stock-alert-btn--active { background: var(--berry-soft); color: var(--berry); }


/* === v1.42: дизайн-контракт — стили для классов, оставшихся без правил === */

/* Шапка витрины */
.shop-header__row { min-width: 0; }
.icon-btn--burger { list-style: none; }
.icon-btn--burger::-webkit-details-marker { display: none; }
.user-menu__trigger-icon { display: inline-flex; color: var(--primary); }
.city-picker__search { margin-bottom: .4rem; }
.city-picker__suggest { margin-top: .4rem; max-height: 16rem; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: .1rem; }

/* Карточка товара и витринные блоки */
.product-card__stars { display: inline-flex; align-items: center; }
.product-info__stars { display: inline-flex; align-items: center; }
.product-info__reviews { color: inherit; }
.product-info__sold { color: var(--muted-foreground); font-size: .82rem; }
.product-info__hint { color: var(--muted-foreground); font-size: .88rem; margin: .3rem 0 0; }
.variant-chip__name { font-weight: 700; font-size: .88rem; }
.seller-card__chat { flex-basis: 100%; justify-content: center; }
.compare-form { display: inline-flex; margin: 0; }
.compare-table__product { min-width: 11rem; text-align: left; }
.compare-table__card { display: flex; flex-direction: column; gap: .4rem; font-weight: 700; }

/* Кабинет: базовые блоки */
.logo--compact { gap: .5rem; color: inherit; text-decoration: none; }
.cab-card { background: var(--card); border-radius: var(--radius); padding: 1rem 1.1rem; min-width: 0; }
.cab-card__title { display: flex; align-items: center; gap: .45rem; font-size: 1.02rem; font-weight: 800; margin: 0 0 .7rem; }
.cab-card__title svg { color: var(--primary); }
.cab-section-title { font-size: 1.02rem; font-weight: 800; margin: 0 0 .7rem; }
.cabinet-page { min-width: 0; }
.cabinet-page__title { display: flex; align-items: center; gap: .5rem; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .45rem; }
.cabinet-page__title svg { color: var(--primary); }
.cabinet-page__note { color: var(--muted-foreground); font-size: .9rem; margin: 0 0 1.1rem; }
.empty-state__title { font-weight: 800; margin: .6rem 0 0; }
.empty-state__text { color: var(--muted-foreground); font-size: .9rem; margin: .25rem 0 0; }
.timeline__text { font-weight: 600; }
.cab-tasklist__icon--order { background: var(--secondary); color: var(--secondary-foreground); }
.cab-switch--inline { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .88rem; }
.table__actions-col { width: 1%; white-space: nowrap; }
.tag--mark { background: var(--accent); color: var(--accent-foreground); }
.ads-package__label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: .95rem; }
.ads-package__label svg { color: var(--primary); }
.address-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.cab-dialog__item--buyer, .cab-dialog__item--system { justify-content: flex-start; }
/* v2.23.5: рамка «моих» сообщений снята — различие несёт фон peach;
   правило стоит после ролей (--buyer/--seller), поэтому перекрывает
   их подложки у собственных сообщений читателя */
.chat-msg--mine .chat-msg__bubble { background: var(--peach); }


/* Статусы отзывов и споров */
.status-badge--success { background: var(--mint); color: #fff; }
.status-badge--danger { background: var(--destructive); color: #fff; }
.status-badge--ticket-pending { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--dispute-open, .status-badge--dispute-seller_replied { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--dispute-platform_review { background: var(--accent); color: var(--accent-foreground); }
.status-badge--dispute-resolved_refund { background: var(--mint); color: #fff; }
.status-badge--dispute-resolved_rejected { background: var(--secondary); color: var(--secondary-foreground); }
.status-badge--dispute-closed { background: var(--muted); color: var(--muted-foreground); }

/* Статусы отправлений */
.status-badge--shipment-created, .status-badge--shipment-accepted { background: var(--secondary); color: var(--secondary-foreground); }
.status-badge--shipment-in_transit, .status-badge--shipment-arrived_at_pickup { background: var(--accent); color: var(--accent-foreground); }
.status-badge--shipment-delivered { background: var(--mint); color: #fff; }
.status-badge--shipment-returned, .status-badge--shipment-cancelled { background: var(--muted); color: var(--muted-foreground); }

/* Статусы заявок на возврат */
.status-badge--return-requested { background: var(--peach); color: var(--secondary-foreground); }
.status-badge--return-platform_review { background: var(--accent); color: var(--accent-foreground); }
.status-badge--return-approved { background: var(--secondary); color: var(--secondary-foreground); }
.status-badge--return-rejected { background: var(--destructive); color: #fff; }
.status-badge--return-refunded { background: var(--mint); color: #fff; }
.status-badge--return-closed { background: var(--muted); color: var(--muted-foreground); }

/* Заказы покупателя */
.order-card__items { color: var(--muted-foreground); font-size: .85rem; }
.order-item__title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.checkout-line__name { min-width: 0; flex: 1 1 auto; }
.order-part--pay { background: color-mix(in oklab, var(--cream) 55%, var(--card)); }
.payment-card__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.field__hint--wide { grid-column: 1 / -1; }

/* Дополнение v1.42: обёртки, вскрытые дизайн-контрактом */
.totp-setup { display: flex; flex-direction: column; gap: .55rem; margin: .8rem 0; padding: .9rem 1rem; background: var(--cream); border-radius: var(--radius); }
.auth-card__form { margin-top: .9rem; display: flex; flex-direction: column; gap: .8rem; }
.form-field--checkbox { margin: .35rem 0; }
.variant-row--first { padding-top: 0; }
.qa-answer-row { align-items: flex-start; }
.cart-item__info { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.cart-item__price { white-space: nowrap; }
.icon-btn--danger { color: var(--destructive); }
.icon-btn--danger:hover { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.cart-promo__applied--error { color: var(--destructive); }
.gallery { display: flex; flex-direction: column; min-width: 0; }
.product-info { min-width: 0; }
.product-attrs { margin-top: 1.2rem; }

/* === v1.43: кабинет на каркасе сайта — общая шапка и футер === */
.cab-zone { background: linear-gradient(180deg, var(--background) 0%, var(--cream) 100%); }
.cab-menubar { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem 0; }
.cab-menubar__title { font-weight: 800; }
@media (min-width: 980px) { .cab-menubar { display: none; } }
/* === v1.45: градиент кабинета дотягивается до футера + настоящие карточки секций === */
/* main на страницах кабинета — flex-колонка: тёплая градиентная зона растёт на всю
   высоту контента и прижата к футеру без белой щели (раньше зона обрывалась за
   2.5rem до футера на каждой странице кабинета). */
.site-main--cabinet { display: flex; flex-direction: column; padding-bottom: 0; }
.site-main--cabinet > .cab-zone { flex: 1 0 auto; }
/* Страницы ошибок 404/500 используют градиентный экран auth-page в общем каркасе —
   тот же прижим градиента к футеру; карточка остаётся сверху, не растягивается. */
.site-main--auth { display: flex; flex-direction: column; padding-bottom: 0; }
.site-main--auth > .auth-page { flex: 1 0 auto; align-items: flex-start; }
/* Класс .card не имел собственной геометрии: секции «cabinet-section card» во всех
   кабинетах рисовались голым текстом на тёплом фоне (профиль, безопасность,
   настройки уведомлений, поддержка, возвраты, лояльность), а «Опасная зона»
   профиля красила инлайном несуществующую рамку. База карточки — как у .cab-card. */
/* v1.46: единая поверхность карточек кабинета — ОДИН подход ко всем блокам:
   белая карточка (var(--card)) на тёплой градиентной зоне, БЕЗ рамок — серые
   обводки блоков запрещены владельцем. Прозрачные и кремовые подложки блоков
   («cab-empty card», «order-card card», «loyalty-card card», «order-part card»,
   «empty-state» и пр.) больше не просвечивают градиентом зоной. Цветные
   поверхности (mint/peach/cream) остаются только ВНУТРИ карточек как
   семантические акценты (текущая сессия, статусы, плитка баллов).
   v2.23.5: семантика опасной/предупреждающей зоны несётся фоном —
   card--danger — тёплая тёнка destructive, card--warn — peach (лимит НПД);
   рамок нет ни у одной карточки. */
.cab-zone .card { background: var(--card); border-radius: var(--radius); }
.cab-zone .empty-state { background: var(--card); border: 0; }
.cabinet-section.card { background: var(--card); border: 0; border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.cabinet-section.card--danger { background: color-mix(in oklab, var(--destructive) 7%, var(--card)); }
.cabinet-section.card--warn { background: var(--peach); }

/* v1.48: единый вертикальный ритм кабинета — любой блок после блока отстоит на
   1.4rem. Перечисление v1.47 «шапка + конкретный класс» пропускало пары вида
   «карточка → empty-state» (склейка баллов лояльности без операций) и
   «chips-row → cab-bulkbar» (товары продавца). Общее правило закрывает все пары;
   шапка раздела прижата к «← Обзор» — одна смысловая группа. */
.cab-content > * + * { margin-top: 1.4rem; }
.cab-content > .cab-backlink + .cab-page-head { margin-top: 0; }
.cab-zone .cab-page-head { margin-bottom: 1.4rem; }
.cab-zone .cab-grid { margin-top: 1.4rem; gap: 1.4rem; }
.cab-zone .cab-grid > * { margin-top: 0; }
.cab-zone .safety-note { margin-bottom: 1.4rem; }
.cab-zone .cab-page-head .cabinet-title svg { color: var(--primary); }
.danger-summary { cursor: pointer; }

/* v1.49: активная роль сессии и переключение профилей (как на Госуслугах) */
.user-menu__role {
  display: inline-flex; align-items: center; gap: .4rem; margin: .15rem .6rem .2rem;
  padding: .28rem .6rem; border-radius: 999px; width: fit-content;
  background: var(--secondary); color: var(--primary); font-size: .74rem; font-weight: 700;
}
.user-menu__current {
  display: flex; align-items: center; gap: .45rem; padding: .45rem .6rem .15rem;
  font-size: .78rem; color: var(--muted-foreground);
}
.user-menu__current svg { color: var(--primary); }


/* ============================================================
   v1.51 — Modern Web Platform (прогрессивное улучшение).
   Новые API применяются только в поддерживающих их браузерах:
   остальные продолжают работать в прежнем мгновенном режиме.
   ============================================================ */

/* Браузерные контролы (поля ввода, автозаполнение, скроллбары) всегда
   в светлой теме витрины — не наследуют системную тёмную тему ОС. */
/* v1.99: кривая бренда в современном формате linear() — точная развёртка
   cubic-bezier(.2, .8, .2, 1) (узлы вычислены по параметрической формуле
   бэзье); браузер без поддержки линейной функции остаётся на бэзье-фолбэке
   из :root — поведение единое. */
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --ease-brand: linear(0, 0.2224 5.5%, 0.4112 10.4%, 0.5688 15.3%, 0.6976 20.8%, 0.8 27.5%, 0.8784 36%, 0.9352 46.9%, 0.9728 60.8%, 0.9936 78.3%, 1);
  }
}

:root { color-scheme: light; }

/* Якорные переходы не прячут заголовок под sticky-шапкой. */
html { scroll-padding-top: 5.5rem; }

/* ---- View Transitions API: плавные кросс-документные переходы страниц ----
   Chromium 126+: смена страниц витрины морфится вместо мгновенной подмены.
   Шапка носит стабильное имя и не мигает между страницами; главное фото
   товара перетекает из карточки списка в галерею страницы товара (парные
   инлайн-имена product-<id> в partials/product_card.html и
   shop/product_detail.html). Браузеры без поддержки — обычная навигация. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.shop-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 200ms ease both vt-page-out; }
::view-transition-new(root) { animation: 260ms ease both vt-page-in; }
@keyframes vt-page-out { to { opacity: 0; translate: 0 -8px; } }
@keyframes vt-page-in { from { opacity: 0; translate: 0 10px; } }

/* ---- Scroll-driven animations: подъём карточек при входе в экран ----
   Ноль JS: таймлайн привязан к прокрутке самого элемента (view()).
   Карточки выше первого экрана уже за пределами диапазона — видны сразу. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .product-grid .product-card,
    .cat-tile {
      animation: card-reveal both ease-out;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
    @keyframes card-reveal {
      from { opacity: .01; translate: 0 18px; }
      to { opacity: 1; translate: 0 0; }
    }
  }
}

/* ---- @starting-style + transition-behavior: плавное открытие подсказок ----
   Переключение hidden у поисковых подсказок анимируется: display уходит
   дискретно, прозрачность и сдвиг — плавно. */
.search__suggest {
  overscroll-behavior: contain;
  transition:
    opacity var(--motion-base) var(--ease-brand),
    translate var(--motion-base) var(--ease-brand),
    display var(--motion-base) var(--ease-brand) allow-discrete,
    overlay var(--motion-base) var(--ease-brand) allow-discrete;
}
@starting-style { .search__suggest { opacity: 0; translate: 0 -8px; } }

/* ---- Плавные аккордеоны: ::details-content + interpolate-size ----
   Фильтры каталога раскрываются плавно (Chromium 131+); прочие браузеры —
   мгновенно, как раньше. */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
}
.filters::details-content {
  height: 0;
  overflow: clip;
  transition: height .28s ease, content-visibility .28s allow-discrete;
}
.filters[open]::details-content { height: auto; }

/* ---- Современная типографика ---- */
.hero__title, .section__title, .page__title { text-wrap: balance; }
.hero__subtitle { text-wrap: pretty; }

/* ---- Системная настройка «повышенный контраст» ----
   Разделители и второстепенный текст темнеют — без появления новых рамок. */
@media (prefers-contrast: more) {
  :root {
    --border: oklch(0.72 0.02 80);
    --muted-foreground: oklch(0.36 0.03 45);
  }
}


/* ============================================================
   v1.52 — UX-полиш состояний: клавиатура, skip-link, сенсор.
   ============================================================ */

/* Активный пункт подсказок при навигации стрелками — та же подсветка,
   что и у :hover */
.suggest-item.is-active { background: var(--secondary); }

/* Заголовок пустого состояния — главный акцент вместо серой фразы */
.empty-state__title {
  margin: .4rem 0 0;
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--foreground);
}

/* Skip-link: невидим до фокуса с клавиатуры, затем — верхний левый угол */
.skip-link {
  position: absolute;
  left: -100vw;
  top: 0;
  z-index: 2000;
  padding: .65rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 800;
}
.skip-link:focus { left: 0; }

/* Сенсорные устройства: липкие hover-эффекты карточек не остаются
   после тапа (визуальный отклик даёт только сам тап) */
@media (hover: none) {
  /* v1.92: на сенсорных не залипают ни брендовая линия, ни фон карточек */
  .product-card, .brand-card { transition: none; }
  .product-card:hover .product-card__img { transform: none; }
  .product-card:hover,
  .brand-card:hover, .brand-card:focus-visible { border-color: transparent; }
  .brand-card:hover, .brand-card:focus-visible { background: var(--card); }
}


/* ============================================================
   v1.53 — Умные формы и семантика: валидация после ввода,
   авторастущие textarea, фирменное выделение, контрастные режимы ОС.
   ============================================================ */

/* :user-valid / :user-invalid — реакция только после ввода пользователя.
   Пустая форма, которую пользователь ещё не трогал, не «краснеет».
   Только background-color: у select.input есть кастомная стрелка
   через background-image — шортхенд background стёр бы её. */
@supports selector(:user-invalid) {
  .input:user-invalid, .form-input:user-invalid {
    outline: 2px solid var(--destructive);
    outline-offset: 0;
    background-color: color-mix(in oklab, var(--destructive) 7%, var(--muted));
  }
  .input:user-invalid:focus, .form-input:user-invalid:focus {
    outline-color: var(--destructive);
    background-color: color-mix(in oklab, var(--destructive) 7%, var(--card));
  }
  .input:user-valid, .form-input:user-valid { background-color: var(--card); }
}

/* field-sizing: content — textarea растёт по содержимому (Chromium 123+);
   без поддержки остаётся прежнее поведение с фиксированной высотой */
@supports (field-sizing: content) {
  textarea.input, textarea.form-input {
    field-sizing: content;
    min-height: 6rem;
    max-height: 18rem;
  }
}

/* Фирменное выделение текста и подсветка фрагмента из ссылки (scroll-to-text) */
::selection { background: var(--primary); color: var(--primary-foreground); }
::target-text { background: var(--primary); color: var(--primary-foreground); }

/* Подсказки открыты — поле поиска живёт в «активном» состоянии */
.search:has(.search__suggest:not([hidden])) .search__input { background: var(--card); }

/* Ошибка валидации внутри .form-field — поле краснеет даже там, где
   серверный класс form-field--error не выставлен */
.form-field:has(> .form-error) .input,
.form-field:has(> .form-error) .form-input {
  outline: 2px solid var(--destructive);
  outline-offset: 0;
}

/* Windows High Contrast (forced-colors): кастомные чекбоксы и радио
   остаются различимы — отметка и фокус получают системные цвета */
@media (forced-colors: active) {
  ::where(input[type="checkbox"]):checked::before,
  ::where(input[type="radio"]):checked::before { background: Highlight; }
  ::where(input[type="checkbox"]):checked,
  ::where(input[type="radio"]):checked { border-color: Highlight; }
  ::where(input[type="checkbox"]):indeterminate::before { background: Highlight; }
  .input:focus, .form-input:focus { outline-color: Highlight; }
}

/* Системная настройка «меньше прозрачности»: стеклянные поверхности
   получают сплошной фон — читаемость важнее блюра */
@media (prefers-reduced-transparency: reduce) {
  .shop-header { background: var(--background); backdrop-filter: none; }
  .fav-btn { background: var(--card); backdrop-filter: none; }
}


/* ============================================================
   v1.54 — Мгновенная навигация: Speculation Rules, плавные меню,
   стабильный сайдбар кабинета, ленивый рендер футера, cap-trim.
   ============================================================ */

/* Плавное появление панелей меню (в одном стиле с megaIn мега-меню):
   панели абсолютны, поэтому анимируем саму панель, а не ::details-content */
@media (prefers-reduced-motion: no-preference) {
  /* v1.70: .user-menu__panel — popover, появление через @starting-style в её слое */
  .city-picker[open] .city-picker__panel,
  .mobile-menu[open] .mobile-menu__panel { animation: menuIn var(--motion-base) var(--ease-brand); }
  @keyframes menuIn {
    from { opacity: 0; translate: 0 -6px; }
    to { opacity: 1; translate: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .city-picker[open] .city-picker__panel,
  .mobile-menu[open] .mobile-menu__panel { animation: none; }
}

/* Кабинет: сайдбар стабилен при переходах между разделами —
   не мигает вместе с контентом (View Transitions, как шапка витрины) */
.cab-sidebar { view-transition-name: cab-sidebar; }

/* Футер ниже первого экрана — рендер откладывается до приближения:
   быстрее первая отрисовка длинных страниц (Lighthouse/SEO) */
.shop-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 22rem;
}

/* Cap-height триминг главного заголовка: межстрочные поля шрифта
   отрезаются — заголовок ровно прилегает к блоку (Chrome 133+, Safari 18.2+) */
@supports (text-box: trim-both cap alphabetic) {
  .hero__title { text-box: trim-both cap alphabetic; }
}


/* ============================================================
   v1.55 — Плотный каталог и точные цифры: content-visibility на
   карточках, фирменные нативные контролы, выровненные цены,
   snap-чипы и плавное появление подсказок городов.
   ============================================================ */

/* Карточки ниже первого экрана не рендерятся до приближения —
   быстрее первая отрисовка каталога, поиска и главной.
   contain-intrinsic-size: примерный размер до первого рендера,
   дальше браузер помнит реальный (auto) — скролл не прыгает.
   Свойства неизвестны старым браузерам и молча игнорируются. */
.product-grid .product-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 22rem;
}

/* Нативные чекбоксы, радио и ползунки везде получают фирменный цвет.
   Кастомные контролы (appearance: none) не затрагиваются. */
:root { accent-color: var(--primary); }

/* Цифры цен одинаковой ширины — списки цен и суммы выровнены. */
.price, .price-old { font-variant-numeric: tabular-nums; }

/* Горизонтальные ряды чипов: липкие остановки при прокрутке и
   без «протягивания» скролла страницы на мобильных. */
.chips-row { scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.chips-row > * { scroll-snap-align: start; }

/* Список городов не «протягивает» скролл за свои пределы. */
.city-suggest-list { overscroll-behavior: contain; }

/* Подсказки городов при подгрузке (htmx) появляются плавно,
   в одном стиле с подсказками поиска (v1.51): @starting-style
   срабатывает на первом кадре жизни элемента; при reduced-motion
   появление мгновенное. */
@media (prefers-reduced-motion: no-preference) {
  @supports (transition-behavior: allow-discrete) {
    .city-suggest-item { transition: opacity var(--motion-gentle) var(--ease-brand), translate var(--motion-gentle) var(--ease-brand); }
    @starting-style { .city-suggest-item { opacity: 0; translate: 0 6px; } }
  }
}


/* ============================================================
   v1.56 — Скорость ввода: горячая клавиша «/», мобильные
   клавиатуры город-пикера, переносы длинных слов.
   ============================================================ */

/* Подсказка-«клавиша» внутри пустого поиска (десктоп): исчезает
   при фокусе, при вводе текста и на сенсорных/узких экранах.
   Клавиша «/» фокусирует поиск из любого места страницы (shop.js). */
.search__kbd {
  display: none; position: absolute; right: 3.1rem; top: 50%; transform: translateY(-50%);
  padding: .1rem .5rem; border-radius: .5rem; border: 1px solid transparent;
  background: var(--muted); color: var(--muted-foreground);
  font-size: .78rem; font-weight: 600; line-height: 1.4; pointer-events: none;
}
@media (min-width: 768px) {
  .search__kbd { display: block; }
}
.search:focus-within .search__kbd { display: none; }
.search:has(.search__input:not(:placeholder-shown)) .search__kbd { display: none; }

/* Длинные русские слова в названиях карточек переносятся по слогам
   (словари браузера, html lang="ru"); без поддержки — как раньше. */
.product-card__title { hyphens: auto; overflow-wrap: break-word; }

/* Длинные названия в строках оформления заказа не ломают вёрстку. */
.checkout-line__name { overflow-wrap: break-word; }

/* ============================================================
   v1.57 — Чтение документации: scroll-driven прогресс статьи,
   типографика абзацев, вежливый smooth-скролл.
   ============================================================ */

/* Индикатор чтения статьи документации (docs/article.html): тонкая
   фирменная полоса в самом верху экрана, ширина = доля прокрутки
   документа. Чистый CSS без JS: animation-timeline: scroll(root).
   Браузеры без scroll-driven анимаций не показывают элемент
   (opacity: 0), вёрстку он не ломает; «меньше движения» уважается. */
.docs-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 45;
  background: linear-gradient(90deg, var(--primary), var(--berry));
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .docs-progress {
      opacity: 1;
      animation-name: docs-progress-grow;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root);
    }
  }
}
@keyframes docs-progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Длинные заголовки статей ложатся по строкам ровно (balance),
   абзацы и списки — без одиночных «висячих» слов в последней строке
   (pretty; браузеры без поддержки переносят как раньше). */
.docs-h1, .docs-h2 { text-wrap: balance; }
.docs-lead, .docs-prose p, .docs-prose li { text-wrap: pretty; }

/* ============ v1.61 → v1.92: scroll-state(stuck) — линия прилипания шапок ============ */
/* Пока страница на топе шапка «парит» на полупрозрачном фоне с блюром; когда
   контент проходит под ней, прилипание считывает сам CSS: sticky-обёртка-хост
   объявлена scroll-state контейнером, @container отмечает её прилипание.
   Стилизовать контейнер сам он не может, а backdrop-filter шапки обрезает
   рисование потомков за её границами, поэтому линию несёт полоса-сиблинг
   внутри хоста, но вне шапки. v1.92: тени сняты по правилу бренда «ноль
   теней» — прилипание отмечает 1px брендовая линия var(--border). Браузеры
   без scroll-state линию не видят вовсе — как в v1.60. */
.shop-header-host { position: sticky; top: 0; z-index: 40; }
.shop-header-depth {
  position: absolute; top: 100%; left: 0; right: 0; height: 1px;
  background: var(--border);
  pointer-events: none; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .shop-header-depth { transition: opacity var(--motion-stately) var(--ease-brand); }
}
@supports (container-type: scroll-state) {
  .shop-header-host { container-type: scroll-state; }
  @container scroll-state(stuck: top) {
    .shop-header-depth { opacity: 1; }
  }
}

/* v1.62: та же линия для липкой строки оглавления статьи.
   Строка сама — sticky-элемент и scroll-state контейнер; горизонтальный
   скролл чипов переехал во внутренний __row (overflow скролл-области
   клиппил бы полосу-потомка), линию несёт полоса вне скролл-области.
   Браузеры без scroll-state не видят линию — строка как в v1.59. */
.docs-toc-depth {
  position: absolute; top: 100%; left: 0; right: 0; height: 1px;
  background: var(--border);
  pointer-events: none; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .docs-toc-depth { transition: opacity var(--motion-stately) var(--ease-brand); }
}
@supports (container-type: scroll-state) {
  .docs-toc { container-type: scroll-state; }
  @container scroll-state(stuck: top) {
    .docs-toc-depth { opacity: 1; }
  }
}

/* ============================================================
   v1.58 → v1.92 — Копирование номера заказа, сайдбар документации
   в VT, единый JS-бастер. scroll()-тень шапок v1.58 снята по правилу
   бренда «ноль теней»: прилипание отмечает линия прилипания v1.92
   (см. блок scroll-state(stuck) выше).
   ============================================================ */

/* Сайдбар документации морфируется между страницами docs, как шапка
   витрины (v1.51) и сайдбар кабинета (v1.54). На мобильных сайдбар
   display:none — в переходе не участвует. */
.docs-sidebar { view-transition-name: docs-sidebar; }

/* Копирование номера заказа: компактная кнопка у заголовка деталей.
   Тач-цель 2rem по высоте внутри h1, фокус-кольцо как у всех кнопок. */
.copy-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin-left: .4rem; vertical-align: -.3rem;
  border: 1px solid transparent; border-radius: .55rem; background: var(--muted);
  color: var(--muted-foreground); cursor: pointer;
}
.copy-number:hover { color: var(--primary); background: var(--secondary); }
.copy-number:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ============================================================
   v1.59 — Содержание статьи на scroll-target-group, появление
   карточек каталога на view()-таймлайне, оптическая типографика.
   ============================================================ */

/* Оглавление статьи: липкая строка-чипы (десктоп, как сайдбар docs).
   Активный раздел подсвечивает сам браузер: ссылки внутри
   scroll-target-group: auto получают :target-current, когда их цель
   в зоне видимости, — ноль JavaScript. Без поддержки — обычные
   якорные ссылки; на мобильных строка скрыта (там полоса прогресса). */
.docs-toc { display: none; }
@media (min-width: 900px) {
  .docs-toc {
    display: block;
    position: sticky; top: 3.8rem; z-index: 25;
    margin-bottom: .4rem;
    background: var(--background);
  }
  .docs-toc__row {
    display: flex; gap: .4rem; overflow-x: auto;
    padding: .4rem 0 .55rem;
    scroll-target-group: auto;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
    /* v1.64: mask-fade края ряда чипов оглавления (сиблинг-полоса stuck-линии
       вне скролл-области не клиппится маской) */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
}
.docs-toc__row a {
  flex: none; display: inline-flex; align-items: center;
  padding: .3rem .7rem; border: 1px solid transparent; border-radius: .6rem;
  background: var(--muted); color: var(--muted-foreground);
  font-size: .82rem; font-weight: 600; white-space: nowrap; text-decoration: none;
}
.docs-toc__row a:hover { color: var(--primary); background: var(--secondary); }
.docs-toc__row a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.docs-toc__row a:target-current { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
/* якорный прыжок должен выводить заголовок из-под липкой строки оглавления */
.docs-prose h2 { scroll-margin-top: 7rem; }

/* Оптическая типографика заголовков статей: обрезка «воздуха» строки
   до кап-высоты — заголовок привязан к сетке без визуального зазора
   (Chrome 133+, Safari 18.2+; остальные — как раньше). */
@supports (text-box: trim-both cap alphabetic) {
  .docs-h1, .docs-h2, .docs-prose h2, .docs-prose h3 { text-box: trim-both cap alphabetic; }
  /* v1.64: оптическая типографика заголовков страниц каталога/поиска —
     обрезка «воздуха» строки до кап-высоты, как у hero и статей (v1.59);
     v1.80: заголовки секций главной примыкают к той же оптической сетке */
  .page__title, .section__title { text-box: trim-both cap alphabetic; }
}


/* ============================================================
   v1.65 — View Transitions между страницами, ценовые чипы поиска,
   плавная раскладушка фильтров (::details-content).
   ============================================================ */

/* Кросс-документные переходы (Chromium 126+): браузер сам снимает
   снимки старой и новой страницы и мягко их кросс-фейдит при любой
   навигации по сайту. Opt-in — meta name="view-transition" в трёх
   оболочках; здесь CSS-сторона с гейтом reduced-motion и чуть более
   короткой длительностью. Прочие браузеры навигируют как раньше. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--motion-gentle); }
}

/* Быстрые ценовые фильтры на странице поиска: пилюли-ссылки в каталог
   с тем же запросом и готовым диапазоном цены — мост v1.63 стал короче. */
.search-quick { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin: .95rem 0 0; }
.search-quick__label { font-size: .84rem; font-weight: 700; color: var(--muted-foreground); }
.search-quick__chip {
  display: inline-flex; align-items: center; padding: .34rem .75rem;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--muted); color: var(--muted-foreground);
  font-size: .84rem; font-weight: 600; text-decoration: none;
  transition: color var(--motion-fast) var(--ease-brand), background-color var(--motion-fast) var(--ease-brand);
}
.search-quick__chip:hover { color: var(--primary); background: var(--secondary); }
.search-quick__chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Плавная раскладушка панели фильтров (::details-content): высота
   раскрывается/сворачивается, content-visibility переключается дискретно.
   v1.68: гейт — поддержка calc-size(), а не селектора ::details-content:
   Firefox 138+ поддерживает псевдоэлемент, но не calc-size() — под старым
   гейтом calc-строка [open] отбрасывалась как невалидная, block-size
   оставался 0 и панель «не раскрывалась» (в Chrome calc-size есть).
   Браузеры без calc-size получают мгновенное раскрытие через базовое
   height:0 -> height:auto; Chromium анимацию сохраняет. Анимация включается
   классом js-ready (shop.js добавляет его через два кадра после стартового
   сворачивания на мобильных) — загрузка страницы не «дёргается». */
@media (prefers-reduced-motion: no-preference) {
  @supports (block-size: calc-size(auto, size)) {
    details.filters.js-ready::details-content {
      block-size: 0; overflow-y: clip;
      transition: block-size var(--motion-slow) var(--ease-brand), content-visibility .22s allow-discrete;
    }
    details.filters.js-ready[open]::details-content { block-size: calc-size(auto, size); }
    @starting-style { details.filters.js-ready[open]::details-content { block-size: 0; } }
  }
}

/* ============================================================
   v1.69 — форм-слой: field-sizing: content
   ============================================================ */
/* textarea растёт по содержимому (Chromium 123+): базовая высота сохранена
   min-height, переполнение гасится max-height со штатным внутренним скроллом
   (chat-form, тикеты, отзывы, спор, возврат, комментарий заказа).
   Браузеры без поддержки — фикс-высота, как раньше. */
@supports (field-sizing: content) {
  textarea.form-input, textarea.input {
    field-sizing: content;
    min-height: 5.5rem;
    max-height: 40vh;
  }
  textarea.form-input.chat-form__input { min-height: 2.6rem; }
}

/* ============================================================
   v1.71 — Контейнерные запросы: карточка подстраивается под свою
   ширину, а не под ширину вьюпорта
   ============================================================ */
/* Карточка живёт в разных сетках: 2 колонки на мобильных (~175px),
   3–4 на десктопе (~260–300px), «похожие товары» от 180px.
   container-type: inline-size делает карточку query-контейнером:
   узким — компактная типографика, широким — просторнее. Браузеры
   без @container — прежние размеры; вёрстка не ломается. */
.product-card { container-type: inline-size; }
@container (max-width: 229px) {
  .product-card__body { padding: .55rem .65rem .7rem; gap: .25rem; }
  .product-card__title { font-size: .85rem; min-height: 2.3em; }
  .product-card__reviews { font-size: .74rem; }
  .product-card__seller { font-size: .72rem; margin-top: .1rem; }
  .badge { top: .45rem; left: .45rem; padding: .15rem .45rem; font-size: .66rem; }
  .badge--new + .badge--sale { left: 3.9rem; }
  .fav-slot { top: .45rem; right: .45rem; }
  .product-card__media .badge--promo { bottom: .45rem; left: .45rem; }
}
@container (min-width: 288px) {
  .product-card__title { font-size: .98rem; }
  .price { font-size: 1.05rem; }
  .price-old { font-size: .92rem; }
}

/* ============ v1.72: кнопка «Наверх» — reveal через scroll-driven animation ============ */
/* Флоат-кнопка правого нижнего угла: появляется, когда страница прокручена
   дальше 300px, ведёт к началу (href="#top" — фрагмент-джокер HTML, скроллит
   наверх даже без JS). Появление — чистый CSS: animation-timeline:
   scroll(root block) с диапазоном 0->300px (scroll-driven animations,
   Chromium 115+). Два keyframes: fade для no-preference и шаг для reduce —
   в отличие от декоративной полосы .docs-progress функциональная кнопка
   остаётся доступна при «меньше движения». В браузерах без scroll-timeline
   видимость ведёт shop.js классом .to-top--show (пассивный scroll-листенер,
   тот же порог 300px); без JS и без поддержки кнопка не показывается вовсе.
   z-index 45 — один слой с .docs-progress, под мобильным меню (55/60),
   лайтбоксом (1200) и тостами (1300). */
.to-top {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 45;
  width: 2.9rem; height: 2.9rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  /* v1.92: канон FAB бренда (как «Фильтры» v1.87) — сплошной primary,
     без тени и рамки (правило бренда «ноль теней») */
  background: var(--primary); color: var(--primary-foreground); border: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: filter var(--motion-fast) var(--ease-brand);
}
.to-top--show { opacity: 1; visibility: visible; pointer-events: auto; }
.to-top:hover { filter: brightness(.94); }
.to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .to-top {
      animation-name: to-top-reveal;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 300px;
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  @supports (animation-timeline: scroll()) {
    .to-top {
      animation-name: to-top-reveal-step;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 300px;
    }
  }
}
/* 0..88% — скрыта (visibility/pointer-events дискретны: не видна и не
   ловит клики), последние ~36px прокрутки — быстрое появление. */
@keyframes to-top-reveal {
  0%, 88% { opacity: 0; visibility: hidden; pointer-events: none; }
  100% { opacity: 1; visibility: visible; pointer-events: auto; }
}
@keyframes to-top-reveal-step {
  0%, 99% { opacity: 0; visibility: hidden; pointer-events: none; }
  100% { opacity: 1; visibility: visible; pointer-events: auto; }
}

/* ============================================================
   v1.75: мобильный таббар — пять основных разделов внизу экрана.
   Только телефоны (<768px); fixed bottom + safe-area; токены
   (--card/--border/--primary) — тёмная тема подхватывается сама.
   Активная ссылка — aria-current="page" (ставит shop.js по pathname).
   Бейджи — подложка primary, hidden при нуле; 44px+ тач-цели.
   view-transition-name: уникальный — таббар не мигает при
   cross-document переходах (живёт как отдельный слой).
   ============================================================ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
  display: none;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* v1.92: тень снята — разделение несёт брендовая линия border-top */
  view-transition-name: tabbar;
}
.tabbar__link {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .18rem; padding: .5rem .25rem; min-height: 3.4rem;
  color: var(--muted-foreground); font-size: .66rem; font-weight: 600; line-height: 1;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.tabbar__link:hover { color: var(--foreground); }
.tabbar__link:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: .5rem; }
.tabbar__link[aria-current="page"] { color: var(--primary); }
.tabbar__icon { position: relative; display: inline-flex; }
.tabbar__label { line-height: 1; letter-spacing: .01em; }
.tabbar__badge {
  position: absolute; top: -0.35rem; right: -0.7rem;
  min-width: 1rem; height: 1rem; padding: 0 .28rem; border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: .62rem; font-weight: 700; line-height: 1rem; text-align: center;
}
.tabbar__badge[hidden] { display: none; }
@media (max-width: 767.98px) {
  .tabbar { display: flex; }
  /* Контент и футер не прячутся за таббаром; «Наверх» поднимается выше него */
  body { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom, 0px)); }
  .to-top { bottom: calc(4rem + env(safe-area-inset-bottom, 0px)); }
}


/* ============================================================
   v1.83 → v1.92 — Премиум-бренд: планка дизайна.
   v1.83 ввела пять приёмов свежайшего CSS; v1.92 вернула бренд
   к дисциплине владельца: «ноль теней» и единое спокойное движение.
   Токены пружины и обоих теневых слоёв сняты вместе со всеми их применениями.

   Канон движения v1.92:
   - hover — только цвет: фон / брендовая линия-акцент primary 30% /
     текст / яркость (var(--motion-fast) var(--ease-brand)); никакой геометрии (translateY/scale)
     и никаких теней;
   - появления (панели, тосты, FAB) — короткий fade/slide на спокойных
     кривых; микро-нажатия :active сохранены; гейты reduced-motion
     нетронуты.

   Приёмы v1.83, оставшиеся в строю (под честными гейтами):
   1. Зерно на хиро: микро-текстура feTurbulence (data-URI, один
      слой, soft-light 6%) — матовая «бумага» премиум-бренда.
   2. Блик-свип по меди карточки: @scope (.product-card) — первый
      скоуп проекта; включается только на hover-способных указателях.
   3. light-dark() — схемозависимые значения (--tint, нейтральный
      свотч) одним токеном под @supports.
   ============================================================ */

/* Зерно хиро: матовая премиум-текстура поверх аурор (мягкое свечение
   теряет «пластик», страница получает тактильную бумагу). Один слой,
   ноль запросов, pointer-events off; на тёмной теме soft-light деликатнее
   multiply/overlay — оба режима читаются одинаково спокойно. */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  opacity: .06; mix-blend-mode: soft-light;
}

/* Блик-свип по меди карточки при наведении — премиальный микро-блеск.
   Первый @scope проекта: стили блика не протекают за пределы карточки.
   Без поддержки @scope блок отбрасывается целиком — пустой aria-hidden
   span остаётся без стилей и ничего не показывает. */
@scope (.product-card) {
  .product-card__shine {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(112deg, transparent 40%, rgb(255 255 255 / 0.34) 50%, transparent 60%);
    translate: -110% 0; opacity: 0;
  }
  @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .product-card:hover .product-card__shine {
      opacity: 1; translate: 110% 0;
      transition: translate .75s cubic-bezier(.3, 0, .2, 1) .05s, opacity var(--motion-stately) var(--ease-brand);
    }
  }
}

/* Акцент заголовков секций главной: фирменный градиентный штрих
   (только главная — site-main--home; кабинеты/заказы не тронуты). */
.site-main--home .section__title { position: relative; }
.site-main--home .section__title::after {
  content: ""; position: absolute; left: 0; bottom: -0.4rem;
  width: 2.4rem; height: 0.22rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--berry) 75%, transparent);
}

/* light-dark(): схемозависимые значения одним токеном. Блок стоит после
   тёмного @media — для поддерживающих браузеров перекрывает обе ветки,
   старые браузеры продолжают читать прежние правила (каскад сохранён). */
@supports (color: light-dark(#000, #fff)) {
  :root {
    --tint: light-dark(rgb(0 0 0 / 6%), rgb(255 255 255 / 7%));
  }
  .swatch-chip__dot {
    background: light-dark(#d4d4d4, oklch(0.45 0.012 55));
  }
}


/* ============================================================
   v1.84 — Премиум-помощник на пустой выдаче; вход секций главной.

   1. Иллюстрация пустой выдачи: инлайн-SVG «ларец с лапкой» в
      палитре бренда вместо системной иконки (ноль запросов,
      тёмная тема читает те же токены).
   2. Чипы популярных разделов на пустой выдаче каталога/поиска —
      единый паттерн с 404-помощником v1.82; данные несёт новый
      контекст-процессор popular_sections (кэш 1 ч, сбой БД —
      строка просто не рисуется). Тактильный отклик чипов —
      фон по канону движения v1.92.
   3. Вход секций главной на scroll-driven: промо-баннер поднимается
      при входе в экран (та же механика, что у карточек v1.59),
      фирменный штрих заголовка вырастает слева. Только главная
      (site-main--home), только no-preference + @supports —
      hero (LCP) и остальные страницы не тронуты.
   ============================================================ */

.empty-state__art { display: block; margin: 0 auto; width: 7.5rem; height: auto; }

.empty-state__sections {
  margin: 1.1rem auto 0; max-width: 30rem;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
}
.empty-state__sections-label {
  font-size: .74rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.empty-state__sections-row { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: center; }
.section-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .4rem .8rem; border-radius: 999px;
  background: var(--muted); border: 1px solid transparent;
  color: var(--foreground); font-size: .84rem; font-weight: 700;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-brand);
}
.section-chip:hover {
  background: var(--secondary);
}
.section-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .site-main--home .promo-banner {
      animation: section-rise both ease-out;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    .site-main--home .section__title::after {
      transform-origin: left center;
      animation: accent-grow both ease-out;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
    @keyframes section-rise {
      from { opacity: .01; translate: 0 22px; }
      to { opacity: 1; translate: 0 0; }
    }
    @keyframes accent-grow {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }
  }
}

/* ============================================================
   v1.87 — Фильтры-аккордеоны с памятью; мобильный FAB; busy-кнопка
   ============================================================ */
/* Аккордеоны длинных списков (бренды/материал/страна/характеристики):
   summary-строка с бейджем выбранных значений; без JS группы открыты
   (details open в разметке), чекбоксы свёрнутых групп продолжают
   отправляться — DOM целиком, форма не теряет данные. */
.fgroup-summary {
  list-style: none; display: flex; align-items: center; gap: .45rem;
  font-weight: 800; font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted-foreground);
  cursor: pointer; user-select: none; padding: .55rem .6rem;
  margin: .5rem -.6rem 0; border-radius: var(--radius-sm);
  transition: background var(--motion-base) var(--ease-brand), color var(--motion-base) var(--ease-brand);
}
.fgroup-summary:hover { background: color-mix(in oklab, var(--primary) 7%, transparent); color: var(--foreground); }
.fgroup-summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fgroup-summary::-webkit-details-marker { display: none; }
.fgroup-summary .icon:last-of-type { margin-left: auto; transition: transform var(--motion-slow) var(--ease-brand); }
.filters__group--collapsible[open] > .fgroup-summary .icon:last-of-type { transform: rotate(180deg); }
.fgroup-summary__badge {
  min-width: 1.35rem; height: 1.35rem; padding: 0 .35rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--primary); color: var(--primary-foreground);
  font-size: .72rem; font-weight: 800; letter-spacing: 0; text-transform: none;
}
/* display:inline-flex перекрывает штатное скрытие [hidden] — гасим явно */
.fgroup-summary__badge[hidden] { display: none; }
.fgroup-summary__name { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Плавные аккордеоны групп (::details-content): гейт — поддержка
   calc-size() (урок v1.68: Firefox 138+ не поддерживает calc-size —
   под старым гейтом получал block-size:0 и «мёртвую» панель; здесь
   без calc-size правило целиком отбрасывается и раскрытие мгновенное).
   Анимация включается классом js-fgroup (shop.js добавляет через два
   кадра — восстановление из localStorage не анимируется). */
@media (prefers-reduced-motion: no-preference) {
  @supports (block-size: calc-size(auto, size)) {
    details.filters__group.js-fgroup::details-content {
      block-size: 0; overflow-y: clip;
      transition: block-size .2s ease, content-visibility .2s allow-discrete;
    }
    details.filters__group.js-fgroup[open]::details-content { block-size: calc-size(auto, size); }
    @starting-style { details.filters__group.js-fgroup[open]::details-content { block-size: 0; } }
  }
}

/* Мобильный FAB «Фильтры»: плавает над таббаром (z-index таббара 44),
   появляется классом .filters-fab--show (shop.js: IntersectionObserver
   по панели + скрытие при открытой панели); на десктопе кнопки нет. */
.filters-fab {
  position: fixed; right: 1rem; bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 45; display: none;
  align-items: center; gap: .5rem; padding: .8rem 1.05rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground);
  font-weight: 800; font-size: .9rem; font-family: inherit;
  /* v1.92: свечение снято (ноль теней); канон появления — спокойный ease */
  opacity: 0; translate: 0 12px; pointer-events: none;
  transition: opacity var(--motion-stately) var(--ease-brand), translate var(--motion-stately) var(--ease-brand);
}
.filters-fab--show { opacity: 1; translate: 0 0; pointer-events: auto; }
.filters-fab:active { scale: .96; }
.filters-fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.filters-fab__badge {
  min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: var(--card); color: var(--primary);
  font-size: .74rem; font-weight: 800;
}
.filters-fab__label { line-height: 1; letter-spacing: .01em; }
@media (max-width: 899.9px) { .filters-fab { display: inline-flex; } }

/* Тактильная отправка фильтров: кнопка «Показать N» уходит в busy
   (текст меняет shop.js, спиннер несёт ::after); повторный сабмит
   блокируется в JS — дубли навигации исключены. */
.btn--busy { opacity: .75; pointer-events: none; }
.btn--busy::after {
  content: ""; width: 1em; height: 1em; margin-left: .45rem;
  border-radius: 999px; border: 2px solid currentColor;
  border-top-color: transparent; display: inline-block;
  animation: btn-spin .7s linear infinite; vertical-align: -0.15em;
}
@keyframes btn-spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .filters-fab { transition: none; translate: 0 0; }
  .btn--busy::after { animation: none; }
  .fgroup-summary .icon:last-of-type { transition: none; }
}

/* ============================================================
   v1.91 — Гигиена обхода 301 + премиум-микродетали.
   ============================================================ */

/* ---- Автозаполнение браузера не ломает бренд (v1.92: ноль теней) ----
   Chrome/Safari красят autofill-поля белым/жёлтым и перекрашивают текст —
   «рваный» вид форм на тёплой палитре. Заливка-«тень» v1.91 снята по
   правилу бренда: UA-перекраска фона замораживается transition-заморозкой
   (99999s — фон остаётся тем, что нарисовал бренд), цвет текста держит
   -webkit-text-fill-color, каретка брендовая. Firefox: :autofill получает
   caret (фон он не перекрашивает). Правило бренда «без рамок» не тронуто. */
.input:-webkit-autofill,
.form-input:-webkit-autofill,
.form-select:-webkit-autofill,
.search__input:-webkit-autofill,
.city-picker__input:-webkit-autofill {
  -webkit-text-fill-color: var(--foreground);
  caret-color: var(--foreground);
  border-radius: inherit;
  transition: background-color 99999s ease-in-out 0s;
}
.input:autofill,
.form-input:autofill,
.form-select:autofill,
.search__input:autofill,
.city-picker__input:autofill { caret-color: var(--foreground); }

/* ---- Бейджи таббара морфятся через View Transitions API ----
   Обновление счётчиков корзины/избранного (shop.js, события cart-changed /
   fav-changed) обёрнуто в document.startViewTransition({update, types:
   ["badge-pop"]}): тип badge-pop гасит анимацию корня страницы
   (:active-view-transition-type — снимок меняется мгновенно, никакой
   кроссфейда whole-page), pop-морф живёт только у бейджей. Имена уникальны
   на странице (шапка — site-header, таббар — tabbar v1.75; урок v1.74 о
   дублях имён). Таббар скрыт на десктопе — имена там не активны.
   prefers-reduced-motion: морфа нет — обмен мгновенный, как раньше.
   Браузеры без API — прямой обмен DOM (фолбэк в shop.js). */
@media (prefers-reduced-motion: no-preference) {
  @supports (view-transition-name: badge-cart) {
    .tabbar__badge[data-tabbar-badge="cart"] { view-transition-name: badge-cart; }
    .tabbar__badge[data-tabbar-badge="favorites"] { view-transition-name: badge-fav; }
    :root:active-view-transition-type(badge-pop)::view-transition-old(root),
    :root:active-view-transition-type(badge-pop)::view-transition-new(root) {
      animation: none;
    }
    ::view-transition-old(badge-cart),
    ::view-transition-new(badge-cart),
    ::view-transition-old(badge-fav),
    ::view-transition-new(badge-fav) {
      animation-duration: var(--motion-stately);
      animation-timing-function: ease;
      transform-origin: center;
    }
    ::view-transition-new(badge-cart),
    ::view-transition-new(badge-fav) { animation-name: badge-pop-in; }
    ::view-transition-old(badge-cart),
    ::view-transition-old(badge-fav) { animation-name: badge-pop-out; }
    @keyframes badge-pop-in {
      from { opacity: 0; transform: scale(.5); }
      to { opacity: 1; transform: scale(1); }
    }
    @keyframes badge-pop-out {
      to { opacity: 0; transform: scale(.5); }
    }
  }
}

/* ==================== v1.93: витрина запуска — плитки каталога на главной ====================
   Канон brand-card (v1.92): чистая карточная поверхность, отклик — только цвет
   (фон cream + брендовая линия primary 30%), ноль теней, ноль пружин.
   Сетка адаптируется к СВОЕЙ ширине через @container (не к вьюпорту):
   на узких контейнерах плитка компактнее — иконка и кегль меньше.
   Появление плиток — канон card-reveal на view()-таймлайне (гейт reduced-motion). */
.cat-tiles {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: .55rem; container-type: inline-size;
}
.cat-tile {
  display: flex; align-items: center; gap: .6rem; padding: .7rem .75rem;
  background: var(--card); border: 1px solid transparent; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--foreground);
  transition: background var(--motion-fast) var(--ease-brand), border-color var(--motion-fast) var(--ease-brand);
}
.cat-tile:hover, .cat-tile:focus-visible {
  background: var(--cream); border-color: color-mix(in oklab, var(--primary) 30%, transparent);
}
.cat-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cat-tile__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.3rem; height: 2.3rem; flex: 0 0 auto;
  border-radius: var(--radius-sm); background: var(--secondary); color: var(--primary);
}
.cat-tile__body { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.cat-tile__name { font-weight: 800; font-size: .92rem; line-height: 1.2; }
.cat-tile__sub { font-size: .76rem; color: var(--muted-foreground); }
@container (max-width: 23rem) {
  .cat-tile { padding: .55rem .6rem; gap: .5rem; }
  .cat-tile__icon { width: 2rem; height: 2rem; }
  .cat-tile__name { font-size: .88rem; }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .site-main--home .cat-tile {
      animation: card-reveal both ease-out;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
  }
}


/* ============================================================
   v1.96 — Раздел собирается: подписка на поступление в пустой категории.
   Пустой раздел — точка сбора раннего спроса, не тупик: честный текст
   вместо «измените фильтры» и анонимная почтовая подписка (honeypot).
   Бренд: цвета и границы на токенах, ноль теней, ноль серых hex,
   движение — канон (только цвет).
   ============================================================ */
.cat-notify {
  margin-top: .9rem;
  display: grid;
  gap: .6rem;
  justify-items: center;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}
.cat-notify__form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  width: 100%;
}
.cat-notify__input { flex: 1 1 11rem; min-width: 0; }
.cat-notify__btn { flex: 0 0 auto; }
.cat-notify__hint {
  margin: 0;
  font-size: .78rem;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.4;
}
.cat-notify__hint a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cat-notify__done {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  color: var(--foreground);
}
.cat-notify__done .icon { color: var(--primary); }
.cat-notify__error {
  margin: 0;
  font-size: .85rem;
  font-weight: 500;
  color: var(--danger);
}
@media print { .cat-notify { display: none !important; } }

/* v1.97 — Современная типография: баланс заголовков и аккуратные подсказки.
   text-wrap: balance — заголовки переносятся по смыслу без «висячих» слов;
   pretty — абзацы без сиротских последних строк. Прогрессивное улучшение:
   старые браузеры молча игнорируют. Бренд-правила целы: ноль теней,
   ноль серых hex. */
h1, h2, h3, .empty-state__title { text-wrap: balance; }
.empty-state__hint, .cat-notify__hint, .cat-desc__text { text-wrap: pretty; }

/* ============================================================
   v1.94 — Печать: витрина остаётся документом.
   Бумага — поверхность чтения: интерактивный хром (шапки-прилипалы,
   таббар, тосты, фильтры, «Наверх», прогресс, подсказки, сайдбар
   документации) смысла на бумаге не несёт; контент, карточки и
   контакты подвала — несут. Тема на бумаге принудительно светлая:
   токены тёмного блока v1.73 переписаны светлыми значениями :root
   (печать тёмной темы жгла бы тонер и читалась плохо). Карточки не
   рвутся между страницами (break-inside: avoid), заголовки не
   остаются сиротами в конце страницы (break-after: avoid), сетки
   выдачи и документации — одна колонка. Правила бренда целы:
   ноль теней, ноль серых рамок — границы на бумаге в тон чернил.
   ============================================================ */
@media print {
  @page { margin: 14mm 12mm; }

  html { color-scheme: light; }
  body { background: #fff; }
  :root {
    --background: oklch(0.99 0.008 85);
    --foreground: oklch(0.28 0.025 40);
    --card: #ffffff;
    --muted: oklch(0.955 0.012 85);
    --muted-foreground: oklch(0.5 0.02 45);
    --border: oklch(0.915 0.015 80);
    --primary: oklch(0.67 0.17 45);
    --primary-foreground: oklch(0.99 0.01 85);
    --secondary: oklch(0.94 0.03 80);
    --secondary-foreground: oklch(0.33 0.05 40);
    --accent: oklch(0.9 0.05 180);
    --accent-foreground: oklch(0.35 0.06 180);
    --destructive: oklch(0.58 0.2 25);
    --mint: oklch(0.66 0.11 180);
    --mint-soft: oklch(0.94 0.04 180);
    --berry: oklch(0.63 0.19 350);
    --berry-soft: oklch(0.94 0.04 350);
    --cream: oklch(0.97 0.02 85);
    --peach: oklch(0.92 0.06 70);
    --cream-2: oklch(0.915 0.015 80);
    --ink-soft: oklch(0.5 0.02 45);
    --danger: oklch(0.58 0.2 25);
    --tint: rgb(0 0 0 / 6%);
  }

  /* Интерактивный хром не печатаем */
  .shop-header-host, .shop-header-depth,
  .tabbar, .toasts, .to-top, .page-progress, .skip-link,
  .filters, .search__suggest, .mega-menu__panel, .user-menu__panel,
  .mobile-menu__panel, .docs-sidebar, .load-more, .icon-btn {
    display: none !important;
  }

  /* Сетки витрины и документации на бумаге — одна колонка */
  .catalog-layout, .docs-layout { display: block; }

  /* Карточки не рвутся между страницами; заголовки — без сиротства */
  .product-card, .auth-card, .brand-card, .cat-tile { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }

  /* Подвал печатаем как контактный блок — без декора */
  .shop-footer { background: #fff; }
}


/* ============================================================
   v1.95 — Онбординг продавца: живые подсказки формы товара.
   Превью фото и счётчик описания — честные данные вместо догадок;
   sticky-сохранение на мобильном — «Сохранить» всегда под рукой.
   Правила бренда целы: ноль теней, границы — канон var(--border).
   ============================================================ */
.image-tile__thumb,
.image-tile__preview img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); display: block; background: var(--muted);
}
.image-tile__preview[hidden] { display: none; }
.image-tile__name {
  display: block; font-size: .72rem; color: var(--muted-foreground);
  margin-top: .3rem; overflow-wrap: anywhere;
}
.form-hint__count {
  display: block; margin-top: .15rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Мобильное сохранение: карточка действий прилипает над таббаром
   (высота таббара 3.4rem + safe-area + зазор) */
@media (max-width: 767.98px) {
  .form-actions {
    position: sticky;
    bottom: calc(3.4rem + env(safe-area-inset-bottom, 0px) + .5rem);
    z-index: 30;
    background: var(--card);
    border-top: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: .8rem 1rem;
  }
}
/* Печать: действия формы — обычный блок, не прилипала (продолжение v1.94) */
@media print {
  .form-actions { position: static; bottom: auto; }
}

/* ============================================================
   v2.10 — Журнал и форум (поддомены) на токенах бренда:
   та же палитра, радиусы, motion и типографика — без нового дизайна.
   ============================================================ */

/* --- Журнал --- */
.journal-hero, .forum-hero {
  background: linear-gradient(135deg, var(--cream), var(--peach));
  border-block-end: 1px solid var(--border);
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.forum-hero { background: linear-gradient(135deg, var(--cream), var(--mint-soft)); }
.journal-hero__eyebrow, .forum-hero__eyebrow {
  margin: 0 0 .25rem;
  color: var(--muted-foreground);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.journal-hero__title, .forum-hero__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
}
.journal-hero__lead, .forum-hero__lead {
  margin: .5rem 0 0;
  max-width: 46rem;
  color: var(--muted-foreground);
}
.forum-hero__user { margin: 1rem 0 0; display: flex; align-items: center; gap: .5rem; }

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
  padding-block: 1.5rem 2rem;
}
.journal-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--motion-base) var(--ease-brand);
}
.journal-card:hover { transform: translateY(-2px); }
.journal-card__cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.journal-card__body { padding: 1rem 1.1rem 1.25rem; }
.journal-card__date { margin: 0 0 .25rem; color: var(--muted-foreground); font-size: .8rem; }
.journal-card__title { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.journal-card__title a { color: inherit; text-decoration: none; }
.journal-card__title a:hover { color: var(--primary); transition: color var(--motion-fast) var(--ease-brand); }
.journal-card__lead { margin: .4rem 0 0; color: var(--muted-foreground); font-size: .92rem; }

.journal-empty {
  margin-block: 3rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
}
.journal-empty__title { margin: 0 0 .25rem; font-weight: 700; font-size: 1.15rem; }
.journal-empty__text { margin: 0 auto 1.25rem; max-width: 32rem; color: var(--muted-foreground); }

.journal-article { padding-block: 1.5rem 3rem; max-width: 50rem; }
.journal-article__draft { display: inline-block; margin-block-end: 1rem; }
.journal-article__breadcrumbs { margin-block-end: 1rem; }
.journal-article__title { margin: 0 0 .5rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; }
.journal-article__meta { margin: 0 0 1.25rem; color: var(--muted-foreground); font-size: .9rem; }
.journal-article__cover { width: 100%; border-radius: var(--radius); margin-block-end: 1.25rem; }
.journal-article__lead { font-size: 1.08rem; color: var(--ink-soft); }
.journal-article__body { line-height: 1.7; }
.journal-article__body h2, .journal-article__body h3 { margin-block: 1.4em .5em; }
.journal-article__body img { max-width: 100%; border-radius: var(--radius-sm); }
.journal-article__body a { color: var(--primary); }
.journal-article__body blockquote {
  margin-inline: 0; padding: .6rem 1rem;
  border-inline-start: 3px solid var(--primary);
  background: var(--cream); border-radius: var(--radius-sm);
}
.journal-article__back { margin-block-start: 2rem; }

/* --- Форум --- */
.forum-boards__grid { display: grid; gap: 1rem; padding-block: 1.5rem 2.5rem; }
.forum-board-card {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.1rem 1.25rem;
  transition: transform var(--motion-base) var(--ease-brand);
}
.forum-board-card:hover { transform: translateY(-2px); }
.forum-board-card__title { margin: 0 0 .25rem; font-size: 1.08rem; }
.forum-board-card__title a { color: inherit; text-decoration: none; }
.forum-board-card__title a:hover { color: var(--primary); }
.forum-board-card__title .badge { margin-inline-start: .5rem; vertical-align: middle; }
.forum-board-card__desc { margin: 0; color: var(--muted-foreground); font-size: .92rem; }
.forum-board-card__stats { display: grid; gap: .2rem; text-align: end; color: var(--muted-foreground); font-size: .85rem; white-space: nowrap; }

.forum-section { padding-block: 1.5rem 3rem; }
.forum-section--narrow { max-width: 46rem; }
.forum-breadcrumbs { margin-block-end: 1rem; }
.forum-section__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-block-end: 1.25rem;
}
.forum-section__title { margin: 0 0 .3rem; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.25; }
.forum-section__desc { margin: 0; color: var(--muted-foreground); }
.forum-topic-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.forum-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.forum-topic-row {
  padding: .85rem 1rem; display: grid; gap: .3rem;
  transition: border-color var(--motion-fast) var(--ease-brand);
}
.forum-topic-row:hover { border-color: var(--primary); }
.forum-topic-row__title { color: inherit; text-decoration: none; font-weight: 600; }
.forum-topic-row__title:hover { color: var(--primary); }
.forum-topic-row__title .badge, .forum-topic-row__main .badge { margin-inline-start: .5rem; }
.forum-topic-row__meta { display: flex; gap: 1rem; flex-wrap: wrap; color: var(--muted-foreground); font-size: .82rem; }

.forum-posts { display: grid; gap: .9rem; margin-block: .5rem 1.25rem; }
.forum-post {
  padding: 1rem 1.15rem;
}
.forum-post__head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-block-end: .6rem; }
.forum-post__author { font-weight: 700; }
.forum-post__time { color: var(--muted-foreground); font-size: .82rem; margin-inline-start: auto; }
.forum-post__edited { color: var(--muted-foreground); font-size: .82rem; }
.forum-post__tools { display: inline-flex; gap: .5rem; align-items: center; }
.forum-post__tool {
  background: none; border: none; padding: 0; color: var(--primary);
  font: inherit; font-size: .85rem; cursor: pointer;
}
.forum-post__tool--danger { color: var(--danger); }
.forum-post__body { line-height: 1.65; overflow-wrap: anywhere; }
.forum-post__body img { max-width: 100%; border-radius: var(--radius-sm); }
.forum-post__body pre {
  background: var(--muted); padding: .8rem 1rem; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: .9rem;
}
.forum-post__body code { background: var(--muted); padding: .1em .35em; border-radius: .3em; }
.forum-post__body pre code { background: none; padding: 0; }

.forum-reply { display: grid; gap: .75rem; max-width: 46rem; }
.forum-reply textarea, .forum-form textarea, .forum-form input[type="text"] {
  padding: .7rem .9rem; font: inherit; background: var(--card); color: var(--foreground);
  transition: border-color var(--motion-fast) var(--ease-brand);
}
.forum-reply textarea:focus-visible, .forum-form textarea:focus-visible,
.forum-form input[type="text"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.forum-form { display: grid; gap: .9rem; justify-items: start; }
.forum-form .btn { justify-self: start; }
/* v2.23.5: dashed-контур пустого состояния снят — мягкая подложка muted
   (как empty-state кабинета: фон и радиус без линий) */
.forum-empty {
  margin-block: 2rem; padding: 2rem 1.5rem; text-align: center; display: grid;
  gap: 1rem; justify-items: center;
  background: var(--muted); border-radius: var(--radius);
}
.forum-closed-note { margin-block-start: 1.25rem; color: var(--muted-foreground); }
.forum-badge-role { font-size: .72rem; }

/* v2.10: переключатель «Розница | Опт» в шапке (токены бренда) */
.price-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--muted);
  border-radius: 999px;
}
.price-mode-switch__btn {
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand);
}
.price-mode-switch__btn:hover { color: var(--foreground); }
.price-mode-switch__btn--active {
  background: var(--card);
  color: var(--primary);
}

/* v2.10: страница оплаты CloudPayments (B2C-розница) */
.cp-pay { max-width: 34rem; padding-block: 2rem 4rem; }
.cp-pay__title { margin: 0 0 .5rem; font-size: 1.5rem; }
.cp-pay__amount { margin: 0 0 .75rem; }
.cp-pay__note { margin: 0 0 1.5rem; color: var(--muted-foreground); line-height: 1.6; }
.cp-pay__submit { width: 100%; }
.cp-pay__warn { margin-block-start: .75rem; color: var(--danger); font-size: .9rem; }
.cp-pay__back { margin-block-start: 1.25rem; }

/* v2.10: доп. контейнеры журнала/форума (дизайн-контракт) */
.journal-list { display: block; }
.journal-empty__cta { display: inline-block; }
.journal-article__header { margin-block-end: 1rem; }
.forum-boards { display: block; }
.forum-board-card__main { min-width: 0; }

/* ==== v2.16.6: пагинация changelog (пилюли бренда) ==== */
.docs-pages { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.docs-pages__nav { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; background: var(--muted); color: var(--foreground); text-decoration: none; font-weight: 700; font-size: .88rem; transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand); }
.docs-pages__nav:hover { background: var(--peach); color: color-mix(in oklab, var(--primary) 70%, black); }
.docs-pages__nav.is-disabled { opacity: .45; pointer-events: none; }
.docs-pages__list { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.docs-pages__page { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .5rem; border-radius: 999px; background: var(--muted); color: var(--foreground); text-decoration: none; font-weight: 800; font-size: .86rem; transition: background var(--motion-fast) var(--ease-brand), color var(--motion-fast) var(--ease-brand), transform var(--motion-fast) var(--ease-brand); }
.docs-pages__page:hover { background: var(--peach); transform: translateY(-1px); }
.docs-pages__page.is-current { background: var(--primary); color: var(--primary-foreground); }
.docs-pages__gap { color: var(--muted-foreground); padding: 0 .25rem; }
@media (max-width: 640px) { .docs-pages { justify-content: center; } }

/* ============ v2.21.0: журнал — модернизация чтения (TOC/теги/шеринг/прогресс/related) ============ */

.journal-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 60;
  pointer-events: none;
}
.journal-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width .1s linear;
}

.journal-toc {
  background: var(--card);
  border-inline-start: 3px solid var(--mint);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-block: 1.25rem;
}
.journal-toc summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--foreground);
  list-style-position: inside;
}
.journal-toc ul {
  list-style: none;
  margin: .5rem 0 0;
  padding: 0;
}
.journal-toc__item { padding-block: .2rem; }
.journal-toc__item--sub { padding-inline-start: 1.1rem; }
.journal-toc__item a { color: var(--foreground); text-decoration: none; }
.journal-toc__item a:hover { color: var(--primary); text-decoration: underline; }

.journal-tag {
  display: inline-block;
  padding: .15rem .65rem;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--accent-foreground);
  font-size: .85rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-brand);
}
.journal-tag:hover { background: var(--mint); color: #fff; }
.journal-tag--active { background: var(--primary); color: var(--primary-foreground); }
.journal-article__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-block-start: .6rem;
}
.journal-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.journal-tags-wrap { margin-block-start: .25rem; }

.journal-hero__feed { margin-block-start: .75rem; }
.journal-feed-link {
  font-size: .9rem;
  color: var(--muted-foreground);
  text-decoration: none;
}
.journal-feed-link:hover { color: var(--primary); }
.journal-hero__backline { margin-block-start: .5rem; font-size: .9rem; }
.journal-hero__backline a { color: var(--muted-foreground); text-decoration: none; }
.journal-hero__backline a:hover { color: var(--primary); }

.journal-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-block: 1.75rem .25rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border);
}
.journal-share__label { color: var(--muted-foreground); font-size: .9rem; }
.journal-share__btn {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  border: none;
  background: var(--secondary);
  color: var(--foreground);
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-brand);
}
.journal-share__btn:hover { background: var(--primary); color: var(--primary-foreground); }
.journal-share__btn:disabled { opacity: .6; cursor: default; }
.journal-share__copy { font-family: inherit; }

.journal-related { margin-block-start: 2.25rem; }
.journal-related__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-block-end: 1rem;
}
.journal-related .journal-card__title { font-size: 1.05rem; }

/* ============ v2.23.4: глобальная полировка бренда ============ */
/* Единый язык по всей платформе (витрина/кабинет/корзина/чекаут):
   баннеры без рамок, токены скруглений вместо точечных пикселей,
   табличные цифры в списках и итогах, плавные аккордеоны отмены
   заказа, уважение «меньше движения» у тостов и пульса поля. */

/* Числовые колонки выравниваются по разрядам — та же настройка, что
   у цен с v1.52: суммы в таблицах, позициях заказа и итогах чекаута
   не «пляшут» по ширине */
.table td,
.cabinet-table td,
.order-item,
.order-part__reject,
.summary-row,
.cart-group__subtotal,
.wizard-summary { font-variant-numeric: tabular-nums; }

/* Аккордеон отмены заказа/заявки — тот же плавный паттерн, что у фильтров
   каталога (::details-content + interpolate-size v2.16.6; в браузерах без
   поддержки — мгновенное раскрытие, как раньше) */
.cancel-box::details-content {
  height: 0;
  overflow: clip;
  transition: height .28s ease, content-visibility .28s allow-discrete;
}
.cancel-box[open]::details-content { height: auto; }

/* «Меньше движения»: тост появляется без выезда, пульс проверки поля
   замирает (состояние остаётся видимым через цвет и текст строки) */
@media (prefers-reduced-motion: reduce) {
  .toast.is-in { animation: none; }
  .toast.is-out { transition: none; }
  .field-status--checking .field-status__dot { animation: none; }
}
