/* ==========================================================================
   4BREWERS — демо-витрина, v6 «рабочий стол закупщика», доработка по взаимному разбору v5.
   Основа v4: светлая тема по умолчанию (тёплая бумага, белые карточки), тёмная — по системе или кнопкой;
   жёлтый только там, где действие. Мобильный: строки листа заказа; плитка — по переключателю.
   Новое в v5: третий вид «таблица» (≥ 960 px, та же разметка карточки — раскладка через display: contents),
   цвет тега как акцент на подставке фото, теги текстом, похожие сорта, прошлые списки, шрифты у себя.
   Mobile-first. Шрифты: Golos Text (всё) + Alumni Sans (крупные числа и заголовки шторок) — woff2 в fonts/.
   ========================================================================== */

/* шрифты у себя: кириллица + латиница, variable-начертания; лицензии — fonts/OFL-*.txt */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/golos-text-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('fonts/golos-text-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Alumni Sans'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('fonts/alumni-sans-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Alumni Sans'; font-style: normal; font-weight: 600 800; font-display: swap; src: url('fonts/alumni-sans-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f4f1ea;
  --bg-2: #ffffff;
  --bg-3: #ece7dc;
  --bg-4: #dfd8ca;
  --line: rgba(26, 23, 20, .09);
  --line-2: rgba(26, 23, 20, .2);
  --fg: #1a1714;
  --fg-2: #5f574d;
  --fg-3: #6f675d;
  --brand: #FEC12B;
  --brand-2: #f5b616;
  --brand-ink: #1b1500;
  --brand-text: #8a5b00;
  --brand-line: rgba(200, 140, 0, .5);
  --brand-soft: rgba(254, 193, 43, .18);
  --brand-halo: rgba(254, 193, 43, .5);
  --sale: #d9232f;
  --sale-soft: rgba(217, 35, 47, .1);
  --warm: #c2410c;
  --low: #b8650a;
  --ok: #1f8a4c;
  --ok-soft: rgba(31, 138, 76, .12);
  --plate: #ffffff;
  --plate-line: rgba(26, 23, 20, .08);
  --plate-shade: rgba(26, 23, 20, .28);
  --plate-shadow: rgba(0, 0, 0, .14);
  --fav-idle: #b8b0a4;
  --ink: #1a1714;
  --ink-fg: #f4efe6;
  --ink-2: #2a2521;
  --badge-bg: #1a1714;
  --badge-fg: #ffffff;
  --pop-bg: #1a1714;
  --pop-fg: #f4efe6;
  --veil: rgba(30, 24, 18, .5);
  --veil-soft: rgba(30, 24, 18, .22);
  --scrim-btn: rgba(26, 23, 20, .82);
  --scrim-btn-fg: #ffffff;
  --video-bg: #000000;
  --focus: #8a5b00;
  --shadow: 0 18px 50px rgba(64, 44, 14, .22);
  --shadow-s: 0 1px 3px rgba(26, 23, 20, .12);
  --shadow-card: 0 1px 2px rgba(26, 23, 20, .06);
  --shadow-dock: 0 10px 30px -14px rgba(26, 23, 20, .45);
  --shadow-bar: 0 18px 50px rgba(26, 23, 20, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  --r: 14px;
  --r-s: 10px;
  --f-display: "Alumni Sans", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 80px;
  --hdr-h: 52px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #151311;
  --bg-2: #1f1b18;
  --bg-3: #2a2521;
  --bg-4: #37312b;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .18);
  --fg: #f4efe6;
  --fg-2: #b3aa9e;
  --fg-3: #8f877c;
  --brand-2: #ffd45e;
  --brand-text: #FEC12B;
  --brand-line: rgba(254, 193, 43, .55);
  --brand-soft: rgba(254, 193, 43, .12);
  --brand-halo: rgba(254, 193, 43, .4);
  --sale: #ff5c6c;
  --sale-soft: rgba(255, 92, 108, .14);
  --warm: #ff8a3a;
  --low: #ffb454;
  --ok: #4cd37b;
  --ok-soft: rgba(76, 211, 123, .16);
  --plate-line: transparent;
  --plate-shade: rgba(0, 0, 0, .5);
  --fav-idle: #c9c1b5;
  --ink: #0f0d0b;
  --ink-fg: #f4efe6;
  --ink-2: #1f1b18;
  --badge-bg: #f4efe6;
  --badge-fg: #151311;
  --pop-bg: #ffffff;
  --pop-fg: #151311;
  --veil: rgba(8, 6, 4, .7);
  --veil-soft: rgba(8, 6, 4, .35);
  --scrim-btn: rgba(21, 19, 17, .85);
  --focus: #FEC12B;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --shadow-s: 0 1px 3px rgba(0, 0, 0, .3);
  --shadow-card: none;
  --shadow-dock: 0 10px 30px -14px rgba(0, 0, 0, .7);
  --shadow-bar: 0 18px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: 400 14px/1.4 var(--f-body);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  transition: padding-bottom .3s, background-color .3s, color .3s;
}
body.has-order { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
body.no-scroll { overflow: hidden; }

img { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button, input, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
b, strong { font-weight: 700; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--brand); color: var(--brand-ink); }
:root[data-theme="dark"] .hdr__mark, :root[data-theme="dark"] .drawer__w, :root[data-theme="dark"] .foot__w { filter: invert(1); }

.wrap {
  width: 100%;
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}

/* --------------------------------------------------------------------------
   Шапка: 52 px — знак, вкладки (мобильный), тема, меню
   -------------------------------------------------------------------------- */
.hdr {
  position: relative;
  z-index: 30;
  background: var(--bg);
  transition: background-color .3s;
}
.hdr__in { display: flex; align-items: center; gap: 8px; height: var(--hdr-h); }
.hdr__logo { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; text-decoration: none; position: relative; }
.hdr__mark { display: block; height: 24px; width: auto; }
.hdr__word { display: none; font: 800 17px/1 var(--f-body); letter-spacing: .02em; }
.hdr__demo {
  font: 800 8.5px/1 var(--f-body);
  letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 5px 3px;
  border: 1.5px solid var(--brand-text);
  color: var(--brand-text);
  border-radius: 5px;
  transform: rotate(-4deg);
}
.hdr__nav { display: none; }
.hdr__spacer { flex: 1 1 0; min-width: 0; }
.hdr__who { display: none; }
.iconbtn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 11px;
  background: var(--bg-3); color: var(--fg);
  flex: 0 0 auto;
  transition: background .2s;
}
.iconbtn svg { width: 21px; height: 21px; }
.iconbtn:hover { background: var(--bg-4); }
.hdr__theme { position: relative; }
.hdr__theme-ico { display: none; }
.hdr__theme-ico svg { width: 19px; height: 19px; transition: transform .35s var(--ease); }
.hdr__theme:active .hdr__theme-ico svg { transform: rotate(40deg) scale(.9); }
html:not([data-theme-mode]) .hdr__theme-ico--auto, html[data-theme-mode="auto"] .hdr__theme-ico--auto { display: block; }
html[data-theme-mode="light"] .hdr__theme-ico--light { display: block; }
html[data-theme-mode="dark"] .hdr__theme-ico--dark { display: block; }

/* вкладки — сегмент-контрол с бегунком; в шапке на мобильном, в панели на десктопе, в доке — всегда */
.tabs {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  height: 38px;
  padding: 3px;
  border-radius: 11px;
  background: var(--bg-3);
  isolation: isolate;
}
.tabs__ind {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: 8px;
  background: var(--brand);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
  transition: transform .3s var(--ease);
  z-index: 0;
}
.tabs[data-active="keg"] .tabs__ind { transform: translateX(100%); }
.tabs__tab {
  position: relative; z-index: 1;
  min-width: 0;
  border: 0; background: transparent;
  border-radius: 8px;
  font: 700 13px/1 var(--f-body);
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: color .2s;
  padding: 0 4px;
}
.tabs__tab small { font-size: 10.5px; font-weight: 600; opacity: .55; margin-left: 2px; }
.tabs__tab[aria-selected="true"] { color: var(--brand-ink); }
.tabs__tab[aria-selected="true"] small { opacity: .7; }
.tabs--hdr { flex: 1 1 auto; min-width: 0; max-width: 250px; margin-inline: auto; }
.tabs--panel { display: none; }

/* липкая компактная панель */
.dock {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-dock);
  transform: translateY(-110%);
  transition: transform .3s var(--ease);
}
.dock.is-in { transform: none; }
.dock__in { display: flex; align-items: center; gap: 6px; height: 56px; }
.tabs--mini { flex: 0 0 auto; width: 150px; height: 36px; }
.tabs--mini .tabs__tab { font-size: 12.5px; }
.tabs--mini .tabs__tab small { display: none; }
.search--mini { flex: 1 1 auto; min-width: 0; height: 40px; }

/* выдвижное меню */
.drawer { position: fixed; inset: 0; z-index: 80; }
.drawer__veil { position: absolute; inset: 0; background: var(--veil); opacity: 0; transition: opacity .3s; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(340px, 86vw);
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  overflow-y: auto;
}
.drawer.is-in .drawer__veil { opacity: 1; }
.drawer.is-in .drawer__panel { transform: none; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__w { width: 27px; height: 36px; }
.drawer__who { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--fg-2); }
.drawer__who b { color: var(--fg); font-size: 15px; }
.drawer__hi { color: var(--brand-text); font-weight: 600; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 16px; font-weight: 600;
  text-decoration: none;
}
.drawer__nav a svg { width: 18px; height: 18px; color: var(--fg-3); }
.drawer__nav a.is-current { color: var(--brand-text); }
.drawer__btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 4px;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit;
  font: 600 16px var(--f-body); text-align: left;
}
.drawer__btn svg { width: 18px; height: 18px; color: var(--fg-3); }
.drawer__note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fg-2); padding: 12px 14px; border-radius: 12px; background: var(--bg-3); }
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--fg-2); }
.drawer__foot a { text-decoration-color: var(--brand-line); text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Баннеры (компактно, без автопрокрутки на мобильном), резерв
   -------------------------------------------------------------------------- */
.main { padding-top: 6px; padding-bottom: 24px; }
.banners { position: relative; margin-bottom: 10px; }
.banners__track {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
  border-radius: var(--r);
}
.banners__track::-webkit-scrollbar { display: none; }
.banner { flex: 0 0 100%; scroll-snap-align: start; border-radius: var(--r); overflow: hidden; background: var(--bg-3); aspect-ratio: 3 / 1; max-height: 130px; display: block; }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banners__dots { position: absolute; right: 8px; bottom: 6px; display: flex; gap: 4px; }
.banners__dot { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5); padding: 0; }
.banners__dot.is-on { background: var(--brand); }

