/* icubestore — компьютерная техника, светлая синяя тема (импорт из Claude Design
   icubestore.ru.corp.dc.html). Светлый холодный фон, тёмно-синий ink, синий акцент --ac,
   navy-градиент для тёмных панелей (хедер-полоса/футер/B2B), Geologica (заголовки/лого),
   Golos Text (body/UI), Unbounded (цены/крупные суммы). Шрифты подключены <link> в base.html:
   https://fonts.googleapis.com/css2?family=Geologica:wght@500;600;700;800&family=Golos+Text:wght@400;500;600;700;800;900&family=Unbounded:wght@600;700;800&display=swap
   Task 2 (Ф2a) — токены + каркас (хедер/футер/кнопки/бейджи/USP). Task 3 — base.html+мега-меню
   (механика <details>/:has() частично здесь, частично Jinja-генерируемая в base.html — см.
   комментарий у .mega-col--sub). Task 4 — карточка товара (.pcard-*) + перенос точечных
   supplement-правил из base.html (иконки/sticky-footer/поиск/футер-ссылки). Главная —Task 5. */

:root {
  /* ── Палитра — verbatim из прототипа ── */
  --ac: #1E4470;
  --ac-dk: #16314F;
  --ac-tint: #eaeff5;
  --ac-soft: #8aa3c0;
  --ac-sh: rgba(30, 68, 112, .45);
  --ac2: #2B3A52;              /* 2-й акцент: бейджи скидок, избранное/favorite-акцент */

  --bg: #eef1f5;                /* фон страницы */
  --paper: #ffffff;             /* карточки, хедер, footer-cell */

  --navy-1: #0b1220;            /* ink / тёмные панели (utility-бар, footer, hero-тёмные блоки) */
  --navy-2: #16314F;
  --navy-line: #1c2433;         /* разделитель внутри тёмных панелей (footer bottom-bar) */
  --navy-grad: linear-gradient(115deg, var(--navy-1) 0%, var(--navy-2) 100%);

  --ink: #0b1220;
  --ink-2: #3a4254;             /* навстрока-ссылки, mega L1-пункты */
  --ink-3: #46505f;             /* mega L2+ пункты (неактивные) */
  --muted: #5b6478;
  --muted-2: #5f6b7a;             /* вторичный текст на светлом — WCAG AA (5.4:1 на белом) */
  --muted-3: #b6bdcb;
  --on-dark: #aeb6c6;           /* текст на navy (utility-бар, футер) */

  --line: #e7ebf3;
  --line-2: #eef1f7;
  --line-3: #f1f3f8;
  --surface-soft: #f3f5fa;      /* поиск, hover-фон иконок хедера */
  --line-hover: #dbe1ec;
  --mega-root-bg: #f7f9fc;      /* фон 1-й (корневой) колонки Miller-мега-меню */

  --ok: #16B364;
  --ok-bg: #e8fff3;
  --warn: #E08400;
  --warn-bg: #fff4e5;
  --star: #FFB400;

  --font-display: 'Geologica', system-ui, sans-serif;   /* заголовки, лого, крупные метки */
  --font-body: 'Golos Text', system-ui, sans-serif;      /* body/UI/кнопки/инпуты — базовый */
  --font-price: 'Unbounded', system-ui, sans-serif;      /* .price/суммы/крупные числа */

  /* ── Радиусы (заведены из литералов прототипа) ── */
  --r-xs: 6px;    /* мелкие тэги/чипы (features-tag на hero) */
  --r-sm: 8px;    /* бейджи скидок, мелкие иконки-кнопки */
  --r-md: 9px;    /* базовый UI-радиус: кнопки, инпуты, мега-пункты, картинка товара */
  --r-lg: 10px;   /* карточки: USP-тайл, товар, бренд, тост, fav-кнопка */
  --r-xl: 12px;   /* крупные изображения/hero-баннер/модалки/add-to-cart в карточке */
  --r-2xl: 14px;  /* тёмные банеры (B2B-полоса, product-hero) */
  --r-mega: 22px; /* мега-панель каталога: нижние углы (panelStyle прототипа) */
  --r-cta: 15px;  /* крупные CTA-кнопки (height ≥52px) */

  /* ── Тени ── */
  --sh-hairline: 0 1px 0 var(--line);                        /* липкий хедер */
  --sh-1: 0 10px 30px -18px rgba(11, 18, 32, .18);            /* лёгкий hover-лифт */
  --sh-2: 0 14px 30px -14px rgba(11, 18, 32, .2);             /* карточка/тайл — средний hover */
  --sh-3: 0 16px 34px -14px rgba(11, 18, 32, .2);             /* карточка товара — hover (базовый) */
  --sh-4: 0 18px 38px -16px rgba(11, 18, 32, .22);            /* крупная featured-карточка hover */
  --sh-toast: 0 24px 60px -16px rgba(11, 18, 32, .32);
  --sh-modal: 0 30px 70px -20px rgba(11, 18, 32, .5);
  --sh-cta: 0 12px 26px -8px var(--ac-sh);                    /* glow крупных CTA-кнопок */
  --sh-mega: 0 24px 40px -20px rgba(11, 18, 32, .28);         /* панель мега-меню */

  /* ── Spacing-шкала ── */
  --s-1: 6px;
  --s-2: 8px;
  --s-3: 10px;
  --s-4: 12px;
  --s-5: 14px;
  --s-6: 16px;
  --s-7: 20px;
  --s-8: 24px;
  --s-9: 28px;
  --s-10: 32px;
  --s-11: 48px;
  --s-12: 56px;  /* нижний паддинг главного контента (main) */

  /* ── Font-size-шкала ── */
  --fs-3xs: 11px;    /* счётчики бейджей (корзина/избранное) */
  --fs-2xs: 11.5px;  /* подписи под иконками хедера, мелкий текст футера */
  --fs-xs: 12px;     /* бейдж скидки, счётчик в мега-меню, копирайт-строка */
  --fs-sm: 12.5px;   /* utility-бар, футер-параграф-мелкий */
  --fs-base: 13px;   /* базовый мелкий текст */
  --fs-md: 13.5px;   /* футер-ссылки, ссылки utility-бара */
  --fs-lg: 14px;     /* навстрока, мега-пункты, текст в кнопках/карточке */
  --fs-xl: 14.5px;   /* вторичные кнопки, mega-mob «все товары» */
  --fs-2xl: 15px;     /* поиск, кнопка «Каталог», mega-mob пункт */
  --fs-3xl: 16px;    /* крупная CTA-кнопка */
  --fs-4xl: 17px;    /* заголовок мега-меню (мобильный drill-down) */
  --fs-5xl: 19px;    /* .price в карточке товара (Unbounded) */
  --fs-6xl: 20px;    /* крупные суммы (Unbounded, телефон в футере) */
  --fs-7xl: 21px;    /* крупные суммы (страница бренда) */
  --fs-8xl: 23px;    /* лого в футере (Geologica) */
  --fs-9xl: 27px;    /* лого в хедере (Geologica) */
  --fs-hero: 44px;   /* H1 hero-баннера главной (Geologica) */
  --fs-b2b: 31px;    /* H2 B2B-полосы главной (Geologica) */
  --fs-section: 26px; /* заголовки секций главной: категории/популярное/бренды/блог (Geologica) */

  --wrap: 1280px;
  --wrap-pad: 28px;
  --wrap-pad-sm: 18px;
  --dur: .14s;
  --dur-slow: .25s;
  --ease: cubic-bezier(.2, .9, .3, 1);

  --z-header: 50;
  --z-overlay: 40;
  --z-mega: 60;
  --z-toast: 120;
  --z-modal: 80;
}

