/* ==========================================================================
   «Версия 3» — основа: токены, плавная типографика, кнопки, поля, фокус, широкие экраны, каталог.
   Подключается после theme.css (тема из админки): `html:root { … }` сильнее её `:root { … }`, поэтому здесь
   перекрыты --fs-*, --fw-heading, контейнер и отступы. Всё в rem: размеры растут вместе с корнем html.
   Размеры шрифтов в style.css и shop.css уже переведены в rem с подъёмом мелких (13 px — минимум для подписей).
   Шапка, меню, подвал — style.css; телефон как приложение — app.css.
   ========================================================================== */

/* ------------------------------------------------------------------ Запасной шрифт без «прыжка» (агент E)
   Пока Montserrat качается (медленная сеть), текст рисуется Arial/Roboto, а потом подменяется — строки переносились иначе,
   страница сдвигалась. Запасные начертания подогнаны под Montserrat: ширина букв (size-adjust, замерено на русском тексте:
   Montserrat шире Arial на 12,8 % в обычном и на 8,5 % в полужирном начертании, шире Roboto на 24 % / 20 %) и высота строки
   (ascent/descent Montserrat = 96,8 % / 25,1 % em). Если локального шрифта нет (редкая платформа) — браузер идёт дальше по списку. */
@font-face { font-family: "Montserrat Fallback"; font-weight: 400 500; font-style: normal;
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"), local("Arimo");
  size-adjust: 112.8%; ascent-override: 85.8%; descent-override: 22.3%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; font-weight: 600 800; font-style: normal;
  src: local("Arial Bold"), local("Helvetica Neue Bold"), local("Helvetica-Bold"), local("Liberation Sans Bold"), local("Arimo Bold");
  size-adjust: 108.5%; ascent-override: 89.2%; descent-override: 23.1%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback Android"; font-weight: 400 500; font-style: normal; src: local("Roboto"), local("Roboto Regular");
  size-adjust: 124%; ascent-override: 78%; descent-override: 20.2%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback Android"; font-weight: 600 800; font-style: normal; src: local("Roboto Bold"), local("Roboto-Bold");
  size-adjust: 120%; ascent-override: 80.7%; descent-override: 20.9%; line-gap-override: 0%; }

/* ------------------------------------------------------------------ Корень и токены */
/* 16 px на телефоне → ≈17,5 на 1440 → ≈18,6 на 1920 → 20 на 2560 → до 22 на 3440. Проценты — уважают
   настройку размера шрифта в браузере (люди с плохим зрением ставят крупнее). */
html { font-size: clamp(100%, .893rem + .2232vw, 137.5%); scroll-padding-top: calc(var(--hdr-main) + 1rem); }
/* 1.2.1: на компьютере (≥ 901 px) всё ≈ на 10 % компактнее — как масштаб браузера 90 % (владелец: «на 100 % выглядело как сейчас на 90 %»).
   Те же 0,9 от прежней формулы: 15,75 px на 1440, ≈ 16,7 на 1920, 18 на 2560, до 19,8 на 3440 и более; нижняя граница 15 px — основной текст
   на узком окне ПК не мельче 15 px, кнопки (3,25rem) не ниже 48 px. Телефон (≤ 900 px) — прежние 16 px и больше, без изменений. */
@media (min-width: 901px) { html { font-size: clamp(93.75%, .8037rem + .2009vw, 123.75%); } }
/* агент E: полоса прокрутки (на Windows/Linux 15 px) занимает место всегда — страница не дёргается вбок, когда окно блокирует прокрутку или страница то короче, то длиннее экрана */
html { scrollbar-gutter: stable; }
html:root {
  --fs-base: 1rem; --fs-h1: 3.75rem; --fs-h2: 2.375rem; --fs-h3: 1.25rem; --fw-heading: 400; --ls-heading: .005em;
  --font-body: "Montserrat", "Montserrat Fallback", "Montserrat Fallback Android", Arial, sans-serif; --font-heading: var(--font-body);
  /* колонка в rem: на 1440 — всё окно за вычетом полей, на 1920 — 1634 px, на 2560 — 1760, на 3440 — 2156 */
  --container: 88rem; --gut-max: 5rem; --gut: clamp(16px, 4vw, 5rem);
  --grid-gap: clamp(16px, 1.45vw, 32px); --section-gap: clamp(4rem, 7vw, 8rem);
  --pad-y: clamp(3.5rem, 6vw, 7rem);
  /* шапка: --hdr-top — полоса, что уезжает при прокрутке; --hdr-main — ряд, что остаётся прикреплённым */
  --hdr-top: 2.6rem; --hdr-main: 5.25rem; --hdr-h: calc(var(--hdr-top) + var(--hdr-main));
  --tabbar-h: 0px;
  --btn-h: max(3.25rem, 50px); --btn-px: 2rem; --tap: max(2.75rem, 44px); /* 1.2.1: корень на ПК меньше — цели касания и кнопки не ниже 44 / 50 px */
  /* вторичный текст: 82 % основного — ≈ #6d574a, контраст 5,3:1 на камне (74 % давало 4,2:1 — мелкие подписи плохо читались) */
  --muted-text: color-mix(in srgb, var(--text) 82%, var(--bg));
  /* агент E: тема из админки даёт --muted #7A685B — на камне 4,19:1, на песке (--surface-2) 3,73:1, а им набраны абзацы, подписи и цифры на
     страницах C (about, delivery, portfolio…). Берём тот же 82 % текста: 5,3:1 на камне и 4,75:1 на песке. */
  --muted: var(--muted-text);
  --brand-focus: #1f6b5c; --olive: #4a5a2e; --gold-soft: #c8a15a;
  --sa-b: env(safe-area-inset-bottom, 0px); --sa-t: env(safe-area-inset-top, 0px);
  --sa-l: env(safe-area-inset-left, 0px); --sa-r: env(safe-area-inset-right, 0px);
}
@media (min-width: 2800px) { html:root { --container: 98rem; } }
@media (max-width: 1100px) { html:root { --hdr-top: 0px; --hdr-main: 4.75rem; } }
@media (max-width: 900px) { html:root { --hdr-top: 3.5rem; --hdr-main: 3.75rem; --btn-h: 3rem; --btn-px: 1.5rem; --tabbar-h: calc(4rem + var(--sa-b)); } }
/* на странице товара вместо вкладок — своя нижняя панель покупки (.pdp-bar); оформление заказа — без вкладок */
@media (max-width: 900px) { body.pg-product, body.pg-checkout, body.no-tabbar { --tabbar-h: 0px; } }