.reserve {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 10px 12px;
  border-radius: 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  font-size: 13px;
}
.reserve p { margin: 0; }
.reserve__ico svg { width: 18px; height: 18px; color: var(--brand-text); }

/* --------------------------------------------------------------------------
   Панель управления: поиск + «Фильтры» · лента быстрых чипсов · строка результатов
   -------------------------------------------------------------------------- */
.panel { display: flex; flex-direction: column; gap: 8px; }
.panel__top { display: flex; align-items: center; gap: 6px; }
.search {
  position: relative;
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.search__ico { position: absolute; left: 12px; color: var(--fg-3); pointer-events: none; }
.search__ico svg { width: 18px; height: 18px; }
.search input {
  flex: 1; min-width: 0;
  height: 100%; padding: 0 40px 0 38px;
  border: 0; background: transparent; color: var(--fg);
  font: 500 15px var(--f-body);
  outline: none;
}
.search input::placeholder { color: var(--fg-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search__clear { position: absolute; right: 4px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-3); display: grid; place-items: center; }
.search__clear svg { width: 16px; height: 16px; }
.search__clear:hover { background: var(--bg-3); color: var(--fg); }
.fbtn {
  position: relative;
  flex: 0 0 auto;
  height: 44px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--fg);
  font: 600 13px var(--f-body);
  box-shadow: var(--shadow-card);
  transition: background .2s, border-color .2s;
}
.fbtn svg { width: 19px; height: 19px; }
.fbtn:hover { background: var(--bg-3); }
.fbtn.is-on { border-color: var(--fg); }
.fbtn__n {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  font: 800 10.5px/18px var(--f-body); text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.fbtn--ico { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 11px; }
.fbtn--ico svg { width: 18px; height: 18px; }
.fbtn span { display: none; }
.sort { display: none; position: relative; align-items: center; gap: 6px; cursor: pointer; }
.sort select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.sort__ico svg { width: 15px; height: 15px; color: var(--fg-3); }
.sort__cur { font-size: 12px; font-weight: 600; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sort.is-on .sort__cur { color: var(--fg); }
.sort.is-on .sort__ico svg { color: var(--brand-text); }
.sort__chev svg { width: 14px; height: 14px; color: var(--fg-3); }
.sort--panel { height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow-card); flex: 0 0 auto; }
.sort--panel .sort__cur { font-size: 13px; }
.sort--results { display: inline-flex; height: 34px; padding: 0 6px; max-width: 46vw; }
.view { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--bg-3); flex: 0 0 auto; }
.view__btn { width: 34px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); display: grid; place-items: center; transition: background .2s, color .2s; }
.view__btn svg { width: 16px; height: 16px; }
.view__btn[aria-pressed="true"] { background: var(--bg-2); color: var(--fg); box-shadow: var(--shadow-s); }
.view__btn--table { display: none; }
.view--panel { display: none; height: 44px; padding: 3px; border-radius: 12px; }
.view--panel .view__btn { width: 38px; height: 36px; border-radius: 9px; }
.view--panel .view__btn svg { width: 18px; height: 18px; }