/* ── Reset ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
body {
  margin: 0;
  display: flex;                 /* sticky-footer: .foot{margin-top:auto} требует flex-колонку */
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
input, textarea, button, select { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
::selection { background: var(--ac); color: #fff; }
.hide { display: none !important; } /* переключение видимости без add/remove узла — цель нужна oob-swap'у (#fav-count) */

/* ===================== ГЛАВНЫЙ КОНТЕНТ (main) ===================== */
.main { padding: var(--wrap-pad) 0 var(--s-12); } /* .wrap внутри — единая обёртка контента страницы (как в прототипе) */

/* ── Иконки (Phosphor через _icons.html) — размеры, сама заливка/цвет — по месту использования ── */
.ic { width: 20px; height: 20px; display: inline-block; vertical-align: -4px; flex: none; }
.ic-sm { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.ic-xs { width: 13px; height: 13px; vertical-align: -2px; flex: none; }
.ic-lg { width: 28px; height: 28px; vertical-align: -6px; flex: none; }  /* иконка в cat-tile (главная) */

/* ── Типографика ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.4px;
  margin: 0;
  color: var(--ink);
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--wrap-pad); }
.muted { color: var(--muted); }
.price, .sum {
  font-family: var(--font-price);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.price-old {
  font-family: var(--font-price);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted-3);
  text-decoration: line-through;
}

/* ── Утилиты: скроллбар / скелетон / зум-картинка / бейдж-пульс (из прототипа) ── */
.scrl::-webkit-scrollbar { height: 8px; }
.scrl::-webkit-scrollbar-thumb { background: var(--line-hover); border-radius: var(--r-sm); }

@keyframes toastIn { 0% { opacity: 0; transform: translateY(16px) scale(.96); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }
@keyframes badgePop { 0% { transform: scale(1); } 35% { transform: scale(1.5); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes shimmer { 0% { background-position: -460px 0; } 100% { background-position: 460px 0; } }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.skel {
  background: var(--line-2);
  background-image: linear-gradient(90deg, var(--line-2) 0px, #f6f8fc 180px, var(--line-2) 360px);
  background-size: 920px 100%;
  animation: shimmer 1.15s linear infinite;
  border-radius: var(--r-lg);
}
.pulse-badge { animation: badgePop .5s ease; }

.gz { overflow: hidden; }
.gz .gz-in { width: 100%; height: 100%; position: relative; }
.gz img, .gz .gz-in { transition: transform .25s ease; }
.gz:hover .gz-in { transform: scale(1.32); }

/* ===================== UTILITY-БАР (тёмная строка над хедером) ===================== */
.util-bar { background: var(--navy-1); color: var(--on-dark); font-size: var(--fs-base); }
.util-in { display: flex; align-items: center; gap: var(--s-8); height: 38px; }
.util-city { display: flex; align-items: center; gap: var(--s-1); color: #fff; font-weight: 500; white-space: nowrap; }
.r-hdrlink { cursor: pointer; white-space: nowrap; }
.r-hdrlink:hover { color: #fff; }
.util-r { margin-left: auto; display: flex; align-items: center; gap: var(--s-6); }
.util-r a { display: flex; align-items: center; gap: var(--s-1); color: var(--on-dark); text-decoration: none; white-space: nowrap; }
.util-r a:hover { color: #fff; }
.util-phone { color: #fff; font-weight: 600; white-space: nowrap; }
.util-auth { cursor: pointer; color: #fff; font-weight: 600; white-space: nowrap; }

/* ===================== ХЕДЕР (белая основная строка) ===================== */
.hdr { position: sticky; top: 0; z-index: var(--z-header); background: var(--paper); box-shadow: var(--sh-hairline); }
.hdr-row { display: flex; align-items: center; gap: var(--s-8); padding-top: var(--s-6); padding-bottom: var(--s-6); }

.hdr-logo { display: flex; align-items: center; cursor: pointer; flex: none; font-family: var(--font-display);
  font-weight: 800; font-size: var(--fs-9xl); letter-spacing: -1.4px; line-height: 1; color: var(--ink); }
.hdr-logo .accent { color: var(--ac); }

.hdr-cat-btn { flex: none; display: flex; align-items: center; gap: 9px; height: 50px; padding: 0 var(--s-7);
  border: none; background: var(--ac); color: #fff; font-weight: 700; font-size: var(--fs-2xl); border-radius: var(--r-md);
  cursor: pointer; font-family: var(--font-body); }
.hdr-cat-btn:hover { background: var(--ac-dk); }
.hdr-cat-btn .chev { display: flex; transition: transform var(--dur-slow) ease; }
.hdr-cat-btn.is-open .chev { transform: rotate(180deg); }
/* .r-catlabel — подпись в кнопке «Каталог», скрывается на ≤520 (media-блок ниже) */

.hdr-search { flex: 1; display: flex; align-items: center; gap: var(--s-4); height: 50px; background: var(--surface-soft);
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s-6); color: var(--muted-2); cursor: text;
  font-size: var(--fs-2xl); }
/* .hdr-search в прототипе — decorative div; у нас настоящая <form>/<input> — сбрасываем нативный вид */
.hdr-search input { flex: 1; min-width: 0; border: none; background: none; outline: none; font: inherit; color: var(--ink); }

.hdr-actions { flex: none; display: flex; align-items: center; gap: var(--s-1); }
.hdr-icon-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px;
  border: none; background: none; cursor: pointer; color: var(--muted); padding: var(--s-2) 0; border-radius: var(--r-sm); }
.hdr-icon-btn:hover { background: var(--surface-soft); }
.hdr-icon-btn.cart { width: 78px; color: var(--ink); }
.hdr-icon-btn.cart .ic { color: var(--ac); }
.hdr-icon-label { font-size: var(--fs-2xs); font-weight: 600; }
.hdr-icon-btn.cart .hdr-icon-label { font-weight: 700; }

.hdr-badge { position: absolute; min-width: 17px; height: 17px; padding: 0 4px; background: var(--ac2); color: #fff;
  border-radius: var(--r-md); font-size: var(--fs-3xs); font-weight: 700; display: flex; align-items: center;
  justify-content: center; border: 2px solid var(--paper); }
.hdr-badge--fav { top: 2px; right: 8px; }
.hdr-badge--cart { top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; }

/* ===================== КАТЕГОРИЙНАЯ НАВСТРОКА ===================== */
.catbar { border-top: 1px solid var(--line-3); }
/* Реальных категорий больше, чем в прототипе (~17 vs 7) — навстрока не помещается
   по ширине даже на десктопе, поэтому overflow-x:auto нужен всегда (в прототипе
   было только на ≤860px, т.к. там категорий было мало). */
.r-navrow { display: flex; align-items: center; gap: var(--s-8); height: 46px; font-size: var(--fs-lg); font-weight: 600; overflow-x: auto; scrollbar-width: thin; }
.catbar-link { color: var(--ink-2); cursor: pointer; white-space: nowrap; flex: none; }
.catbar-link:hover { color: var(--ac); }
.catbar-sale { margin-left: auto; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: var(--s-1); white-space: nowrap; flex: none; }

/* ===================== МЕГА-МЕНЮ КАТАЛОГА (Miller columns + мобильный drill-down) ===================== */
/* открытие «Каталог» → мега-панель через <details>/<summary> (без JS, как rackcore .catmega) */
details.hdr-cat { flex: none; }
details.hdr-cat > summary { list-style: none; cursor: pointer; }
details.hdr-cat > summary::-webkit-details-marker { display: none; }
details.hdr-cat[open] > summary.hdr-cat-btn { background: var(--ac-dk); }
details.hdr-cat[open] > summary.hdr-cat-btn .chev { transform: rotate(180deg); }
details.hdr-cat[open] .mega-panel { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mega-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: var(--z-mega); background: var(--paper);
  border-top: 1px solid var(--line-3); border-radius: 0 0 var(--r-mega) var(--r-mega); box-shadow: var(--sh-mega);
  overflow: hidden; opacity: 0; transform: translateY(-12px); pointer-events: none;
  transition: opacity var(--dur-slow) ease, transform var(--dur-slow) ease; }
.mega-panel.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* Desktop: каскадные колонки (одна колонка на уровень вложенности) */
.mega-desk { display: flex; min-height: 392px; max-height: 560px; overflow-x: auto; overflow-y: hidden; }
.mega-col { width: 262px; flex: none; padding: var(--s-5); display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto; border-right: 1px solid var(--line-3); background: var(--paper); }
.mega-col--root { background: var(--mega-root-bg); }

.mega-item { display: flex; align-items: center; gap: var(--s-3); padding: 11px 13px; border-radius: var(--r-md);
  cursor: pointer; background: transparent; color: var(--ink-3); font-weight: 500; transition: background .12s ease; }
.mega-item:hover { background: var(--ac-tint); }
.mega-item--l1 { color: var(--ink-2); font-weight: 700; }
.mega-item.is-active { background: var(--ac-tint); color: var(--ac); font-weight: 700; }
.mega-item-icon { display: flex; flex: none; }
.mega-item-name { font-size: var(--fs-lg); flex: 1; line-height: 1.25; }
.mega-item-count { font-size: var(--fs-2xs); color: var(--muted-3); font-weight: 500; flex: none; }
.mega-item-arrow { display: flex; color: var(--muted-3); flex: none; }
.mega-item.is-active .mega-item-arrow { color: var(--ac); }

/* Переключение колонок — класс .on, управляется JS (см. base.html «мега-меню»). Раньше был
   CSS :has(:hover)-каскад, но он схлопывал колонку домена, как только мышь съезжала с домена
   на его подкатегории (до не-первого домена было не добраться). JS фиксирует активную колонку
   классом .on — держится независимо от позиции мыши. Дефолт (домен 0) выставлен в разметке. */
.mega-col--sub, .mega-col--items { display: none; }
.mega-col--sub.on, .mega-col--items.on { display: flex; }

/* Mobile: единая колонка с drill-down (переключение через media 860 ниже) */
.mega-mob { display: none; flex-direction: column; max-height: 78vh; overflow-y: auto; }
.mega-mob-head { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--line-3); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.mega-mob-back { width: 34px; height: 34px; flex: none; border: 1.5px solid var(--line); background: var(--paper);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--ink); transform: rotate(180deg); }
.mega-mob-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-4xl); flex: 1; }
.mega-mob-cur { display: flex; align-items: center; gap: var(--s-1); padding: var(--s-5) var(--s-6); color: var(--ac);
  font-weight: 700; font-size: var(--fs-xl); cursor: pointer; border-bottom: 1px solid var(--line-2); }
.mega-mob-list { display: flex; flex-direction: column; padding: var(--s-2) var(--s-3); }
.mega-mob-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-5) var(--s-4); border-radius: var(--r-md);
  cursor: pointer; color: var(--ink); font-weight: 600; }
.mega-mob-item:hover { background: var(--ac-tint); }
.mega-mob-item-name { font-size: var(--fs-2xl); flex: 1; line-height: 1.25; }
.mega-mob-item-count { font-size: var(--fs-xs); color: var(--muted-3); font-weight: 500; flex: none; }
.mega-mob-item-arrow { display: flex; color: var(--line-hover); flex: none; }
/* мобильный drill-down — аккордеон на вложенных <details>/<summary> (без JS) */
details.mega-mob-lvl > summary { list-style: none; cursor: pointer; }
details.mega-mob-lvl > summary::-webkit-details-marker { display: none; }
details.mega-mob-lvl[open] > summary .mega-mob-item-arrow { transform: rotate(180deg); }

/* ===================== КНОПКИ ===================== */
/* Крупная CTA (заливка --ac + glow тени var(--ac-sh)) */
.btn {
  height: 52px; padding: 0 var(--s-8); border: none; border-radius: var(--r-cta); background: var(--ac); color: #fff;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-3xl); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  box-shadow: var(--sh-cta); transition: background var(--dur) ease, transform var(--dur) ease;
}
.btn:hover { background: var(--ac-dk); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-lg { height: 56px; }
.btn-block { width: 100%; }

/* Вторичная (контурная белая) */
.btn-secondary {
  height: 52px; padding: 0 var(--s-8); border: 1.5px solid var(--line); border-radius: var(--r-cta); background: var(--paper);
  color: var(--ink); font-family: var(--font-body); font-weight: 700; font-size: var(--fs-2xl); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  transition: border-color var(--dur) ease, color var(--dur) ease;
}
.btn-secondary:hover { border-color: var(--ac); color: var(--ac); }

/* Тинт-кнопка (маленькая «В корзину» на карточке товара) */
.btn-tint {
  width: 100%; border: none; background: var(--ac-tint); color: var(--ac); font-weight: 700; font-size: var(--fs-lg);
  height: 44px; border-radius: var(--r-xl); cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: var(--s-1); font-family: var(--font-body); transition: background var(--dur) ease, color var(--dur) ease;
}
.btn-tint:hover { background: var(--ac); color: #fff; }

/* ===================== БЕЙДЖИ ===================== */
.badge-discount {
  position: absolute; top: 9px; left: 9px; background: var(--ac2); color: #fff; font-size: var(--fs-xs); font-weight: 700;
  padding: 3px var(--s-2); border-radius: var(--r-sm);
}
.badge-ok { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-sm); font-weight: 700; color: var(--ok);
  background: var(--ok-bg); padding: 4px var(--s-3); border-radius: var(--r-sm); }
.badge-warn { display: inline-flex; align-items: center; gap: var(--s-1); font-size: var(--fs-sm); font-weight: 700; color: var(--warn);
  background: var(--warn-bg); padding: 4px var(--s-3); border-radius: var(--r-sm); }

/* ===================== USP-ТАЙЛЫ (features grid) ===================== */
.r-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.usp-tile { display: flex; align-items: center; gap: var(--s-4); background: var(--paper); border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-7); }
.usp-icon { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--ac-tint); color: var(--ac);
  display: flex; align-items: center; justify-content: center; flex: none; }
.usp-title { font-weight: 700; font-size: var(--fs-xl); }
.usp-sub { font-size: var(--fs-base); color: var(--muted-2); }

/* ===================== КАРТОЧКА ТОВАРА (мини-карточка листинга, Task 4) ===================== */
.pcard {
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-5);
  cursor: pointer; min-width: 0; display: flex; flex-direction: column; transition: transform var(--dur-slow) ease,
  box-shadow var(--dur-slow) ease, border-color var(--dur-slow) ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line-hover); }
.pcard-img { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: var(--ac-tint); color: var(--ac); }
.pcard-img:has(img) { background: #fff; }  /* фото — на белой подложке (тинт только для плейсхолдера) */
.pcard-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pcard-noimg { width: 40%; height: 40%; opacity: .5; } /* плейсхолдер без фото — иконка, не текст */
.pcard-fav { position: absolute; top: 7px; right: 7px; width: 40px; height: 40px; border: none;
  background: rgba(255, 255, 255, .85); border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center;
  color: #9aa3b5; cursor: pointer; }
.pcard-fav:hover { color: var(--ac2); }
.pcard-fav.on { color: var(--ac2); } /* товар уже в подборке — сердце-fill остаётся акцентным без hover */
.pcard-name { font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; margin-top: var(--s-4); min-height: 36px;
  min-width: 0; overflow-wrap: anywhere; }  /* длинные названия/mpn переносятся, не распирают карточку на узких экранах */
.pcard-price-row { display: flex; align-items: baseline; gap: var(--s-3); margin-top: var(--s-3); }
.pcard-price-row .price { font-size: var(--fs-5xl); }
.pcard-price-row .price-old { font-size: var(--fs-base); }
/* .pcard-add — обёртка отступа; сама кнопка использует .btn-tint из блока «Кнопки» */
.pcard-add { margin-top: var(--s-5); }

/* ===================== ГЛАВНАЯ — ОБЩИЕ ЭЛЕМЕНТЫ СЕКЦИЙ (Task 5) ===================== */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-3); margin: var(--s-11) 0 var(--s-7); }
.sec-title { font-size: var(--fs-section); letter-spacing: -.6px; }
.sec-title-ic { display: flex; align-items: center; gap: var(--s-3); }
.sec-title-ic .ic-sm { color: var(--ac); }
.sec-link { font-size: var(--fs-2xl); font-weight: 600; color: var(--ac); white-space: nowrap; }
.sec-link:hover { color: var(--ac-dk); }

/* ===================== ГЛАВНАЯ — HERO ===================== */
.hero-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s-6); }

.hero-banner { position: relative; border-radius: var(--r-xl); overflow: hidden; min-height: 300px;
  background: var(--navy-grad); color: #fff; }
.hero-banner-fade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8, 14, 26, .94) 0%, rgba(8, 14, 26, .74) 48%, rgba(8, 14, 26, .3) 100%); }
.hero-banner-body { position: relative; padding: var(--s-9) var(--s-9); min-height: 300px;
  display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: var(--s-1); background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18); padding: 6px 13px; border-radius: var(--r-xs); font-size: var(--fs-xs);
  font-weight: 700; letter-spacing: .05em; text-transform: uppercase; width: max-content; color: #dbe3ee; }
.hero-h1 { font-size: var(--fs-hero); line-height: 1.03; margin-top: var(--s-6); max-width: 460px;
  letter-spacing: -1.5px; color: #fff; }
.hero-sub { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-lg); color: #c7d0dd;
  margin-top: var(--s-5); max-width: 400px; line-height: 1.5; }
.hero-chips { display: flex; gap: var(--s-2); margin-top: var(--s-7); flex-wrap: wrap; }
.hero-chip { font-size: var(--fs-sm); font-weight: 600; color: #dbe3ee; background: rgba(255, 255, 255, .1);
  padding: 7px 13px; border-radius: var(--r-xs); }
.hero-cta-row { display: flex; align-items: center; gap: var(--s-7); margin-top: var(--s-8); flex-wrap: wrap; }
.hero-price { font-size: var(--fs-sm); color: var(--ac-soft); }
.hero-price span { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-3xl); color: #fff; }

.hero-promo { display: flex; flex-direction: column; gap: var(--s-6); }
.promo-card { flex: 1; border-radius: var(--r-xl); padding: var(--s-8); position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; transition: transform var(--dur-slow) ease; }
.promo-card:hover { transform: translateY(-3px); }
.promo-card--dark { background: var(--navy-1); color: #fff; }
.promo-card--light { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); }
.promo-title { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.1; max-width: 210px; }
.promo-sub { font-size: var(--fs-lg); color: var(--muted-2); margin-top: var(--s-2); }
.promo-card--dark .promo-sub { color: #aeb6c6; }
.promo-link { margin-top: var(--s-5); font-size: var(--fs-lg); font-weight: 700; color: var(--ac); }
.promo-card--dark .promo-link { color: var(--ac-soft); }
/* В прототипе тут кастомная line-art иллюстрация сборки ПК (недоступна нам как ассет) —
   вместо неё Phosphor-плейсхолдер (CLAUDE.md п.9), но крупнее/контрастнее прежнего варианта:
   на rgba(124,155,255,.22) при 96px иконка читалась как «пустой прямоугольник» на тёмной
   карточке — почти неразличима на пиксель-сверке с эталоном. */
.promo-deco { position: absolute; right: 4px; bottom: 0; color: var(--ac-soft); opacity: .55; pointer-events: none; }
.promo-deco-ic { width: 128px; height: 128px; }

/* Кнопки на navy-панелях (hero-баннер, B2B-полоса) — обычный .btn/.btn-secondary тут не подходят
   (тёмный фон), прототип везде на navy использует белую кнопку + прозрачную ghost-кнопку. */
.btn-light { height: 52px; padding: 0 var(--s-8); border: none; border-radius: var(--r-cta); background: #fff;
  color: var(--navy-2); font-family: var(--font-body); font-weight: 700; font-size: var(--fs-3xl); cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  transition: transform var(--dur) ease; }
.btn-light:hover { transform: translateY(-2px); }
.btn-ghost-dark { height: 52px; padding: 0 var(--s-7); border: 1.5px solid rgba(255, 255, 255, .28);
  border-radius: var(--r-cta); background: transparent; color: #fff; font-family: var(--font-body); font-weight: 700;
  font-size: var(--fs-2xl); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  justify-content: center; gap: var(--s-2); transition: border-color var(--dur) ease, background var(--dur) ease; }
.btn-ghost-dark:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06); }