body { font-size: var(--fs-base); line-height: 1.6; font-weight: 400; color: var(--text); }
.lead, .rich, .txt, .txt-s { line-height: 1.65; }
.lead, .muted { color: var(--muted-text); }
/* заголовки 400 вместо 300 (тема из админки задаёт 300), мелкий текст не тоньше 400 */
h1, h2, h3, h4 { font-weight: var(--fw-heading); }
.h1, .h2--light, .h-light, .shop-h1, .shop-h2 { font-weight: var(--fw-heading); }
.h2, .h3, .shop-h3 { font-weight: 500; }
.eyebrow, .shop-eyebrow { font-size: max(.8125rem, 13px); }

/* ------------------------------------------------------------------ Окна <dialog>: страница под ними не прокручивается (1.2.1)
   «Подобрать зеркало», «Купить в 1 клик», вопрос и отзыв на карточке — нативные <dialog> (shop.js dialog(), reviews.js): в отличие от меню и листов
   (app.js, appshell.js — они блокируют сами), колесо мыши и смахивание за пределами окна прокручивали страницу под ним. Блокировка — без JS,
   пока в документе есть открытое окно (scrollbar-gutter: stable выше — страница при этом не «прыгает»); внутри окна прокрутка не передаётся странице. */
html:has(dialog[open]) { overflow: hidden; }
dialog[open] { overscroll-behavior: contain; }
/* Увеличение фото (shop.js lightbox): строка сетки была «по содержимому», поэтому max-height: 100% у фото не работало — оно рисовалось
   в полную ширину (1296 × 1728) и обрезалось окном: видна была лишь верхняя часть кадра. Теперь дорожка сетки равна окну просмотра. */
.shop-lb__stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.shop-lb__img { justify-self: center; align-self: center; }
/* «Купить в 1 клик» (shop.js quickOrder, 1.2.1): имя, телефон, согласие; e-mail, город, доставка и комментарий — под ссылкой «Добавить комментарий».
   Блок с кнопкой «Отправить» закреплён внизу окна (sticky в прокручиваемом теле) — виден без прокрутки даже на 360 × 640. */
.qo__more { margin: 0 0 .25rem; }
.qo__more > summary { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); cursor: pointer; list-style: none; font-size: .9375rem; font-weight: 500; color: var(--text);
  text-decoration: underline; text-decoration-color: var(--text-30); text-underline-offset: .3em; }
.qo__more > summary::-webkit-details-marker { display: none; }
.qo__more > summary .si { width: 1rem; height: 1rem; transform: rotate(90deg); transition: transform .25s var(--ease); }
.qo__more[open] > summary .si { transform: rotate(-90deg); }
.qo__more-in { display: grid; gap: .875rem; padding: .5rem 0 .25rem; }
.qo__act { position: sticky; bottom: -1.5rem; z-index: 2; display: grid; gap: .5rem; margin: .5rem -2rem -1.5rem; padding: .75rem 2rem 1rem; background: var(--bg); border-top: 1px solid var(--line); }
.qo__act .shop-muted { margin: 0; font-size: .8125rem; line-height: 1.4; text-align: center; }
.qo__item .qo__price { font-weight: 600; color: var(--text); }
@media (max-width: 767px) {
  .qo__act { bottom: -20px; margin: .5rem -20px -20px; padding: .75rem 20px calc(.75rem + var(--sa-b)); }
  .qo__item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; margin-bottom: 12px; padding-bottom: 12px; }
  .qo__item img { width: 56px; }
  .qo__item b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .9375rem; line-height: 1.35; }
  .qo__item span { margin-top: 2px; }
}
/* «Собрать зеркало» (1.2.1): итог. Один вариант — главное содержимое окна, ничего не сжимается: фото крупно (≈ 42 % ширины окна, 4 : 5), название целиком,
   характеристики списком, цена крупно, «В корзину» (главная) → «В корзине — оформить» и «Открыть карточку». Несколько вариантов — «самый доступный» такой же карточкой,
   остальные — списком карточек с фото ≥ 88 px (название до 3 строк, цена). «Показать N моделей →» — в подвале на каждом шаге (на итоге с одним вариантом его нет). */