/* лента быстрых чипсов: Все · ♥ · Новинки · Хиты · Акции | группы стилей; справа — активные фильтры с крестиком */
.strip { position: relative; margin-inline: -12px; }
.strip__scroll {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; scroll-snap-type: none;
  padding: 2px 12px;
  scrollbar-width: none; -ms-overflow-style: none;
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.strip__scroll::-webkit-scrollbar { display: none; }
.strip__chips, .strip__active { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.strip__active:empty { display: none; }
.strip__active::before { content: ""; width: 1px; height: 18px; background: var(--line-2); margin: 0 2px; }
.strip__sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 2px; flex: 0 0 auto; }
.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-2); color: var(--fg-2);
  font: 600 12.5px/1 var(--f-body);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: background .2s, color .2s, border-color .2s;
}
.chip::before { content: ""; position: absolute; inset: -6px 0; }
.chip:hover { background: var(--bg-3); }
.chip__n { font-style: normal; font-size: 10.5px; opacity: .6; }
.chip__n:empty { display: none; }
.chip.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.is-on .chip__n { opacity: .7; }
.chip.is-zero { opacity: .45; }
.chip--fav svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.chip--fav.is-on svg { fill: var(--sale); stroke: var(--sale); }
.chip--fav { padding: 0 9px; }
.chip--tag .chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tag, var(--fg-3)); flex: 0 0 auto; }
.chip--tag.is-on .chip__dot { box-shadow: 0 0 0 2px var(--bg); }
.chip--static { cursor: default; height: 26px; padding: 0 9px; font-size: 11.5px; }
.chip--static:hover { background: var(--bg-2); }
.chip--x { padding-right: 8px; background: var(--brand-soft); border-color: var(--brand-line); color: var(--fg); }
.chip--x svg { width: 14px; height: 14px; color: var(--fg-2); }
.chip--x .chip__sort { color: var(--brand-text); }
.chip--x:hover { background: var(--brand-soft); border-color: var(--fg); }
.chip--x:hover svg { color: var(--fg); }
.chip--opt { height: 34px; }

.panel__end { height: 0; }
.results { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0 8px; min-height: 30px; }
.results__txt { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--fg-3); min-width: 0; white-space: nowrap; overflow: hidden; }
.results__note { display: none; }
.results__txt > * { flex: 0 0 auto; }
.results__txt > .results__count { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
.results__count { color: var(--fg); font-weight: 700; white-space: nowrap; }
.results__time { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.results__time b { font-weight: 600; color: var(--fg-2); }
.results__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 2px var(--ok-soft); flex: 0 0 auto; transition: background .3s; }
.results__time[data-state="busy"] .results__dot { animation: blink 1s infinite; }
.results__time[data-state="warn"] .results__dot { background: var(--low); box-shadow: none; }
.results__time[data-state="stale"] .results__dot { background: var(--sale); box-shadow: 0 0 0 2px var(--sale-soft); }
.results__reload { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--fg-3); display: grid; place-items: center; margin-left: -2px; }
.results__reload svg { width: 14px; height: 14px; }
.results__reload:hover { background: var(--bg-3); color: var(--fg); }
.results__reload.is-busy svg { animation: spin .8s linear infinite; }
.results__tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.sort--results .sort__cur { display: none; }

/* предупреждение о протухших остатках */
.stale {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 10px 12px;
  border-radius: 12px;
  background: var(--sale-soft);
  border: 1px solid var(--sale);
  color: var(--fg);
  font-size: 13px; font-weight: 500;
}
.stale svg { width: 18px; height: 18px; color: var(--sale); flex: 0 0 auto; }
.stale span { flex: 1 1 auto; }
.stale__btn { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--fg); color: var(--bg); font: 700 12.5px var(--f-body); }

/* --------------------------------------------------------------------------
   Карточки: список (строка листа заказа) и плитка. Разметка одна, раскладка — по html[data-view]
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 8px; align-items: stretch; }
html[data-view="list"] .grid { grid-template-columns: minmax(0, 1fr); }
html[data-view="grid"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.card {
  position: relative;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  animation: rise .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
  transition: border-color .25s, box-shadow .25s, background-color .3s;
  scroll-margin-top: 70px;
}
.loaded .card { animation: none; }
.card.in-cart { border-color: var(--brand-line); box-shadow: 0 0 0 1px var(--brand-soft); }
.card.is-out .card__plate img { filter: grayscale(1); opacity: .5; }
.card:target { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.card__plate {
  position: relative;
  background: var(--plate);
  border-radius: 10px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px var(--plate-line), inset 0 -14px 24px -22px var(--plate-shade);
  overflow: hidden;
}
.card__plate img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card__plate::after {
  content: ""; position: absolute; left: 24%; right: 24%; bottom: 4px; height: 7px;
  border-radius: 50%; background: radial-gradient(closest-side, var(--plate-shadow), transparent);
  pointer-events: none;
}
.badges { position: absolute; top: 5px; left: 5px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; pointer-events: none; z-index: 1; }
.badge {
  display: inline-flex; align-items: center;
  padding: 4px 6px 3px;
  border-radius: 5px;
  font: 800 9px/1 var(--f-body);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--badge-fg);
  background: var(--badge-bg);
}
.badge--new { background: var(--brand); color: var(--brand-ink); }
.badge--sale { background: var(--sale); color: #fff; font-size: 10px; letter-spacing: .03em; }

.fav {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--fav-idle);
  display: grid; place-items: center;
  transition: color .2s, transform .2s;
}
.fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav:hover { color: var(--fg-2); }
.fav[aria-pressed="true"] { color: var(--sale); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.fav.pop { animation: heart .45s var(--ease); }
.fav--static { position: static; background: var(--bg-3); }

.card__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--fg-2); min-height: 16px; }
.card__style { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card__abv { flex: 0 0 auto; font-weight: 700; font-size: 10.5px; color: var(--fg); padding: 2px 5px; border-radius: 5px; background: var(--bg-3); }
.card__name { margin: 0; font: 700 15.5px/1.2 var(--f-body); letter-spacing: -.01em; overflow-wrap: anywhere; }
.card__open {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left;
  cursor: pointer;
}
.card__open:hover { color: var(--brand-text); }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; }
.vars { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; }
.var {
  position: relative;
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-3); color: var(--fg-2);
  font: 600 12px/1 var(--f-body);
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.var::before { content: ""; position: absolute; inset: -8px -3px; }
.var.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.var.is-out { opacity: .45; text-decoration: line-through; }
.var.has-qty::after { content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--bg-2); }
.var--single { font: 500 11.5px/1 var(--f-body); color: var(--fg-2); white-space: nowrap; }
.card__exp { font-size: 11px; color: var(--fg-3); white-space: nowrap; flex: 0 0 auto; }
.card__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 11.5px; line-height: 1.3; min-height: 15px; }
.card__warm { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; color: var(--warm); font-weight: 600; }
.card__warm svg { width: 12px; height: 12px; flex: 0 0 auto; }
.stock { color: var(--fg-2); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.stock b { font-weight: 700; color: var(--fg); }
.stock.is-low { color: var(--low); font-weight: 600; }
.stock.is-low b { color: inherit; }
.stock.is-low::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.6s infinite; flex: 0 0 auto; }
.stock--out { color: var(--sale); font-weight: 600; }
.stock.is-stale { color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--sale); }

.card__buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.price { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1; }
.price__main { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.price__main b { font: 800 19px/1 var(--f-body); letter-spacing: -.02em; }
.price__cur { font: 800 13px/1 var(--f-body); margin-left: -1px; }
.price__per { font: 600 11.5px var(--f-body); color: var(--fg-2); }
.price__old { font: 600 12px var(--f-body); color: var(--fg-3); text-decoration: line-through; text-decoration-color: var(--sale); text-decoration-thickness: 1.5px; }
.price__sub { font: 500 11.5px/1.2 var(--f-body); color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price__sub s { color: var(--fg-3); text-decoration-color: var(--sale); }
.card.in-cart .price__main b { color: var(--brand-text); }

/* степпер: qty=0 → одна жёлтая кнопка «+ короб»; qty>0 → [−] [ 2 кор.] [+] с редактируемым полем */
.stepper { display: flex; align-items: center; gap: 4px; height: 40px; flex: 0 0 auto; }
.stepper__btn {
  height: 40px; min-width: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 0; border-radius: 10px;
  padding: 0;
  font: 700 13px var(--f-body);
  flex: 0 0 auto;
  transition: background .2s, transform .15s var(--ease), color .2s;
}
.stepper__btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.stepper__btn:active { transform: scale(.92); }
.stepper__btn--minus { background: var(--bg-3); color: var(--fg); }
.stepper__btn--minus:hover { background: var(--bg-4); }
.stepper__btn--plus { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 12px -6px var(--brand-halo); padding: 0 12px 0 10px; }
.stepper__btn--plus:hover { background: var(--brand-2); }
.stepper__btn--plus:disabled { background: var(--bg-3); color: var(--fg-3); box-shadow: none; cursor: not-allowed; transform: none; }
.stepper__btn--plus:disabled .stepper__word::before { content: "нет · "; }
.stepper__word { text-transform: lowercase; white-space: nowrap; }
.stepper__field {
  display: none; align-items: center; gap: 2px;
  height: 40px; padding: 0 6px 0 7px;
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 -2px 0 var(--line-2);
  cursor: text;
}
.stepper__field:hover { box-shadow: inset 0 0 0 1px var(--fg-3), inset 0 -2px 0 var(--fg-3); }
.stepper__in {
  width: 34px; height: 100%;
  border: 0; background: transparent; color: var(--fg);
  font: 800 16px var(--f-body); text-align: center;
  outline: none; padding: 0;
  -moz-appearance: textfield;
}
.stepper__in::-webkit-inner-spin-button, .stepper__in::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper__field:focus-within { box-shadow: inset 0 0 0 2px var(--brand), inset 0 -3px 0 var(--brand); }
.stepper__unit { font: 600 10.5px var(--f-body); color: var(--fg-2); white-space: nowrap; }
.stepper[data-qty="0"] .stepper__btn--minus { display: none; }
.stepper:not([data-qty="0"]) .stepper__field { display: inline-flex; }
.stepper:not([data-qty="0"]) .stepper__btn--plus { padding: 0; width: 40px; }
.stepper:not([data-qty="0"]) .stepper__word { display: none; }
.stepper.bump .stepper__in { animation: bump .4s var(--ease); }
.stepper.is-stale .stepper__btn--plus { background: var(--bg-3); color: var(--fg-3); box-shadow: none; cursor: not-allowed; }