/* ===================== ГЛАВНАЯ — 4 USP-ТАЙЛА ===================== */
.usp-row { margin-top: var(--s-6); } /* .r-grid4/.usp-tile/.usp-icon — общие классы каркаса (Task 2) */

/* ===================== ГЛАВНАЯ — ПОПУЛЯРНЫЕ КАТЕГОРИИ ===================== */
.cats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.cat-tile { display: flex; align-items: center; gap: var(--s-6); background: var(--paper); border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-8); border: 1.5px solid transparent;
  transition: transform var(--dur-slow) ease, box-shadow var(--dur-slow) ease, border-color var(--dur-slow) ease; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line); }
.cat-tile-ic { width: 62px; height: 62px; border-radius: var(--r-lg); display: flex; align-items: center;
  justify-content: center; flex: none; background: var(--ac-tint); color: var(--ac); }
.cat-tile-name { font-weight: 700; font-size: var(--fs-2xl); }

/* ===================== ГЛАВНАЯ — ПОПУЛЯРНОЕ (featured) ===================== */
.hits-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s-6); }

/* ===================== ГЛАВНАЯ — БРЕНДЫ ===================== */
.brands-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-5); }
.brand-tile { height: 84px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 var(--s-3);
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-7xl); letter-spacing: -.5px; color: var(--ink-2);
  transition: transform var(--dur) ease, box-shadow var(--dur) ease, border-color var(--dur) ease; }
.brand-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-hover); }

/* ===================== ГЛАВНАЯ — БЛОГ И ГАЙДЫ ===================== */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-7); }
.blog-tile { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--dur-slow) ease, box-shadow var(--dur-slow) ease, border-color var(--dur-slow) ease; }
.blog-tile:hover { transform: translateY(-4px); box-shadow: var(--sh-4); border-color: var(--line-hover); }
.blog-tile-cover { height: 148px; position: relative; background: var(--ac-tint); color: var(--ac);
  display: flex; align-items: center; justify-content: center; }
.blog-tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.blog-tile-ic { width: 34px; height: 34px; opacity: .6; }
.blog-tile-cat { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, .92); color: var(--ac);
  font-size: var(--fs-xs); font-weight: 700; padding: 5px 11px; border-radius: var(--r-sm); }
.blog-tile-body { padding: var(--s-6) var(--s-6) var(--s-7); display: flex; flex-direction: column; flex: 1; }
.blog-tile-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-4xl); letter-spacing: -.3px;
  line-height: 1.3; }
.blog-tile-excerpt { font-size: var(--fs-md); color: var(--muted); line-height: 1.55; margin-top: var(--s-3); flex: 1; }
.blog-tile-meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-2xs); color: var(--muted-2);
  margin-top: var(--s-5); }

/* ===================== ГЛАВНАЯ — B2B-ПОЛОСА ===================== */
.b2b-band { margin-top: var(--s-11); border-radius: var(--r-2xl); overflow: hidden; background: var(--navy-grad);
  color: #fff; display: grid; grid-template-columns: 1.25fr 1fr; }
.b2b-band-main { padding: var(--s-9); }
.b2b-band-eyebrow { display: inline-flex; align-items: center; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16); padding: 6px 13px; border-radius: var(--r-xs); font-size: var(--fs-sm);
  font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #cdd6e4; }
.b2b-band-h2 { font-size: var(--fs-b2b); line-height: 1.1; letter-spacing: -.8px; margin-top: var(--s-6);
  max-width: 460px; color: #fff; }
.b2b-band-sub { font-size: var(--fs-2xl); color: #aeb6c6; line-height: 1.6; margin-top: var(--s-4); max-width: 440px; }
.b2b-band-cta { display: flex; gap: var(--s-4); margin-top: var(--s-8); flex-wrap: wrap; }
.b2b-band-metrics { padding: var(--s-9); border-left: 1px solid rgba(255, 255, 255, .08); display: grid;
  grid-template-columns: 1fr 1fr; gap: var(--s-7) var(--s-8); align-content: center; }
.b2b-metric-v { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-7xl); color: #fff; }
/* на navy-band — светлый вариант (тёмный --muted-2 для светлого фона тут дал бы низкий контраст) */
.b2b-metric-l { font-size: var(--fs-sm); color: var(--on-dark); margin-top: 5px; line-height: 1.4; }

/* ===================== ФУТЕР (тёмный, 4 колонки) ===================== */
.foot { background: var(--navy-1); color: var(--on-dark); margin-top: auto; }
.r-foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-10);
  padding: var(--s-11) var(--wrap-pad) var(--s-10); }

.foot-logo { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-8xl); letter-spacing: -1.2px;
  color: #fff; line-height: 1; margin-bottom: var(--s-6); }
.foot-logo .accent { color: var(--ac-soft); }
.foot-desc { font-size: var(--fs-md); line-height: 1.6; max-width: 300px; margin: 0 0 var(--s-6); }
.foot-phone { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-6xl); color: #fff; }
.foot-hours { font-size: var(--fs-base); margin-top: 4px; }
.foot-social { display: flex; align-items: center; gap: var(--s-6); margin-top: var(--s-6); font-size: var(--fs-md); }
.foot-social a { display: flex; align-items: center; gap: var(--s-1); color: var(--on-dark); text-decoration: none; }
.foot-social a:hover { color: #fff; }
.foot-email { display: flex; align-items: center; gap: 7px; margin-top: var(--s-4); font-size: var(--fs-md);
  color: var(--on-dark); text-decoration: none; }
.foot-email:hover { color: #fff; }

.foot-col-h { color: #fff; font-weight: 700; font-size: var(--fs-2xl); margin-bottom: var(--s-5); }
.foot-links { display: flex; flex-direction: column; gap: var(--s-3); font-size: var(--fs-md); }
/* прототип рассчитан на mock <span onClick>; у нас настоящие <a> (лучше для SEO/доступности) */
.foot-links a { color: inherit; }
.foot-links a:hover { color: #fff; }

.foot-bottom { border-top: 1px solid var(--navy-line); }
.foot-bottom-row { display: flex; align-items: center; justify-content: space-between; padding: var(--s-6) var(--wrap-pad);
  font-size: var(--fs-sm); gap: var(--s-4); flex-wrap: wrap; }
.foot-bottom-pay { display: flex; align-items: center; gap: var(--s-2); color: #93a0b8; }  /* a11y: было var(--muted) #5b6478 (3.15:1 на тёмном футере) → 4.5:1 */

/* ===================== КАТАЛОГ (Ф2b Task 1) — крошки/шапка-раздела/сайдбар-фильтры/грид/SEO =====================
   ctx — те же ключи rackcore/catalog.html (products/total/page/has_next/cat_tree/brands/spec_facets/
   f_*): без новых бэкенд-ключей. Слайдер цены — реальный двойной range (0–500000 ₽, практичная
   дефолтная шкала показа, НЕ факт. максимум по каталогу — такого facet'а нет), заливка — от
   РЕАЛЬНЫХ текущих f_price_min/f_price_max; значения вне шкалы всё равно фильтруют через числовые
   поля (submit по кнопке «Применить», без auto-submit слайдера). */
.cat-crumbs { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-md); color: var(--muted-2);
  margin-bottom: var(--s-6); flex-wrap: wrap; }
.cat-crumbs a { color: var(--muted-2); }
.cat-crumbs a:hover { color: var(--ac); }
.cat-crumbs-sep { color: var(--muted-3); }
.cat-crumbs-cur { color: var(--ink); font-weight: 600; }

.cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--s-8); flex-wrap: wrap; }
.cat-head-l { display: flex; align-items: baseline; gap: var(--s-4); flex-wrap: wrap; }
.cat-title { font-size: 30px; letter-spacing: -.8px; }
.cat-count { font-size: var(--fs-2xl); color: var(--muted-2); }

.cat-sort { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.cat-sort-pill { display: flex; align-items: center; height: 44px; padding: 0 var(--s-6); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--r-md); font-size: var(--fs-lg); font-weight: 600;
  color: var(--ink-2); white-space: nowrap; transition: border-color var(--dur) ease, color var(--dur) ease; }
.cat-sort-pill:hover { border-color: var(--ac); color: var(--ac); }
.cat-sort-pill.on { background: var(--navy-1); border-color: var(--navy-1); color: #fff; }

.cat-layout { display: grid; grid-template-columns: 268px 1fr; gap: var(--s-8); align-items: start; }

.cat-side { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: var(--s-7);
  position: sticky; top: 170px; }
.cat-side-h { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: var(--fs-2xl);
  margin-bottom: var(--s-6); }
.cat-side-h .ic-sm { color: var(--ac); }
.cat-reset { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ac); }
.cat-reset:hover { color: var(--ac-dk); }

.cat-side-group { padding: var(--s-6) 0; border-top: 1px solid var(--line-3); }
.cat-side-group:first-of-type { padding-top: 0; border-top: none; }
.cat-side-sub { font-weight: 700; font-size: var(--fs-2xl); margin-bottom: var(--s-4); }

/* дерево категорий: depth0 — доменная иконка+bold (как «Разделы» в мока), depth>0 — точка+отступ
   («Категории»); один и тот же плоский cat_tree (ctx), группировка визуальная, не структурная. */
.cat-tnode { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2); border-radius: var(--r-sm);
  cursor: pointer; font-size: var(--fs-md); color: var(--ink-3); transition: background var(--dur) ease, color var(--dur) ease; }
.cat-tnode:hover { background: var(--ac-tint); }
.cat-tnode .ct-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-3); flex: none; }
.cat-tnode .ct-name { flex: 1; min-width: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-tnode .ct-cnt { font-size: var(--fs-2xs); color: var(--muted-3); font-weight: 500; flex: none; }
.cat-tnode .ct-caret { display: flex; color: var(--muted-3); flex: none; transition: transform var(--dur) ease; }
.cat-tnode .ct-caret.open { transform: rotate(90deg); }
.cat-tnode.d0 { font-weight: 700; color: var(--ink-2); font-size: var(--fs-lg); padding: var(--s-3); }
.cat-tnode.d0 .ic-sm { color: var(--ac); }
.cat-tnode.d1 { padding-left: var(--s-6); }
.cat-tnode.d2 { padding-left: var(--s-9); font-size: var(--fs-base); }
.cat-tnode.on { background: var(--ac-tint); color: var(--ac); }
.cat-tnode.on .ct-dot { background: var(--ac); }
.cat-tnode.on .ct-caret { color: var(--ac); }

/* чекбокс-фильтры (бренды/icecat-характеристики) — заливка/галочка по .on, состояние в URL (без JS) */
.cat-check { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; cursor: pointer; }
.cat-check-box { width: 20px; height: 20px; flex: none; border-radius: var(--r-xs); border: 2px solid var(--line-hover);
  background: var(--paper); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
  font-weight: 700; transition: background var(--dur) ease, border-color var(--dur) ease; }
.cat-check-name { flex: 1; min-width: 0; font-size: var(--fs-lg); color: var(--ink-2); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.cat-check-cnt { font-size: var(--fs-base); color: var(--muted-3); flex: none; }
.cat-check:hover .cat-check-box { border-color: var(--ac); }
.cat-check:hover .cat-check-name { color: var(--ink); }
.cat-check.on .cat-check-box { background: var(--ac); border-color: var(--ac); }
.cat-check.on .cat-check-name { color: var(--ink); font-weight: 600; }

/* цена: числовые поля — реальный источник фильтра; range-слайдер поверх — визуальный шорткат,
   пишет только в значение числового поля-соседа (oninput), submit — по «Применить» */
.cat-price-row { display: flex; gap: var(--s-3); }
.cat-price-input { flex: 1; min-width: 0; height: 42px; padding: 0 var(--s-4); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); font-size: var(--fs-lg); color: var(--ink); background: var(--paper); }
.cat-price-slider { position: relative; height: 20px; margin: var(--s-6) 0 var(--s-2); }
.cat-price-slider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px;
  transform: translateY(-50%); background: var(--line-2); border-radius: var(--r-xs); }
.cat-price-fill { position: absolute; top: 50%; height: 4px; transform: translateY(-50%); background: var(--ac);
  border-radius: var(--r-xs); }
.cat-rng { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); width: 100%; height: 4px;
  margin: 0; background: none; appearance: none; -webkit-appearance: none; pointer-events: none; }
.cat-rng::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.cat-rng::-moz-range-track { height: 4px; background: transparent; }
.cat-rng::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 3px solid var(--ac); cursor: pointer; margin-top: 0; }
.cat-rng::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  border: 3px solid var(--ac); cursor: pointer; }

.cat-apply { width: 100%; height: 46px; border: none; border-radius: var(--r-xl); background: var(--navy-1); color: #fff;
  font-weight: 700; font-size: var(--fs-lg); cursor: pointer; font-family: var(--font-body); margin-top: var(--s-2);
  transition: background var(--dur) ease; }
