/* ==========================================================================
   COOLBREW shop — витрина и админка поверх coolbrew-web.css (тот файл не правим).
   Светлая тема, один акцент (primary-кнопка и ключевой статус), без градиентов,
   теней и анимаций. Раскладки: ≤600 смартфон · 601–1024 планшет · >1024 десктоп.
   Каталог: 2 / 3 / 4 колонки. Боковой отступ 16 px, без горизонтальной прокрутки.
   ========================================================================== */

/* ---- 0. База страницы ------------------------------------------------- */
html, body { overflow-x: clip; }
.shop-shell { max-width: 1280px; min-height: 100vh; display: flex; flex-direction: column; }
.shop-main { flex: 1 0 auto; padding-top: 84px; }            /* место под язычок, свисающий ниже шапки */
.shop svg { max-width: 100%; }
.shop a { text-decoration: none; }
.shop p a { text-decoration: underline; }
.shop a.cb-btn:not(.cb-btn--icon) { display: inline-block; text-align: center; }
.shop .cb-btn[disabled] { opacity: .5; cursor: not-allowed; }
.shop .cb-btn--primary[disabled]:hover { background: var(--brand-orange); border-color: var(--brand-orange); }
.shop-muted { color: var(--ink-muted); }

/* типографика витрины: крупный заголовок набирается Geologica 800 */
.shop-h1 { font-size: 40px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.shop-h1--sm { font-size: 28px; line-height: 1.15; }
.shop-lead { font-size: 16px; line-height: 1.45; color: var(--ink-muted); margin: 8px 0 0; max-width: 60ch; }

/* ---- 1. Шапка --------------------------------------------------------- */
.shop-topbar { gap: var(--space-8) var(--space-16); }
.shop-topbar .cb-brand { flex: 0 0 auto; }
.shop-nav { display: flex; align-items: center; gap: 2px; flex: 0 1 auto; flex-wrap: wrap; min-width: 0; }
.shop-nav__link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.shop-nav__link:hover { background: var(--ground-alt); }
.shop-nav__link.is-active { background: var(--ink); color: var(--ground); }
.shop-nav__link--b2b { color: var(--ink-muted); }
.shop-nav__tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.shop-nav__link.is-active .shop-nav__tag { color: var(--ground); opacity: .75; }
.shop-actions { flex: none; margin-left: auto; }   /* разделы и «Для бизнеса» слева, иконки прижаты вправо (этап 4) */
.shop-actions .cb-btn--icon { border-color: var(--line-strong); }
.shop-actions .cb-btn--icon:hover { border-color: var(--ink); }

/* подменю админки под шапкой (block admin в base.html) */
.shop-admin-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 12px 0 0 68px; } /* правее язычка, который свисает ниже шапки */
.shop-admin-nav a { padding: 6px 12px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 600; color: var(--ink-muted); }
.shop-admin-nav a:hover { background: var(--ground-alt); color: var(--ink); }
.shop-admin-nav a.is-active, .shop-admin-nav a[aria-current="page"] { background: var(--ink); color: var(--ground); }
.shop-admin-nav .ui-label { margin-right: 6px; }

/* ---- 2. Сообщения ----------------------------------------------------- */
.shop-flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.shop-flash { padding: 10px 14px; border-radius: var(--radius-control); font-size: 13px; font-weight: 600; }
.shop-flash--ok { background: var(--ok-soft); color: var(--ok); }
.shop-flash--error { background: var(--bad-soft); color: var(--bad); }

/* ---- 3. Главная: фраза бренда, плитки разделов ------------------------ */
.shop-hero { padding: 4px 0 32px; }
.shop-hero .shop-h1 { max-width: 18ch; }
.shop-block { margin-bottom: 44px; }
.shop-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-block__head h2 { margin: 0; }
.shop-empty { color: var(--ink-muted); padding: 20px 0; margin: 0; }
.shop-empty a { text-decoration: underline; }
.shop-page-head { margin-bottom: 18px; }

.shop-tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-tile { display: flex; flex-direction: column; gap: 6px; min-height: 124px; padding: 18px 20px; color: var(--ink); }
.shop-tile:hover { background: var(--surface-sunken); }
.shop-tile__lead { color: var(--ink-muted); }
.shop-tile--b2b { color: var(--ink-muted); }
.shop-tag { align-self: flex-start; margin-top: auto; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--ground); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }

/* ---- 4. Каталог: сетка и карточка ------------------------------------- */
.shop-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; color: var(--ink); }
.shop-card:hover { background: var(--surface-sunken); }
.shop-card__media { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: 16px; background: var(--ground); color: var(--line-strong); margin-bottom: 4px; } /* место под фото; пока знак */
.shop-card__title { font-size: 14px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.shop-card__sub { color: var(--ink-muted); overflow-wrap: anywhere; }
.shop-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 6px 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.shop-price { font-size: 15px; font-weight: 600; white-space: nowrap; }

/* фильтр раздела: pills на белом фоне страницы */
.shop-filter { margin-bottom: 18px; }
.shop-filter .cb-pill { background: var(--ground-alt); }
.shop-filter .cb-pill:hover { background: var(--surface-sunken); }
.shop-filter .cb-pill.is-active { background: var(--ink); color: var(--ground); }

/* бейджи наличия: всегда с текстом. Класс из stock_badge(): ok | order | warn (синонимы оставлены на случай других имён) */
.shop-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--surface-sunken); color: var(--ink-muted); }
.shop-badge--ok, .shop-badge--ok-soft, .shop-badge--in_stock, .shop-badge--in-stock, .shop-badge--available { background: var(--ok-soft); color: var(--ok); }
.shop-badge--order, .shop-badge--orange, .shop-badge--orange-soft, .shop-badge--on_order, .shop-badge--on-order, .shop-badge--note, .shop-badge--preorder { background: var(--orange-soft); color: var(--orange-ink); }
.shop-badge--warn, .shop-badge--warn-soft, .shop-badge--unknown, .shop-badge--stale, .shop-badge--check { background: var(--warn-soft); color: var(--warn); }

/* ---- 5. Страница товара ----------------------------------------------- */
.shop-product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.shop-product__media { display: grid; place-items: center; aspect-ratio: 1 / 1; border-radius: var(--radius-card); background: var(--ground-alt); color: var(--line-strong); } /* место под фото; пока знак */
.shop-product__main > * + * { margin-top: 14px; }
.shop-product__main .shop-lead { margin-top: 6px; }
.shop-product__meta { color: var(--ink-muted); }
.shop-product__avail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-product__price { font-size: 28px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; }
.shop-product__buy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shop-text { white-space: pre-line; font-size: 15px; line-height: 1.55; max-width: 64ch; overflow-wrap: anywhere; }
.shop-specs { margin-top: 20px; }
.shop-specs .ui-h2 { margin: 0 0 12px; }
.shop-specs dl { margin: 0; display: grid; gap: 12px; }
.shop-specs__row dt { margin-bottom: 4px; }
.shop-specs__row dd { margin: 0; font-size: 14px; }
.shop-product__sections { color: var(--ink-muted); }
.shop-product__sections a { color: var(--ink); text-decoration: underline; }

/* ---- 6. Заглушки и 404 ------------------------------------------------ */
.shop-placeholder { max-width: 560px; padding: 16px 0 48px; }
.shop-placeholder .cb-btn { margin-top: 20px; }

