/* ponomaro.ru: публичный сайт. Свои шрифты, без внешних запросов и фреймворков.
   Две вёрстки: мобильная (по умолчанию, до 1023px) и десктопная (от 1024px). Промежуточных брейкпоинтов нет. */

@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/static/fonts/jost-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Jost"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("/static/fonts/jost-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/static/fonts/lora-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/static/fonts/lora-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #4f3e35;
  --muted: #9a8f89;
  --line: #e6e1de;
  --bg: #fff;
  --accent: #b89b72;
  --radius: 4px;
  --gutter: 20px;  /* боковые поля страницы: на телефоне 20px, на десктопе переопределяются на 50px */
  --header-h: 64px;
  --strip-h: 48px;
  --tabbar-h: 55px;
  --font: "Jost", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }  /* место под полосу прокрутки занято всегда: при открытии окон и панелей (страница не прокручивается) контент не прыгает */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/22px var(--font); letter-spacing: .7px;
  padding-bottom: var(--tabbar-h);
}
/* подложки во всю ширину (100vw включает полосу прокрутки) не должны давать горизонтальную прокрутку;
   clip, а не hidden: hidden создал бы контейнер прокрутки и сломал прилипание фильтров */
main { overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
@media (max-width: 1023px) { input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; } }  /* iOS увеличивает страницу при фокусе в поле мельче 16px и потом не возвращает масштаб */
button { cursor: pointer; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
s { color: var(--muted); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-flip { transform: scaleX(-1); }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; background: none;
}
.badge {
  position: absolute; top: 3px; right: 1px; min-width: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; text-align: center; letter-spacing: 0;
}
.fav-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); pointer-events: none; }
.icon-btn .fav-dot { top: 9px; right: 9px; }
@media (min-width: 1024px) { .icon-btn .fav-dot { top: 6px; right: 6px; } }  /* на десктопе точка ближе к углу, подобрано владельцем */
.tabbar__label { position: relative; }
.tabbar__label .fav-dot { top: -2px; right: -9px; }  /* у правого верхнего края слова, подобрано владельцем */
.badge--text { top: 6px; right: auto; left: calc(50% + 24px); background: none; color: var(--accent); font-size: 11px; padding: 0; }

/* ---------- шапка и мобильные панели ---------- */

.header { display: none; }
.topstrip {
  position: sticky; top: 0; z-index: 40; height: var(--strip-h); background: var(--bg);
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px; gap: 4px;
}
.topstrip__right { display: flex; flex: none; margin-left: auto; }
.genders { display: flex; gap: 14px; min-width: 0; }
.genders a { font-size: 10px; line-height: 16px; text-transform: uppercase; letter-spacing: 1.5px; padding: 4px 0; border-bottom: 1px solid transparent; opacity: .6; transition: opacity .2s; }
.genders a:hover, .genders a.is-active { opacity: 1; }
.genders a.is-active { border-bottom-color: currentColor; }
/* на телефоне вкладки пола только на главной и в открытом меню (как у референса); в меню нет кнопки фильтров */
body:not(.page-home):not(.menu-open) .topstrip .genders { display: none; }
.menu-open .topstrip [data-filters-open] { display: none; }
/* «назад»: в открытом меню и на главной аудитории нет (главная корневая, а при переключении вкладок пола стрелка прыгала бы) */
.page-home .topstrip [data-back] { display: none; }
body.menu-open .topstrip [data-back] { display: none; }
.topstrip .genders { margin-left: 16px; }

.logo { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; text-transform: uppercase; }

.tabbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: var(--tabbar-h); background: var(--bg);
  display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line);
}
.tabbar__item {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px;
  border: 0; background: none; padding: 0; font-size: 12px; letter-spacing: 1.2px; color: var(--muted);
}
.tabbar__item:hover, .tabbar__item[aria-expanded="true"], .tabbar__item[aria-current] { color: var(--text); }
.tabbar__item[aria-expanded="true"]::before { content: ""; position: absolute; top: -1px; width: 24px; height: 2px; background: var(--text); }
.tabbar__item--logo { font-family: var(--serif); font-size: 17px; letter-spacing: 1.2px; color: var(--text); }