.cat-apply:hover { background: var(--ac); }

.cat-toggle { display: flex; align-items: center; gap: var(--s-3); cursor: pointer; font-size: var(--fs-lg); color: var(--ink);
  margin-top: var(--s-6); }
.cat-toggle input { position: absolute; opacity: 0; pointer-events: none; appearance: none; -webkit-appearance: none; }
.cat-toggle .tg { width: 38px; height: 22px; flex: none; border-radius: 12px; background: var(--line-hover); position: relative;
  transition: background var(--dur) ease; }
.cat-toggle .tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; transition: left var(--dur) ease; box-shadow: 0 1px 3px rgba(11, 18, 32, .25); }
.cat-toggle input:checked + .tg { background: var(--ac); }
.cat-toggle input:checked + .tg::after { left: 18px; }
.cat-toggle input:focus-visible + .tg { outline: 2px solid var(--ac); outline-offset: 2px; }

.cat-main { min-width: 0; }
/* minmax(0,1fr), не голый 1fr: иначе трек грида не может сжаться уже min-content
   карточки (.pcard без min-width:0) — колонка растягивается, 3-я карточка уезжает
   за пределы контейнера (реальный баг: карточки 499/485/421px в 932px). */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }

.cat-empty { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: 72px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center; }
.cat-empty-ic { width: 88px; height: 88px; border-radius: var(--r-xl); background: var(--surface-soft); color: var(--muted-3);
  display: flex; align-items: center; justify-content: center; }
.cat-empty-ic .ic-lg { width: 36px; height: 36px; }
.cat-empty-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin-top: var(--s-7); }
.cat-empty-sub { font-size: var(--fs-xl); color: var(--muted-2); margin-top: var(--s-3); max-width: 340px; line-height: 1.5; }
.cat-empty .btn { margin-top: var(--s-8); }

/* пагинация */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s-3); margin: var(--s-9) 0 0; }
.pager a, .pager .pg { min-width: 42px; height: 42px; padding: 0 var(--s-3); border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--paper); display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--fs-lg); color: var(--ink-2); }
.pager a:hover { border-color: var(--ac); color: var(--ac); }
.pager a:first-child .ic-sm { transform: rotate(180deg); }
.pager .pg.cur { background: var(--navy-1); border-color: var(--navy-1); color: #fff; }

/* SEO-текст-блок каталога — заголовок/абзацы/теги собраны из СУЩЕСТВУЮЩИХ ctx (root_name/q/
   total/brands), без новых бэкенд-полей и без выдуманных данных */
.cat-seo { margin-top: var(--s-11); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl);
  padding: var(--s-9) var(--s-10); }
.cat-seo-h2 { font-size: 22px; letter-spacing: -.5px; margin-bottom: var(--s-6); }
.cat-seo p { font-size: var(--fs-xl); line-height: 1.75; color: var(--muted); margin: 0 0 var(--s-5); max-width: 900px; }
.cat-seo-tags { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.cat-seo-tag { font-size: var(--fs-base); font-weight: 600; color: var(--muted); background: var(--surface-soft);
  border-radius: var(--r-md); padding: 7px 13px; }

/* ===================== ТОВАР — PDP (Ф2b Task 2) =====================
   ctx — 1:1 с rackcore/product.html: p (get_product), related (related_products), fav.
   Крошки — переиспользуем .cat-crumbs (общий компонент, не catalog-специфичный).
   H1 — переиспользуем .cat-title (те же 30px/-.8px), заголовок раздела related — .sec-title
   (главная). Layout — 3 колонки (тумбы 96px | контент | buy-box 340px sticky), как в прототипе
   icubestore.ru.corp (r-prod grid 120px/1fr/332px), токены/радиусы — свои. */
.pd-head { margin-bottom: var(--s-8); }
.pd-meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-md); color: var(--muted-2); margin-bottom: var(--s-3); }
.pd-meta-sep { color: var(--muted-3); }
.pd-brand { font-weight: 700; color: var(--ink-2); }
.pd-h1 { margin: 0 0 var(--s-5); max-width: 760px; line-height: 1.15; }
.pd-headrow { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; }
.pd-keyspecs { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.pd-keyspec { font-size: var(--fs-sm); color: var(--ink-3); background: var(--surface-soft); padding: 6px var(--s-4); border-radius: var(--r-sm); }
.pd-keyspec b { color: var(--ink); font-weight: 700; }

.pd-top { margin-top: var(--s-8); display: grid; grid-template-columns: 96px 1fr 340px; gap: var(--s-7); align-items: start; }
.pd-top--nothumbs { grid-template-columns: 1fr 340px; }

.pd-thumbs { display: flex; flex-direction: column; gap: var(--s-3); max-height: 480px; overflow-y: auto; }
.pd-thumb { width: 100%; aspect-ratio: 1; flex: none; padding: 0; border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden; background: var(--paper); cursor: pointer; transition: border-color var(--dur) ease; }
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumb:hover { border-color: var(--line-hover); }
.pd-thumb.on { border-color: var(--ac); }

.pd-main { min-width: 0; }
.pd-gallery { position: relative; width: 100%; aspect-ratio: 1.2; border-radius: var(--r-xl); border: 1.5px solid var(--line-2);
  background: var(--ac-tint); color: var(--ac); display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.pd-gallery:has(img) { background: #fff; }  /* фото — на белой подложке */
.pd-gallery .gz-in { display: flex; align-items: center; justify-content: center; }
.pd-gallery img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pd-noimg { width: 30%; height: 30%; opacity: .5; }

.pd-specs-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin: var(--s-9) 0 var(--s-5); }
.pd-specs-h h2 { font-size: 20px; letter-spacing: -.4px; }
.pd-specs-cnt { font-size: var(--fs-sm); font-weight: 600; color: var(--muted-2); }
.pd-specs-card { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: 0 var(--s-7); }
.pd-spec-group { padding: var(--s-5) 0; border-bottom: 1px solid var(--line-3); }
.pd-spec-group:last-child { border-bottom: none; }
.pd-spec-gh { font-weight: 700; font-size: var(--fs-sm); color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin-bottom: var(--s-3); }
.pd-spec-row { display: flex; gap: var(--s-6); padding: var(--s-3) 0; border-top: 1px solid var(--line-3); }
.pd-spec-row:first-child { border-top: none; }
.pd-spec-k { flex: none; width: 220px; color: var(--muted); font-size: var(--fs-md); }
.pd-spec-v { flex: 1; font-weight: 600; font-size: var(--fs-md); color: var(--ink); }

.pd-desc-h { margin: var(--s-9) 0 var(--s-4); font-size: 20px; letter-spacing: -.4px; }
.pd-desc p { font-size: var(--fs-xl); line-height: 1.7; color: var(--muted); max-width: 720px; margin: 0 0 var(--s-4); }

.pd-buybox { position: sticky; top: 170px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl);
  padding: var(--s-8); box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: var(--s-4); }
.pd-price { font-family: var(--font-price); font-weight: 800; font-size: 32px; letter-spacing: -1px; color: var(--ink); }
.pd-invoice { display: flex; align-items: center; gap: var(--s-2); background: var(--ac-tint); color: var(--ac);
  font-weight: 700; font-size: var(--fs-md); padding: 10px var(--s-5); border-radius: var(--r-lg); }
.pd-vat { font-size: var(--fs-sm); color: var(--muted-2); }

.pd-qty-row { display: flex; gap: var(--s-3); }
.pd-qty-row .btn { flex: 1; }
.pd-qty { display: flex; align-items: center; flex: none; border: 1.5px solid var(--line); border-radius: var(--r-cta); overflow: hidden; }
.pd-qty-btn { width: 44px; height: 52px; border: none; background: var(--surface-soft); color: var(--ink);
  font-size: 18px; font-weight: 700; cursor: pointer; transition: background var(--dur) ease, color var(--dur) ease; }
.pd-qty-btn:hover { background: var(--ac-tint); color: var(--ac); }
.pd-qty-n { width: 44px; border: none; border-left: 1.5px solid var(--line); border-right: 1.5px solid var(--line);
  text-align: center; font-weight: 700; font-size: var(--fs-lg); color: var(--ink); font-family: inherit; -moz-appearance: textfield; }
.pd-qty-n::-webkit-outer-spin-button, .pd-qty-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pd-soc-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.pd-soc { display: flex; align-items: center; justify-content: center; gap: var(--s-2); height: 48px; border-radius: var(--r-md);
  font-weight: 700; font-size: var(--fs-md); text-decoration: none; transition: background var(--dur) ease, color var(--dur) ease; }
.pd-soc-max { background: #eef3ff; color: #1A6DFF; }
.pd-soc-max:hover { background: #1A6DFF; color: #fff; }
.pd-soc-tg { background: #e8f6fc; color: #229ED9; }
.pd-soc-tg:hover { background: #229ED9; color: #fff; }

.pd-kp-btn { display: flex; align-items: center; justify-content: center; gap: var(--s-2); width: 100%; height: 48px;
  border: 1.5px dashed var(--line-hover); border-radius: var(--r-md); background: var(--surface-soft); color: var(--ink-2);
  font-weight: 700; font-size: var(--fs-md); cursor: pointer; text-decoration: none;
  transition: border-color var(--dur) ease, color var(--dur) ease, background var(--dur) ease; }
.pd-kp-btn:hover { border-color: var(--ac); color: var(--ac); background: var(--paper); }

.pd-supply { list-style: none; margin: 0; padding-top: var(--s-5); border-top: 1px solid var(--line-3); display: flex; flex-direction: column; gap: var(--s-3); }
.pd-supply li { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--ink-3); }
.pd-supply .ic-sm { color: var(--ac); flex: none; }
.pd-supply b { color: var(--ink); font-weight: 700; }

/* КП-модалка — CSS :target, без JS (порт rackcore/#kp на токены icubestore) */
.kp-modal { display: none; position: fixed; inset: 0; z-index: var(--z-modal); align-items: center; justify-content: center; padding: var(--s-7); }
.kp-modal:target { display: flex; }
.kp-backdrop { position: absolute; inset: 0; background: rgba(11, 18, 32, .5); }
.kp-box { position: relative; z-index: 1; background: var(--paper); border-radius: var(--r-xl); max-width: 480px; width: 100%;
  padding: var(--s-9) var(--s-9) var(--s-8); box-shadow: var(--sh-modal); max-height: 90vh; overflow: auto; }
.kp-x { position: absolute; top: var(--s-5); right: var(--s-6); color: var(--muted-2); text-decoration: none; font-size: 18px; line-height: 1; }
.kp-x:hover { color: var(--ink); }
.kp-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.5px; color: var(--ink); padding-right: var(--s-7); }
.kp-prod { color: var(--muted); font-size: var(--fs-md); margin-top: var(--s-2); line-height: 1.4; }
.quote-form { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-6); }
.quote-form input, .quote-form textarea { padding: var(--s-4) var(--s-5); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  font: inherit; background: var(--paper); color: var(--ink); }
.quote-form input:focus, .quote-form textarea:focus { border-color: var(--ac); outline: none; }
.quote-done { margin: var(--s-2) 0 0; padding: var(--s-4) var(--s-5); border-radius: var(--r-sm); font-size: var(--fs-md); }
.quote-done.ok { background: var(--ok-bg); color: var(--ok); }
.quote-done.err { background: #fef2f2; color: #b91c1c; }

.pd-related-h { margin: var(--s-11) 0 var(--s-7); }
.pd-related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }

/* ===================== КОРЗИНА (Ф2b Task 3) =====================
   ctx — 1:1 с rackcore/cart.html: items (commerce.cart_items: sku/qty/title/brand/in_stock/
   price/line_total), total. БЕЗ промокода — роут /cart/* его не считает (только add/update),
   не выдумываем UI под несуществующую механику. Крошки/H1 — .cat-crumbs/.cat-title (общие
   компоненты каталога/товара), сводка .cart-sum переиспользуется checkout'ом (.co-summary). */
.cart-h1 { display: flex; align-items: baseline; gap: var(--s-5); margin-bottom: var(--s-8); }
.cart-h1-cnt { font-family: var(--font-body); font-weight: 500; font-size: var(--fs-2xl); color: var(--muted-2); }

.cart-empty { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: 90px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: var(--s-12); }
.cart-empty-ic { width: 96px; height: 96px; border-radius: var(--r-2xl); background: var(--surface-soft); color: var(--muted-3);
  display: flex; align-items: center; justify-content: center; }
.cart-empty-ic .ic-lg { width: 40px; height: 40px; }
.cart-empty-h { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin-top: var(--s-7); }
.cart-empty p { font-size: var(--fs-xl); color: var(--muted-2); margin: var(--s-3) 0 0; max-width: 380px; line-height: 1.5; }
.cart-empty .btn { margin-top: var(--s-8); }

.cart-grid { display: grid; grid-template-columns: 1fr 360px; gap: var(--s-8); align-items: start; margin-bottom: var(--s-12); }
.cart-items { display: flex; flex-direction: column; gap: var(--s-5); }

.ci { display: flex; gap: var(--s-7); background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-7); }
.ci-thumb { width: 108px; height: 108px; flex: none; border-radius: var(--r-xl); background: var(--ac-tint); color: var(--ac);
  display: flex; align-items: center; justify-content: center; }
.ci-thumb .ic-lg { width: 36px; height: 36px; opacity: .75; }
.ci-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ci-meta { font-size: var(--fs-sm); color: var(--muted-2); margin-bottom: 3px; }
.ci-name { font-size: var(--fs-2xl); font-weight: 600; line-height: 1.3; }
.ci-name:hover { color: var(--ac); }
.ci-stock { display: flex; align-items: center; gap: var(--s-1); margin-top: var(--s-3); font-size: var(--fs-sm); font-weight: 700; color: var(--ok); }
.ci-stock.out { color: var(--warn); }
.ci-rm { margin-top: auto; padding-top: var(--s-3); }
.ci-rm button { border: none; background: none; display: flex; align-items: center; gap: var(--s-1); padding: 0; color: var(--muted-2);
  font-size: var(--fs-md); font-weight: 600; cursor: pointer; font-family: inherit; }
.ci-rm button:hover { color: var(--ac2); }

.ci-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; flex: none; gap: var(--s-5); }
.ci-line { text-align: right; }
.ci-line-sum { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-6xl); }
.ci-line-each { font-size: var(--fs-sm); color: var(--muted-3); margin-top: 2px; }
.qty-step { display: flex; align-items: center; background: var(--surface-soft); border-radius: var(--r-lg); padding: 4px; flex: none; }
.qty-step form { margin: 0; }
.qty-step button { width: 36px; height: 36px; border: none; background: var(--paper); border-radius: var(--r-md); color: var(--ink);
  font-size: 17px; font-weight: 700; cursor: pointer; font-family: inherit; }