/* список: фото слева 96 px, информация справа, нижняя строка — цена + степпер */
html[data-view="list"] .card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas: "plate info" "buy buy";
  column-gap: 10px; row-gap: 0;
  padding: 8px 10px 8px 8px;
}
html[data-view="list"] .card__plate { grid-area: plate; height: 104px; }
html[data-view="list"] .card__info { grid-area: info; padding: 1px 0 0; }
html[data-view="list"] .card__meta { padding-right: 34px; }
html[data-view="list"] .card__buy { grid-area: buy; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
html[data-view="list"] .fav { top: 2px; right: 2px; }
html[data-view="list"] .badges { top: 4px; left: 4px; }
html[data-view="list"] .badge { font-size: 8px; padding: 3px 5px 2px; }

/* плитка: фото сверху, степпер во всю ширину */
html[data-view="grid"] .card { display: flex; flex-direction: column; }
html[data-view="grid"] .card__plate { height: 150px; border-radius: 12px 12px 0 0; padding: 6px; }
html[data-view="grid"] .card__info { padding: 8px 9px 4px; }
html[data-view="grid"] .card__buy { flex-direction: column; align-items: stretch; padding: 4px 9px 9px; margin-top: auto; gap: 6px; }
html[data-view="grid"] .card__row { flex-wrap: wrap; }
html[data-view="grid"] .card .stepper { width: 100%; }
html[data-view="grid"] .card .stepper__field { flex: 1 1 auto; justify-content: center; }
html[data-view="grid"] .card .stepper[data-qty="0"] .stepper__btn--plus { flex: 1 1 auto; }
html[data-view="grid"] .fav { top: 4px; right: 4px; background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-s); width: 36px; height: 36px; }
html[data-view="grid"] .fav svg { width: 18px; height: 18px; }
html[data-view="grid"] .price__main b { font-size: 20px; }
html[data-view="grid"] .card__name { font-size: 15px; }

/* промо-плитка: в плитке — вертикальная картинка на размытом фоне, в списке — строка с текстом */
.promo-tile {
  position: relative;
  display: block;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-decoration: none;
  color: #fff;
  animation: rise .5s var(--ease) both;
  transition: transform .25s var(--ease);
}
.promo-tile::before {
  content: ""; position: absolute; inset: -24px;
  background: var(--img) center / cover no-repeat;
  filter: blur(22px) saturate(1.15);
  opacity: .9;
}
.promo-tile::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.promo-tile img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.promo-tile__txt { position: relative; z-index: 1; display: none; flex-direction: column; gap: 3px; justify-content: center; min-width: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.promo-tile__txt small { font: 800 10px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.promo-tile__txt b { font: 700 15px/1.2 var(--f-body); overflow-wrap: anywhere; }
.promo-tile__txt span { display: inline-flex; align-items: center; gap: 5px; font: 600 12px var(--f-body); opacity: .9; }
.promo-tile__txt span svg { width: 14px; height: 14px; }
.promo-tile:hover { transform: translateY(-2px); }
html[data-view="grid"] .promo-tile { min-height: 280px; }
html[data-view="list"] .promo-tile { display: none; }

.empty { text-align: center; padding: 48px 16px 56px; color: var(--fg-2); }
.empty__art { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg-3); display: grid; place-items: center; color: var(--brand-text); }
.empty__art svg { width: 26px; height: 26px; }
.empty h2 { margin: 0 0 4px; font: 700 32px/1 var(--f-display); text-transform: uppercase; color: var(--fg); letter-spacing: .02em; }
.empty p { margin: 0 0 18px; font-size: 14px; }

.tail { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--fg-3); }
.tail__up { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--fg-2); font: 600 12px var(--f-body); }
.tail__up svg { width: 14px; height: 14px; }
.tail__up:hover { background: var(--bg-3); color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: var(--brand); color: var(--brand-ink);
  font: 700 14px var(--f-body);
  text-decoration: none;
  transition: background .2s, transform .15s var(--ease);
}
.btn:hover { background: var(--brand-2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.btn--ghost { background: var(--bg-3); color: var(--fg); }
.btn--ghost:hover { background: var(--bg-4); }
.btn--ico { width: 44px; padding: 0; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Подвал, плавающий итог заказа, тост
   -------------------------------------------------------------------------- */
.foot { display: flex; align-items: center; gap: 12px; padding-block: 18px 22px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); }
.foot__w { width: 18px; height: 24px; opacity: .6; }
.foot span { flex: 1 1 auto; }
.foot a { color: var(--fg-2); text-decoration-color: var(--brand-line); text-underline-offset: 2px; }

.orderbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 50;
  padding: 0 10px calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
  transform: translateY(120%);
  transition: transform .4s var(--ease);
}
.orderbar.is-in { transform: none; }
.orderbar__in {
  pointer-events: auto;
  max-width: 720px; margin-inline: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 18px;
  background: var(--ink); color: var(--ink-fg);
  box-shadow: var(--shadow-bar);
}
.orderbar__in.bump { animation: barbump .45s var(--ease); }
.orderbar__sum { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 0; text-align: left; }
.orderbar__ico { position: relative; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; flex: 0 0 auto; }
.orderbar__ico svg { width: 20px; height: 20px; }
.orderbar__badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font: 800 10.5px/18px var(--f-body); text-align: center; }
.orderbar__txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.orderbar__n { font-size: 11px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orderbar__total { font: 700 24px/1 var(--f-display); letter-spacing: .01em; white-space: nowrap; }
.orderbar__total b { font-weight: 700; font-size: 26px; }
.orderbar__go {
  flex: 0 0 auto;
  height: 44px; padding: 0 14px 0 12px;
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; border-radius: 12px;
  background: var(--brand); color: var(--brand-ink);
  font: 700 14px var(--f-body);
  text-decoration: none;
  transition: background .2s, transform .15s var(--ease);
}
.orderbar__go:hover { background: var(--brand-2); }
.orderbar__go:active { transform: scale(.96); }
.orderbar__go svg { width: 18px; height: 18px; }
.orderbar__list { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 100;
  transform: translate(-50%, 20px);
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--pop-bg); color: var(--pop-fg);
  font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.has-order .toast { bottom: calc(var(--bar-h) + 10px + env(safe-area-inset-bottom)); }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast__btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font: 700 12.5px var(--f-body); white-space: nowrap; }