/* меню каталога */
.menu {
  position: fixed; z-index: 45; left: 0; right: 0; top: var(--strip-h); bottom: var(--tabbar-h);
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
}
.menu__panel { min-height: 100%; display: flex; flex-direction: column; padding: 4px 0 16px; }
.menu__top { display: none; }
.menu__list { display: flex; flex-direction: column; gap: 2px; }
.menu__item {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px;
  padding: 0 20px; border: 0; background: none; text-align: left; font-size: 17px;
}
.menu__all { display: flex; align-items: center; min-height: 48px; padding: 0 20px; margin-top: 2px; font-size: 17px; }
.menu__back { display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px; border: 0; border-bottom: 1px solid var(--line); background: none; font-size: 16px; width: 100%; text-align: left; }
body.menu-open { overflow: hidden; }  /* на телефоне страница под меню не скроллится; на десктопе блокирует lockPage у <html> */
/* текущая категория в меню: плашка как при наведении плюс полужирный, чтобы отличалась от простого наведения */
.menu__item--active { background: #faf7f4; font-weight: 500; color: var(--text); }
.menu__item--active .i { color: var(--text); }
.menu__all--active { background: #faf7f4; font-weight: 500; }
.scrim { display: none; }

/* ---------- общие блоки ---------- */

.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
.container--text { max-width: 860px; padding: 16px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; margin-bottom: 20px; font-size: 14px; line-height: 20px; }
.page-product .crumbs, .page-catalog .crumbs { display: none; }  /* на телефоне в каталоге и карточке крошек нет, на десктопе показываются */
.crumbs__sep { color: var(--muted); }
.crumbs [aria-current] { color: var(--muted); }
.h1 { font-size: 23px; line-height: 30px; font-weight: 400; padding: 8px 0 16px; }
.h2 { font-size: 19px; line-height: 26px; font-weight: 400; margin-bottom: 16px; }
.prose { padding: 8px 0 40px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul { list-style: disc; padding-left: 20px; }
.prose a { text-decoration: underline; }
.prose ol { list-style: decimal; padding-left: 20px; }
.prose h2 { font-size: 19px; line-height: 26px; font-weight: 400; margin: 28px 0 12px; }
.prose h3 { font-size: 16px; line-height: 24px; font-weight: 500; margin: 22px 0 10px; }
.prose blockquote { margin: 0 0 14px; padding: 4px 0 4px 16px; border-left: 2px solid var(--line, #ebe6e1); color: var(--muted); }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right { text-align: right; }
.prose .ql-align-justify { text-align: justify; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.empty a { color: var(--text); text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px;
  border: 1px solid var(--text); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 15px;
}
.btn--primary { background: var(--text); color: #fff; }
.btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.btn--wide { width: 100%; }
.btn--square { width: 44px; padding: 0; flex: none; }
.buybar .btn--square, .buy__actions .btn--square { border: 0; background: none; }  /* «В избранное» без рамки */

/* ---------- фильтры ---------- */

.filters { display: none; }
body.filters-open .filters {
  display: flex; flex-direction: column; position: fixed; z-index: 60; inset: 0; background: var(--bg); overflow-y: auto;
}
body.filters-open { overflow: hidden; }
.filters__head { display: flex; align-items: center; gap: 8px; height: var(--strip-h); padding: 0 20px 0 4px; border-bottom: 1px solid var(--line); font-weight: 500; }
.filters__head strong { flex: 1; font-weight: 400; font-size: 19px; }
.filters__reset-all { font-size: 16px; }
.filters__bar .filters__reset { display: none; }
.filters__bar { display: flex; flex-direction: column; flex: 1; padding: 0 20px 90px; font-size: 16px; }
.dd summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; list-style: none; cursor: pointer; }
.dd summary::-webkit-details-marker { display: none; }
.dd__arrow { width: 16px; height: 16px; color: var(--muted); flex: none; }
.dd summary b { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: 8px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 500; letter-spacing: 0; }
.dd__panel { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; }
.dd__head { display: none; }
.dd__current, .dd__title, .dd__submit { display: none; }
.dd__label { font-size: 13px; color: var(--accent); }
/* «Сортировка» и «Цена» на телефоне всегда раскрыты, как блоки со своей подписью */
.dd--static summary { min-height: 40px; pointer-events: none; }
.dd--static .dd__arrow { display: none; }
.dd--sort { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.dd--price { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dd--list { border: 0; }
/* «Размер» и «Цвет» на телефоне открываются отдельным экраном поверх панели */
.dd--list[open] .dd__panel {
  position: fixed; z-index: 1; inset: 0; background: var(--bg); overflow-y: auto; padding: 0 20px 90px;
}
.dd--list .dd__head { display: flex; align-items: center; gap: 8px; height: var(--strip-h); margin: 0 -20px 8px; padding: 0 20px 0 4px; border-bottom: 1px solid var(--line); }
.dd--list .dd__head strong { flex: 1; font-weight: 400; font-size: 19px; }
.dd__all { border: 0; background: none; padding: 8px 0; font-size: 16px; }
.dd__panel--price { flex-direction: row; align-items: center; gap: 12px; padding: 8px 0 12px; }
.dd__panel--price input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: var(--radius); background: #f7f5f3; -moz-appearance: textfield; }
.dd__panel--price input::placeholder { color: #b9b1ac; }
.dd__panel--price input::-webkit-outer-spin-button, .dd__panel--price input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.radio, .check { display: flex; align-items: center; gap: 10px; min-height: 42px; cursor: pointer; }
.radio input, .check input { position: absolute; opacity: 0; pointer-events: none; }
.radio span::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 14px; border: 1px solid var(--line); border-radius: 50%; vertical-align: -4px; }
.radio input:checked + span::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 4px #fff; }
.check span::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: 14px; border: 1px solid var(--line); border-radius: 2px; vertical-align: -4px; }
.check input:checked + span::before {
  border-color: var(--accent); background: var(--accent) center / 12px no-repeat
    url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAxMiAxMic+PHBhdGggZD0nTTIgNi4ybDIuNiAyLjZMMTAgMy40JyBmaWxsPSdub25lJyBzdHJva2U9JyNmZmYnIHN0cm9rZS13aWR0aD0nMS40JyBzdHJva2UtbGluZWNhcD0ncm91bmQnIHN0cm9rZS1saW5lam9pbj0ncm91bmQnLz48L3N2Zz4=");
}
.check { padding: 0 4px; margin: 0 -4px; border-radius: var(--radius); }
.check:has(input:checked) { background: #f7f5f3; }
.check .dot--lg + span::before { display: none; }
.check--color .dot--lg { margin-left: auto; }
.check--color span { flex: 0 1 auto; }
.check input:focus-visible + span::before, .radio input:focus-visible + span::before { outline: 2px solid var(--text); outline-offset: 2px; }
.filters__apply { position: fixed; z-index: 2; left: 20px; right: 20px; bottom: 12px; }
.filters__reset { padding: 14px 0; text-decoration: underline; color: var(--muted); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); flex: none; }
.dot--lg { width: 16px; height: 16px; }

/* ---------- сетка и карточка каталога ---------- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 8px; padding-bottom: 32px; }
.card { position: relative; min-width: 0; }
.card__media { position: relative; border-radius: var(--radius); overflow: hidden; background: #f4f1ef; }
.card__strip { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 3 / 4; }
.card__strip::-webkit-scrollbar { display: none; }
.card__slide { flex: 0 0 100%; scroll-snap-align: start; display: block; height: 100%; }
.card__slide--empty, .recent__media.is-empty { display: flex; align-items: center; justify-content: center; padding: 0 12px; text-align: center; font-size: 13px; line-height: 18px; color: var(--muted); }
.card__slide img { width: 100%; height: 100%; object-fit: cover; }
.buy__tag { margin: 0 0 4px; color: var(--accent); font-size: 12px; line-height: 16px; letter-spacing: .06em; text-transform: uppercase; }
.check--toggle { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); border-radius: 0; }
.check--toggle + .check--toggle { margin-top: 0; padding-top: 0; border-top: 0; }
.card__fav { position: absolute; top: 4px; right: 4px; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--text); }
.card__fav { padding: 0; border: 0; background: none; }
.card__fav .i { width: 20px; height: 20px; }
[data-fav-toggle][aria-pressed="true"] .i { fill: currentColor; }  /* закладка в избранном закрашена */
.card__bars { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 3px; pointer-events: none; }
.card__bars i { width: 12px; height: 2px; background: rgba(255, 255, 255, .55); }
.card__bars i.is-on { background: #fff; }
.card__info { display: block; padding-top: 8px; }
.card__name { display: block; font-size: 13px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card__row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.card__price { font-size: 15px; line-height: 22px; }
.card__price s { font-size: 13px; }
.card__stock { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; align-items: center; }
.more { display: flex; justify-content: center; padding: 8px 0 48px; }

/* ---------- карточка товара ---------- */

.page-product:not(.menu-open) .topstrip { display: none; }
/* при открытом меню в карточке нужна верхняя полоса (вкладки пола, поиск); из потока убираем, чтобы страница под меню не сдвигалась */
.page-product.menu-open .topstrip { position: fixed; left: 0; right: 0; top: 0; }
.product { display: block; }
.lightbox { position: fixed; z-index: 120; inset: 0; background: var(--bg); }
.lightbox__strip { display: flex; width: 100%; height: 100%; touch-action: pan-x; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.lightbox__strip::-webkit-scrollbar { display: none; }
.lightbox__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; }
.lightbox__slide img { width: 100%; height: 100%; object-fit: cover; }  /* фото заполняет весь экран */
.lightbox__close { position: absolute; top: calc(8px + env(safe-area-inset-top)); left: 8px; width: 44px; height: 44px; color: #fff; outline: none; }
.lightbox__bars { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 4px; pointer-events: none; }
.lightbox__bars i { flex: 1; height: 2px; background: rgba(255, 255, 255, .55); }
.lightbox__bars i.is-on { background: #fff; }
body.lightbox-open { overflow: hidden; }
/* ---------- фото на весь экран, десктоп ---------- */
.lbd { position: fixed; z-index: 120; inset: 0; background: var(--bg); }
.lbd__view { position: absolute; inset: 13px 13px 13px 96px; overflow-x: hidden; overflow-y: hidden; scrollbar-width: none; overscroll-behavior: contain; }
.lbd__view.is-over { cursor: none; }  /* курсор над самим фото: вместо системного курсора рисуем свой кружок (.lbd__cursor): он попадает на скриншоты */
.lbd__view.is-zoomed { overflow: auto; }  /* фото крупнее экрана, мышь двигает его по высоте и ширине */
.lbd__cursor { position: fixed; z-index: 2; left: 0; top: 0; width: 32px; height: 32px; margin: -16px 0 0 -16px; display: none; align-items: center; justify-content: center; border-radius: 50%; background: #ebebeb; color: #111; pointer-events: none; }
.lbd__cursor.is-on { display: flex; }
.lbd__cursor svg { width: 12px; height: 12px; }
.lbd__view.is-zoomed ~ .lbd__cursor .v { display: none; }  /* в увеличении «−», иначе «+» */
.lbd__strip { position: relative; width: 100%; will-change: transform; }
.lbd__view::-webkit-scrollbar { display: none; }
.lbd__view.is-dragging { user-select: none; }
.lbd__photo { display: block; width: 100%; height: calc(100vh - 26px); object-fit: contain; user-select: none; -webkit-user-drag: none; }  /* по высоте экрана, по бокам полосы */
.lbd__view.is-zoomed .lbd__strip { width: 200%; }
.lbd__view.is-zoomed .lbd__photo.is-prev, .lbd__view.is-zoomed .lbd__photo.is-next { display: none; }
.lbd__view.is-zoomed .lbd__photo { height: auto; min-height: calc(100vh - 26px); object-fit: cover; }
.lbd__photo.is-prev, .lbd__photo.is-next { position: absolute; top: 0; }  /* соседи стоят рядом с текущим, текущее задает высоту */
.lbd__photo.is-prev { left: -100%; }
.lbd__photo.is-next { left: 100%; }
.lbd__btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--ink, #111); box-shadow: 0 1px 6px rgba(0, 0, 0, .25); cursor: pointer; transition: background .15s; }
.lbd__btn:hover { background: #f0eeec; }
.lbd__btn .i { width: 20px; height: 20px; }
.lbd__close { top: 20px; right: 20px; }
.lbd__prev, .lbd__next { top: 50%; margin-top: -20px; }
.lbd__prev { left: 112px; }
.lbd__next { right: 24px; }
.lbd__thumbs { position: absolute; top: 0; bottom: 0; left: 0; width: 96px; display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; scrollbar-width: none; background: var(--bg); }
.lbd__thumbs::-webkit-scrollbar { display: none; }
.lbd__thumb { flex: none; width: 72px; height: 96px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; opacity: .8; cursor: pointer; overflow: hidden; }
.lbd__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lbd__thumb:hover { opacity: 1; }
.lbd__thumb.is-on { border-color: var(--accent); opacity: 1; }
.lbd__tscroll { left: 28px; width: 40px; height: 28px; border-radius: 14px; z-index: 1; }
.lbd__tscroll.is-up { top: 12px; }
.lbd__tscroll.is-down { bottom: 12px; }
@media (max-width: 1023px) { .lbd { display: none; } }

.gallery-wrap { position: relative; margin: 0 -20px; }  /* на телефоне крошек нет: фото с самого верха */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #f4f1ef; }
.gallery::-webkit-scrollbar { display: none; }
.gallery__img { flex: 0 0 100%; scroll-snap-align: start; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #f4f1ef; }
.gallery__empty { flex: 0 0 100%; aspect-ratio: 3 / 4; background: #f4f1ef; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; color: var(--muted); }
/* «назад» стоит там же, где в верхней полосе других страниц (иконка 40px по центру 48px), без круга: не прыгает при переходе из каталога */
.gallery__back { position: absolute; top: 4px; z-index: 5; width: 40px; height: 40px; color: #fff; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .4)); }
.gallery__back { left: 4px; }
.gallery__bars { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 4px; pointer-events: none; }
.gallery__bars i { flex: 1; height: 2px; background: rgba(255, 255, 255, .55); }
.gallery__bars i.is-on { background: #fff; }

.buy { padding: 16px 0 24px; text-align: center; }
.buy__name { font-size: 19px; line-height: 26px; font-weight: 400; }
.buy__price { font-size: 19px; line-height: 28px; margin-top: 4px; }
.buy__price s { font-size: 15px; }
.swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.swatch { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid transparent; }
.swatch i { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }
.swatch.is-current { border-color: var(--text); }
.buy__color { margin-top: 8px; font-size: 13px; color: var(--muted); }
.select { display: block; margin-top: 16px; position: relative; }
.select__btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); text-align: left; font-size: 16px;
}
.select__btn.is-empty, .select__btn.is-filled { background: #f6f1e8; }  /* и пустое, и заполненное поле того же цвета, что при наведении */
.select__btn:hover, .select__btn[aria-expanded="true"] { background: #f6f1e8; }
.select__btn[aria-expanded="true"] { border-color: var(--text); }  /* поле открыто: рамка цвета кнопки «Добавить в корзину» */
.select__btn[aria-invalid="true"] { border-color: #a24b3a; }
.select__btn:disabled { cursor: default; background: var(--bg); }
.select__ph { color: var(--muted); }
.select__arrow { width: 14px; height: 14px; flex: none; transform: rotate(90deg); transition: transform .15s; }
.select__btn[aria-expanded="true"] .select__arrow { transform: rotate(-90deg); }
/* на телефоне список размеров выезжает шторкой снизу, на десктопе это выпадающий список под полем */
.select__backdrop { position: fixed; z-index: 69; inset: 0; background: rgba(79, 62, 53, .4); }
.select__list {
  position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px;
  max-height: 75vh; overflow: hidden; padding: 0 8px; background: var(--bg);
  border-radius: 16px 16px 0 0; text-align: left;
}
.select__opts { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }  /* воздух после последнего размера перед кнопкой */
.select__sheet-foot { flex: none; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.select__sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 8px 12px; font-size: 19px; }
.select__sheet-head strong { font-weight: 400; }
.select__note { font-size: 14px; color: var(--muted); }
.select__opt {
  display: flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 48px; padding: 0 12px;
  border: 0; border-radius: var(--radius); background: none; font-size: 17px; text-align: left;
}
.select__opt > span:first-child { min-width: 64px; }
.select__opt:hover:not(:disabled), .select__opt.is-selected { background: #f6f1e8; }
.select__opt.is-selected::after { content: ""; flex: none; margin-left: auto; width: 6px; height: 12px; margin-right: 4px; border: solid var(--text); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
.select__opt:disabled { color: var(--muted); cursor: default; }
/* «Подберите свой размер» в шторке (телефон); таблица открывается в той же шторке */
.select__guide { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 0; background: none; font-size: 15px; }
.select__guide .i { width: 14px; height: 14px; color: var(--muted); }
.guide { padding: 0 12px 16px; }
.guide__hint { margin: 8px 0 16px; font-size: 15px; line-height: 1.4; }
.guide__table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 14px; text-align: center; }  /* колонки равной ширины: при переключении вкладок верстка не зависит от длины заголовков */
.guide__table th { overflow-wrap: anywhere; padding: 8px 4px; border-top: 1px solid var(--text); border-bottom: 1px solid var(--line); font-weight: 400; font-size: 12px; color: var(--muted); }
.guide__table td { padding: 14px 4px; border-bottom: 1px solid var(--line); }
.guide__note { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.guide__tabs { display: flex; margin: 4px 0 16px; border-bottom: 1px solid var(--line); }
.guide__tab { flex: 1; padding: 12px 8px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.guide__tab.is-active { border-bottom-color: var(--text); color: var(--text); }
.buy__actions { display: none; }
.buy__desc { margin-top: 28px; text-align: left; font-size: 14px; }
.buy__desc p { line-height: 1.5; }
.buy__desc.is-long .buy__desc-text { position: relative; max-height: 4.5em; overflow: hidden; }  /* три строки */
.buy__desc.is-long .buy__desc-text::after {  /* затухание последней строки; кнопка ниже блока и не затемняется */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5em; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--bg) 95%);
}
.buy__desc-more { display: block; margin-top: 4px; text-align: right; cursor: pointer; text-decoration: underline; }
.buy__desc-more .is-close, .buy__desc-toggle:checked ~ .buy__desc-more .is-open { display: none; }
.buy__desc-toggle:checked ~ .buy__desc-more .is-close { display: inline; }
.buy__desc-toggle:checked ~ .buy__desc-text { max-height: none; }
.buy__desc-toggle:checked ~ .buy__desc-text::after { display: none; }
.buy__desc-toggle:focus-visible ~ .buy__desc-more { outline: 2px solid var(--text); outline-offset: 2px; }
/* строки «О товаре», «Отзывы», «Вопросы» и их шторки (на телефоне снизу, как шторка размера; на десктопе по центру) */
.info-rows { margin-top: 20px; border-bottom: 1px solid var(--line); text-align: left; }
.info-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 52px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 16px; text-align: left; cursor: pointer; }
.info-row .i { width: 14px; height: 14px; color: var(--muted); }
.sheet { position: fixed; inset: auto 0 0 0; z-index: 70; width: 100%; max-width: none; min-height: 50vh; max-height: 75vh; margin: 0; padding: 0 8px; border: 0; border-radius: 16px 16px 0 0; background: var(--bg); color: var(--text); text-align: left; overflow-y: auto; overscroll-behavior: contain; }
.sheet:focus { outline: none; }
.sheet::backdrop { background: rgba(79, 62, 53, .4); }
.sheet__head { flex: none; position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 8px 0 8px 12px; font-size: 19px; background: var(--bg); }  /* заголовок и крестик остаются сверху при прокрутке */
.sheet__head strong { font-weight: 400; }
.sheet__body { padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); font-size: 15px; line-height: 1.5; }
.sheet__body p + p { margin-top: 8px; }
/* характеристики: подпись слева, значение справа, строки разделены линиями; ниже серая кнопка-ссылка на сертификат */
.specs > div { display: grid; grid-template-columns: 40% 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.specs__doc { display: flex; align-items: center; gap: 12px; margin-top: 20px; padding: 14px 16px; border-radius: var(--radius); background: #f4f2ef; color: var(--text); text-decoration: none; }
.specs__doc .i { width: 20px; height: 20px; flex: none; }
.info-row__n { margin-left: 8px; font-size: 13px; color: var(--muted); }
.info-row .info-row__n + .i { margin-left: auto; }
/* вопросы покупателей */
/* шторка вопросов: список прокручивается, «Задать вопрос» всегда прижата к низу шторки */
.sheet[open] { display: flex; flex-direction: column; }
.sheet__body.qa { flex: 1; display: flex; flex-direction: column; }
.qa [data-qa-list] { flex: 1; display: flex; flex-direction: column; }
.qa [data-qa-list][hidden] { display: none; }
.sheet__body.qa { padding-bottom: 0; }
.qa__ask { position: sticky; bottom: 0; z-index: 1; margin-top: auto; padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -8px 12px -8px rgba(79, 62, 53, .12); }
.qa__item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.qa__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.qa__meta span { color: var(--muted); font-size: 13px; }
.qa__color { margin-top: 2px; font-size: 13px; color: var(--muted); }
.qa__q { margin-top: 6px; white-space: pre-line; }
.qa__wait, .qa__empty, .qa__thanks { margin-top: 10px; font-size: 14px; color: var(--muted); }
.qa__thanks { color: var(--text); padding: 12px 14px; border-radius: var(--radius); background: #f4f2ef; }
.qa__answer { margin-top: 10px; }
.qa__answer summary { display: inline-block; padding: 8px 14px; border-radius: var(--radius); background: #f4f2ef; font-size: 14px; cursor: pointer; list-style: none; }
.qa__answer summary::-webkit-details-marker { display: none; }
.qa__a { margin-top: 10px; padding: 12px 14px; border-left: 2px solid var(--text); background: #faf8f6; font-size: 14px; }
.qa__a p { margin-top: 4px; white-space: pre-line; }
.qa__form { display: flex; flex-direction: column; gap: 14px; }
.qa__form[hidden] { display: none; }
.qa__field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.qa__field input, .qa__field textarea { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.qa__field textarea { resize: vertical; min-height: 110px; }
.qa__consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.qa__consent input { margin-top: 3px; flex: none; }
.qa__error { color: #a24b3a; font-size: 14px; }
body.sheet-open { overflow: hidden; }
/* таблица размеров под кнопкой «Добавить в корзину»: только десктоп, на телефоне она в шторке размера */
.buy__link { display: none; }
@keyframes sheet-in { from { transform: translateX(100%); } }
@keyframes sheet-out { to { transform: translateX(100%); } }
@keyframes sheet-fade-in { from { opacity: 0; } }
@keyframes sheet-fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop { animation: none !important; } }
/* телефон: шторки медленно выезжают снизу (0,4 с), закрываются вниз (0,3 с); список размеров только выезжает, он убирается из страницы сразу */
@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-up .4s cubic-bezier(.22, .61, .36, 1); }
  .sheet[open]::backdrop { animation: sheet-fade-in .4s ease; }
  .sheet.is-closing { animation: sheet-down .3s cubic-bezier(.4, 0, 1, 1) forwards; }
  .sheet.is-closing::backdrop { animation: sheet-fade-out .3s ease forwards; }
  .select__list { animation: sheet-up .4s cubic-bezier(.22, .61, .36, 1); }
  .select__backdrop { animation: sheet-fade-in .4s ease; }
}
@media (min-width: 1024px) {
  .buy__link { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; padding: 0; border: 0; background: none; font-size: 14px; cursor: pointer; }
  .buy__link .i { width: 16px; height: 16px; }
  .buy__link:hover { text-decoration: underline; }
  /* на десктопе шторки карточки (характеристики, отзывы, вопросы, таблица размеров) — правая панель, как «Выбрать ПВЗ» в корзине */
  .sheet { inset: 0 0 0 auto; width: 520px; max-width: 100vw; height: 100vh; max-height: none; min-height: 0; padding: 0 24px; border-radius: 0; }
  .sheet::backdrop { background: rgba(0, 0, 0, .35); }
  /* панель плавно выезжает справа, затемнение проявляется; закрытие тем же ходом назад (класс is-closing ставит site.js) */
  .sheet[open] { animation: sheet-in .3s cubic-bezier(.22, .61, .36, 1); }
  .sheet[open]::backdrop { animation: sheet-fade-in .3s ease; }
  .sheet.is-closing { animation: sheet-out .25s cubic-bezier(.4, 0, 1, 1) forwards; }
  .sheet.is-closing::backdrop { animation: sheet-fade-out .25s ease forwards; }
  .sheet__head { padding: 0; height: 72px; font-size: 19px; }
  .sheet__body { padding: 0 0 24px; }
  .sheet__body.qa { padding-bottom: 0; }
}
.buybar { position: fixed; z-index: 48; left: 0; right: 0; bottom: var(--tabbar-h); display: flex; gap: 8px; padding: 8px 20px; background: var(--bg); border-top: 1px solid var(--line); }
body:not(.page-product) .buybar { display: none; }
.menu-open .buybar { display: none; }
/* закрепленная панель покупки не должна закрывать низ страницы (подвал) */
@media (max-width: 1023px) { .page-product { padding-bottom: calc(var(--tabbar-h) + 64px); } }  /* меню на весь экран закрывает панель покупки */

.recent { padding: 24px 0 40px; }
.recent__row { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.recent__row::-webkit-scrollbar { display: none; }
.recent__item { scroll-snap-align: start; min-width: 0; }
.recent__media { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); background: #f4f1ef; overflow: hidden; }
.recent__item img { width: 100%; height: 100%; object-fit: cover; }
.recent__item span { display: block; }
.recent__name { margin-top: 8px; font-size: 13px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- подвал ---------- */

.footer { padding: 32px var(--gutter) 24px; border-top: 1px solid var(--line); margin-top: 24px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer__links a:hover { text-decoration: underline; }
.footer__legal { display: flex; flex-direction: column; gap: 4px; margin-top: 24px; font-size: 12px; color: var(--muted); }

/* ================= десктоп ================= */

@media (min-width: 1024px) {
  :root { --gutter: 50px; }  /* на десктопе поля страницы шире: на некрупких мониторах 20px слишком тесно */
  body { padding-bottom: 0; }
  .topstrip, .tabbar, .buybar { display: none !important; }
  .page-product .topstrip { display: none !important; }

  .header {
    position: sticky; top: 0; z-index: 60; height: var(--header-h); background: var(--bg); border-bottom: 1px solid #ebe6e1;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px;  /* шапка — свои 20px, --gutter только для контентной части */
  }
  .header__left { display: flex; align-items: center; gap: 24px; }
  .header__right { display: flex; justify-content: flex-end; gap: 4px; }
  .icon-btn .i-close, .icon-btn[aria-expanded="true"] .i-burger { display: none; }
  .icon-btn[aria-expanded="true"] .i-close { display: block; }

  /* вкладки пола в шапке только на главной; при открытом меню шапка уходит под затемнение, а крестик и вкладки живут в панели */
  .header__left .genders { display: none; }
  .page-home .header__left .genders { display: flex; }
  .menu-open .header { z-index: 40; }

  /* меню: слева панель 360px на всю высоту, подраздел открывается второй панелью рядом */
  .menu { display: flex; top: 0; bottom: 0; right: auto; width: auto; z-index: 55; overflow: visible; background: none; animation: menu-in .3s ease-in-out; }
  .menu.is-closing { animation: menu-out .3s ease-in-out forwards; }
  .menu__top { display: flex; align-items: center; gap: 24px; height: var(--header-h); margin: 0 -8px 8px; padding: 0 20px; }  /* 8px снизу: первый пункт левого меню на одной высоте с первым пунктом подменю (у него padding-top header-h + 8px) */
  .menu__top .genders a { font-size: 11px; }
  .menu__panel { width: 360px; height: 100%; min-height: 0; overflow-y: auto; padding: 0 8px 16px; background: var(--bg); }
  .menu__panel:not([data-panel="root"]) { width: 361px; padding-top: calc(var(--header-h) + 8px); border-left: 1px solid var(--line); }
  .menu__back { display: none; }
  .menu__item { min-height: 48px; padding: 0 12px; border-radius: var(--radius); font-size: 17px; text-transform: none; transition: background .15s; }
  .menu__item .i { color: var(--muted); transition: color .15s; }
  .menu__all { margin: 2px 0 0; padding: 0 12px; border-radius: var(--radius); transition: background .15s; }
  .menu__all:hover { background: #faf7f4; }
  .menu__item:hover, .menu__item.is-hover { background: #faf7f4; }
  .menu__item:hover .i, .menu__item.is-hover .i { color: var(--text); }
  .scrim { position: fixed; z-index: 50; inset: 0; background: rgba(95, 94, 92, .3); animation: fade-in .3s; }
  .scrim.is-closing { animation: fade-out .3s forwards; }
  .scrim:not([hidden]) { display: block; }
  @keyframes menu-in { from { transform: translateX(-100%); } }
  @keyframes menu-out { to { transform: translateX(-100%); } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes fade-out { to { opacity: 0; } }

  .container { padding: 0 var(--gutter); }
  .container--wide { padding: 0 var(--gutter); }
  .crumbs, .page-catalog .crumbs, .page-product .crumbs { display: flex; padding: 16px 0 0; margin-bottom: 30px; }
  .page-product .crumbs { margin-bottom: 0; }
  .h1 { padding: 8px 0 0; }
  .page-catalog .crumbs { margin-bottom: 70px; }  /* отступы каталога как у референса: крошки, H1, фильтры, карточки */
  .page-catalog .h1 { margin-bottom: 18px; }
  .page-catalog .grid { margin-top: 16px; }

  /* фильтры: ряд кнопок-выпадашек */
  /* ряд фильтров прилипает под шапкой: белая полоса во всю ширину, после прилипания с мягкой тенью */
  .filters, body.filters-open .filters { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; position: sticky; inset: auto; top: var(--header-h); z-index: 35; overflow: visible; background: none; padding: 16px 0; }
  .filters::before {
    content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw;  /* без transform: сдвиг на полпикселя размывал текст кнопок */
    background: var(--bg); transition: box-shadow .2s;
  }
  .page-catalog .header { border-bottom-color: transparent; }  /* в каталоге шапка и фильтры одна белая полоса, линии между ними нет */
  .filters.is-stuck::before { box-shadow: 0 3px 10px rgba(20, 21, 26, .02), 0 10px 16px rgba(20, 21, 26, .05); }
  body.filters-open { overflow: auto; }
  .filters__head { display: none; }
  .filters__bar { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px; padding: 0; flex: 1; }
  .dd { position: relative; border: 0; }
  .dd summary { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); gap: 10px; font-size: 16px; background: var(--bg); }  /* непрозрачный фон: на прозрачном поверх слоя полосы текст рисуется с серым сглаживанием и выглядит размытым */
  .dd summary:hover, .dd[open] summary, .dd--active summary { background: #f6f1e8; border-color: #f6f1e8; }
  .dd summary:hover { border-color: var(--line); }
  .dd__arrow { width: 14px; height: 14px; transform: rotate(90deg); color: var(--text); transition: transform .15s; }
  .dd[open] .dd__arrow { transform: rotate(-90deg); }
  .dd--static summary { pointer-events: auto; min-height: 42px; }
  .dd--static .dd__arrow { display: block; }
  .dd__label { display: none; }
  .dd__current, .dd__title { display: inline; }
  .dd--sort { padding: 0; border: 0; }
  .dd--price { margin: 0; padding: 0; border: 0; }
  .dd__panel { position: absolute; z-index: 30; top: 46px; left: 0; min-width: 220px; max-height: 360px; overflow-y: auto; padding: 8px; background: var(--bg); border: 0; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(79, 62, 53, .16); }
  .dd--list[open] .dd__panel { position: absolute; inset: auto; top: 46px; z-index: 30; padding: 8px; overflow-y: auto; }
  .dd--list .dd__head { display: none; }
  .dd__panel { gap: 2px; }
  .radio, .check { min-height: 44px; padding: 0 12px; border-radius: var(--radius); font-size: 16px; }
  .radio:hover, .check:hover, .radio:has(input:checked), .check:has(input:checked) { background: #f6f1e8; }
  .radio span::before, .check span::before { display: none; }
  .radio span, .check span { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .radio input:checked + span::after, .check input:checked + span::after { content: ""; flex: none; width: 6px; height: 12px; margin-right: 4px; border: solid var(--text); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); }
  .check--toggle { flex: none; margin: 0; padding: 0 12px; min-height: 42px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }  /* в ряду фильтров: кнопка-переключатель как выпадашки */
  .check--toggle + .check--toggle { margin: 0; padding: 0 12px; border: 1px solid var(--line); }  /* второй подряд: без правил «склейки» телефона */
  .check--toggle:hover, .check--toggle + .check--toggle:hover { background: #f6f1e8; border-color: var(--line); }
  .check--toggle:has(input:checked) { border-color: #f6f1e8; }
  .check--toggle span { flex: none; gap: 10px; }
  .check--color .dot--lg { order: -1; margin-left: 0; }  /* цвет: кружок слева, потом название, галочка справа */
  .dd--sort .radio { white-space: nowrap; }
  .dd__panel--price { min-width: 300px; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 16px; }
  .dd__panel--price input { height: 40px; flex: 1 1 100px; }
  .dd__panel--price span { color: var(--muted); }
  .dd__submit:disabled { border-color: #e9e6e3; background: #e9e6e3; color: #b9b1ac; cursor: default; pointer-events: none; }
  .dd__submit { display: block; flex: 0 0 100%; min-height: 40px; font-size: 16px; }
  .filters__apply { display: none; }
  .filters__bar .filters__reset { display: inline; padding: 0 8px; line-height: 42px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px 8px; padding-bottom: 48px; }
  .card__strip { overflow: hidden; }
  .card__name { font-size: 13px; }

  /* карточка товара: галерея 2×N слева, липкая колонка справа, 2:1 */
  .product { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; padding-top: 16px; }
  .gallery-wrap { margin: 0; }
  .gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; overflow: visible; background: none; }
  .gallery__img { aspect-ratio: 3 / 4; border-radius: var(--radius); background: #f4f1ef; }
  .gallery__img { cursor: pointer; }  /* нажатие открывает фото на весь экран */
  .gallery__back, .gallery__bars { display: none; }
  .gallery .is-clone { display: none; }
  .buy { position: sticky; top: calc(var(--header-h) + 16px); padding: 0 0 24px; text-align: left; }
  .swatches { justify-content: flex-start; }
  .buy__actions { display: flex; gap: 8px; margin-top: 16px; }
  .select__opts { padding-bottom: 0; }
  .select__backdrop, .select__sheet-head, .select__sheet-foot, .select__guide { display: none; }
  .select__list {
    position: absolute; z-index: 30; top: 52px; bottom: auto; max-height: 320px; padding: 8px; overflow-y: auto; border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(79, 62, 53, .16);
  }
  .select__opt { justify-content: flex-start; min-height: 44px; font-size: 16px; }  /* размер и подпись слева, галочка выбранного справа */
    .recent__row { grid-auto-columns: calc(25% - 6px); gap: 8px; }

  .footer { display: grid; gap: 24px; padding: 40px var(--gutter) 24px; }
  .footer__links { flex-direction: row; flex-wrap: wrap; gap: 12px 32px; }
  .footer__legal { flex-direction: row; justify-content: space-between; margin-top: 0; padding-top: 16px; border-top: 1px solid var(--line); }
}

/* ---------- остров «Добавить в корзину» ---------- */
.select select[aria-invalid="true"] { border-color: #a24b3a; }

/* ---------- юридические страницы ---------- */
.legal h2 { margin: 28px 0 10px; font-size: 19px; line-height: 26px; font-weight: 400; }
.legal ol { margin: 0 0 14px; padding-left: 22px; list-style: decimal; }
.legal li { margin-bottom: 6px; }
.legal__meta { color: var(--muted); font-size: 13px; }

/* ---------- уведомление о cookie ---------- */
.cookie {
  position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px);
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  background: var(--bg, #fff); border: 1px solid var(--line); box-shadow: 0 4px 24px rgb(0 0 0 / 12%);
  font-size: 13px; line-height: 19px;
}
.cookie[hidden] { display: none; }
.cookie a { text-decoration: underline; }
@media (min-width: 1024px) {
  .cookie { left: 20px; right: auto; bottom: 20px; max-width: 440px; }
}

/* ---------- страница 404 ---------- */
.notfound { display: flex; flex-direction: column; align-items: center; padding: 64px 16px 80px; text-align: center; }
.notfound__code { font-family: var(--serif); font-size: 96px; line-height: 1; letter-spacing: 2px; color: var(--line); }
.notfound__title { margin-top: 8px; font-size: 23px; line-height: 30px; font-weight: 400; }
.notfound__text { max-width: 420px; margin-top: 12px; color: var(--muted); }
.notfound__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.notfound__actions .btn { min-width: 180px; }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 32px; font-size: 14px; }
.notfound__links a { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) {
  .notfound { padding: 120px 20px 140px; }
  .notfound__code { font-size: 160px; }
}

/* ---------- поиск ---------- */

body.search-open { overflow: hidden; }
.search { position: fixed; z-index: 80; inset: 0; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.search__panel { display: flex; flex-direction: column; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
.search__side { display: contents; }  /* на телефоне блоки справа и результаты слева идут одним столбцом в порядке order */
.search__form { order: 1; display: flex; align-items: center; gap: 12px; }
.search__chips { order: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.search__results { order: 3; margin-top: 20px; }
.search__block:nth-of-type(1) { order: 4; }
.search__block:nth-of-type(2) { order: 5; }
.search__block:nth-of-type(3) { order: 6; }
.search__field { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; height: 44px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #faf7f4; }
.search__field .i { width: 20px; height: 20px; color: var(--muted); }
.search__field input { flex: 1; min-width: 0; height: 100%; padding: 0 8px; border: 0; outline: 0; background: none; -webkit-appearance: none; appearance: none; }
.search__field input::-webkit-search-cancel-button { display: none; }
.search__field:focus-within { border-color: var(--text); }
.search__clear { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; color: var(--muted); }
.search__clear .i { width: 18px; height: 18px; }
.search__close { flex: none; padding: 0; border: 0; background: none; font-size: 15px; }
.search__chip { padding: 5px 12px; border: 1px solid var(--text); border-radius: var(--radius); background: none; font-size: 14px; line-height: 20px; }
.search__chip:hover { background: #faf7f4; }
.search__block { margin-top: 20px; }
.search__label { margin: 0 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.search__item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 16px; }
.search__item > a { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.search__item .i { width: 20px; height: 20px; color: var(--muted); }
.search__forget { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; background: none; color: var(--muted); }
.search__forget .i-x { display: none; }
.search__forget:hover .i-x { display: block; }
.search__forget:hover .i-clock { display: none; }
.search__title { margin: 0 0 12px; font-size: 17px; line-height: 24px; font-weight: 400; }
.search__empty { display: flex; flex-direction: column; align-items: center; padding: 48px 0 32px; text-align: center; }
.search__empty[hidden] { display: none; }
.search__sad { width: 40px; height: 40px; fill: none; stroke: var(--text); stroke-width: 1.500; stroke-linecap: round; }
.search__empty-title { margin: 24px 0 0; font-size: 22px; line-height: 30px; }
.search__empty-hint { margin: 16px 0 0; font-size: 14px; line-height: 20px; }
.search--empty .search__chips, .search--empty .search__block { display: none; }
.search__cards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.search__cards::-webkit-scrollbar { display: none; }
.sc { flex: 0 0 42vw; min-width: 0; }
.sc__media { display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); background: #f4f1ef; overflow: hidden; }
.sc__media img { width: 100%; height: 100%; object-fit: cover; }
.sc__name { display: block; padding-top: 8px; font-size: 13px; line-height: 18px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc__row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; font-size: 14px; line-height: 20px; }
.sc__row s { font-size: 12px; }
.sc__stock { display: block; font-size: 12px; color: var(--muted); }
.search__all { display: flex; width: 100%; margin-top: 16px; }
.search-note { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.search-more { margin: 24px 0 16px; font-size: 19px; line-height: 26px; font-weight: 400; }

@media (min-width: 1024px) {
  .search { background: rgba(95, 94, 92, .3); animation: fade-in .2s; }
  .search__panel { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 0 56px; align-items: start; max-height: calc(100vh - 48px); overflow-y: auto; padding: 12px 20px 28px; background: var(--bg); }
  .search__side { display: block; grid-column: 2; grid-row: 1; }
  .search--empty .search__side { position: relative; z-index: 1; }  /* поле остается справа сверху, сообщение по центру всей панели */
  .search--empty .search__results { grid-column: 1 / -1; padding-top: 70px; }
  .search__results { grid-column: 1; grid-row: 1; align-self: stretch; display: flex; flex-direction: column; margin-top: 0; padding-top: 10px; }  /* на всю высоту панели: «Смотреть все» прижата к нижней границе */
  .search__form { order: 0; }
  .search__chips { margin-top: 16px; }
  .search__cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; gap: 8px; }
  .sc { flex: none; }
  .search__cards { margin-bottom: 28px; }
  .search__all { margin-top: auto; }
  .search__item, .search__item > a { min-height: 48px; }
  .search__item:hover { background: #faf7f4; }
}

/* ---------- блокировка прокрутки под окнами, десктоп ----------
   Полоса прокрутки страницы всегда на месте. Пока открыто окно, site.js (lockPage) прячет ее через `overflow: hidden` у <html>
   и фиксирует ширину <body>: контент не прыгает, как у 12 STOREEZ. Старый `overflow: hidden` у body здесь не нужен. */
@media (min-width: 1024px) {
  html { overflow-y: scroll; }
  body.lightbox-open, body.sheet-open, body.search-open, body.menu-open { overflow: visible; }
}

/* шторка размеров (карточка товара и образы) на телефоне уезжает вниз при закрытии (анимации те же, что у шторок карточки) */
@media (max-width: 1023px) {
  .select__list.is-closing { animation: sheet-down .3s cubic-bezier(.4, 0, 1, 1) forwards; pointer-events: none; }
  .select__backdrop.is-closing { animation: sheet-fade-out .3s ease forwards; pointer-events: none; }
}


/* ---------- подсказка размера по личным меркам ---------- */
.guide__advice { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: #f6f1e8; font-size: 14px; line-height: 20px; }
.guide__advice[hidden] { display: none; }
.guide__advice a { margin-left: 2px; text-decoration: underline; }
.guide__table tr.is-advice td { background: #f6f1e8; font-weight: 500; }
.select__advice { padding: 1px 8px; border-radius: 10px; background: #efe6d6; font-size: 12px; line-height: 18px; white-space: nowrap; }