.qty-step button:hover { color: var(--ac); }
.qty-n { min-width: 40px; text-align: center; font-weight: 700; font-size: var(--fs-lg); }

/* Сводка заказа — переиспользуется корзиной (.cart-sum) и checkout'ом (.cart-sum.co-summary) */
.cart-sum { position: sticky; top: 170px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl);
  padding: var(--s-8); box-shadow: var(--sh-1); }
.cart-sum-h { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-7xl); margin-bottom: var(--s-7); }
.cart-sum-row { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-xl); margin-bottom: var(--s-5); color: var(--muted-2); }
.cart-sum-row b { color: var(--ink); font-weight: 700; }
.cart-sum-dlv { color: var(--ink-3); font-weight: 600; font-size: var(--fs-sm); }
.cart-sum-hr { height: 1px; background: var(--line-3); margin-bottom: var(--s-6); }
.cart-sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; font-weight: 700; font-size: var(--fs-lg); }
.cart-sum-total .v { font-family: var(--font-price); font-weight: 800; font-size: 28px; letter-spacing: -.6px; }
.cart-sum-vat { text-align: right; font-size: var(--fs-sm); color: var(--muted-2); margin-bottom: var(--s-7); }
.cart-sum .btn { margin-bottom: var(--s-5); }
.cart-sum-back { display: block; text-align: center; font-size: var(--fs-md); color: var(--muted-2); }
.cart-sum-back:hover { color: var(--ac); }

/* ===================== CHECKOUT (Ф2b Task 3) =====================
   ctx — 1:1 с rackcore/checkout.html: items/total, me (customers — предзаполнение), pay_online
   (per-tenant касса, у icubestore выключена → «по счёту» единственный реальный способ),
   geo_city, maps_key. Шаги пронумерованы (1. Доставка / 2. Получатель / 3. Оплата) как в
   прототипе; buyer_type физ/юр и delivery_mode курьер/ПВЗ переключаются CSS :has() — без JS,
   тот же паттерн, что rackcore/store.css (.co-cards:has(#bt-legal:checked)). */
.co-grid { margin-bottom: var(--s-12); }
.co-cards { display: flex; flex-direction: column; gap: var(--s-6); }
.co-card { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: var(--s-8); }
.co-card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); font-family: var(--font-display);
  font-weight: 700; font-size: 18px; margin-bottom: var(--s-6); }
.co-card-tag { display: flex; align-items: center; gap: var(--s-1); font-weight: 700; font-size: var(--fs-md); color: var(--ok); }

/* переключатель способа доставки — карточки-радио (курьер/ПВЗ), :checked-подсветка */
.co-dmode { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-6); }
.co-dm input { position: absolute; opacity: 0; pointer-events: none; }
.co-dm span { display: flex; flex-direction: column; gap: var(--s-2); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-5); cursor: pointer; transition: border-color var(--dur) ease, background var(--dur) ease; }
.co-dm span .ic { color: var(--ac); }
.co-dm span b { font-weight: 700; font-size: var(--fs-lg); }
.co-dm span small { font-size: var(--fs-sm); color: var(--muted-2); }
.co-dm input:checked + span { border-color: var(--ac); background: var(--ac-tint); }
.co-dm input:focus-visible + span { outline: 2px solid var(--ac); outline-offset: 2px; }

.co-field { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-5); }
.co-field .co-l { display: block; }
.co-l { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; color: var(--muted-2); }
.co-field input, .co-field textarea, .co-f input, .co-inn input, .co-f textarea {
  height: 50px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s-5);
  font: inherit; font-size: var(--fs-md); color: var(--ink); background: var(--paper);
}
.co-field textarea, .co-f textarea { height: auto; padding: var(--s-4) var(--s-5); }
.co-field input:focus, .co-field textarea:focus, .co-f input:focus { border-color: var(--ac); outline: none; }
.ship-row { display: flex; gap: var(--s-3); }
.ship-row input { flex: 1; min-width: 0; }
.ship-opts:empty { display: none; }
.ship-opts { margin-top: var(--s-4); }
.ship-list { display: flex; flex-direction: column; gap: var(--s-3); }
.ship-opt { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border: 1.5px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; }
.ship-opt:has(input:checked) { border-color: var(--ac); background: var(--ac-tint); }
.ship-name { flex: 1; font-size: var(--fs-md); color: var(--ink-2); }
.ship-cost { font-weight: 700; font-size: var(--fs-md); white-space: nowrap; }
.ship-empty { color: var(--muted-2); font-size: var(--fs-md); padding: var(--s-2) 0 0; }

/* курьер/ПВЗ-разделы — показываем только выбранный режим (CSS :has, без JS) */
.co-courier, .co-point { display: none; }
.co-card:has(#dm-courier:checked) .co-courier { display: block; }
.co-card:has(#dm-point:checked) .co-point { display: block; }
.co-point { margin-top: var(--s-5); }
.co-point .btn-secondary { display: flex; }
.pvz-points:empty { display: none; }
.pvz-points { margin-top: var(--s-4); }
.pvz-wrap.has-map { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s-5); align-items: start; }
.pvz-list { display: flex; flex-direction: column; gap: var(--s-3); max-height: 340px; overflow-y: auto; }
.pvz-wrap.has-map .pvz-list { max-height: 320px; }
.pvz-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border: 1.5px solid var(--line);
  border-radius: var(--r-md); cursor: pointer; }
.pvz-item:has(input:checked) { border-color: var(--ac); background: var(--ac-tint); }
.pvz-item input { margin: 0; flex: none; }
.pvz-body { flex: 1; min-width: 0; }
.pvz-addr { display: block; font-size: var(--fs-md); color: var(--ink); }
.pvz-wt { display: block; font-size: var(--fs-sm); color: var(--muted-2); margin-top: 2px; }
.pvz-tag { font-size: var(--fs-xs); font-weight: 700; color: var(--muted-2); flex: none; }
.pvz-empty { color: var(--muted-2); font-size: var(--fs-md); padding: var(--s-2) 0 0; }
.cdek-map { width: 100%; height: 300px; border-radius: var(--r-md); background: var(--surface-soft); overflow: hidden; }
.pvz-wrap.has-map .cdek-map { height: auto; min-height: 320px; }

/* тип покупателя физ/юр — карточки-радио, реквизиты компании показываются только для юрлица */
.co-btype { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); margin-bottom: var(--s-6); }
.co-bt input { position: absolute; opacity: 0; pointer-events: none; }
.co-bt span { display: flex; align-items: center; justify-content: center; height: 52px; border: 2px solid var(--line);
  border-radius: var(--r-md); font-weight: 700; font-size: var(--fs-lg); cursor: pointer; color: var(--ink-2);
  transition: border-color var(--dur) ease, background var(--dur) ease, color var(--dur) ease; }
.co-bt input:checked + span { border-color: var(--ac); background: var(--ac-tint); color: var(--ac); }
.co-bt input:focus-visible + span { outline: 2px solid var(--ac); outline-offset: 2px; }
.co-fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
.co-f { display: flex; flex-direction: column; gap: var(--s-2); }
.co-f.wide, .co-field.wide { grid-column: 1 / -1; }
.co-legal { display: none; margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line-3); }
.co-card:has(#bt-legal:checked) .co-legal { display: block; }
.co-legal-h { font-weight: 700; font-size: var(--fs-lg); margin-bottom: var(--s-5); }

/* способ оплаты — «по счёту» основной для юрлиц (онлайн-оплата у icubestore выключена) */
.pay-pick { display: flex; flex-direction: column; gap: var(--s-4); }
.pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-opt span { display: flex; align-items: center; gap: var(--s-4); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: var(--s-5); cursor: pointer; transition: border-color var(--dur) ease, background var(--dur) ease; }
.pay-opt span .ic { color: var(--ac); flex: none; }
.pay-opt span b { font-weight: 700; font-size: var(--fs-lg); }
.pay-opt span small { display: block; font-size: var(--fs-sm); color: var(--muted-2); font-weight: 500; margin-top: 2px; }
.pay-opt input:checked + span { border-color: var(--ac); background: var(--ac-tint); }
.pay-opt input:focus-visible + span { outline: 2px solid var(--ac); outline-offset: 2px; }
.co-vat-note { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-6); font-size: var(--fs-sm); color: var(--muted-2); }
.co-vat-note .ic-sm { color: var(--ac); flex: none; }

.co-summary .co-sum-items { display: flex; flex-direction: column; gap: var(--s-4); padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line-3); margin-bottom: var(--s-6); }
.co-sum-item { display: flex; gap: var(--s-4); align-items: baseline; font-size: var(--fs-sm); }
.co-sum-item .t { flex: 1; color: var(--ink-3); line-height: 1.3; }
.co-sum-item .x { color: var(--muted-3); }
.co-sum-item .s { color: var(--ink); font-weight: 600; white-space: nowrap; }
.co-ship-cost { font-weight: 700; color: var(--ink); }
.co-note { text-align: center; font-size: var(--fs-sm); color: var(--muted-2); line-height: 1.5; margin-top: var(--s-4); }

/* ===================== ЗАКАЗ / SUCCESS (Ф2b Task 3) =====================
   ctx — 1:1 с rackcore/order.html: o (commerce.get_order), can_pay, pay_error. Копирайт —
   2 варианта (счёт юрлицу / обычный заказ) по o.address.payment in (invoice, leasing), т.к.
   «по счёту» — основной способ у icubestore (онлайн-оплата отключена per-tenant). */
.ok-error { display: flex; align-items: center; gap: var(--s-2); max-width: 560px; margin: 0 auto var(--s-6); padding: var(--s-4) var(--s-5);
  background: #fef2f2; color: #b91c1c; border-radius: var(--r-md); font-size: var(--fs-md); }

.ok-card { max-width: 560px; margin: var(--s-8) auto 0; background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-xl); padding: 48px 40px; text-align: center; }
.ok-check { width: 92px; height: 92px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: flex;
  align-items: center; justify-content: center; margin: 0 auto; }
.ok-check .ic-lg { width: 44px; height: 44px; }
.ok-check.cancel { background: var(--warn-bg); color: var(--ac2); }
.ok-h { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.6px; margin-top: var(--s-7); }
.ok-sub { font-size: var(--fs-2xl); color: var(--muted); margin-top: var(--s-3); line-height: 1.6; }
.ok-tile { display: flex; align-items: center; gap: var(--s-5); background: var(--surface-soft); border-radius: var(--r-md);
  padding: var(--s-5) var(--s-6); margin-top: var(--s-7); text-align: left; }
.ok-tile-ic { width: 46px; height: 46px; flex: none; border-radius: var(--r-md); background: var(--ac-tint); color: var(--ac);
  display: flex; align-items: center; justify-content: center; }
.ok-tile-t { font-weight: 700; font-size: var(--fs-md); }
.ok-tile-s { font-size: var(--fs-sm); color: var(--muted-2); margin-top: 2px; }
.ok-paid { display: flex; align-items: center; justify-content: center; gap: var(--s-2); color: var(--ok); font-weight: 700;
  font-size: var(--fs-md); margin-top: var(--s-6); }

/* статус-таймлайн — счётчик CSS (без JS), done/act — акцент */
.otl { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); padding: 0;
  margin: var(--s-8) 0 var(--s-6); counter-reset: s; }
.otl li { position: relative; padding: var(--s-3) var(--s-5) var(--s-3) 36px; border: 1.5px solid var(--line); border-radius: 999px;
  font-size: var(--fs-md); color: var(--muted-2); counter-increment: s; }
.otl li::before { content: counter(s); position: absolute; left: var(--s-2); top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; background: var(--line-hover); color: #fff; font-size: var(--fs-xs);
  display: flex; align-items: center; justify-content: center; }
.otl li.done { color: var(--ink-2); border-color: var(--ac); }
.otl li.done::before { content: "✓"; background: var(--ac); }
.otl li.act { color: var(--ink); border-color: var(--ac); font-weight: 700; }
.otl li.act::before { background: var(--ac); }