/* ---- 7. Подвал -------------------------------------------------------- */
.shop-foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 8px; font-size: 13px; color: var(--ink-muted); }
.shop-foot__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shop-foot__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.shop-foot__col .ui-label { margin-bottom: 4px; }
.shop-foot__col a { color: var(--ink); }
.shop-foot__col a:hover { text-decoration: underline; }
.shop-foot__tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.shop-foot a.shop-foot__admin { color: var(--ink-muted); }
.shop-foot__bottom { display: flex; align-items: center; gap: 10px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }
.shop-foot__bottom svg { color: var(--brand-orange); flex: none; }

/* ---- 8. Нижняя панель смартфона --------------------------------------- */
.shop-dock { display: none; }

/* ---- 9. Админка: формы и таблицы в стиле системы ----------------------
   Действует на страницах /admin (класс shop-main--admin ставит base.html).
   Сырые элементы (h1, table, input, button) и классы ERP (.card, .btn, .flash,
   .muted, .mono, .grid2, form.inline, label.chk, .scroll) выглядят как система
   без дополнительной разметки; есть и явные классы .shop-form / .shop-field. */
.shop-main--admin { padding-top: 72px; }
.shop-main--admin h1 { font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 16px; }
.shop-main--admin h2 { font-size: 16px; line-height: 1.3; font-weight: 600; margin: 0 0 10px; }
.shop-main--admin h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.shop-main--admin .card, .shop-admin-card { background: var(--ground-alt); border-radius: var(--radius-card); padding: 20px 22px; margin-bottom: 16px; min-width: 0; }
.shop-main--admin .muted { color: var(--ink-muted); }
.shop-main--admin .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.shop-main--admin .right { text-align: right; }
.shop-main--admin .grid2, .shop-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shop-main--admin .grid2.wide-left, .shop-form__row--wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.shop-main--admin .scroll, .shop-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }

/* таблицы: сырая <table> выглядит как .cb-table */
.shop-main--admin table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.shop-main--admin th { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); color: var(--ink-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.shop-main--admin td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.shop-main--admin tbody tr:hover td { background: var(--surface-sunken); }
.shop-main--admin tr[data-href] { cursor: pointer; }
.shop-main--admin td form { display: inline; }

/* поля */
.shop-form { display: grid; gap: 14px; max-width: 760px; }
.shop-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.shop-field > label { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.shop-field__hint { font-size: 12px; color: var(--ink-faint); }
/* сырые поля без класса .cb-input (поля с .cb-input остаются как в coolbrew-web.css) */
.shop-main--admin input:not(.cb-input):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.shop-main--admin select:not(.cb-input), .shop-main--admin textarea:not(.cb-input),
.shop-input, .shop-select, .shop-textarea {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--ground); border: 1px solid var(--line-strong);
  border-radius: var(--radius-control); padding: 8px 12px; width: 100%; max-width: 100%; min-width: 0; outline: none; }
.shop-main--admin textarea:not(.cb-input), .shop-textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.shop-main--admin input:focus, .shop-main--admin select:focus, .shop-main--admin textarea:focus,
.shop-input:focus, .shop-select:focus, .shop-textarea:focus { border-color: var(--brand-orange); }
.shop-main--admin input::placeholder, .shop-main--admin textarea::placeholder { color: var(--ink-faint); }
.shop-main--admin input:disabled, .shop-main--admin select:disabled, .shop-main--admin textarea:disabled { background: var(--surface-sunken); color: var(--ink-muted); }
.shop-main--admin input[type="checkbox"], .shop-main--admin input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); vertical-align: middle; }
.shop-main--admin label.chk, .shop-check { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--ink); cursor: pointer; }
.shop-check-list { display: flex; flex-direction: column; gap: 6px; }
.shop-main--admin form.inline, .shop-form--inline { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; }
.shop-main--admin form.inline label, .shop-form--inline .shop-field { flex: 1 1 160px; display: flex; flex-direction: column; gap: 4px; }
.shop-form__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 4px; }

/* кнопки: сырой <button> без класса .cb-btn и .btn выглядят как cb-btn; один primary на форму */
.shop-main--admin button:not(.cb-btn), .shop-main--admin .btn, .shop-main--admin input[type="submit"], .shop-main--admin input[type="button"] {
  font: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-pill); border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); cursor: pointer; display: inline-block; text-align: center; }
.shop-main--admin button:not(.cb-btn):hover, .shop-main--admin .btn:hover, .shop-main--admin input[type="submit"]:hover { background: var(--ink); color: var(--ground); }
.shop-main--admin .btn.primary, .shop-main--admin button.primary { background: var(--brand-orange); border-color: var(--brand-orange); color: var(--on-orange); }
.shop-main--admin .btn.primary:hover, .shop-main--admin button.primary:hover { background: #B83B19; border-color: #B83B19; color: var(--on-orange); }
.shop-main--admin .btn.ghost, .shop-main--admin button.ghost { border-color: var(--line-strong); color: var(--ink-muted); }
.shop-main--admin .btn.ghost:hover, .shop-main--admin button.ghost:hover { background: var(--ground-alt); color: var(--ink); }
.shop-main--admin button.small, .shop-main--admin .btn.small { padding: 5px 11px; font-size: 12px; }
.shop-main--admin button[disabled], .shop-main--admin .btn[disabled] { opacity: .5; cursor: not-allowed; }
.shop-main--admin a.cb-btn { display: inline-block; }

/* сообщения в стиле ERP (.flash / .flash.err) = shop-flash */
.shop-main--admin .flash { padding: 10px 14px; border-radius: var(--radius-control); margin-bottom: 14px; font-size: 13px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.shop-main--admin .flash.err { background: var(--bad-soft); color: var(--bad); }

/* справочные данные 1С справа от формы: пары «подпись — значение» */
.shop-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13px; }
.shop-kv dt { color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.shop-kv dd { margin: 0; overflow-wrap: anywhere; }

/* статус «да/нет» в таблицах и сводке */
.shop-yes { color: var(--ok); font-weight: 600; }
.shop-no { color: var(--ink-faint); }
.shop-bad { color: var(--bad); font-weight: 600; }

/* ---- 10. Раскладки ---------------------------------------------------- */
/* планшет 601–1024: каталог 3 колонки. Разделы розницы — в кнопке «Разделы» (раздел 13); навигация бизнеса — отдельной строкой
   под брендом и иконками */
@media (max-width: 1024px) {
  .shop--biz .shop-topbar .cb-brand { order: 1; flex: 1 1 auto; }
  .shop--biz .shop-topbar__end { order: 2; }
  .shop--biz .shop-nav { order: 3; flex: 1 1 100%; padding: 2px 0 0 68px; } /* вторая строка начинается правее язычка */
  .shop-main { padding-top: 56px; }
  .shop-main--admin { padding-top: 48px; }
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-product { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .shop-h1 { font-size: 34px; }
}

/* смартфон ≤600: меню и иконки шапки спрятаны, внизу закреплённая панель; каталог 2 колонки */
@media (max-width: 600px) {
  .cb-tab { width: 44px; height: 99px; }
  .cb-topbar--sticky .cb-brand__logo { padding-left: 56px; }
  .cb-brand__logo .cb-wordmark { height: 26px; }
  .shop-admin-nav { padding-left: 56px; }
  .shop-topbar .cb-brand { flex: 1 1 auto; }
  .shop-nav, .shop-actions { display: none; }
  .shop-main { padding-top: 56px; }
  .shop-main--admin { padding-top: 48px; }
  .shop-shell { padding-bottom: calc(76px + env(safe-area-inset-bottom)); } /* подвал не прячется под панель */
  .shop-h1 { font-size: 28px; }
  .shop-h1--sm { font-size: 24px; }
  .shop-lead { font-size: 15px; }
  .shop-hero { padding-bottom: 24px; }
  .shop-block { margin-bottom: 32px; }
  .shop-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-tile { min-height: 108px; padding: 14px 16px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .shop-card { padding: 12px; }
  .shop-card__title { font-size: 13px; }
  .shop-product { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .shop-product__media { aspect-ratio: 4 / 3; }
  .shop-product__price { font-size: 24px; }
  .shop-foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .shop-main--admin .grid2, .shop-form__row, .shop-main--admin .grid2.wide-left, .shop-form__row--wide-left { grid-template-columns: minmax(0, 1fr); }
  .shop-kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .shop-kv dd { margin-bottom: 8px; }

  .shop-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--ground); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .shop-dock__item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; border-radius: var(--radius-control);
    font-size: 11px; font-weight: 600; color: var(--ink-muted); }
  .shop-dock__item[aria-expanded="true"], .shop-dock__item.is-active { color: var(--ink); }
  /* раскрытое меню разделов: лист над нижней панелью, под большим пальцем */
  .shop-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: fixed; left: 16px; right: 16px;
    bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 29; background: var(--ground-alt); border-radius: var(--radius-card); padding: 10px; }
  .shop-nav.is-open .shop-nav__link { padding: 12px 14px; font-size: 15px; white-space: normal; }
  .shop-nav.is-open .shop-nav__link:hover { background: var(--ground); }
  .shop-nav.is-open .shop-nav__link.is-active:hover { background: var(--ink); }
}

/* десктоп >1024: ничего сверх базовых правил — 4 колонки, меню в одной строке с брендом */

/* ---- 11. Этап 2: корзина, оформление, заказ, кабинет ------------------
   Те же правила: один акцент (primary-кнопка, ключевая цифра кабинета), карточки cb-card без теней,
   активные состояния ink на ground, статусы ok/warn/bad всегда с текстом. Раскладки ≤600 / 601–1024 / >1024. */

/* счётчик корзины: бейдж ink на ground у иконки в шапке и в нижней панели; при 0 base.html его не выводит */
.shop-cart-link { position: relative; }
.shop-cart-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ground); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; pointer-events: none; }
.shop-cart-link:hover .shop-cart-count { background: var(--ground); color: var(--ink); }
.shop-dock .shop-cart-count { top: 0; right: auto; left: calc(50% + 6px); }