.bld.is-final { width: min(56rem, calc(100vw - 2rem)); max-height: min(93vh, 980px); }
.bld.is-final .bld__steps { margin-bottom: .75rem; }
.bld.is-final .bld__q { margin: 0 0 .75rem; font-size: 1.4rem; }
.bld__steps { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: .25rem; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 2rem), transparent); }
.bld__steps::-webkit-scrollbar { display: none; }
.bld__steps li { flex: none; white-space: nowrap; }
.bld__best { display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); grid-template-areas: "img info" "img act"; grid-template-rows: auto 1fr; gap: .9rem 1.75rem; align-items: start; margin: 0 0 1.75rem; }
.bld__best-info { grid-area: info; }
.bld__best-act { grid-area: act; }
.bld__sku { margin: -.35rem 0 0; font-size: .8125rem; color: var(--muted-text); }
.bld__best-img { grid-area: img; display: block; width: 100%; aspect-ratio: 4 / 5; max-height: min(34rem, 62vh); overflow: hidden; background: var(--surface); }
.bld__best-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bld__best-info { display: grid; gap: .8rem; align-content: start; min-width: 0; }
.bld__best-name { margin: 0; font-size: 1.1875rem; line-height: 1.35; font-weight: 600; text-wrap: pretty; overflow-wrap: anywhere; }
.bld__spec { display: grid; margin: 0; }
.bld__spec > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; padding: .4rem 0; border-top: 1px solid var(--line); font-size: .9375rem; line-height: 1.45; }
.bld__spec > div:last-child { border-bottom: 1px solid var(--line); }
.bld__spec dt { color: var(--muted-text); }
.bld__spec dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.bld__best-price { font-size: 2rem; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
/* 1.2.2: цена — внутри закреплённого ряда с кнопками: при прокрутке окна (1280 × 720, телефон) ряд кнопок ложился поверх цены */
.bld__best-act { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-areas: "price price" "add open"; align-items: center; gap: .6rem; position: sticky; bottom: -1.5rem; z-index: 2; padding: .5rem 0 .75rem; background: var(--bg); }
.bld__best-act .bld__best-price { grid-area: price; }
.bld__add { grid-area: add; }
.bld__act-open { grid-area: open; }
/* ссылка «Открыть карточку товара» под названием — только на телефоне (там в закреплённом ряду — цена и «В корзину») */
.bld__open { display: none; }
.bld__best-act .btn { white-space: nowrap; padding-inline: 1rem; }
.bld__best-act .btn.is-added { --btn-bg: var(--success); --btn-fg: #fff; }
.bld__more { margin: 0 0 .75rem; font-size: .875rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-text); }
.bld__res { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.bld .bld__item { grid-template-columns: max(5.5rem, 88px) minmax(0, 1fr); gap: .9rem; align-items: start; padding: .6rem; }
.bld .bld__item img { width: max(5.5rem, 88px); }
.bld__item-t { display: grid !important; gap: .2rem; margin-top: 0 !important; min-width: 0; }
.bld__item-t > b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .9375rem; line-height: 1.35; font-weight: 600; }
.bld__item-t > small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .8125rem; line-height: 1.4; color: var(--muted-text); }
.bld__item-t > strong { font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.bld .shop-dlg__foot { align-items: center; }
.bld__show { margin-left: auto; min-height: var(--btn-h); }
/* низкое окно ПК (1280 × 720): фото и отступы компактнее, чтобы карточка почти целиком умещалась без прокрутки */
@media (min-width: 768px) and (max-height: 800px) {
  .bld__best-img { max-height: 44vh; }
  .bld__spec > div { padding: .3rem 0; }
  .bld__best-info { gap: .6rem; }
  .bld__best-price { font-size: 1.75rem; }
}
@media (max-width: 767px) {
  .bld.is-final { width: 100vw; }
  /* телефон: фото, название, цена и кнопки идут подряд (видны сразу, кнопки закреплены внизу окна), характеристики — ниже */
  .bld__best { grid-template-columns: minmax(0, 1fr); grid-template-areas: "img" "name" "sku" "open" "act" "spec"; grid-template-rows: none; gap: .5rem 0; }
  .bld__best-info { display: contents; }
  .bld__best-name { grid-area: name; margin-top: .5rem; }
  .bld__sku { grid-area: sku; margin: 0; }
  .bld__open { grid-area: open; display: inline-flex; align-items: center; gap: .35rem; justify-self: start; min-height: var(--tap); font-size: .9375rem; font-weight: 600; color: var(--brand); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
  .bld__open .i, .bld__open svg { width: 1rem; height: 1rem; }
  .bld__spec { grid-area: spec; margin-top: .75rem; }
  /* фото сверху на всю ширину карточки; ниже, чем было (26 svh): название и ссылка видны над закреплённым рядом с ценой */
  .bld__best-img { aspect-ratio: auto; height: min(26svh, 18rem); max-height: none; }
  .bld.is-final .bld__q { margin-bottom: .5rem; font-size: 1.25rem; }
  .bld.is-final .bld__steps { margin-bottom: .5rem; }
  .bld__best-name { font-size: 1.0625rem; }
  .bld__spec > div { grid-template-columns: 6.25rem minmax(0, 1fr); gap: .6rem; }
  .bld__best-price { font-size: 1.5rem; white-space: nowrap; }
  /* закреплённый ряд внизу окна: цена и «В корзину» в одну строку — видны всегда, пока читаешь характеристики */
  .bld__best-act { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "price add"; column-gap: 1rem; position: sticky; bottom: -20px; z-index: 2; margin: 0 -20px; padding: .6rem 20px .75rem; background: var(--bg); border-top: 1px solid var(--line); }
  .bld__act-open { display: none; }
  .bld__res { grid-template-columns: minmax(0, 1fr); }
  .bld__steps { margin-inline: -20px; padding-inline: 20px; }
  /* подвал окна на телефоне: «Назад» и «Сначала» в строке, под ними (если есть) — «Показать N моделей →» на всю ширину */
  .bld .shop-dlg__foot { gap: .15rem .75rem; }
  .bld .bld__foot-info { display: none; }
  .bld .shop-dlg__foot .shop-textbtn { flex: none; order: 1; }
  .bld__show { flex: 1 1 100%; margin-left: 0; order: 2; }
}
/* Шапка телефона (1.2.1): между рядом логотипа и рядом поиска оставался row-gap .9rem из style.css — шапка была на 14 px выше расчётной (--hdr-h),
   а закреплённая строка поиска стояла с пустой полосой ~20 px над собой и 6 px под собой. Теперь ряды вплотную: поиск по центру полосы 3,75rem. */
@media (max-width: 900px) { .hdr__main-in { row-gap: 0; } }
/* Окно cookie (cookie-consent.js рисует свои стили с Arial) — шрифт сайта; на телефоне компактнее, на ПК кнопки крупнее (1.2.1) */
html .almcookie__box, html .almcookie__btn { font-family: var(--font-body), Arial, Helvetica, sans-serif; }
html .almcookie__box { font-size: .9375rem; line-height: 1.5; }
html .almcookie__btn { font-size: .9375rem; min-height: max(44px, 2.75rem); }
@media (min-width: 901px) { html .almcookie__btn { min-height: 3rem; } }
@media (max-width: 640px) { html .almcookie__box { gap: .6rem; padding: .75rem .9rem; font-size: .8125rem; line-height: 1.4; } html .almcookie__btn { font-size: .875rem; min-height: 2.75rem; } }
/* меню телефона: быстрые ссылки — кабинет, избранное, сравнение и (1.2.1) корзина со счётчиком; на карточке товара вкладок нет */
.mnav__quick { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.mnav__q { padding-inline: .2rem; font-size: .8125rem; }
/* 320–375 px: номер в кнопке «Позвонить» ломался на две строки («919-» / «49-23») */
/* (.mnav__row — чтобы перебить общие .btn ниже: white-space: normal до 479 px и отступы кнопок) */
.mnav__row .mnav__call { white-space: nowrap; }
@media (max-width: 380px) { .mnav__row .mnav__call { padding-inline: .75rem; gap: .5rem; } }
/* веточка у заголовка окна на телефоне переносилась отдельной строкой под «Собрать зеркало» — в окнах-листах её не рисуем */
@media (max-width: 767px) { html .shop-dlg .shop-h2::after { display: none; } }

/* ------------------------------------------------------------------ Кнопки: ≥ 52 px на ПК, ≥ 48 на телефоне */
.btn {
  min-height: var(--btn-h); padding: .85rem var(--btn-px); gap: 1rem;
  font-size: 1rem; line-height: 1.3; font-weight: 600; letter-spacing: .01em;
}
.btn .i { width: 1.15rem; height: 1.15rem; }
.btn--sm, .btn.btn--sm { min-height: 2.75rem; padding: .55rem 1.1rem; font-size: .9375rem; }
.btn--lg { min-height: 3.75rem; padding-inline: 2.5rem; font-size: 1.0625rem; }
.btn--light { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 18%, transparent); }
.btn--ghost { box-shadow: inset 0 0 0 1.5px var(--text-30); }
/* 1.2.2 (владелец: «при наведении текст чёрный»): прозрачная кнопка (btn--ghost, btn--outline) при наведении заливается
   фирменным цветом (запасное правило shop.css и «волна» motion.css), а текст и значок оставались тёмными. Теперь текст
   светлеет вместе с фоном — одним переходом (motion.css: background-color и color), светлый текст не бывает на светлом
   фоне. Без @media (hover): на телефоне «залипшее» наведение после касания тоже должно читаться. */
.btn:is(.btn--ghost, .btn--outline):hover { --btn-fg: var(--on-brand); --m-btn-fill: var(--brand-2); background-color: var(--brand-2); color: var(--on-brand); box-shadow: inset 0 0 0 1.5px var(--brand-2); }
/* «Выбрать параметры» на карточке подборки: при наведении бледнела (opacity .65 → контраст 3,6) — теперь темнеет */
.scard__more:hover { opacity: 1; color: var(--brand); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
/* нажатие — лёгкое «вдавливание»: на телефоне hover нет, отклик должен быть сразу */
.btn:active { transform: scale(.985); }
@media (prefers-reduced-motion: reduce) { .btn:active { transform: none; } }
.link-arrow { min-height: var(--tap); gap: 1rem; font-size: 1rem; line-height: 1.3; font-weight: 600; }
.link-arrow .i { width: 1.1rem; height: 1.1rem; }
.icon-btn { width: var(--tap); height: var(--tap); }
.icon-btn .i { width: 1.35rem; height: 1.35rem; }
.badge { min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; font-size: .8125rem; font-weight: 600; }
.chip { min-height: var(--tap); padding: .5rem 1.15rem; font-size: .9375rem; font-weight: 500; }
.chip.is-active, .chip[aria-pressed="true"] { font-weight: 600; }

/* ------------------------------------------------------------------ Поля: ≥ 16 px — iOS не увеличивает страницу при вводе */
.input, .textarea, .select {
  min-height: var(--btn-h); padding: .8rem 1rem; font-size: 1rem; line-height: 1.4;
}
.textarea { min-height: 7rem; line-height: 1.5; }
.field { gap: .5rem; }
.field__label { font-size: .9375rem; line-height: 1.4; font-weight: 500; }
.field__err { font-size: .875rem; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--muted) 85%, transparent); }
select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { font-size: max(1rem, 16px); }
.check { font-size: .875rem; line-height: 1.5; gap: .8rem; }
/* 1.2.1: подсказка «Поставьте галочку…» была position:absolute с запасом 20 px под одну строку — на телефоне в две строки её закрывала кнопка «Отправить».
   Теперь подсказка — обычная строка под подписью галочки, высота подстраивается. */
.check.is-invalid { flex-wrap: wrap; margin-bottom: 0; }
.check.is-invalid > span:not(.field__err) { flex: 1 1 0; min-width: 0; }
.check.is-invalid .field__err { position: static; flex: 0 0 calc(100% - 2.175rem); margin: 0 0 0 2.175rem; line-height: 1.4; }
.check input { width: 1.375rem; height: 1.375rem; margin-top: .1rem; }
.check input::after { width: .7rem; height: .4rem; }
.drop__t { font-size: .9375rem; line-height: 1.4; }
.drop__s { font-size: .8125rem; line-height: 1.4; }
.form-msg { font-size: .9375rem; line-height: 1.45; }

/* ------------------------------------------------------------------ Фокус с клавиатуры: виден везде */
:focus-visible { outline: 2px solid var(--brand-focus); outline-offset: 3px; border-radius: 2px; }
.btn:focus-visible { outline-color: var(--gold-soft); }
.sec.bg-brand :focus-visible, .sec.bg-dark :focus-visible { outline-color: var(--gold-soft); }
.input:focus-visible, .textarea:focus-visible, .select:focus-visible { outline: 0; }

/* ------------------------------------------------------------------ Контейнер и широкие экраны */
.container, .wrap { padding-inline: max(var(--gut), var(--sa-l)) max(var(--gut), var(--sa-r)); }
.rich, .shop-desc { max-width: 52rem; }

/* ------------------------------------------------------------------ Плавное появление страницы (переходы между страницами — motion.css) */
/* запасной вариант для браузеров без View Transitions (Firefox, старый Safari): мягкое появление содержимого */
@keyframes v3-page-in { from { opacity: 0; } }
@supports not (view-transition-name: none) {
  @media (prefers-reduced-motion: no-preference) {
    html.js:not([data-motion="off"]) main { animation: v3-page-in .32s ease-out both; }
  }
}

/* ------------------------------------------------------------------ Плашка беты */
.beta-badge {
  position: fixed; left: max(12px, var(--sa-l)); bottom: calc(var(--tabbar-h) + 12px + var(--sa-b)); z-index: 70;
  display: inline-flex; align-items: center; gap: .6rem; padding: .4rem .45rem .4rem .9rem; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--brand) 92%, transparent); color: var(--on-brand); font-size: .8125rem; line-height: 1.2; font-weight: 600;
  letter-spacing: .02em; box-shadow: 0 8px 24px -8px rgba(11, 42, 36, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.beta-badge__dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--gold-soft); box-shadow: 0 0 0 3px rgba(200, 161, 90, .28); }