.toast__btn svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   Шторки: детали сорта (с липкой строкой покупки), заказ, фильтры
   -------------------------------------------------------------------------- */
.sheet {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  color: var(--fg);
  overflow: visible;
  transition: background-color .3s;
}
.sheet::backdrop { background: transparent; }
.sheet.is-in { background: var(--veil); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - 20px);
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform .42s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.is-in .sheet__panel { transform: none; }
.sheet__grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto 6px; flex: 0 0 auto; }
.sheet__close { position: absolute; top: 18px; right: 12px; z-index: 3; background: var(--scrim-btn); color: var(--scrim-btn-fg); }
.sheet__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 0 14px 18px; min-height: 0; }
.sheet__hero { position: relative; }
.sheet__plate {
  position: relative;
  background: var(--plate);
  border-radius: 16px;
  height: 240px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px var(--plate-line), inset 0 -18px 30px -24px var(--plate-shade);
}
.sheet__plate img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sheet__plate .badges { top: 10px; left: 10px; }
.sheet__plate .badge { font-size: 10px; padding: 5px 7px 4px; }
.sheet__title { display: flex; align-items: flex-start; gap: 10px; }
.sheet__title .fav { flex: 0 0 auto; margin-top: -4px; }
.sheet__info { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.sheet__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--fg-2); }
.sheet__meta .pill { display: inline-block; padding: 3px 7px; border-radius: 6px; background: var(--bg-3); color: var(--fg); font-weight: 700; font-size: 11px; letter-spacing: .04em; }
.sheet__name { margin: 0; flex: 1 1 auto; min-width: 0; font: 800 24px/1.15 var(--f-body); letter-spacing: -.02em; overflow-wrap: anywhere; }
.sheet__descr { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--fg-2); }
.sheet__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sheet__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 12.5px; color: var(--fg-2); }
.sheet__facts div { display: flex; gap: 5px; align-items: center; }
.sheet__facts dt { margin: 0; color: var(--fg-3); }
.sheet__facts dd { margin: 0; color: var(--fg); font-weight: 600; }
.sheet__facts .sheet__warm { color: var(--warm); }
.sheet__facts .sheet__warm svg { width: 14px; height: 14px; }
.sheet__facts .sheet__warm dd { color: var(--warm); }
.sheet__vars .var { height: 38px; padding: 0 14px; font-size: 13px; }
.sheet__vars .var--single { font-size: 13px; }
.sheet__vars .var.is-out::after { content: " · нет"; }