/* формы покупки: страница товара (количество 1–99) и карточка сетки (qty=1, outline-кнопка — акцент остаётся за страницей товара) */
.shop-qty { width: 78px; text-align: center; padding-left: 8px; padding-right: 8px; }
.shop-buy { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.shop-buy__qty { display: flex; flex-direction: column; gap: 6px; }
.shop-card__link { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; color: inherit; }
.shop-card__link:hover .shop-card__title { text-decoration: underline; }
.shop-card__buy { margin: 8px 0 0; }
.shop-card__btn { width: 100%; padding: 7px 12px; font-size: 12.5px; }

/* двухколоночные страницы: основное слева, итоги справа (кабинет — наоборот, узкая колонка слева) */
.shop-cart, .shop-checkout, .shop-order, .shop-cabinet { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.shop-cabinet { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.shop-cart__main, .shop-checkout__form, .shop-order__main, .shop-cabinet__side, .shop-cabinet__main, .shop-profile { display: grid; gap: 16px; }
.shop-cart__side, .shop-checkout__side, .shop-order__side { display: grid; gap: 16px; position: sticky; top: 84px; }
.shop-profile { max-width: 640px; }
.shop .cb-card > .ui-h2 { margin: 0 0 12px; }
.shop .cb-card__head .ui-h2 { margin: 0; }
.shop a.cb-card__hint:hover { text-decoration: underline; }

/* строки корзины и заказа: название и цена слева, количество, сумма, удаление справа; подсказка под строкой */
.shop-lines { display: grid; }
.shop-line { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "title qty amount x" "price qty amount x" "hint hint hint hint";
  gap: 2px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shop-line:first-child { padding-top: 4px; }
.shop-line:last-child { border-bottom: 0; }
.shop-line__title { grid-area: title; font-weight: 600; overflow-wrap: anywhere; }
a.shop-line__title:hover { text-decoration: underline; }
.shop-line__price { grid-area: price; }
.shop-line__qty { grid-area: qty; display: flex; align-items: center; gap: 6px; margin: 0; }
.shop-line__qty--text { font-weight: 600; white-space: nowrap; }
.shop-line__amount { grid-area: amount; font-weight: 600; white-space: nowrap; text-align: right; min-width: 88px; }
.shop-line__remove { grid-area: x; margin: 0; }
.shop-line__x { width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink-muted);
  font: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.shop-line__x:hover { background: var(--surface-sunken); color: var(--ink); }
.shop-line__hint { grid-area: hint; }
.shop-line--static { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title amount" "price amount"; }
.shop-qty__apply { padding: 6px 10px; font-size: 12px; }
.js .shop-qty__apply { display: none; }   /* с JS количество отправляется само при изменении */
.shop-cart-block__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.shop-sum { font-size: 16px; font-weight: 600; white-space: nowrap; }
.shop-cart__note { margin: 0; }

/* итоги (корзина, оформление, заказ) */
.shop-totals__group { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.shop-totals__group .ui-label { display: block; margin-bottom: 6px; }
.shop-totals__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 2px 0; }
.shop-totals__row span:first-child { overflow-wrap: anywhere; }
.shop-totals__row span:last-child { white-space: nowrap; }
.shop-totals__row--sum { font-weight: 600; }
.shop-totals__list { margin: 0; display: grid; gap: 6px; }
.shop-totals__list > div { display: flex; justify-content: space-between; gap: 12px; }
.shop-totals__list > div[hidden] { display: none; }   /* 24.10: «Доставка СДЭК» скрыта, пока СДЭК не выбран (display: flex перебивал hidden) */
.shop-totals__list dt { color: var(--ink-muted); }
.shop-totals__list dd { margin: 0; white-space: nowrap; }
.shop-totals__grand { padding-top: 8px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 600; }
.shop-totals__grand dt { color: var(--ink); }
.shop-order__totals { margin-top: 12px; }
.shop-totals__hint { margin: 12px 0 0; }
.shop-totals__hint a { text-decoration: underline; }
.shop-totals__cta { display: block; width: 100%; margin-top: 16px; }
.shop-totals__clear { margin: 10px 0 0; text-align: center; }
.shop-totals__back { margin: 12px 0 0; text-align: center; }
.shop-totals__back a { text-decoration: underline; color: var(--ink-muted); }

/* поля публичных форм: cb-input с подписью ui-label (сетка .shop-field / .shop-form__row из раздела 9 общая) */
.shop-fields { display: grid; gap: 14px; }
.shop textarea.cb-input { border-radius: 16px; min-height: 84px; resize: vertical; line-height: 1.45; }
.shop-field__hint { margin-top: -1px; }

/* сегмент способа получения на radio (cb-seg без JS): активный — ink на ground; внутри карточки подложка ground */
.shop-seg { background: var(--ground); margin-bottom: 14px; }
.shop-seg__item { position: relative; }
.shop-seg__item input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.shop-seg__item span { display: inline-block; padding: 7px 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.shop-seg__item span:hover { background: var(--surface-sunken); }
.shop-seg__item input:checked + span { background: var(--ink); color: var(--ground); }
.shop-seg__item input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.shop-method > p { margin: 0 0 4px; }
.shop-method[hidden] { display: none; }
.shop-checkout__note { margin: 0; }
.shop-consent { font-size: 13px; padding: 0 4px; }
.shop-totals .shop-consent { margin-top: 12px; padding: 0; }   /* 24.10: согласие под кнопкой «Подтвердить заказ» */
.shop-consent input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); flex: none; }

/* бейджи статуса заказа (на базе .shop-badge): ok — подтверждён/в работе/отгружен, warn — принят, bad — отменён */
.shop-status--ok { background: var(--ok-soft); color: var(--ok); }
.shop-status--warn { background: var(--warn-soft); color: var(--warn); }
.shop-status--bad { background: var(--bad-soft); color: var(--bad); }

/* страница заказа */
.shop-order-head, .shop-cabinet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.shop-order-head__meta, .shop-cabinet-head__links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-cabinet-head__links { gap: 8px; }
.shop-order-key { margin-bottom: 16px; }
.shop-order-key p { margin: 6px 0 10px; }
.shop-order-key__url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.shop-order-sibling p { margin: 6px 0 0; }
.shop-order-sibling a { text-decoration: underline; }
.shop-order .shop-kv { font-size: 14px; }
.shop-order-cancel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0; }
.shop-order__links { margin: 0; }
.shop-order__help { margin: 0; }   /* 09.11: «Вопрос по заказу в Telegram» */
.shop-support-phone { margin: 0 0 32px; }   /* 09.11: телефон на «Службе поддержки» — мелко внизу */
.shop-info .cb-btn { text-decoration: none; }   /* 09.11: кнопка в карточке — без подчёркивания ссылок карточки */
.shop-order__links a { text-decoration: underline; color: var(--ink-muted); }

/* кабинет: карточка лояльности (ключевая цифра — единственный акцент страницы), данные, таблица заказов */
.shop-loyalty__next { margin-top: 12px; font-size: 13px; font-weight: 600; }
.shop-loyalty__bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-sunken); margin-top: 8px; overflow: hidden; }
.shop-loyalty__fill { height: 100%; background: var(--ink); border-radius: var(--radius-pill); }
.shop-loyalty__note { margin: 10px 0 0; }
.shop-cabinet__data .shop-kv { font-size: 14px; }
.shop-orders td a { text-decoration: underline; }
.shop-nowrap { white-space: nowrap; }
.shop .cb-table th { position: static; cursor: default; }
.shop .cb-table th:hover { color: var(--ink-muted); }

/* вход и регистрация: одна узкая сетка */
.shop-account { max-width: 440px; margin: 8px auto 0; display: grid; gap: 12px; }
.shop-account__title { margin: 0 0 4px; }
.shop-account__lead { margin: 0 0 16px; }
.shop-account__foot { text-align: center; margin: 0; }
.shop-account__foot a { text-decoration: underline; }

/* планшет и смартфон: одна колонка, боковые итоги не липнут */
@media (max-width: 1024px) {
  .shop-cart, .shop-checkout, .shop-order, .shop-cabinet { grid-template-columns: minmax(0, 1fr); }
  .shop-cart__side, .shop-checkout__side, .shop-order__side { position: static; }
}
@media (max-width: 600px) {
  .shop-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title x" "price price" "qty amount" "hint hint"; gap: 4px 10px; }
  .shop-line__amount { min-width: 0; }
  .shop-line--static { grid-template-areas: "title amount" "price amount"; }
  .shop-line__remove { justify-self: end; }
  .shop-order-key__url { font-size: 11px; }
  .shop-account { margin-top: 0; }
}

/* ---- 12. Этап 3: бизнес-витрина, регистрация бизнеса, кабинет компании --
   Те же правила: один акцент (primary-кнопка), карточки cb-card без теней, активное — ink на ground,
   статусы ok / warn / bad всегда с текстом. Раскладки ≤600 / 601–1024 / >1024. */

/* надпись над заголовком страниц бизнеса: «Для бизнеса · компания» */
.shop-eyebrow { display: block; margin-bottom: 6px; }
a.shop-eyebrow--link:hover { color: var(--ink); text-decoration: underline; }
.shop-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* лендинг /business */
.shop-biz-hero .shop-lead { max-width: 56ch; }
.shop-biz-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.shop-biz-hero__note { margin: 14px 0 0; max-width: 60ch; }
.shop-biz-hero__note a { text-decoration: underline; }
.shop-biz-points { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shop-biz-point { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; }
.shop-biz-point p { margin: 0; font-size: 14px; line-height: 1.45; }

/* ожидание подтверждения */
.shop-pending { max-width: 600px; padding: 0 0 32px; display: grid; gap: 16px; }
.shop-pending .shop-lead { margin-top: 0; }
.shop-pending__note { margin: 12px 0 0; }

/* цена для бизнеса: «ваша цена», рядом зачёркнутая бизнес-цена сетки (source != grid) */
.shop-bprice { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 0 6px; flex-wrap: wrap; }
.shop-price-base { color: var(--ink-muted); font-size: 12px; font-weight: 400; white-space: nowrap; text-decoration: line-through; }
.shop-price-base--lg { font-size: 16px; }
.shop-yourprice { display: flex; flex-direction: column; gap: 4px; }
.shop-yourprice__row { display: flex; align-items: baseline; gap: 4px 12px; flex-wrap: wrap; }

/* количество: поле с шагом кратности, рядом минимум и кратность */
.shop-mult { font-size: 12px; line-height: 1.4; color: var(--ink-muted); }
.shop-card--biz .shop-mult { margin-top: 2px; }
.shop-buy--biz > .shop-mult, .shop-buy--biz > .ui-small { flex-basis: 100%; margin-top: -4px; }   /* подсказки строкой под полем и кнопкой */
.shop-card__buy--biz { display: flex; gap: 6px; align-items: center; }
.shop-card__buy--biz .shop-qty { width: 64px; flex: none; padding: 7px 6px; font-size: 12.5px; }
.shop-card__buy--biz .shop-card__btn { width: auto; flex: 1 1 auto; min-width: 0; }

/* строка над сеткой каталога: фильтр слева, подпись к ценам и время остатков справа */
.shop-biz-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.shop-biz-bar .shop-filter { margin-bottom: 0; }

/* предупреждение в карточке (минимальная сумма, ERP недоступна) */
.shop-notice { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-control); background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; line-height: 1.4; }
.shop-notice a { text-decoration: underline; color: inherit; }
.cb-card__head + .shop-notice { margin-top: 0; margin-bottom: 12px; }

/* оформление: грузополучатель и номер заявки под основным блоком карточки */
.shop-checkout__extra { margin-top: 14px; }

/* регистрация: переключатель «Физлицо / Бизнес» (виден только с JS), подсказки к ИНН */
.shop-register { max-width: 520px; }
.shop-register__head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.shop-register__head .shop-account__title { margin: 0; }
.shop-register__title { margin: 0 0 4px; }
.shop-register__note { margin: 14px 0 0; }
.shop-kind .shop-seg__item span { padding: 7px 16px; }
html:not(.js) .shop-kind { display: none; }
[data-kind-block][hidden] { display: none; }
[data-kpp-field][hidden] { display: none; }   /* 29.10: КПП у компаний не из России скрыт (display: flex у .shop-field перебивал hidden) */
.shop-inn-hint.is-ok { color: var(--ok); }
.shop-inn-hint.is-bad { color: var(--bad); }
.shop .cb-input:disabled { background: var(--surface-sunken); color: var(--ink-muted); cursor: not-allowed; }

/* кабинет компании: списки, скидки, подписи */
.shop-plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.shop-plain-list li { overflow-wrap: anywhere; }
.shop-plain-list .shop-badge { margin-left: 4px; }
.shop-cabinet__note { margin: 12px 0 0; }
.shop-discounts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.shop-docs__sub { display: block; margin-top: 2px; }
.shop-docs__ships { display: flex; flex-direction: column; gap: 2px; }
.shop-docs__sub a, .shop-rtable td a { text-decoration: underline; }
.shop-rtable td { vertical-align: top; }
.shop-rtable td .shop-badge { white-space: nowrap; }

@media (max-width: 1024px) {
  .shop-biz-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-cabinet--biz .shop-cabinet__main { order: -1; }   /* в одну колонку сначала заказы и документы, реквизиты ниже */
}

@media (max-width: 600px) {
  .shop-biz-points { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .shop-biz-point { padding: 14px 16px; }
  .shop-biz-cta .cb-btn { flex: 1 1 100%; }
  .shop-biz-bar { flex-direction: column; align-items: flex-start; }
  .shop-card__buy--biz { flex-wrap: wrap; }
  .shop-card__buy--biz .shop-qty { width: 100%; }
  .shop-card__buy--biz .shop-card__btn { flex: 1 1 100%; }
  .shop-register { max-width: none; }

  /* таблицы кабинета компании сворачиваются в карточки: подпись колонки слева, значение справа */
  .shop-rtable thead { display: none; }
  .shop-rtable, .shop-rtable tbody, .shop-rtable tr { display: block; width: 100%; }
  .shop-rtable tr { background: var(--ground); border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; }
  .shop-rtable tr:hover td { background: transparent; }
  .shop-rtable td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); text-align: right; }
  .shop-rtable td:last-child { border-bottom: 0; }
  .shop-rtable td[data-label]::before { content: attr(data-label); flex: none; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-muted); text-align: left; }
  .shop-rtable td.shop-rtable__title { display: block; text-align: left; font-weight: 600; padding-top: 0; }
  .shop-rtable td.shop-rtable__title::before { content: none; }
  .shop-rtable td.shop-rtable__title .shop-docs__sub { font-weight: 400; }
  .shop-rtable .shop-nowrap { white-space: normal; }
}