.beta-badge__act { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; min-height: 2rem; padding: 0 .6rem; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .14); color: inherit; font-size: .8125rem; font-weight: 600; text-decoration: none; }
.beta-badge__act:hover { background: rgba(255, 255, 255, .24); }
body.pg-product .beta-badge { bottom: calc(5.5rem + var(--sa-b)); }
/* 1.2.2: «✕» прячет плашку на 30 дней (appshell.js; раннее скрытие — layout.njk); на ПК через 5 с — кружок с точкой,
   наведение и фокус раскрывают плашку целиком (раньше она закрывала содержимое у левого края страницы) */
html.beta-off .beta-badge { display: none; }
@media (min-width: 901px) and (hover: hover) {
  .beta-badge { transition: padding .25s ease, gap .25s ease; }
  .beta-badge > span:not(.beta-badge__dot), .beta-badge__act { max-width: 16rem; overflow: hidden; white-space: nowrap; transition: max-width .3s ease, opacity .2s ease, padding .25s ease, min-width .25s ease; }
  .beta-badge.is-mini:not(:hover):not(:focus-within) { gap: 0; width: 2.25rem; height: 2.25rem; padding: 0; justify-content: center; }
  .beta-badge.is-mini:not(:hover):not(:focus-within) > span:not(.beta-badge__dot),
  .beta-badge.is-mini:not(:hover):not(:focus-within) .beta-badge__act { max-width: 0; min-width: 0; min-height: 0; padding-inline: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .beta-badge, .beta-badge > span, .beta-badge__act { transition: none !important; } }

/* ==========================================================================
   Каталог, подборка, поиск, избранное, сравнение
   ========================================================================== */
.shop { padding-bottom: clamp(3.5rem, 6vw, 7rem); }
.shop-crumbs { padding-top: clamp(1.25rem, 2.2vw, 2.5rem); }
.crumbs { font-size: .9375rem; line-height: 1.5; color: var(--muted-text); }
.crumbs a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.shop-head { padding-bottom: clamp(1.5rem, 2.4vw, 2.5rem); margin-bottom: clamp(1.5rem, 2.4vw, 2.5rem); }
.shop-head__row { margin-top: 1.25rem; gap: 2rem; }
@media (min-width: 768px) { .shop-head__row { grid-template-columns: minmax(0, 1fr) minmax(0, min(32rem, 45%)); } }
/* без вводного текста справа заголовок раздела на планшете сжимался в узкую колонку (4 строки) рядом с пустым местом */
.shop-head__row:not(:has(> .shop-lead)) { grid-template-columns: minmax(0, 1fr); }
.shop-eyebrow { font-weight: 500; color: var(--muted-text); letter-spacing: .16em; }
.shop-h1 { margin-top: .6rem; font-size: clamp(2rem, 1.2rem + 2.2vw, 3.25rem); line-height: 1.12; letter-spacing: .005em; }
.shop-h2 { font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.25rem); }
.shop-h3 { font-size: clamp(1.1875rem, 1rem + .7vw, 1.5rem); }
.shop-lead { font-size: 1.0625rem; line-height: 1.65; color: var(--muted-text); }
.shop-desc { font-size: 1.0625rem; line-height: 1.7; color: var(--muted-text); }
.shop-textbtn { min-height: var(--tap); padding: .5rem .25rem; font-size: .9375rem; font-weight: 500; color: var(--muted-text); }
.shop-muted { font-size: .9375rem; line-height: 1.55; color: var(--muted-text); }