/* липкая строка покупки внизу шторки деталей */
.sheet__buy {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.sheet__buy:empty { display: none; }
.sheet__price { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.sheet__price .price__main b { font-size: 24px; }
.sheet__price .price__cur { font-size: 15px; }
.sheet__price .stock { font-size: 11.5px; }
.stepper--big { height: 48px; flex: 0 0 auto; }
.stepper--big .stepper__btn { height: 48px; min-width: 48px; font-size: 14px; }
.stepper--big .stepper__btn--plus { padding: 0 16px 0 12px; }
.stepper--big:not([data-qty="0"]) .stepper__btn--plus { width: 48px; padding: 0; }
.stepper--big .stepper__field { height: 48px; }
.stepper--big .stepper__in { font-size: 19px; width: 40px; }
.stepper--big .stepper__btn svg { width: 20px; height: 20px; }

.sheet__links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.linkbtn {
  min-width: 0;
  display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: center;
  min-height: 46px; padding: 8px 12px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: transparent; color: var(--fg);
  font: 600 13px/1.2 var(--f-body);
  text-align: left;
  text-decoration: none;
  transition: background .2s;
}
.linkbtn:hover { background: var(--bg-3); }
.linkbtn svg { width: 18px; height: 18px; color: var(--brand-text); grid-row: 1 / span 2; }
.linkbtn span { overflow-wrap: anywhere; }
.linkbtn small { font-size: 10.5px; font-weight: 500; color: var(--fg-3); }
.linkbtn small:empty { display: none; }
.linkbtn[aria-disabled="true"], .linkbtn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.linkbtn[aria-disabled="true"] svg, .linkbtn:disabled svg { color: var(--fg-3); }
.linkbtn.is-on { background: var(--bg-3); border-color: var(--brand); }
.sheet__video video { width: 100%; max-height: 60vh; border-radius: 12px; background: var(--video-bg); display: block; }

.story { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; border-radius: 12px; background: var(--bg-3); }
.story__btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; min-height: 46px; padding: 0 12px;
  border: 0; background: transparent; color: var(--fg);
  font: 700 13.5px/1 var(--f-body);
  text-align: left;
}
.story__btn > svg { width: 18px; height: 18px; color: var(--brand-text); flex: 0 0 auto; }
.story__btn span { flex: 1 1 auto; }
.story__btn i { display: grid; }
.story__btn i svg { width: 16px; height: 16px; color: var(--fg-3); transition: transform .3s var(--ease); }
.story__btn[aria-expanded="true"] i svg { transform: rotate(180deg); }
.story__text { margin: -4px 0 0; padding: 0 14px 14px; font-size: 14px; line-height: 1.55; color: var(--fg-2); white-space: pre-line; animation: rise .35s var(--ease) both; }

/* список заказа */
.order { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.order__head { display: flex; align-items: baseline; gap: 10px; padding-right: 52px; }
.order__title { margin: 0; font: 700 34px/.9 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.order__count { font-size: 12px; color: var(--fg-3); }
.order__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.orow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px; row-gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  animation: rise .35s var(--ease) both;
}
.orow__main { grid-column: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.orow__name { font: 700 14.5px/1.2 var(--f-body); overflow-wrap: anywhere; }
.orow__var { font-size: 12px; color: var(--fg-2); }
.orow__sum { grid-column: 2; grid-row: 1; align-self: start; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.orow__sum b { font: 800 17px/1 var(--f-body); white-space: nowrap; }
.orow__sum small { font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.orow .stepper { grid-column: 1; grid-row: 2; height: 36px; }
.orow .stepper__btn, .orow .stepper__field { height: 36px; min-width: 36px; }
.orow .stepper:not([data-qty="0"]) .stepper__btn--plus { width: 36px; }
.orow__rm { grid-column: 2; grid-row: 2; align-self: center; justify-self: end; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-3); display: grid; place-items: center; }
.orow__rm svg { width: 16px; height: 16px; }
.orow__rm:hover { background: var(--bg-3); color: var(--sale); }
.order__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.order__total small { display: block; margin-top: 4px; font: 500 11px var(--f-body); letter-spacing: 0; text-transform: none; color: var(--fg-3); }
.order__total b { font: 700 36px/1 var(--f-display); color: var(--fg); letter-spacing: .01em; }
.order__acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.order__acts .btn { padding: 0 8px; font-size: 12.5px; gap: 6px; }
.order__acts .btn span { white-space: nowrap; }
.order__acts--public { grid-template-columns: minmax(0, 1fr) auto 44px; }
.order__acts--public .order__go { padding: 0 12px; font-size: 14px; height: 48px; }
.order__acts--public .btn--ghost { height: 48px; }
.order__acts--public .btn--ico { width: 48px; }
.order__hint { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: var(--fg-3); text-align: center; }
.order__hint svg { width: 14px; height: 14px; flex: 0 0 auto; }
.order__hint a { color: var(--fg-2); text-decoration-color: var(--brand-line); text-underline-offset: 2px; }
.order__go { height: 52px; font-size: 15px; }
.order__go svg { width: 20px; height: 20px; }

/* панель фильтров */
.filters { display: flex; flex-direction: column; gap: 16px; padding: 0 16px 14px; }
.filters__title { margin: 2px 0 0; font: 700 32px/.9 var(--f-display); text-transform: uppercase; letter-spacing: .02em; padding-right: 52px; }
.fsec { display: flex; flex-direction: column; gap: 9px; }
.fsec__h { margin: 0; display: flex; align-items: center; gap: 10px; font: 700 11px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.fsec__h::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fsec__none { margin: 0; font-size: 12.5px; color: var(--fg-3); }
.fcheck {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2); color: var(--fg-2);
  font: 600 12.5px/1 var(--f-body);
  cursor: pointer; user-select: none;
  transition: background .2s, color .2s;
}
.fcheck:hover { background: var(--bg-3); }
.fcheck input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fcheck:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.fcheck__box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--fg-3); display: grid; place-items: center; color: var(--brand-ink); transition: background .2s, border-color .2s; flex: 0 0 auto; }
.fcheck__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .25s var(--ease); }
.fcheck:has(input:checked) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.fcheck:has(input:checked) .fcheck__box { background: var(--brand); border-color: var(--brand); }
.fcheck:has(input:checked) .fcheck__box svg { opacity: 1; transform: none; }
.fcheck--fav > svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; margin-right: -2px; }
.fcheck:has(input:checked).fcheck--fav > svg { fill: var(--sale); stroke: var(--sale); }
.fcheck__n { font-style: normal; font-size: 10.5px; opacity: .55; }
.fcheck__n:empty { display: none; }
.filters__foot {
  flex: 0 0 auto;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.filters__foot .btn { height: 48px; }
.filters__foot .btn b { font-weight: 800; }
.sheet--filters .sheet__panel { padding-bottom: 0; min-height: min(72dvh, 640px); }

/* --------------------------------------------------------------------------
   Анимации
   -------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.3); color: var(--brand-text); } 100% { transform: scale(1); } }
@keyframes barbump { 0% { transform: scale(1); } 40% { transform: scale(1.02) translateY(-3px); } 100% { transform: scale(1); } }
@keyframes heart { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 359px) {
  .hdr__demo { display: none; }
  .tabs--hdr .tabs__tab { font-size: 12px; }
}

@media (min-width: 560px) {
  html[data-view="grid"] .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .fbtn span { display: inline; }
  .hdr__word { display: inline; }
  .results__tools .sort--results { max-width: none; }
  .sort--results .sort__cur { display: inline; }
  .results__note { display: inline; }
}

@media (min-width: 720px) {
  .wrap { padding-inline: 20px; }
  .main { padding-top: 10px; }
  .hdr__in { height: 60px; gap: 12px; }
  .hdr__mark { height: 28px; }
  .tabs--hdr { display: none; }
  .tabs--panel { display: grid; flex: 0 0 240px; height: 44px; }
  .tabs--panel .tabs__tab { font-size: 14px; }
  .hdr__theme { order: 10; }
  .hdr__burger { order: 11; }
  .panel__top .search { flex: 1 1 auto; max-width: 520px; }
  .sort--panel { display: inline-flex; margin-left: auto; }
  .view--panel { display: flex; }
  .results__tools { display: none; }
  .strip { margin-inline: 0; }
  .strip__scroll { mask-image: none; -webkit-mask-image: none; padding-inline: 0; flex-wrap: wrap; row-gap: 6px; }
  .dock__in { height: 60px; }
  .tabs--mini { width: 200px; height: 40px; }
  .tabs--mini .tabs__tab { font-size: 13.5px; }
  .tabs--mini .tabs__tab small { display: inline; }
  .search--mini { max-width: 480px; }
  .results { margin: 4px 0 10px; }
  .results__txt { font-size: 12.5px; }
  .orderbar { padding-bottom: 20px; }
  .orderbar__in { gap: 10px; padding: 10px 10px 10px 16px; }
  .orderbar__list { display: inline-flex; }
  .banner { aspect-ratio: 4 / 1; max-height: 140px; }
  .card:hover { border-color: var(--line-2); }
  .card.in-cart:hover { border-color: var(--brand); }

  /* список на широком экране — две колонки строк */
  html[data-view="list"] .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  html[data-view="list"] .card { grid-template-columns: 110px minmax(0, 1fr); padding: 10px 12px 10px 10px; }
  html[data-view="list"] .card__plate { height: 118px; }
  html[data-view="grid"] .card__plate { height: 160px; }
  html[data-view="grid"] .card__info { padding: 10px 11px 4px; }
  html[data-view="grid"] .card__buy { padding: 4px 11px 11px; }

  /* модалка вместо шторки */
  .sheet__panel {
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(920px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    border-radius: 22px;
    transform: translate(-50%, -50%) scale(.96);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .3s;
    padding-bottom: 0;
  }
  .sheet.is-in .sheet__panel { transform: translate(-50%, -50%); opacity: 1; }
  .sheet__grip { display: none; }
  .sheet__close { top: 14px; right: 14px; }
  .sheet__scroll { padding: 22px 22px 22px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; align-items: start; }
  .sheet__hero { position: sticky; top: 0; }
  .sheet__plate { height: 340px; padding: 20px; }
  .sheet__info { padding-top: 6px; }
  .sheet__name { font-size: 28px; }
  .sheet__title { padding-right: 44px; }
  .sheet__buy { padding: 12px 22px 14px; border-radius: 0 0 22px 22px; }
  .sheet__price .price__main b { font-size: 26px; }
  .sheet--order .sheet__panel { width: min(600px, calc(100vw - 48px)); }
  .sheet--order .sheet__scroll { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 26px; }
  .order__title { font-size: 40px; }

  /* фильтры на десктопе — выпадающая панель под кнопкой «Фильтры» (координаты ставит demo.js) */
  .sheet--filters.is-in { background: var(--veil-soft); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sheet--filters .sheet__panel {
    left: auto; top: var(--fy, 80px); right: var(--fx, 24px); bottom: auto;
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100vh - var(--fy, 80px) - 24px);
    border-radius: 18px;
    transform-origin: top right;
    transform: translateY(-8px) scale(.97);
    min-height: 0;
  }
  .sheet--filters.is-in .sheet__panel { transform: none; }
  .sheet--filters .sheet__panel::before {
    content: ""; position: absolute; top: -6px; right: 22px;
    width: 12px; height: 12px; background: var(--bg-2); transform: rotate(45deg);
    border-left: 1px solid var(--line); border-top: 1px solid var(--line);
  }
  .sheet--filters .sheet__scroll { display: flex; flex-direction: column; gap: 16px; padding: 20px 20px 14px; }
  .sheet--filters .sheet__close { top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-3); color: var(--fg); }
  .filters__title { font-size: 30px; }
  .filters__foot { padding: 12px 20px; border-radius: 0 0 18px 18px; }
}