.ord-card { max-width: 640px; margin: var(--s-6) auto; background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-xl); padding: 4px var(--s-8); }
.ord-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line-3); font-size: var(--fs-md); }
.ord-row:last-child { border-bottom: none; }
.ord-row .k { color: var(--muted-2); }
.ord-row .v { font-weight: 700; text-align: right; }
.ord-row.total .v { font-family: var(--font-price); font-weight: 800; font-size: 22px; letter-spacing: -.4px; }
.ok-track { text-align: center; font-size: var(--fs-md); color: var(--ink-2); margin: 0 0 var(--s-6); }
.ok-track a { color: var(--ac); }
.ok-track a:hover { color: var(--ac-dk); }

.ord-items { max-width: 640px; margin: 0 auto var(--s-8); }
.ord-item { display: flex; justify-content: space-between; gap: var(--s-5); padding: var(--s-4) 0; border-bottom: 1px solid var(--line-3);
  font-size: var(--fs-md); color: var(--ink-3); }
.ord-item:last-child { border-bottom: none; }
.ord-item .x { color: var(--muted-3); }
.ord-item .s { white-space: nowrap; color: var(--ink); font-weight: 600; }

.ord-actions { display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; margin-bottom: var(--s-12); }

/* ===================== АВТОРИЗАЦИЯ — вход/регистрация/восстановление (Ф2b Task 4) =====================
   Роуты (app.py): /login, /register (тот же login.html, mode=register), /forgot, /reset —
   email+пароль (bcrypt, store/auth.py), ссылка сброса на почту (sign_reset/read_reset, TTL 1ч),
   НЕ код/OTP. Прототип (isLogin) рисует email-OTP («пришлём код подтверждения») — реального
   OTP-эндпоинта в бэкенде нет, поэтому карточка ниже — настоящая форма email+пароль в
   corp-визуале прототипа (центрированная белая карточка/Geologica-лого/крупный CTA). */
.auth-wrap { max-width: 440px; margin: var(--s-11) auto var(--s-12); }
.auth-card { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: var(--s-10) var(--s-9); }
.auth-logo { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-9xl); letter-spacing: -.6px; text-align: center; }
.auth-logo .accent { color: var(--ac); }
.auth-title { font-size: 22px; letter-spacing: -.4px; text-align: center; margin-top: var(--s-6); }
.auth-sub { font-size: var(--fs-md); color: var(--muted-2); text-align: center; margin-top: var(--s-3); line-height: 1.5; }
.auth-err { display: flex; align-items: center; gap: var(--s-2); background: #fef2f2; color: #b91c1c; font-size: var(--fs-base);
  border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin-top: var(--s-6); }
.auth-form { display: flex; flex-direction: column; gap: var(--s-5); margin-top: var(--s-7); }
.auth-field { display: flex; flex-direction: column; gap: var(--s-2); }
.auth-field input {
  height: 52px; border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 0 var(--s-5);
  font: inherit; font-size: var(--fs-md); color: var(--ink); background: var(--paper);
}
.auth-field input:focus { border-color: var(--ac); outline: none; }
.auth-form .btn { margin-top: var(--s-2); }
.auth-switch { text-align: center; font-size: var(--fs-md); color: var(--muted-2); margin-top: var(--s-7); }
.auth-switch a { color: var(--ac); font-weight: 600; }
.auth-switch a:hover { color: var(--ac-dk); }
.auth-legal { text-align: center; font-size: var(--fs-sm); color: var(--muted-3); margin-top: var(--s-5); line-height: 1.5; }
.auth-legal a { color: inherit; text-decoration: underline; }
.auth-ok { display: flex; gap: var(--s-4); align-items: flex-start; background: var(--ok-bg); border-radius: var(--r-md);
  padding: var(--s-6); margin-top: var(--s-6); }
.auth-ok .ic { color: var(--ok); flex: none; margin-top: 2px; }
.auth-ok b { font-size: var(--fs-lg); color: var(--ink); }
.auth-ok p { margin: var(--s-2) 0 0; font-size: var(--fs-md); color: var(--muted); line-height: 1.5; }

/* ===================== КАБИНЕТ — сайдбар+вкладки (Ф2b Task 4) =====================
   ctx — 1:1 с rackcore/account.html: me (auth.current_customer), orders
   (commerce.orders_for_customer — number/status/total/created_at, БЕЗ address/items ни на
   одном из 2 бэкендов заказов). Вкладки — чистый CSS (4 скрытых radio перед .acc-grid + ~ /
   :checked, без JS, как переключатели checkout/мега-меню выше). «Избранное»/«Адреса» —
   честные вкладки без выдуманных данных (см. комментарий в account.html): избранное — ссылка
   на реальную /favorites, адреса — реальный legal_address компании. */
.acc-tab-radio { position: absolute; opacity: 0; pointer-events: none; }
.acc-h1 { margin-bottom: var(--s-8); }
.acc-grid { display: grid; grid-template-columns: 300px 1fr; gap: var(--s-8); align-items: start; margin-bottom: var(--s-12); }

.acc-side { position: sticky; top: 170px; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: var(--s-7); }
.acc-user { display: flex; align-items: center; gap: var(--s-5); }
.acc-avatar { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--ac); color: #fff; flex: none;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-price); font-weight: 700; font-size: 20px; }
.acc-user-name { font-weight: 700; font-size: var(--fs-lg); }
.acc-user-sub { font-size: var(--fs-sm); color: var(--muted-2); margin-top: 2px; }

.acc-nav { display: flex; flex-direction: column; gap: 4px; margin-top: var(--s-7); }
.acc-nav-item { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md);
  cursor: pointer; font-weight: 600; font-size: var(--fs-lg); color: var(--ink-3); transition: background var(--dur) ease, color var(--dur) ease; }
.acc-nav-item .ic-sm { color: var(--muted-3); }
.acc-nav-item:hover { background: var(--surface-soft); }
.acc-nav-logout { margin-top: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line-3); color: var(--muted-2); }
.acc-nav-logout:hover { color: var(--ac2); background: none; }

#acc-tab-orders:checked ~ .acc-grid .acc-nav-item[data-nav="orders"],
#acc-tab-data:checked ~ .acc-grid .acc-nav-item[data-nav="data"],
#acc-tab-fav:checked ~ .acc-grid .acc-nav-item[data-nav="fav"],
#acc-tab-addr:checked ~ .acc-grid .acc-nav-item[data-nav="addr"] {
  background: var(--ac-tint); color: var(--ac);
}
#acc-tab-orders:checked ~ .acc-grid .acc-nav-item[data-nav="orders"] .ic-sm,
#acc-tab-data:checked ~ .acc-grid .acc-nav-item[data-nav="data"] .ic-sm,
#acc-tab-fav:checked ~ .acc-grid .acc-nav-item[data-nav="fav"] .ic-sm,
#acc-tab-addr:checked ~ .acc-grid .acc-nav-item[data-nav="addr"] .ic-sm {
  color: var(--ac);
}

.acc-main { min-width: 0; }
.acc-panel { display: none; }
#acc-tab-orders:checked ~ .acc-grid .acc-panel[data-panel="orders"],
#acc-tab-data:checked ~ .acc-grid .acc-panel[data-panel="data"],
#acc-tab-fav:checked ~ .acc-grid .acc-panel[data-panel="fav"],
#acc-tab-addr:checked ~ .acc-grid .acc-panel[data-panel="addr"] {
  display: block;
}

.acc-panel-h { font-size: 19px; letter-spacing: -.3px; margin: 0 0 var(--s-5); }
.acc-hint { margin: -8px 0 var(--s-5); font-size: var(--fs-sm); }

.acc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-bottom: var(--s-8); }
.acc-stat { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-6); }
.acc-stat-v { font-family: var(--font-price); font-weight: 700; font-size: 26px; }
.acc-stat-v.accent { color: var(--ac); }
.acc-stat-l { font-size: var(--fs-sm); color: var(--muted-2); margin-top: 4px; }

.acc-orders { display: flex; flex-direction: column; gap: var(--s-4); }
.acc-order { display: flex; align-items: center; gap: var(--s-5); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg); padding: var(--s-6); color: inherit; text-decoration: none;
  transition: border-color var(--dur) ease, transform var(--dur) ease; }
.acc-order:hover { border-color: var(--line-hover); transform: translateY(-2px); }
.acc-order-ic { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--ac-tint); color: var(--ac); flex: none;
  display: flex; align-items: center; justify-content: center; }
.acc-order-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.acc-order-h { display: flex; align-items: baseline; gap: var(--s-3); font-size: var(--fs-lg); }
.acc-order-date { font-size: var(--fs-sm); color: var(--muted-2); font-weight: 500; }
.acc-order-status { align-self: flex-start; font-size: var(--fs-sm); font-weight: 700; padding: 3px var(--s-3); border-radius: var(--r-sm);
  background: var(--surface-soft); color: var(--ink-3); }
.acc-order-status--paid, .acc-order-status--done { background: var(--ok-bg); color: var(--ok); }
.acc-order-status--shipped { background: var(--ac-tint); color: var(--ac); }
.acc-order-status--canceled { background: #fef2f2; color: #b91c1c; }
.acc-order-sum { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-6xl); flex: none; }

.acc-personal { margin-bottom: var(--s-8); }
.acc-ro { height: 50px; display: flex; align-items: center; padding: 0 var(--s-5); background: var(--surface-soft);
  border-radius: var(--r-md); font-size: var(--fs-md); font-weight: 600; color: var(--ink); }

.acc-cta-card { display: flex; align-items: center; gap: var(--s-6); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-xl); padding: var(--s-8); }
.acc-cta-ic { width: 64px; height: 64px; border-radius: var(--r-lg); background: var(--ac-tint); color: var(--ac); flex: none;
  display: flex; align-items: center; justify-content: center; }
.acc-cta-body { flex: 1; min-width: 0; }
.acc-cta-t { font-weight: 700; font-size: var(--fs-lg); }
.acc-cta-s { font-size: var(--fs-base); color: var(--muted-2); margin-top: 4px; line-height: 1.5; }

.acc-addr-item { display: flex; align-items: center; gap: var(--s-5); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg); padding: var(--s-6); margin-bottom: var(--s-5); }
.acc-addr-ic { width: 46px; height: 46px; border-radius: var(--r-md); background: var(--ac-tint); color: var(--ac); flex: none;
  display: flex; align-items: center; justify-content: center; }
.acc-addr-body { flex: 1; min-width: 0; }
.acc-addr-t { font-weight: 700; font-size: var(--fs-md); }
.acc-addr-s { font-size: var(--fs-base); color: var(--muted-2); margin-top: 2px; }
.acc-addr-edit { flex: none; font-size: var(--fs-sm); font-weight: 600; color: var(--muted-3); cursor: pointer; }
.acc-addr-edit:hover { color: var(--ac); }

/* реквизиты компании (акк./данные) — переиспользует .co-card/.co-field/.co-f/.co-l чекаута;
   .co-inn/.btn-sm/.co-msg — своя мелочь ИНН-поиска (HTMX oob-swap /account/company/lookup) */