/* «Собрать зеркало» в шапке каталога — крупная заметная кнопка */
.shop-builder-cta { margin-top: 1.5rem; gap: 1rem 1.75rem; }
.shop-builder-cta__hint { max-width: 26rem; font-size: .9375rem; line-height: 1.5; color: var(--muted-text); }

/* ----- разделы-плитки */
/* вступление каталога из конструктора (баннер с «без отступа снизу») не должно прилипать к заголовку раздела */
.shop-intro { margin-bottom: clamp(1.5rem, 2.5vw, 2.75rem); }
.shop-cats { margin-bottom: clamp(2rem, 3vw, 3.5rem); }
.shop-cats__head { margin-bottom: 1.1rem; }
.shop-cats__count { font-size: .9375rem; color: var(--muted-text); }
.shop-cats__grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
@media (max-width: 767px) { .shop-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shop-tile { gap: .2rem; }
.shop-tile__media { margin-bottom: .75rem; }
.shop-tile__eyebrow { font-size: .8125rem; font-weight: 500; letter-spacing: .12em; color: var(--muted-text); }
.shop-tile__title { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; }
.shop-tile__count { font-size: .9375rem; line-height: 1.4; color: var(--muted-text); }
.shop-subnav { gap: .5rem; margin-bottom: 1.75rem; padding-bottom: .25rem; }

/* ----- список: фильтры слева, результаты справа */
.shop-listing { gap: clamp(1.5rem, 3vw, 3.5rem); }
@media (min-width: 1101px) {
  .shop-listing { grid-template-columns: 17.5rem minmax(0, 1fr); }
  .shop-filters { top: calc(var(--hdr-main) + 1.25rem); max-height: calc(100vh - var(--hdr-main) - 2.5rem); padding-right: .5rem; }
}
.shop-filters__head { padding-bottom: 1rem; }
.shop-filters__title { font-size: .875rem; font-weight: 600; letter-spacing: .14em; }
.shop-filters__reset { min-height: var(--tap); font-size: .9375rem; color: var(--muted-text); }
.shop-fgroup__label { padding: .6rem 0; font-size: .875rem; font-weight: 600; letter-spacing: .1em; min-height: 3.25rem; }
.shop-fgroup__sel { min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: var(--r-pill); font-size: .8125rem; line-height: 1.4rem; font-weight: 600; }
.shop-fgroup__opts { gap: .1rem; padding-bottom: 1rem; }
.shop-fopt { gap: .75rem; min-height: var(--tap); font-size: 1rem; line-height: 1.3; }
.shop-fopt__box { width: 1.375rem; height: 1.375rem; }
.shop-fopt__box .si { width: .95rem; height: .95rem; }
.shop-fopt__sw { width: 1rem; height: 1rem; }
.shop-fopt__n { font-size: .875rem; color: var(--muted-text); }
.shop-search .si { left: 1rem; width: 1.2rem; height: 1.2rem; }
.shop-search .input { padding-left: 2.9rem; }
.shop-range { gap: .6rem; }
.shop-range .input { min-height: 3rem; padding: 0 .85rem; font-size: 1rem; }

/* панель над сеткой: количество, сортировка, фильтры (телефон) */
.shop-bar { gap: 1rem; padding-bottom: 1rem; margin-bottom: 1.25rem; }
.shop-bar__count { font-size: 1rem; line-height: 1.4; color: var(--muted-text); font-weight: 500; }
.shop-sort { gap: .6rem; font-size: .9375rem; color: var(--muted-text); }
.shop-sort__select { min-height: var(--tap); padding-right: 1.9rem; font-size: 1rem; font-weight: 600; }
.shop-sort .si-down { width: 1.1rem; height: 1.1rem; }
.shop-bar__filters { min-height: var(--tap); padding: 0 1.15rem; gap: .65rem; font-size: 1rem; font-weight: 600; }
.shop-bar__badge { min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: var(--r-pill); font-size: .8125rem; line-height: 1.4rem; font-weight: 600; }
.shop-chips { gap: .5rem; margin: -.25rem 0 1.5rem; }
.shop-chip { min-height: 2.5rem; gap: .5rem; padding: 0 .8rem 0 1rem; font-size: .9375rem; line-height: 1.2; }
.shop-chip .si { width: .8rem; height: .8rem; }

/* ----- сетка карточек: колонки растут с шириной — 3 → 4 → 5, карточка не растягивается */
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: clamp(2rem, 3vw, 3.25rem) var(--grid-gap); }
.shop-grid--rail { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.shop-more { margin-top: 3.5rem; gap: 1.25rem; }
.shop-more__btn { min-width: 16rem; }
.shop-pager { gap: .4rem; }
.shop-pager a, .shop-pager span { min-width: var(--tap); height: var(--tap); font-size: 1rem; }

/* ----- пустые состояния */
.shop-empty, .shop-done { gap: .9rem; max-width: 34rem; padding: clamp(2.5rem, 5vw, 4.5rem) 1.5rem; }
.shop-empty__icon, .shop-done__icon { width: 4.5rem; height: 4.5rem; }
.shop-empty__icon .si, .shop-done__icon .si { width: 1.75rem; height: 1.75rem; }
.shop-empty__title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); font-weight: var(--fw-heading); }
.shop-empty__text { font-size: 1.0625rem; line-height: 1.6; color: var(--muted-text); }
.shop-rail { margin-top: clamp(4rem, 7vw, 7rem); }
.shop-rail__head { margin-bottom: 2rem; }