@media (min-width: 960px) {
  html[data-view="grid"] .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .hdr__in { gap: 16px; }
  .hdr__nav { display: flex; gap: 2px; margin-left: 4px; }
  .hdr__nav a {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    color: var(--fg-2);
    text-decoration: none;
    transition: color .2s, background .2s;
  }
  .hdr__nav a:hover { color: var(--fg); background: var(--bg-3); }
  .hdr__nav a.is-current { color: var(--brand-ink); background: var(--brand); }
  .hdr__burger { display: none; }
  .hdr__who { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; min-width: 0; line-height: 1.15; text-align: right; }
  .hdr__company { font-weight: 600; font-size: 12.5px; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hdr__dept { font-size: 11px; color: var(--fg-2); max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hdr__spacer { display: block; }
  html[data-view="grid"] .card__plate { height: 168px; padding: 8px; }
  html[data-view="grid"] .card__name { font-size: 15.5px; }
  .empty { padding: 90px 16px; }
}

@media (min-width: 1200px) {
  html[data-view="grid"] .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
  html[data-view="list"] .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wrap { padding-inline: 28px; }
}

/* ==========================================================================
   v5: акцент тега и теги текстом в карточке
   ========================================================================== */
.card__plate::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1;
  background: var(--acc, transparent);
  opacity: .9;
}
html[data-view="list"] .card__plate::before, html[data-view="grid"] .card__plate::before { display: none; }
html[data-view="table"] .card__plate::before { right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
.card__tags { display: none; font-size: 11px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 720px) {
  html[data-view="list"] .card__tags, html[data-view="grid"] .card__tags { display: block; }
}

/* строка «Прошлые списки» в хвосте */
.tail__hist { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--fg-2); font: 600 12px var(--f-body); margin-left: auto; }
.tail__hist svg { width: 14px; height: 14px; color: var(--brand-text); }
.tail__hist:hover { background: var(--bg-3); color: var(--fg); }
.tail__hist + .tail__up { margin-left: 0; }

/* ==========================================================================
   v5: заказ — пустое состояние и прошлые списки
   ========================================================================== */
.order__empty { margin: 0; padding: 14px 14px; border-radius: 12px; background: var(--bg-3); font-size: 13.5px; line-height: 1.45; color: var(--fg-2); }
.sheet--order.is-empty .order__total, .sheet--order.is-empty .order__acts, .sheet--order.is-empty .order__hint, .sheet--order.is-empty .order__go, .sheet--order.is-empty .order__count { display: none; }
.hist { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.hist__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hist__h { margin: 0; display: inline-flex; align-items: center; gap: 7px; font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.hist__h svg { width: 16px; height: 16px; color: var(--brand-text); }
.hist__save { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-2); color: var(--fg-2); font: 600 12px var(--f-body); }
.hist__save svg { width: 14px; height: 14px; }
.hist__save:hover { background: var(--bg-3); color: var(--fg); }
.sheet--order.is-empty .hist__save { display: none; }
.hist__empty { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--fg-3); }
.hist__rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hrow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px;
  padding: 8px 8px 8px 12px;
  border-radius: 12px;
  background: var(--bg-3);
}
.hrow__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hrow__when { font: 700 13px var(--f-body); }
.hrow__what { font-size: 11.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow__apply { height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font: 700 12.5px var(--f-body); white-space: nowrap; }
.hrow__apply:hover { background: var(--brand-2); }
.hrow__rm { width: 34px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--fg-3); display: grid; place-items: center; }
.hrow__rm svg { width: 15px; height: 15px; }
.hrow__rm:hover { background: var(--bg-4); color: var(--sale); }

/* ==========================================================================
   v5: детали — миниатюры (этикетка / промо), «нет в наличии», ссылка, похожие сорта
   ========================================================================== */