/* --- корзина без перезагрузки (17.10): счётчик на карточке, строка «в корзине» на странице товара, всплывашка ------------- */
.shop-buyblock { margin: 8px 0 0; }
.shop-buyblock--page { margin: 0; }
.shop-buyblock .shop-card__buy { margin: 0; }
.shop-stepper { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill); padding: 2px; }
.shop-stepper form { margin: 0; }
.shop-stepper__btn { width: 34px; height: 30px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; font-weight: 600; line-height: 1; cursor: pointer; }
.shop-stepper__btn:hover { background: var(--surface-sunken); }
.shop-stepper__btn:disabled, .shop-card__btn:disabled { opacity: .5; cursor: progress; }
.shop-stepper__qty { text-align: center; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.shop-incart { margin: 10px 0 0; color: var(--ink-muted); }
.shop-incart a { color: var(--ink); font-weight: 600; }
.shop-buyblock--biz .shop-mult { display: block; margin-top: 6px; }
.shop-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--ground); font-size: 13.5px; transition: opacity .15s, transform .15s; }
.shop-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.shop-toast a { color: var(--ground); font-weight: 600; white-space: nowrap; }
.shop-toast--error { background: var(--bad); }
@media (max-width: 600px) { .shop-toast { bottom: calc(80px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .shop-toast { transition: none; } }

/* --- «Доставка и оплата» (17.10) --- */
.shop-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 32px; }
.shop-info p { margin: 8px 0 0; }
.shop-info .ui-h2 { margin: 0 0 4px; }
.shop-tiers { margin: 10px 0 0; padding: 0 0 0 18px; }
.shop-tiers li { margin: 4px 0; }
@media (max-width: 600px) { .shop-info-grid { grid-template-columns: 1fr; } }
.shop-info--wide { grid-column: 1 / -1; }

/* --- поиск (17.10) --- */
.shop-search { display: flex; gap: 8px; margin: 0 0 20px; max-width: 640px; }
.shop-search__input { flex: 1 1 auto; min-width: 0; }
.shop-search--biz { margin: 0 0 12px; max-width: 420px; }

/* --- единица продажи (этап 3в, 19.10): бейдж «6 банок» рядом с объёмом, под ценой «за упаковку 6 банок» и мелко «≈ 141,67 ₽ за банку»,
       в корзине и заказе «2 упак. (12 банок)»; бизнес — «в упаковке 6 шт» из упаковок 1С рядом с кратностью --- */
.shop-badge--pack { background: var(--ink); color: var(--ground); margin-left: 2px; vertical-align: 1px; }
.shop-unitnote { display: flex; flex-direction: column; gap: 1px; font-size: 12px; line-height: 1.35; color: var(--ink); }
.shop-unitnote__each { color: var(--ink-muted); font-size: 11.5px; }
.shop-unitnote--card { align-items: flex-end; text-align: right; margin-top: -2px; }
.shop-product__pricebox { display: flex; flex-direction: column; gap: 6px; }
.shop-unitnote--page { font-size: 14px; }
.shop-unitnote--page .shop-unitnote__each { font-size: 13px; }
.shop-line__unit { white-space: nowrap; }
.shop-line__each { display: block; }
.shop-totals__unit { margin: -2px 0 4px; }
.shop-product__main > .shop-pack { margin-top: 8px; }
.shop-card--biz .shop-pack { margin-top: 2px; }

/* ---- 13. Этап 4 (19.10): шапка, «Для бизнеса», меню учётной записи, режим бизнеса, быстрые фильтры, «Новинка» ----------
   shop/stage4-ux-spec-2026-10-19.md §1–§6. Активное — ink на ground, без теней; меню — карточка ground-alt с границей line и радиусом 16 px.
   Кнопка «Для бизнеса» — оранжевая с чёрным текстом (правка Стаса 19.10): чёрная с белым выглядела как второй выбранный раздел. */

/* кнопка «Для бизнеса»: отдельный вход, отступлена от разделов на шаг — 24 px до тонкого разделителя.
   Чёрный на brand-orange — контраст 4,6:1 (AA для текста 13 px, 600). Наведение — наоборот: оранжевый текст на чёрном, тот же контраст */
.shop-topbar__sep { flex: none; width: 1px; height: 20px; margin-left: 8px; background: var(--line-strong); }
.shop .shop-biz-btn { flex: none; background: var(--brand-orange); border-color: var(--brand-orange); color: var(--black); white-space: nowrap; }
.shop .shop-biz-btn:hover { background: var(--black); border-color: var(--black); color: var(--brand-orange); }
.shop-biz-btn__short { display: none; }
.shop-sections-btn { display: none; }
/* правый край шапки (base.html): на десктопе контейнера как бы нет — его дети встают в строку шапки сами */
.shop-topbar__end { display: contents; }

/* меню учётной записи (static/menu.js) */
.shop-acct { position: relative; display: inline-flex; }
.shop-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; display: flex; flex-direction: column; gap: 2px;
  min-width: 232px; max-width: min(320px, calc(100vw - 32px)); padding: 8px; background: var(--ground-alt); border: 1px solid var(--line); border-radius: 16px; }