/* ----- сравнение, поиск */
.shop-switch { gap: .75rem; font-size: 1rem; color: var(--text); min-height: var(--tap); }
.shop-switch__track { width: 3rem; height: 1.7rem; border-radius: var(--r-pill); }
.shop-switch__track::after { left: 3px; top: 3px; width: 1.2rem; height: 1.2rem; border-radius: 50%; }
.shop-switch input:checked + .shop-switch__track::after { transform: translateX(1.3rem); }
.cmp__table { font-size: 1rem; line-height: 1.45; }
.cmp__table th:first-child { font-size: .875rem; font-weight: 600; letter-spacing: .08em; }
.cmp__price { font-size: 1.5rem; font-weight: 500; }
.cmp__acts .btn { min-height: 2.75rem; }
/* телефон: столбец подписей занимал 160 из 356 px — «В корзину» ломалась на две строки, «Убрать» уходила за край */
@media (max-width: 600px) {
  .cmp__table th, .cmp__table td { min-width: 13rem; padding: .75rem; }
  .cmp__table th:first-child { min-width: 0; width: 7rem; max-width: 7rem; padding: .75rem .625rem; font-size: .8125rem; letter-spacing: .02em; text-transform: none; }
  .cmp__acts { flex-wrap: wrap; gap: .25rem .75rem; }
  .cmp__acts .btn { white-space: nowrap; }
}
.shop-bigsearch__input { min-height: 3.75rem; font-size: 1.125rem; font-weight: 400; padding-left: 3.4rem; }
.shop-bigsearch .btn { min-height: 3.75rem; }
.shop-bigsearch > .si { left: 1.2rem; width: 1.4rem; height: 1.4rem; }
/* подсказки в шапке: «Все результаты по …» пряталась под прокруткой окна подсказок — прикреплена к его низу */
.hdr__sugg .hdr__sugg-all { position: sticky; bottom: 0; z-index: 1; border-top: 1px solid var(--line); border-bottom: 0; }
/* пустая выдача поиска: пустой счёт и спрятанная «Показать ещё» добавляли ~90 px пустоты — «Ничего не нашлось» на телефоне уходило за сгиб */
.shop-search-page .shop-bar--plain:has(> [data-count]:empty) { padding-bottom: 0; margin-bottom: 0; }
.shop-search-page .shop-more:has(> [data-more][hidden]) { margin-top: 0; }