.sheet__thumbs { display: flex; gap: 8px; margin-top: 8px; }
.sheet__thumb { width: 52px; height: 52px; padding: 3px; border: 2px solid var(--line); border-radius: 10px; background: var(--plate); display: grid; place-items: center; overflow: hidden; }
.sheet__thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sheet__thumb.is-on { border-color: var(--brand); }
.sheet__plate.is-promo img { object-fit: contain; }
.sheet__oos { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--sale-soft); font-size: 12.5px; line-height: 1.45; color: var(--fg); }
.sheet__oos svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--sale); margin-top: 1px; }
.sheet__links { grid-template-columns: 1fr 1fr; }
.sheet__links .linkbtn:last-child { grid-column: 1 / -1; }
.similar { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.similar__h { margin: 0; font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); }
.similar__rail { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 0 6px; margin-inline: -14px; padding-inline: 14px; scrollbar-width: none; }
.similar__rail::-webkit-scrollbar { display: none; }
.sim {
  flex: 0 0 118px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 5px; align-items: stretch;
  padding: 6px 6px 8px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-2); color: var(--fg);
  text-align: left; font: inherit;
  transition: border-color .2s, transform .2s var(--ease);
}
.sim:hover { border-color: var(--line-2); transform: translateY(-2px); }
.sim__plate { position: relative; height: 84px; border-radius: 8px; background: var(--plate); padding: 4px; box-shadow: inset 0 0 0 1px var(--plate-line); overflow: hidden; }
.sim__plate::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--acc, transparent); }
.sim__plate img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sim__name { font: 700 12px/1.2 var(--f-body); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.sim__meta { font-size: 10.5px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__price { font: 800 12.5px var(--f-body); }
.sim__price small { font-weight: 600; color: var(--fg-2); font-size: 10.5px; }
@media (min-width: 720px) {
  .sheet__links { grid-template-columns: 1fr 1fr 1fr; }
  .sheet__links .linkbtn:last-child { grid-column: auto; }
  .similar__rail { margin-inline: 0; padding-inline: 0; }
  .sim { flex-basis: 132px; }
}

/* ==========================================================================
   v5: таблица быстрого заказа (≥ 960 px). Разметка карточки та же: .card__info и .card__buy
   раскрываются через display: contents, дочерние блоки становятся ячейками сетки.
   ========================================================================== */
.thead { display: none; }
@media (min-width: 960px) {
  .view__btn--table { display: grid; }
  html[data-view="table"] .thead {
    display: grid;
    grid-template-columns: 56px 40px 150px minmax(0, 1fr) 190px 130px 170px 200px;
    column-gap: 12px; align-items: center;
    padding: 0 12px 6px;
    font: 700 11px/1 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3);
  }
  .thead__btn, .thead__sort { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
  .thead__btn:hover, .thead__sort:hover { color: var(--fg); }
  .thead__btn[aria-sort]:not([aria-sort="none"]), .thead__sort[aria-sort]:not([aria-sort="none"]) { color: var(--brand-text); }
  .thead__btn[aria-sort="ascending"]::after { content: " ↑"; }
  .thead__btn[aria-sort="descending"]::after { content: " ↓"; }
  .thead__sort { margin-left: 4px; padding: 2px 5px; border-radius: 5px; background: var(--bg-3); letter-spacing: 0; }
  html[data-view="table"] .grid { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
  html[data-view="table"] .card {
    display: grid;
    grid-template-columns: 56px 40px 150px minmax(0, 1fr) 190px 130px 170px 200px;
    column-gap: 12px; align-items: center;
    padding: 6px 12px;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    box-shadow: none;
    animation: none;
  }
  html[data-view="table"] .card:last-child { border-bottom: 0; }
  html[data-view="table"] .card:hover { background: color-mix(in srgb, var(--bg-2) 70%, var(--bg-3)); }
  html[data-view="table"] .card.in-cart { background: color-mix(in srgb, var(--bg-2) 82%, var(--brand)); box-shadow: inset 3px 0 0 var(--brand); }
  html[data-view="table"] .card__info, html[data-view="table"] .card__buy { display: contents; }
  html[data-view="table"] .card__plate { width: 56px; height: 56px; padding: 2px; border-radius: 8px; }
  html[data-view="table"] .card__plate::after { display: none; }
  html[data-view="table"] .badges { display: none; }
  html[data-view="table"] .fav { position: static; width: 36px; height: 36px; }
  html[data-view="table"] .fav svg { width: 18px; height: 18px; }
  html[data-view="table"] .card__meta { flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
  html[data-view="table"] .card__style { font-size: 12px; max-width: 100%; }
  html[data-view="table"] .card__name { font-size: 14px; }
  html[data-view="table"] .card__open { -webkit-line-clamp: 2; }
  html[data-view="table"] .card__row { justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
  html[data-view="table"] .card__facts { flex-direction: column; align-items: flex-start; gap: 2px; }
  html[data-view="table"] .card__tags { display: none; }
  html[data-view="table"] .price__main b { font-size: 17px; }
  html[data-view="table"] .stepper { justify-self: end; }
  html[data-view="table"] .promo-tile { display: none; }
  html[data-view="table"] .card.is-out .card__plate img { filter: grayscale(1); opacity: .5; }
}


/* ==========================================================================
   v6: правки по взаимному разбору v5
   ========================================================================== */
/* сумма строки — отдельно от цены упаковки */
.price__line { display: block; margin-top: 3px; font: 500 11.5px/1.25 var(--f-body); color: var(--brand-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price__line b { font-weight: 800; }
.card.in-cart .price__main b { color: var(--fg); }
html[data-view="grid"] .price__line { white-space: normal; }
.sheet__price .price__line { font-size: 12px; }

/* объём при переключаемых фасовках, срок от розлива, бейдж «Промо» */
.card__vol { font: 500 11.5px/1 var(--f-body); color: var(--fg-3); white-space: nowrap; margin-left: 2px; }
.badge--promo { background: var(--brand-soft); color: var(--brand-text); border: 1px solid var(--brand-line); }
html[data-view="grid"] .badge--promo { display: none; } /* в плитке промо-плитка стоит рядом */

/* кнопка «Заказ» в шапке: всегда доступна, с числом упаковок */
.hdr__order { position: relative; }
.hdr__order svg { width: 20px; height: 20px; }
.hdr__order-n {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
  font: 800 10.5px/18px var(--f-body); text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.hdr__order.has-items { background: var(--fg); color: var(--bg); }
@media (max-width: 719px) { .hdr__theme { display: none; } } /* на телефоне тема — в меню */
.drawer__btn--theme svg { width: 18px; height: 18px; color: var(--fg-3); }

/* внешние ссылки в публичном демо */
.ext { display: inline-block; margin-left: 3px; font-style: normal; font-size: .85em; color: var(--fg-3); }

/* прошлые списки: имя, «Добавить» / «Заменить» */
.hist__form { display: flex; gap: 6px; align-items: center; }
.hist__name { flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--fg); font: 500 14px var(--f-body); outline: none; }
.hist__name:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.hist__ok { height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: 700 13px var(--f-body); }
.hist__cancel { width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg-3); color: var(--fg-2); display: grid; place-items: center; }
.hist__cancel svg { width: 16px; height: 16px; }
.hrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
.hrow__main { grid-column: 1 / -1; }
.hrow__when { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hrow__title { font: 700 13.5px var(--f-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hrow__date { font: 500 11.5px var(--f-body); color: var(--fg-3); white-space: nowrap; }
.hrow__ren { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--fg-3); display: grid; place-items: center; flex: 0 0 auto; }
.hrow__ren svg { width: 14px; height: 14px; }
.hrow__ren:hover { background: var(--bg-4); color: var(--fg); }
.hrow__acts { grid-column: 1; display: flex; gap: 6px; flex-wrap: wrap; }
.hrow__btn { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font: 700 12.5px var(--f-body); white-space: nowrap; }
.hrow__btn:hover { background: var(--brand-2); }
.hrow__btn--ghost { background: var(--bg-2); color: var(--fg); border: 1px solid var(--line-2); }
.hrow__btn--ghost:hover { background: var(--bg-4); }
.hrow__rm { grid-column: 2; grid-row: 2; }

/* похожие сорта: причина и точная фасовка у цены */
.sim__why { font: 600 10.5px/1.2 var(--f-body); color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim__why.is-alt { color: var(--fg-3); }
.sim__price small { display: block; margin-top: 1px; }

/* чипс «В заказе» в ленте */
.chip--incart { background: var(--brand-soft); border-color: var(--brand-line); color: var(--fg); }
.chip--incart.is-on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