.shop-menu[hidden] { display: none; }
.shop-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }   /* мостик: мышь не теряет меню по пути от иконки */
.shop-menu__head { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.shop-menu__title { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.shop-menu__sub { font-size: 12px; color: var(--ink-muted); }
.shop-menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.shop-menu__item { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.3; color: var(--ink); }
.shop-menu__item:hover, .shop-menu__item:focus-visible { background: var(--ground); }
.shop-acct.is-open > .cb-btn--icon { border-color: var(--ink); }

/* режим бизнеса: «Корзина» в навигации — счётчик в строке, а не над иконкой */
.shop-nav__cart .shop-cart-count { position: static; display: inline-block; margin-left: 6px; }
.shop-nav__cart:hover .shop-cart-count { background: var(--ink); color: var(--ground); }
.shop-nav__cart.is-active .shop-cart-count, .shop-nav__cart.is-active:hover .shop-cart-count { background: var(--ground); color: var(--ink); }

/* якоря кабинета (пункты меню учётной записи): заголовок карточки не прячется под закреплённую шапку и язычок (126 px; на смартфоне 99) */
.shop-anchor { scroll-margin-top: 140px; }
@media (max-width: 600px) { .shop-anchor { scroll-margin-top: 112px; } }

/* «Новинка» — в углу фото карточки, бейджу наличия не мешает */
.shop-card__link { position: relative; }
.shop-new { position: absolute; top: 10px; left: 10px; z-index: 1; }

/* быстрые фильтры раздела: чипы со значками, группа «вкус» | группа «формат» */
.shop-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -8px 0 18px; }
.shop .shop-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--ground-alt); }
.shop .shop-chip:hover { background: var(--surface-sunken); }
.shop .shop-chip.is-active { background: var(--ink); color: var(--ground); }
.shop-chip svg { flex: none; }
.shop-chips__sep { flex: none; width: 1px; height: 18px; margin: 0 4px; background: var(--line-strong); }