/* ==========================================================================
   Карточка модели в списке (.sc): фото, метки, цена крупно, заметная кнопка
   ========================================================================== */
.sc__link { aspect-ratio: 4 / 5; }
.sc__badges { left: .75rem; top: .75rem; gap: .4rem; }
.sc__badge { padding: .3rem .6rem; font-size: .8125rem; line-height: 1.2; font-weight: 600; letter-spacing: .06em; }
.sc__fav { right: .65rem; top: .65rem; width: 2.75rem; height: 2.75rem; background: color-mix(in srgb, var(--surface-3) 90%, transparent); box-shadow: 0 2px 10px -4px rgba(59, 42, 32, .35); }
.sc__fav .si { width: 1.3rem; height: 1.3rem; }
.sc__head { margin-top: 1rem; gap: .75rem; align-items: flex-start; }
.sc__title { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; letter-spacing: 0; -webkit-line-clamp: 2; }
.sc__head .si { display: none; }
.sc__sub { margin-top: .35rem; font-size: .9375rem; line-height: 1.4; color: var(--muted-text); }
/* 1.2.1: отличия карточки (цвет рамы, подсветка) под размерами — у карточек с одинаковым названием */
.sc__tr { display: flex; flex-wrap: wrap; gap: 0 .7rem; margin: .3rem 0 0; font-size: .875rem; line-height: 1.4; font-weight: 500; color: var(--text); }
.sc__tr span + span::before { content: '·'; margin-right: .7rem; color: var(--muted-text); }
@media (max-width: 1100px) { .sc__tr { flex-direction: column; } .sc__tr span + span::before { display: none; } }
.sc__sw { gap: .4rem; margin-top: .6rem; }
.sc__sw li { width: .8rem; height: .8rem; }
.sc__foot { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-items: start; gap: .75rem; margin-top: auto; padding-top: .9rem; border-top: 0; }
.sc__sub + .sc__foot, .sc__sw + .sc__foot, .sc__head + .sc__foot { margin-top: .9rem; }
.sc__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .45rem; font-size: 1.1875rem; line-height: 1.2; font-weight: 700; letter-spacing: 0; color: var(--text); }
.sc__price s { font-size: .9375rem; font-weight: 400; color: var(--muted-text); }
.sc__price small { font-size: .9375rem; font-weight: 500; color: var(--muted-text); }
.sc__btn { width: 100%; min-height: max(3rem, 48px); padding: .6rem 1rem; gap: .6rem; font-size: 1rem; font-weight: 600; justify-content: center; }
.sc__btn .si { width: 1.15rem; height: 1.15rem; transition: transform var(--t) var(--ease); }
.sc__btn:hover .si-chev { transform: translateX(3px); }
.sc__btn.is-added { --btn-bg: var(--success); --btn-fg: #fff; }
.sc__btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); box-shadow: inset 0 0 0 1.5px var(--text-30); }
.sc__btn--ghost::before { background: color-mix(in srgb, var(--text) 7%, transparent); }
/* прежняя ссылка «Выбрать параметры» (подборки в блоках конструктора могут её рисовать) */
.sc__more { font-size: .9375rem; line-height: 1.4; font-weight: 600; background-size: 100% 1px; }