.co-inn { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.btn-sm { flex: none; height: 50px; padding: 0 var(--s-6); border: none; border-radius: var(--r-md); background: var(--navy-1);
  color: #fff; font-family: var(--font-body); font-weight: 700; font-size: var(--fs-base); cursor: pointer; white-space: nowrap; }
.btn-sm:hover { background: var(--ac); }
.co-msg { display: block; margin-top: var(--s-3); font-size: var(--fs-sm); }
.co-msg.ok { color: var(--ok); }
.co-msg.err { color: #b91c1c; }

/* ===================== КОНФИГУРАТОР ПК (Ф2b Task 6) — ЛИД-ФОРМА =====================
   /configure — общий роут (app.py) для rackcore/icubestore: POST собирает
   platform/cpu/ram/storage/purpose/budget в текстовую спецификацию для инженера
   (quotes.create_quote), НЕ реалтайм-сборка — прайса компонентов нет. Карты типа техники —
   .co-dmode--3 (тот же .co-dm, что шаг доставки чекаута, просто 3 колонки вместо 2).
   Радио-чипы cpu/ram/storage/purpose/budget — мелкий вариант той же :checked+span механики
   (.cfg-chip). Сайдбар-сводка переиспользует .cart-sum (корзина/checkout). */
.co-dmode--3 { grid-template-columns: repeat(3, 1fr); }
.cfg-chips { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.cfg-chip { position: relative; }
.cfg-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-chip span { display: inline-flex; align-items: center; height: 44px; padding: 0 var(--s-6); border: 1.5px solid var(--line);
  border-radius: var(--r-cta); font-size: var(--fs-lg); font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: border-color var(--dur) ease, background var(--dur) ease, color var(--dur) ease; }
.cfg-chip input:checked + span { border-color: var(--ac); background: var(--ac-tint); color: var(--ac); }
.cfg-chip input:focus-visible + span { outline: 2px solid var(--ac); outline-offset: 2px; }
.cfg-sub { font-size: var(--fs-md); color: var(--muted-2); line-height: 1.5; margin: 0 0 var(--s-7); }
.cfg-incl { list-style: none; padding: 0; margin: 0 0 var(--s-7); display: flex; flex-direction: column; gap: var(--s-4); }
.cfg-incl li { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-md); color: var(--ink-2); }
.cfg-incl .ic-sm { color: var(--ac); flex: none; }
.cfg-price { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-6);
  margin: var(--s-2) 0 var(--s-7); border-top: 1px solid var(--line-3); }
.cfg-price-l { font-size: var(--fs-lg); color: var(--ink); }
.cfg-price-v { font-size: var(--fs-sm); color: var(--ac); font-weight: 600; text-align: right; line-height: 1.4; }
.cfg-foot { display: flex; align-items: center; gap: var(--s-2); justify-content: center; font-size: var(--fs-sm); color: var(--muted-2); margin-top: var(--s-6); }

/* ===================== ОБЩИЙ КОМПОНЕНТ — HERO-ПОЛОСА КОНТЕНТ-СТРАНИЦ (Ф2b Task 5) =====================
   Один navy-компонент переиспользуют /brands, /brand/*, /page/about, /page/delivery (у /brand
   вместо него — своя светлая карточка .bh-*, см. ниже: там hero — товарная витрина бренда,
   не редакционный текст). .cat-crumbs--dark — модификатор для тех же крошек каталога/брендов
   на тёмном фоне (тот же .cat-crumbs/.cat-crumbs-sep/.cat-crumbs-cur, другой цвет). */
.cat-crumbs--dark { color: rgba(255, 255, 255, .5); margin-bottom: var(--s-7); }
.cat-crumbs--dark a { color: rgba(255, 255, 255, .72); }
.cat-crumbs--dark a:hover { color: #fff; }
.cat-crumbs--dark .cat-crumbs-sep { color: rgba(255, 255, 255, .3); }
.cat-crumbs--dark .cat-crumbs-cur { color: #fff; }

.pg-hero { background: var(--navy-grad); color: #fff; border-radius: var(--r-2xl); padding: var(--s-9) var(--s-10) var(--s-10); margin-bottom: var(--s-11); }
.pg-eyebrow { display: inline-flex; align-items: center; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  padding: 6px 13px; border-radius: var(--r-xs); font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #cdd6e4; margin-bottom: var(--s-6); }
.pg-h1 { font-size: 38px; line-height: 1.12; letter-spacing: -1px; color: #fff; max-width: 760px; margin: 0 0 var(--s-6); }
.pg-lead { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); line-height: 1.6; color: #c7d0dd; max-width: 640px; margin: 0 0 var(--s-9); }
.pg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-7); border-top: 1px solid rgba(255, 255, 255, .14);
  padding-top: var(--s-7); max-width: 800px; }
.pg-stat b { display: block; font-family: var(--font-price); font-weight: 700; font-size: var(--fs-7xl); color: #fff; white-space: nowrap; }
.pg-stat span { display: block; font-size: var(--fs-sm); color: #aeb6c6; margin-top: 4px; }
/* .pg-stats--onlight — та же 4-колоночная строка метрик, но на белой карточке (страница бренда) */
.pg-stats--onlight { border-top-color: var(--line-3); margin: var(--s-8) 0 var(--s-11); }
.pg-stats--onlight .pg-stat b { color: var(--ink); }
.pg-stats--onlight .pg-stat span { color: var(--muted-2); }

.pg-cta { position: relative; overflow: hidden; background: var(--navy-grad); border-radius: var(--r-2xl); color: #fff;
  padding: var(--s-9) var(--s-10); margin: var(--s-11) 0; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-8); flex-wrap: wrap; }
.pg-cta-copy { max-width: 620px; }
.pg-cta-eyebrow { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ac-soft); margin-bottom: var(--s-3); }
.pg-cta h2 { font-size: 26px; letter-spacing: -.6px; color: #fff; margin: 0 0 var(--s-3); }
.pg-cta p { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); line-height: 1.6; color: #c7d0dd; margin: 0; }
.pg-cta-actions { display: flex; gap: var(--s-4); flex: none; flex-wrap: wrap; }

/* «Ценности» — 3 карточки (об-нас/бренды-assurance): переиспользуется /page/about и /brands */
.pg-vals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.pg-val { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-7); }
.pg-val-ic { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--ac-tint); color: var(--ac);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--s-5); }
.pg-val h3 { font-size: 18px; letter-spacing: -.3px; margin-bottom: var(--s-3); }
.pg-val p { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-base); line-height: 1.55; color: var(--muted); margin: 0; }

.pg-empty { color: var(--muted); font-size: var(--fs-xl); padding: var(--s-9) 0 var(--s-11); }

/* Индикатор наличия (led-точка) — переиспускается /brands (карточка бренда) и info-band ниже */
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }

/* ===================== БЛОГ — список + статья (Ф2b Task 5) =====================
   ctx — 1:1 с rackcore/blog_list.html и blog_post.html: posts/post/related (blog.py, без
   изменений контракта). У icubestore постов пока 0 (store_posts пуст для тенанта) — рисуем
   честный empty-state, а не пустую сетку/заглушку 500. Сетка карточек — переиспользует
   .blog-grid/.blog-tile* (уже заведены в секции «ГЛАВНАЯ — БЛОГ И ГАЙДЫ» выше, Ф2a Task 5),
   без дублирования стилей. */
.blog-intro { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); color: var(--muted); max-width: 640px; margin: 0 0 var(--s-9); }

/* .empty-box — общий блок «пусто» (список блога без постов, подборка без избранного) */
.empty-box { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: 72px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: var(--s-11); }
.empty-box-ic { width: 88px; height: 88px; border-radius: var(--r-xl); background: var(--surface-soft); color: var(--muted-3);
  display: flex; align-items: center; justify-content: center; }
.empty-box-ic .ic-lg { width: 36px; height: 36px; }
.empty-box-h { font-family: var(--font-display); font-weight: 700; font-size: 21px; margin-top: var(--s-7); }
.empty-box p { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); color: var(--muted-2); margin: var(--s-3) 0 0; max-width: 380px; line-height: 1.5; }
.empty-box .btn { margin-top: var(--s-8); }

.bp { max-width: 780px; margin: 0 auto var(--s-12); }
.bp-eyebrow { display: inline-flex; align-items: center; background: var(--ac-tint); color: var(--ac); font-size: var(--fs-sm);
  font-weight: 700; padding: 6px 13px; border-radius: var(--r-xs); margin-bottom: var(--s-6); }
.bp-title { font-size: 34px; letter-spacing: -.9px; line-height: 1.16; margin: 0 0 var(--s-5); }
.bp-meta { font-size: var(--fs-md); color: var(--muted-2); margin-bottom: var(--s-8); }
.bp-cover { width: 100%; height: auto; aspect-ratio: 2.16 / 1; object-fit: cover; border-radius: var(--r-xl); margin-bottom: var(--s-9); }
.bp-body { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); line-height: 1.75; color: var(--ink-3); }
.bp-body p { margin: 0 0 var(--s-6); }
.bp-related { margin-top: var(--s-11); padding-top: var(--s-9); border-top: 1px solid var(--line-2); }
.bp-related-h { font-size: 22px; letter-spacing: -.5px; margin-bottom: var(--s-6); }
.bp-related-list { display: flex; flex-direction: column; gap: var(--s-3); }
.bp-rel { display: flex; align-items: center; gap: var(--s-4); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-md); padding: var(--s-5) var(--s-6); transition: border-color var(--dur) ease; }
.bp-rel:hover { border-color: var(--ac); }
.bp-rel-cat { flex: none; font-size: var(--fs-sm); font-weight: 700; color: var(--ac); background: var(--ac-tint);
  padding: 4px var(--s-3); border-radius: var(--r-sm); }
.bp-rel-title { flex: 1; min-width: 0; font-weight: 600; font-size: var(--fs-lg); color: var(--ink); }
.bp-rel-arr { flex: none; color: var(--muted-3); }

/* ===================== БРЕНДЫ — листинг + страница бренда (Ф2b Task 5) =====================
   ctx — 1:1 с rackcore/brands.html и brand.html: brand_cards (catalog.brand_cards)/products,
   total, page, has_next, root_name, brand_slug, brand_cats (catalog.brand_categories), fav.
   Hero листинга — .pg-hero (общий компонент выше); hero одного бренда — своя светлая
   карточка .bh-* (товарная витрина, не редакционный текст, поэтому не navy-панель). */
.bcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); margin-bottom: var(--s-11); }
.bcard { display: flex; flex-direction: column; gap: var(--s-4); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-lg); padding: var(--s-7);
  transition: transform var(--dur-slow) ease, box-shadow var(--dur-slow) ease, border-color var(--dur-slow) ease; }
.bcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-hover); }
.bcard-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.bcard-wm { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.3px; color: var(--ink); }
.bcard-instock { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--ok); white-space: nowrap; }
.bcard-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.bcard-cat { font-size: var(--fs-sm); color: var(--ink-3); background: var(--surface-soft); border-radius: 999px; padding: 3px 10px; }
.bcard-cat b { color: var(--muted-2); font-weight: 600; }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--s-2); }
.bcard-cnt { font-size: var(--fs-base); color: var(--muted-2); }
.bcard-go { font-size: var(--fs-base); font-weight: 700; color: var(--ac); display: flex; align-items: center; gap: 4px; }

.cat-title--sm { font-size: 22px; } /* заголовок «Товары {бренд}» на странице бренда — .cat-title поменьше */

.bh-card { display: flex; align-items: center; gap: var(--s-8); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-xl); padding: var(--s-9); margin-bottom: var(--s-7); flex-wrap: wrap; }
.bh-tile { width: 120px; height: 120px; flex: none; border-radius: var(--r-lg); background: var(--ac-tint);
  display: flex; align-items: center; justify-content: center; padding: 0 var(--s-3); text-align: center; }
.bh-tile span { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.4px; color: var(--ac); line-height: 1.1; }
.bh-body { flex: 1; min-width: 240px; }
.bh-h1 { font-size: 28px; letter-spacing: -.7px; margin-bottom: var(--s-3); }
.bh-lead { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); color: var(--muted); max-width: 520px; line-height: 1.6; margin-bottom: var(--s-6); }
.bh-actions { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.bh-lines { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-9); }
.bh-line { display: flex; align-items: center; gap: var(--s-2); background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-5); font-size: var(--fs-md); color: var(--ink-2);
  transition: border-color var(--dur) ease, color var(--dur) ease; }
.bh-line:hover { border-color: var(--ac); color: var(--ac); }
.bh-line b { color: var(--muted-2); font-weight: 600; }
.bh-line .ic-sm { color: var(--ac); }

/* ===================== ИЗБРАННОЕ (Ф2b Task 5) =====================
   ctx — 1:1 с rackcore/favorites.html: products (catalog.products_by_skus по cookie), fav.
   Крошки/заголовок/грид/empty-state — переиспользуют .cat-crumbs/.cat-title/.cat-grid (каталог)
   и .empty-box (заведён выше для блога) — новых классов странице не требуется. */

/* ===================== КОНТЕНТ-СТРАНИЦЫ — about/delivery/contacts/offer/privacy (Ф2b Task 5) =====================
   ctx — только _base() (tenant/nav), как rackcore/page_*.html: реквизиты/контакты — из
   tenant.legal_name/requisites/contacts (одни и те же на всех витринах ФЕРМО). Hero-полоса —
   .pg-hero/.pg-stats (общие компоненты выше). */
.pg-sec { margin: var(--s-11) 0; }
.pg-sec--top { margin-top: var(--s-8); } /* контакты: между H1 и первой секцией меньше воздуха, чем после hero */
.pg-sec h2 { font-size: 24px; letter-spacing: -.5px; margin-bottom: var(--s-3); }
.pg-sub { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); color: var(--muted); margin: 0 0 var(--s-7); max-width: 640px; }

.pg-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.pg-tier { position: relative; background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-xl); padding: var(--s-7); }
.pg-tier.on { border-color: var(--ac); box-shadow: 0 18px 40px -28px var(--ac-sh); }
.pg-tier-badge { position: absolute; top: -11px; left: var(--s-7); background: var(--ac); color: #fff; font-size: var(--fs-xs);
  font-weight: 700; letter-spacing: .04em; padding: 4px 11px; border-radius: 999px; }
.pg-tier-term { font-family: var(--font-price); font-weight: 700; font-size: 22px; letter-spacing: -.4px; color: var(--ac); margin-bottom: 4px; }
.pg-tier-t { font-weight: 700; font-size: 17px; margin-bottom: var(--s-3); }
.pg-tier-d { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-base); line-height: 1.55; color: var(--muted); margin: 0 0 var(--s-6); }
.pg-tier-list { display: flex; flex-direction: column; gap: var(--s-3); border-top: 1px solid var(--line-3); padding-top: var(--s-5); }
.pg-tier-li { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-base); color: var(--ink-3); }
.pg-tier-li .ic-sm { color: var(--ac); flex: none; }

.pg-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
/* .pg-steps--4 — вариант «как мы работаем» с 4 шагами (B2B-лендинг, Ф2b Task 6);
   существующие responsive-переопределения .pg-steps (2 → 1 колонка) применяются как есть. */
.pg-steps--4 { grid-template-columns: repeat(4, 1fr); }
.pg-step { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-7); }
.pg-step-n { font-family: var(--font-price); font-weight: 700; font-size: var(--fs-md); color: var(--ac); margin-bottom: var(--s-4); }
.pg-step h3 { font-size: 17px; margin-bottom: var(--s-2); }
.pg-step p { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-base); line-height: 1.55; color: var(--muted); margin: 0; }

.pg-info-band { background: var(--navy-1); color: #fff; border-radius: var(--r-lg); padding: var(--s-6) var(--s-7);
  display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; margin-top: var(--s-7); }
.pg-ib-led { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-md); color: var(--ac-soft); font-weight: 600; }
.pg-ib-sep { color: var(--navy-line); }
.pg-ib-txt { font-size: var(--fs-md); color: var(--on-dark); }

.pg-req-card { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-3) var(--s-8); }
.pg-req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-10); }
.pg-req-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); padding: var(--s-4) 0; border-bottom: 1px solid var(--line-3); }
.pg-req-row:last-child { border-bottom: none; }
.pg-req-row .k { font-size: var(--fs-md); color: var(--muted); }
.pg-req-row .v { font-size: var(--fs-md); color: var(--ink); font-weight: 600; text-align: right; }