/* планшет 601–1024: разделы розницы — в кнопке «Разделы» (карточка под шапкой), «Для бизнеса» — слева от иконок */
@media (min-width: 601px) and (max-width: 1024px) {
  .shop:not(.shop--biz) .shop-sections-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
  .shop:not(.shop--biz) .shop-sections-btn:hover, .shop:not(.shop--biz) .shop-sections-btn[aria-expanded="true"] { border-color: var(--ink); }
  .shop:not(.shop--biz) .shop-nav { display: none; }
  .shop:not(.shop--biz) .shop-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; position: absolute; top: calc(100% + 6px);
    left: 68px; z-index: 35; min-width: 240px; padding: 8px; background: var(--ground-alt); border: 1px solid var(--line); border-radius: 16px; }
  .shop:not(.shop--biz) .shop-nav.is-open .shop-nav__link { padding: 10px 14px; font-size: 14px; }
  .shop:not(.shop--biz) .shop-nav.is-open .shop-nav__link:hover { background: var(--ground); }
  .shop:not(.shop--biz) .shop-nav.is-open .shop-nav__link.is-active:hover { background: var(--ink); }
  .shop-topbar__sep { display: none; }
  /* шапка розницы на планшете — одна строка, язычок свисает ниже неё: отступ контента как на десктопе (бизнес — две строки, 56 px хватает) */
  .shop:not(.shop--biz):not(.shop--admin) .shop-main { padding-top: 80px; }
}
/* узкий планшет и телефон боком: вордмарк меньше, отступы плотнее, чтобы шапка розницы шла одной строкой
   (721–820: «Разделы» и «Для бизнеса» с подписью; 601–720: «Разделы» значком, «Бизнесу») */
@media (min-width: 601px) and (max-width: 820px) {
  .shop:not(.shop--biz) .shop-topbar { column-gap: 10px; }
  .shop:not(.shop--biz) .cb-brand__logo .cb-wordmark { height: 26px; }
}
@media (min-width: 601px) and (max-width: 720px) {
  .shop:not(.shop--biz) .cb-brand__logo .cb-wordmark { height: 24px; }
  .shop:not(.shop--biz) .shop-sections-btn { padding: 8px 11px; }
  .shop:not(.shop--biz) .shop-sections-btn span { display: none; }   /* имя кнопки остаётся в aria-label="Разделы" */
  .shop-biz-btn__full { display: none; }
  .shop-biz-btn__short { display: inline; }
}
/* планшет и смартфон: «Для бизнеса» и иконки — одним блоком справа, переносятся только вместе (не уезжают под язычок) */
@media (max-width: 1024px) {
  .shop-topbar__end { display: flex; align-items: center; gap: 10px; flex: none; margin-left: auto; }
  .shop-topbar__end .shop-actions { margin-left: 0; }
}

/* смартфон ≤600: в шапке вордмарк и компактная «Бизнесу»; меню учётной записи — у «Кабинет» в нижней панели, листом над ней */
@media (max-width: 600px) {
  .shop-topbar__sep, .shop-sections-btn { display: none; }
  .shop .shop-biz-btn { padding: 6px 12px; font-size: 12.5px; }
  .shop-biz-btn__full { display: none; }
  .shop-biz-btn__short { display: inline; }
  .shop-acct--dock { display: flex; position: static; min-width: 0; }
  .shop-acct--dock > .shop-dock__item { flex: 1 1 auto; }
  .shop-acct--dock .shop-menu { position: fixed; top: auto; left: 16px; right: 16px; bottom: calc(70px + env(safe-area-inset-bottom)); max-width: none; z-index: 31; }
  .shop-acct--dock .shop-menu::before { content: none; }
  .shop-acct--dock .shop-menu__item { padding: 12px 14px; font-size: 15px; }
  .shop-chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shop-chips::-webkit-scrollbar { display: none; }
  .shop .shop-chip { flex: none; }
}
/* узкие телефоны: вордмарк 26 px и «Бизнесу» в одну строку помещаются от 390 px; уже — вордмарк пропорционально меньше, отступы плотнее
   (вордмарк не сжимается по ширине и не переносится, кнопка не уходит на вторую строку) */
@media (max-width: 400px) {
  .shop-topbar { column-gap: 10px; }
  .cb-brand__logo .cb-wordmark { height: 22px; }
  .shop .shop-biz-btn { padding: 6px 10px; }
}
@media (max-width: 345px) {
  .shop-topbar { column-gap: 8px; }
  .cb-brand__logo .cb-wordmark { height: 18px; }
  .shop .shop-biz-btn { padding: 6px 9px; }
}