/* телефон: две колонки, цели ≥ 44 px, текст не мельче 14 px */
@media (max-width: 767px) {
  .shop-grid, .shop-grid--rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .65rem; }
  .sc__fav { right: .4rem; top: .4rem; width: 2.5rem; height: 2.5rem; }
  .sc__head { margin-top: .7rem; }
  .sc__head .si { display: none; }
  .sc__title { font-size: 1rem; line-height: 1.3; }
  .sc__sub { font-size: .875rem; margin-top: .25rem; }
  .sc__foot { padding-top: .6rem; gap: .6rem; }
  .sc__price { font-size: 1.125rem; }
  .sc__btn { min-height: 2.9rem; padding-inline: .5rem; font-size: .9375rem; }
  .sc__more { min-height: var(--tap); font-size: .9375rem; }
  .shop-bar__count { font-size: .9375rem; }
}
/* 360–400 px: «Выбрать размер» со стрелкой не помещалась в карточку и ломалась на две строки — стрелку прячем */
@media (max-width: 400px) { .sc__btn .si-chev { display: none; } }

/* разделы-ссылки над списком: на компьютере переносятся, на телефоне — лента с прокруткой (app.css) */
.shop-subnav { flex-wrap: wrap; overflow: visible; }
.shop-subnav .chip { white-space: nowrap; }

/* крошки, закрытие фильтров, название в карточке: цель касания ≥ 44 px */
.crumbs a, .crumbs li > span { display: inline-flex; align-items: center; }
@media (max-width: 900px) {
  .crumbs a { min-height: var(--tap); }
  .crumbs ol { gap: 0; }
  .sc__head { min-height: var(--tap); }
  .sc__fav { width: var(--tap); height: var(--tap); }
}
.shop-filters__close { width: var(--tap); height: var(--tap); }
.shop-empty__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .5rem; }

/* планшет: три колонки карточек (на узком окне auto-fill дал бы две огромные) */
@media (min-width: 768px) and (max-width: 1100px) { .shop-grid, .shop-grid--rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 404: поле поиска */
.nf { padding-block: clamp(3rem, 8vw, 7.5rem); }
.nf__search { position: relative; display: flex; gap: .6rem; max-width: 36rem; margin: 2rem auto 0; }
.nf__search > .i { position: absolute; left: 1rem; top: 1.0rem; width: 1.3rem; height: 1.3rem; color: var(--muted-text); pointer-events: none; }
.nf__search .input { padding-left: 3rem; }
.nf__search .btn { flex: none; }
@media (max-width: 520px) { .nf__search { flex-direction: column; } }

/* ------------------------------------------------------------------ Агент E: длинные подписи кнопок на узком экране
   .btn в макете — nowrap; на 320 px кнопки «Смотреть новогоднюю коллекцию» и др. вылезали за край (до 16 px справа обрезались body{overflow-x:clip}).
   Теперь кнопка не шире строки, а подпись на самых узких экранах переносится. */
.btn { max-width: 100%; }
@media (max-width: 479px) {
  .btn { white-space: normal; text-align: left; }
  .btn > span:not(.i):not(.btn__arrow) { min-width: 0; }
}
@media (max-width: 900px) {
  /* ссылка со стрелкой («Все зеркала», «Читать далее») не шире строки */
  .link-arrow { max-width: 100%; }
}
@media (max-width: 479px) {
  .link-arrow { white-space: normal; text-align: left; }
}
/* блок «Призыв» (cta): на планшете кнопки не умещались рядом с текстом и вылезали за край на 44 px — теперь переходят на следующую строку */
@media (max-width: 1023px) { .cta__box { flex-wrap: wrap; } .cta__actions { flex: 1 1 auto; } }

/* ------------------------------------------------------------------ Агент E: лента «Популярные модели» под списком, который рисует скрипт
   Поиск, избранное и сравнение сначала отдают пустой список, скрипт заполняет его через 100–300 мс и толкает ленту вниз — раньше это был сдвиг
   вёрстки 0,15–0,2. Теперь лента занимает место, но невидима, пока shop.js не поставит html.shop-ready (запасной выход — через 2,5 с),
   а у самой страницы есть минимальная высота, чтобы подвал не «подпрыгивал» на высоких экранах. */
.shop-rail--late { visibility: hidden; animation: shop-rail-late 0s 2.5s forwards; }
html.shop-ready .shop-rail--late { visibility: visible; animation: none; }
@keyframes shop-rail-late { to { visibility: visible; } }
.shop-search-page, .shop-fav, .shop-compare { min-height: 60vh; }

/* ------------------------------------------------------------------ Ведущий: товары раздела — выше (продаёт)
   На ПК карточки с ценой и кнопкой начинались ниже первого экрана: двухстрочный заголовок раздела и два ряда
   подразделов. Заголовок раздела — компактнее, подразделы — одной лентой с прокруткой, отступы шапки — меньше. */
.shop-catalog .shop-h1 { font-size: clamp(1.75rem, 1.05rem + 1.45vw, 2.5rem); line-height: 1.15; }
.shop-catalog .shop-head { padding-bottom: clamp(1rem, 1.6vw, 1.75rem); margin-bottom: clamp(1rem, 1.6vw, 1.75rem); }
.shop-catalog .shop-crumbs { padding-top: clamp(.75rem, 1.4vw, 1.5rem); }
.shop-subnav {
  display: flex; flex-wrap: nowrap; gap: .5rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 3rem), transparent);
  padding-bottom: .25rem; margin-bottom: clamp(1rem, 1.6vw, 1.5rem);
}
.shop-subnav::-webkit-scrollbar { display: none; }
.shop-subnav .chip { flex: none; white-space: nowrap; }
/* Читаемость текста (КОНТЕНТ → «Страницы»): затемнённые токены темы, 10 % */
html:root{--text:#4c3326;--muted:#756356;--muted-2:#a29286;--footer-text:#4c3326;--ann-text:#faf8f2}