.pg-contacts-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--s-8); align-items: stretch; }
.pg-cocards { display: flex; flex-direction: column; gap: var(--s-6); }
.pg-cocard { background: var(--paper); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s-8); }
.pg-ct-cap { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: var(--s-5); }
.pg-ct-cap--pad { padding-top: var(--s-3); }
.pg-ct-phone { display: block; font-family: var(--font-price); font-weight: 700; font-size: 24px; letter-spacing: -.4px; color: var(--ink); margin-bottom: var(--s-2); }
.pg-ct-phone.sub { font-size: 17px; color: var(--ink-3); }
.pg-ct-email { display: inline-block; font-size: var(--fs-md); color: var(--ac); margin-top: var(--s-2); }
.pg-ct-emails { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-5); }
.pg-ct-email-row { display: flex; flex-direction: column; }
.pg-ct-email-cap { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.pg-ct-email-row .pg-ct-email { margin-top: 2px; }
.pg-ct-hours { font-family: var(--font-body); font-weight: 400; font-size: var(--fs-base); color: var(--muted); margin-top: var(--s-4); line-height: 1.5; }
.pg-ct-soc { display: flex; gap: var(--s-4); margin-top: var(--s-6); }
.pg-ct-soc a { display: inline-flex; align-items: center; gap: var(--s-2); height: 42px; padding: 0 var(--s-5); border: 1.5px solid var(--line);
  border-radius: var(--r-md); color: var(--ink-2); font-size: var(--fs-md); font-weight: 600; transition: border-color var(--dur) ease, color var(--dur) ease; }
.pg-ct-soc a:hover { border-color: var(--ac); color: var(--ac); }
.pg-ct-addr { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-md); color: var(--ink-2); line-height: 1.5; }
.pg-ct-addr .ic-sm { color: var(--ac); flex: none; margin-top: 2px; }

.pg-map { background: var(--navy-grad); border-radius: var(--r-xl); min-height: 340px; position: relative; overflow: hidden; }
.pg-map-grid { position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 40px); }
.pg-map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; }
.pg-map-label { background: var(--navy-1); color: #fff; font-size: var(--fs-sm); padding: 7px 12px; border-radius: var(--r-sm);
  white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--sh-1); margin-bottom: 6px; }
.pg-map-dot { width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: rotate(45deg); background: var(--ac);
  box-shadow: 0 0 0 5px var(--ac-sh); }

/* Юридические страницы (оферта/конфиденциальность) — простая типографика */
.prose { color: var(--ink-3); font-family: var(--font-body); font-weight: 400; font-size: var(--fs-xl); line-height: 1.7; max-width: 780px; }
.prose h2 { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); margin: var(--s-8) 0 var(--s-3); letter-spacing: -.3px; }
.prose p { margin: 0 0 var(--s-4); }
.prose a { color: var(--ac); }
.pg-legal-note { font-size: var(--fs-sm); }

/* ===================== МЕДИА (Task 3-5: каркас+главная) ===================== */
@media (max-width: 980px) {
  .wrap { padding-left: var(--wrap-pad-sm); padding-right: var(--wrap-pad-sm); }
  .hits-grid { grid-template-columns: repeat(3, 1fr) !important; } /* главная: «Популярное» */

  /* Каталог (Task 1): сайдбар уходит из sticky-колонки наверх, грид — 2 колонки */
  .cat-layout { grid-template-columns: minmax(0, 1fr) !important; }
  .cat-side { position: static !important; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* Товар (Task 2): тумбы/контент/buy-box — в 1 колонку, тумбы становятся горизонтальной
     полосой над картинкой, buy-box теряет sticky, related — 2 колонки */
  .pd-top, .pd-top--nothumbs { grid-template-columns: minmax(0, 1fr) !important; }
  .pd-thumbs { flex-direction: row !important; overflow-x: auto !important; max-height: none !important; }
  .pd-thumb { width: 84px !important; flex: none !important; }
  .pd-buybox { position: static !important; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Корзина/checkout (Task 3): сводка теряет sticky-колонку, уходит под позиции */
  .cart-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .cart-sum { position: static !important; }

  /* Кабинет (Task 4): сайдбар уходит из sticky-колонки наверх */
  .acc-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .acc-side { position: static !important; }
}

@media (max-width: 860px) {
  .hdr-row { flex-wrap: wrap !important; gap: var(--s-4) !important; }
  .hdr-search { order: 5; flex-basis: 100% !important; flex: 1 1 100% !important; }
  .r-navrow { overflow-x: auto; gap: var(--s-6) !important; }
  .r-hdrlink { display: none !important; }
  .r-grid4 { grid-template-columns: repeat(2, 1fr) !important; }
  .r-foot { grid-template-columns: repeat(2, 1fr) !important; }

  .mega-desk { display: none !important; }
  .mega-mob { display: flex !important; }

  /* Главная (Task 5): hero в 1 колонку, гриды секций схлопываются. minmax(0,1fr), НЕ голый
     1fr — иначе трек не сжимается уже min-content карточки и на узких экранах (320px, iPhone SE
     1-2 gen) .pcard распирает документ горизонтально (см. коммент у .cat-grid). */
  .hero-grid { grid-template-columns: 1fr !important; }
  .cats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .hits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .brands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .b2b-band { grid-template-columns: 1fr !important; }
  .b2b-band-metrics { border-left: none !important; border-top: 1px solid rgba(255, 255, 255, .08) !important; }

  /* Конфигуратор (Task 6): карты типа техники — 2 колонки вместо 3 */
  .co-dmode--3 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Корзина/checkout (Task 3): позиция — колонкой (тумб+инфо сверху, кол-во/сумма снизу),
     карта ПВЗ уходит под список */
  .ci { flex-wrap: wrap !important; }
  .ci-side { flex-direction: row-reverse !important; align-items: center !important; width: 100% !important; }
  .pvz-wrap.has-map { grid-template-columns: 1fr !important; }
  .pvz-wrap.has-map .cdek-map { min-height: 240px !important; order: -1 !important; }

  /* Блог/бренды/контент (Task 5): гриды 3 → 2 колонки, hero-заголовок мельче, контакты/бренд стекаются */
  .bcard-grid, .pg-vals, .pg-tiers, .pg-steps, .pg-stats, .pg-stats--onlight { grid-template-columns: repeat(2, 1fr) !important; }
  .pg-h1 { font-size: 32px !important; }
  .pg-contacts-grid { grid-template-columns: 1fr !important; }
  .pg-map { min-height: 240px !important; }
  .bh-card { flex-direction: column !important; text-align: center !important; }
  .bh-actions { justify-content: center !important; }
  .pg-cta { flex-direction: column !important; align-items: flex-start !important; }
}

@media (max-width: 520px) {
  .r-grid4 { grid-template-columns: 1fr !important; }
  .r-foot { grid-template-columns: 1fr !important; }
  .r-catlabel { display: none !important; }

  /* Utility-бар (fix): свернуть до города + «Войти», иначе телефон/почта/соцссылки/МАКС
     в .util-r не помещаются в 375px → .page шире вьюпорта и боковой скролл на всех страницах.
     Оставляем город (гео) и auth — телефон/почта/соцсети дублируются в футере. */
  .util-in { gap: var(--s-4) !important; overflow: hidden !important; }
  .util-r { gap: var(--s-4) !important; }
  .util-r a[href^="mailto"], .util-r a[target="_blank"], .util-phone { display: none !important; }

  /* Главная (Task 5): гриды секций — 1 колонка. minmax(0,1fr), НЕ голый 1fr — иначе трек не
     сжимается уже min-content карточки и на 320px .pcard распирает документ. */
  .cats-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .hits-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .brands-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .blog-grid { grid-template-columns: minmax(0, 1fr) !important; }

  /* Каталог (Task 1): грид в 1 колонку, шапка раздела стекается */
  .cat-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .cat-head { flex-direction: column !important; align-items: flex-start !important; }

  /* Товар (Task 2): related — 1 колонка, spec-строки стекаются */
  .pd-related-grid { grid-template-columns: 1fr !important; }
  .pd-spec-row { flex-direction: column !important; gap: var(--s-1) !important; }
  .pd-spec-k { width: auto !important; }

  /* Корзина/checkout (Task 3): формы/переключатели — в 1 колонку, заказ/success — компактнее */
  .co-dmode, .co-btype, .co-fields { grid-template-columns: 1fr !important; }
  .ship-row { flex-direction: column !important; }
  .ship-row .btn-secondary { width: 100% !important; }
  .ok-card { padding: 32px 22px !important; }
  .ord-card { padding: 4px var(--s-6) !important; }
  .ord-row { flex-direction: column !important; align-items: flex-start !important; gap: var(--s-1) !important; }
  .ord-row .v { text-align: left !important; }

  /* Кабинет/авторизация (Task 4): статы в 1 колонку, карточки заказа/CTA стекаются */
  .auth-card { padding: var(--s-8) var(--s-6) !important; }
  .acc-stats { grid-template-columns: 1fr !important; }
  .acc-order { flex-wrap: wrap !important; }
  .acc-order-sum { margin-left: 63px !important; }
  .acc-cta-card { flex-direction: column !important; text-align: center !important; }

  /* Блог/бренды/контент (Task 5): всё в 1 колонку */
  .bcard-grid, .pg-vals, .pg-tiers, .pg-steps, .pg-stats, .pg-stats--onlight, .pg-req-grid { grid-template-columns: 1fr !important; }
  .bh-lines { flex-direction: column !important; }
  .pg-cta-actions { width: 100% !important; }
  .pg-cta-actions .btn-light, .pg-cta-actions .btn-ghost-dark { flex: 1 !important; }
}

/* ---- Чекбокс согласия (152-ФЗ: обязательная галочка при регистрации/checkout) ---- */
.consent-check { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 12px;
  font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.consent-check input { margin-top: 2px; flex: none; width: 16px; height: 16px; cursor: pointer; accent-color: var(--ac); }
.consent-check a { text-decoration: underline; }

/* ---- Брендинг / медиакит (/page/brand): логотипы, аватарки, палитра ---- */
.bk-h { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); margin: 34px 0 6px; }
.bk-h:first-of-type { margin-top: 4px; }
.bk-note { color: var(--muted-2); font-size: 14px; margin: 0 0 16px; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.bk-grid--ava { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.bk-card { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper); display: flex; flex-direction: column; }
.bk-prev { flex: 1; min-height: 150px; display: grid; place-items: center; padding: 28px 20px; }
.bk-card--dark .bk-prev { background: linear-gradient(135deg, var(--ac), var(--ac-dk)); }
.bk-card--soft .bk-prev { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.bk-prev img { max-width: 100%; height: auto; }
.bk-ava { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 10px 30px -8px rgba(11,18,32,.4); }
.bk-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.bk-label { font-size: 14px; color: var(--muted-2); }
.bk-dl { display: inline-flex; gap: 8px; flex: none; }
.bk-dl a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--ac); color: var(--ac);
  font-size: 12px; font-weight: 800; letter-spacing: .04em; text-decoration: none; transition: background .15s, color .15s; }
.bk-dl a:hover { background: var(--ac); color: #fff; }
.bk-palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.bk-sw { display: flex; flex-direction: column; align-items: stretch; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, transform .1s; }
.bk-sw:hover { border-color: var(--ac-soft); }
.bk-sw:active { transform: scale(.98); }
.bk-sw::before { content: ""; display: block; height: 68px; background: var(--c); }
.bk-sw--light::before { box-shadow: inset 0 0 0 1px var(--line-hover); }
.bk-sw-name { padding: 10px 12px 2px; font-size: 12px; color: var(--muted-2); }
.bk-sw code { padding: 0 12px 12px; font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.bk-sw.copied { border-color: var(--ac); }
.bk-sw.copied .bk-sw-name::after { content: " · скопировано"; color: var(--ac); }
@media (max-width: 560px) { .bk-grid { grid-template-columns: 1fr; }
  .bk-meta { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* iOS Safari зумит вьюпорт при фокусе на input/textarea/select с font-size < 16px
   (раздражающий авто-зум на телефоне: поиск/фильтр цены/qty/формы были 14–15px). На мобиле
   поднимаем текстовые поля до 16px — десктопные дизайн-размеры не трогаем. checkbox/radio/range
   (не текстовые) исключаем. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select, textarea { font-size: 16px; }
}

/* Мобильный нижний таб-бар (thumb-зона): Главная/Каталог/Поиск/Корзина/Кабинет. Только на мобиле
   (desktop → display:none). Иконки currentColor → цвет из .botnav-i. Контент не под баром
   (padding-bottom body), cookie-бар поднят выше. Разметка — общий _shared/_botnav.html. */
.botnav { display: none; }
@media (max-width: 768px) {
  .botnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
    background: var(--paper); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(11,18,32,.06); padding-bottom: env(safe-area-inset-bottom); }
  .botnav-i { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 0 6px; min-height: 50px; text-decoration: none; color: var(--muted);
    font-size: 10px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
  .botnav-i.on { color: var(--ac); }
  .botnav-i .bn-ic { width: 23px; height: 23px; }
  .botnav-icw { position: relative; display: inline-flex; }
  .botnav-n { position: absolute; top: -6px; left: 12px; box-sizing: border-box; min-width: 16px;
    height: 16px; padding: 0 4px; border-radius: 8px; background: var(--ac); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
  body { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }
  .cookie-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }
}