/* ---- 14. Этап 5 (19.10): онлайн-оплата на странице заказа ------------------------------------------------------------------
   Кнопка «Оплатить» — primary (единственный акцент страницы заказа), статус «Оплачен» — бейдж ok. */
.shop-pay__text { margin: 8px 0 14px; }
.shop-pay--ok .shop-pay__text { margin-bottom: 0; }
.shop-pay__note { margin: 10px 0 0; }
.shop-pay .shop-totals__cta { margin-top: 0; }
/* 23.10: доставка СДЭК на оформлении */
.shop-cdek { display: grid; gap: 12px; }
.shop-cdek__pane[hidden], .shop-cdek__result[hidden] { display: none; }
.shop-cdek__result { padding: 12px 14px; border-radius: var(--radius-control); background: var(--ground); }
.shop-cdek__where { margin: 0 0 6px; font-weight: 600; }
.shop-cdek__opts { display: grid; gap: 6px; margin: 0 0 6px; }
.shop-cdek__points { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.shop-cdek__point { display: grid; gap: 2px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--ground); }
.shop-cdek__point:hover, .shop-cdek__point:focus-visible { border-color: var(--brand-orange); }
.shop-cdek__point.is-on { border: 2px solid var(--brand-orange); }
.shop-cdek__point b { font-weight: 600; }
.shop-cdek__point span { font-size: 13px; color: var(--ink-muted); }
.shop-cdek__cities { max-height: 220px; margin-top: -4px; }   /* 06.11 (№61): подсказки городов под полем «Город» */
.shop-cdek__points[hidden] { display: none; }
.shop-paydlg.shop-cdek__dlg { width: min(900px, calc(100vw - 32px)); }
.shop-cdek > .shop-seg { justify-self: start; margin-bottom: 0; }
.shop-cdek__frame iframe { display: block; width: 100%; height: min(600px, calc(100vh - 160px)); border: 0; border-radius: var(--radius-control); }
/* 23.10: окно «Оплатить» — выбор способа оплаты */
.shop-paydlg { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 0; border-radius: var(--radius-card); background: var(--ground); color: var(--ink); }
.shop-paydlg::backdrop { background: rgb(0 0 0 / .45); }
/* 10.11: окно «Мы обновляем упаковку» для пришедших с главного сайта (base.html) — на том же компоненте; ссылка на главный сайт в нижней строке подвала */
.shop-sitenote p { margin: 0 0 12px; line-height: 1.45; }
.shop-sitenote__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.shop-foot__bottom a { color: inherit; text-decoration: none; }
.shop-foot__bottom a:hover { text-decoration: underline; }
.shop-paydlg__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.shop-paydlg__head .ui-h2 { margin: 0; }
.shop-paydlg__close { flex: none; width: 36px; height: 36px; border: 0; border-radius: var(--radius-pill); background: var(--ground-alt); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.shop-paydlg form { margin: 0 0 10px; }
.shop-paydlg__opt { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; width: 100%; padding: 14px 16px; text-align: left;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: var(--ground-alt); color: var(--ink); font: inherit; cursor: pointer; }
.shop-paydlg__opt:hover, .shop-paydlg__opt:focus-visible { border-color: var(--brand-orange); }
.shop-paydlg__opt:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.shop-paydlg__opt.is-busy { opacity: .6; cursor: progress; }
.shop-paydlg__title { font-weight: 600; }
.shop-paydlg__note { grid-column: 1; font-size: 14px; color: var(--ink-muted); }
.shop-paydlg__go { grid-column: 2; grid-row: 1 / span 2; color: var(--brand-orange); font-size: 20px; }
.shop-paydlg__foot { margin: 6px 0 0; }

/* ---- 15. 21.10: оферта и пользовательское соглашение (страницы для Яндекс Пэй) -----------------------------------------------
   Длинный юридический текст: строка не шире 72ch, абзацы и списки с воздухом, якоря #offer и #privacy не прячутся под шапкой и язычком. */
.shop-legal { max-width: 72ch; font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; margin: 0 0 32px; }
.shop-legal p { margin: 10px 0 0; }
.shop-legal ul { margin: 8px 0 0; padding-left: 22px; }
.shop-legal li { margin: 4px 0 0; }
.shop-legal .ui-h2 { margin: 28px 0 4px; scroll-margin-top: 136px; }
.shop-legal > .ui-h2:first-child { margin-top: 0; }
/* разделы «Доставка и оплата» по якорю (/payment → #payment, /return → #exchange) не уходят под липкую шапку и язычок логотипа (низ 126 px) */
.shop-info[id] { scroll-margin-top: 136px; }

/* ---- 16. 21.10: фото товаров (shop/photos-spec-2026-10-21.md) -----------------------------------------------------------------
   Карточка: главное фото вписано в квадрат на фоне --ground (прозрачный фон PNG ложится на него). Страница товара: лента фото
   с прокруткой и привязкой (scroll-snap), миниатюры — ссылки на каждое фото; полосы прокрутки ленты не видно. */
.shop-card__media--photo { overflow: hidden; }
.shop-card__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.shop-product__gallery { display: grid; gap: 10px; min-width: 0; }
.shop-product__media--photo { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
                              background: var(--ground); border: 1px solid var(--line); }   /* фото на белом фоне — как в карточке, без серой рамки вокруг */
.shop-product__media--photo::-webkit-scrollbar { display: none; }
.shop-product__media--photo img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; scroll-margin-top: 136px; }
.shop-product__thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.shop-product__thumbs a { flex: 0 0 64px; height: 64px; border-radius: 12px; background: var(--ground-alt); border: 1px solid var(--line); overflow: hidden; }
.shop-product__thumbs a:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.shop-product__thumbs img { display: block; width: 100%; height: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .shop-product__media--photo { scroll-behavior: auto; } }

/* ---- 17. 22.10: бизнес-каталог — наличие и BR (решение Стаса: «В наличии» горит зелёным, «Под заказ» — серым; BR у экстрактов) ------- */
.shop-filter .cb-pill.shop-stock__pill { display: inline-flex; align-items: center; gap: 6px; }
.shop-stock__pill::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.shop-filter .cb-pill.shop-stock__pill--in { background: var(--ok-soft); color: var(--ok); }
.shop-filter .cb-pill.shop-stock__pill--in:hover { box-shadow: inset 0 0 0 1px var(--ok); }
.shop-filter .cb-pill.shop-stock__pill--in.is-active { background: var(--ok); color: var(--ground); }
.shop-filter .cb-pill.shop-stock__pill--order { color: var(--ink-muted); }
.shop-filter .cb-pill.shop-stock__pill--order.is-active { background: var(--ink-muted); color: var(--ground); }
.shop-chips__label { flex: none; margin-right: 2px; color: var(--ink-muted); }
.shop-biz-bar__filters { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }

/* ---- 18. 23.10: индивидуальные позиции бизнес-клиента (прайс-листы, решение Стаса: оранжевая кнопка и подсветка) ------------ */
.shop-ind { display: inline-block; padding: 3px 8px; border-radius: var(--radius-pill); background: var(--brand-orange); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; }
.shop-card--ind { box-shadow: inset 0 0 0 2px var(--brand-orange); }
.shop .shop-chip--ind { background: var(--orange-soft); color: var(--orange-ink); font-weight: 600; }
.shop .shop-chip--ind:hover { box-shadow: inset 0 0 0 1px var(--brand-orange); background: var(--orange-soft); }
.shop .shop-chip--ind.is-active { background: var(--brand-orange); color: #fff; }
.shop-ind-line { margin: 4px 0 0; }

/* ---- 19. 26.10: анкета для бизнеса (/anketa, shop/anketa-spec-2026-10-26.md) ----------------------------------
   Планшет на выставке: варианты — крупные плашки под палец в две колонки (на смартфоне в одну), выбранная — ink на ground; поля 16px —
   iOS не увеличивает страницу при фокусе; кнопка отправки прилипает к низу экрана (sticky внутри формы, на смартфоне над нижней панелью).
   «Укажите» и подвопрос про улучшения прячутся только при JS (класс js на <html>): их открывает survey.js. */
.shop-survey { max-width: 880px; margin: 0 auto; }
.shop-survey [hidden] { display: none !important; }      /* .shop-field и плашки задают display, hidden иначе не прячет */
.shop-survey__head { margin-bottom: 20px; }
.shop-survey__time { margin: 8px 0 0; }
.shop-survey__form { display: block; }                   /* блок, а не grid: sticky-панели нужен вся форма как предел */
.shop-survey__card { margin: 0 0 12px; }
fieldset.shop-survey__card { border: 0; min-width: 0; }
.shop-survey__q > legend { float: left; width: 100%; }   /* плавающая легенда встаёт внутрь карточки, а не на её верхнюю кромку */
.shop-survey__q > legend + * { clear: both; }
.shop-survey__title { display: block; padding: 0; margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--ink); }
.shop-survey__num { color: var(--ink-faint); font-weight: 800; }
.shop-survey__lead { color: var(--ink-muted); font-weight: 400; }
.shop-survey__hint { margin: 4px 0 14px; }
.shop-survey__q.is-full .shop-survey__hint { color: var(--ink); font-weight: 600; }
.shop-survey__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.shop-survey__req { color: var(--brand-orange); }
.shop-survey .shop-survey__input { font-size: 16px; padding: 12px 16px; border-color: var(--line-strong); scroll-margin: 140px 0 120px; }
.shop-survey .shop-survey__input:focus { border-color: var(--brand-orange); }
.shop-survey__input[aria-invalid="true"] { border-color: var(--bad); }
.shop-survey__opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-opt { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-control); background: var(--ground); font-size: 15px; line-height: 1.3; cursor: pointer;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.shop-opt input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); scroll-margin: 140px 0 120px; }
.shop-opt:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.shop-opt:has(input:checked) input { accent-color: var(--ground); }
.shop-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.shop-opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .shop-opt:hover { border-color: var(--ink); } }
.shop-survey__other { margin-top: 12px; }
.js .shop-survey__other:not(.is-open), .js .shop-survey__q--sub:not(.is-open) { display: none; }
.shop-survey__err { color: var(--bad); margin: 8px 0 0; }
.shop-survey__consents { display: grid; gap: 14px; margin: 20px 0 0; padding: 0 4px; }
.shop-survey .shop-survey__check { align-items: flex-start; font-size: 15px; line-height: 1.4; }
.shop-survey__check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.shop-survey__check a { text-decoration: underline; }
.shop-survey__bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 20px 0 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--ground); border-top: 1px solid var(--line); }
.shop-survey__send { font-size: 16px; min-height: 52px; padding: 14px 28px; }
.shop-survey__queue { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 0 0 12px;
  padding: 12px 16px; border-radius: var(--radius-control); background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 600; }
.shop-survey__retry { flex: none; border-color: var(--warn); color: var(--warn); }
.shop-survey__retry:hover { background: var(--warn); border-color: var(--warn); color: var(--ground); }
.shop-survey__done { padding: 32px 28px; margin: 0 0 12px; }
.shop-survey__done:focus { outline: none; }
.shop-survey__status { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.shop-survey__status.is-ok { color: var(--ok); }
.shop-survey__status.is-wait { color: var(--warn); }
.shop-survey__status.is-bad { color: var(--bad); }
.shop-survey__again { display: inline-block; margin-top: 20px; font-size: 16px; padding: 14px 28px; }
.shop-survey__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 600px) {
  .shop-survey__fields, .shop-survey__opts { grid-template-columns: minmax(0, 1fr); }
  .shop-survey__card { padding: 18px 16px; }
  .shop-survey__bar { bottom: calc(64px + env(safe-area-inset-bottom)); padding-bottom: 12px; }   /* над нижней панелью смартфона */
  .shop-survey__bar-note { display: none; }
  .shop-survey__send { flex: 1 1 auto; }
}

/* ---- 20. 27.10: оформление без оплаты недоступно — кнопка «Подтвердить заказ» выключена (товар не для чека, оплата выключена) --- */
.shop-totals__cta[disabled] { opacity: .45; cursor: not-allowed; }
.shop-totals__cta[disabled]:hover { background: var(--brand-orange); border-color: var(--brand-orange); }

/* ---- 21. 30.10: уведомление о cookie (Яндекс Метрика) — внизу страницы, на смартфоне над нижней панелью ---- */
.shop-cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; max-width: 560px; margin: 0 auto; display: flex; align-items: center;
  gap: 12px; padding: 12px 14px; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12); font-size: 13px; line-height: 1.45; }
.shop-cookie[hidden] { display: none; }
.shop-cookie p { margin: 0; flex: 1; }
.shop-cookie a { color: inherit; }
.shop-cookie .cb-btn { flex: none; }
@media (max-width: 600px) { .shop-cookie { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* ---- 09.11. Поисковики: крошки, абзац раздела, вопросы и ответы, лендинг бизнеса ----------------------------- */
.shop-crumbs { margin: 0 0 12px; color: var(--ink-muted); }
.shop-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.shop-crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--ink-faint, var(--ink-muted)); }
.shop-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.shop-crumbs [aria-current] { color: var(--ink); }
.shop-intro { margin-top: 12px; }
.shop-faq { display: grid; gap: 10px; }
.shop-faq h2 { margin: 0 0 4px; }
.shop-faq__item { padding: 0; }
.shop-faq__item summary { cursor: pointer; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin: 0; }
.shop-faq__item summary::-webkit-details-marker { display: none; }
.shop-faq__item summary::after { content: "+"; flex: 0 0 auto; font-weight: 400; color: var(--ink-muted); }
.shop-faq__item[open] summary::after { content: "–"; }
.shop-faq__item .shop-text { padding: 0 20px 18px; }
.shop-biz-how { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.shop-biz-how .shop-biz-point::before { counter-increment: step; content: counter(step); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-orange); color: #fff; font-weight: 600; font-size: 14px; }
.shop-biz-text { max-width: 64ch; }
.shop-biz-text h2 { margin: 0 0 10px; }
.shop-biz-text p { margin: 0 0 10px; font-size: 15px; line-height: 1.55; }
.shop-biz-text ul { margin: 0 0 10px; padding-left: 20px; font-size: 15px; line-height: 1.55; }
@media (max-width: 1024px) { .shop-biz-how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .shop-biz-how { grid-template-columns: minmax(0, 1fr); } .shop-faq__item summary { padding: 14px 16px; } .shop-faq__item .shop-text { padding: 0 16px 16px; } }
