/* ROZKUR — монохром «графит и платина»: цвета у интерфейса нет, акцент — свет (серебро, платина);
   цвет только со смыслом (ошибка, «нет в наличии»). Крайний контраст масштабов: огромное плотное
   название и крошечные разреженные подписи. Одна форма кнопок и одна система скруглений везде.
   Все цвета — переменные ниже: чтобы перекрасить сайт, меняйте только :root. */
:root {
  --bg: #0a0b0d;
  --bg-2: #0f1013;
  --surface: #131418;
  --surface-2: #1a1c21;
  --photo-bg: #15171b;
  --line: #24262b;
  --line-strong: #393c43;
  --field-border: #737983;    /* рамка полей ввода: ≥3:1 и к фону страницы, и к фону поля */
  /* Лестница серых: ярко-белое — только главное. */
  --text: #f4f5f7;
  --soft: #c9ccd2;
  --muted: #a0a5ad;
  --faint: #7d838c;           /* только для крупного или неважного */
  --accent: #d5d8de;          /* серебро: подписи, выбор, NEW */
  --accent-ink: #111317;
  --button: linear-gradient(180deg, #f5f6f8, #c4c8cf);      /* платина */
  --button-hover: linear-gradient(180deg, #ffffff, #d2d6dc);
  --button-flat: #dcdfe4;                                    /* для рамки кнопки */
  --button-ink: #111317;
  --link: #f4f5f7;
  --link-strong: #ffffff;
  --danger: #ff9e90;
  --danger-ink: #2a0f0b;
  --warn: #e3c27c;
  --ok: #b9d9c4;
  --focus: #f4f5f7;
  --spot: rgba(214, 220, 230, 0.12);         /* студийный свет на витрину */
  --spot-2: rgba(150, 160, 178, 0.07);
  --vapor: 206 211 220;                      /* цвет пара для static/vapor.js: R G B */
  --shadow: rgba(0, 0, 0, 0.42);
  --overlay: rgba(6, 7, 9, 0.88);

  /* Жидкое стекло — только у слоя управления, который парит над товарами (шапка, капсула
     категорий, поиск, плавающие кнопки, окно 18+). Сами товары и тексты — плотные. */
  --glass: rgba(24, 26, 31, 0.5);
  --glass-strong: rgba(24, 26, 31, 0.72);              /* где под стеклом бывает мелкий текст */
  --glass-lens: blur(10px) saturate(175%) brightness(1.06);
  --glass-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 52%);
  /* Кромка: яркий блик сверху, почти пропадает по бокам, слабый отсвет снизу — как у линзы. */
  --glass-rim: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.07) 38%,
               rgba(255, 255, 255, 0.03) 62%, rgba(255, 255, 255, 0.18));
  --glass-depth: 0 14px 34px -14px rgba(0, 0, 0, 0.7), inset 0 -10px 18px -14px rgba(255, 255, 255, 0.14);
  /* Та же кромка тенями — для листающейся капсулы категорий (рамка-слой уехал бы с содержимым). */
  --glass-rim-flat: inset 0 1px 0 rgba(255, 255, 255, 0.34), inset 0 -1px 0 rgba(255, 255, 255, 0.12),
                    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --glass-press: rgba(255, 255, 255, 0.13);           /* выбранная капля внутри стекла */
  --glass-edge: rgba(10, 11, 13, 0.62);                /* размытый край под панелью каталога */
  --glass-edge-lens: blur(16px) saturate(140%);
  --mask-solid: linear-gradient(#000 0 0);                                   /* маски — не цвет на экране */
  --mask-fade-bottom: linear-gradient(180deg, #000 calc(100% - 8px), transparent);
  --glass-solid: #17191d;                               /* без размытия в браузере / «меньше прозрачности» */
  --overlay-glass: rgba(6, 7, 9, 0.55);

  --radius: 14px;             /* кнопки и поля — одна форма */
  --radius-lg: 22px;          /* панели и фото */
  --control-h: 48px;
  --header-h: 64px;         /* высота шапки: под ней прилипает оглавление категорий */
  --gutter: 16px;
  --shell: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--font);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
/* Без плавной прокрутки: переходы по якорю и смена категории не «летят» через всю страницу. */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 9rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  /* 100%, а не 16px: увеличенный шрифт в настройках браузера/телефона применяется к сайту. */
  font: 100%/1.6 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--line-strong); }
img { max-width: 100%; }
a { color: var(--link); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--link-strong); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 1px solid var(--focus); outline-offset: 4px;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 750; line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 20px; }
h2 { font-size: 1.5rem; margin: 32px 0 12px; }

/* Глубина: свет витрины сверху и тёмный низ. Неподвижно, без узоров. */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 60% at 72% -12%, var(--spot), transparent 70%),
    radial-gradient(ellipse 40% 35% at 8% 0%, var(--spot-2), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
  animation: lights 1.6s var(--ease) both;
}
@keyframes lights { from { opacity: 0; } }
/* Пар (static/vapor.js) — слой поверх света витрины, проявляется плавно. Холст в низком
   разрешении растянут на экран: дым мягкий сам по себе. */
.vapor { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 2.4s var(--ease); }
.vapor.is-on { opacity: 1; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 40px; } }

.page { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.content { flex: 1; padding-top: 0; padding-bottom: 88px; }
.content--narrow { padding-top: 28px; }

/* Шапка: название по центру, как вывеска; тонкая линейка снизу. */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.js .site-header { position: sticky; top: 0; z-index: 5; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.js .site-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.js .site-header__inner > .site-name { grid-column: 2; }
.js .site-header__inner > .badge-18 { grid-column: 3; justify-self: end; }
.site-name {
  display: inline-flex; align-items: center; gap: 12px; min-width: 0;
  color: var(--text); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.42em; text-transform: uppercase; overflow-wrap: anywhere;
}
.site-name:hover { color: var(--text); }
.site-logo { display: block; height: 32px; width: auto; max-width: 120px; object-fit: contain; }

.badge-18 {
  display: inline-block; flex: none; padding: 1px 8px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--soft); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; line-height: 1.6;
}

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.site-footer__inner { display: flex; flex-direction: column; gap: 14px; padding-top: 32px; padding-bottom: 40px; }
.site-footer__note { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.footer-links a { color: var(--text); text-decoration: none; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; }
.footer-links a:hover { text-decoration: underline; }

/* Мелкие прописные подписи — второй голос рядом с антиквой. */
.hero__eyebrow, .section-title, .card__category, .showcase__kind, .field label, .stock, .chip__code {
  font-family: var(--font); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
}

/* ---------- Главная: обложка ---------- */
.hero {
  display: grid; gap: 40px; align-items: end; margin: 0;
  padding: clamp(48px, 9vw, 120px) 0 clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .hero--with-showcase { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 64px; } }
.hero__eyebrow { margin: 0 0 28px; color: var(--accent); }
.hero__title {
  margin: 0; font-family: var(--serif); font-weight: 800; font-size: clamp(3.4rem, 11vw, 9rem);
  line-height: 0.86; letter-spacing: -0.07em; text-transform: uppercase;
}
.hero__tagline {
  margin: 28px 0 0; max-width: 26ch; color: var(--soft);
  font-family: var(--serif); font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 450; line-height: 1.4; letter-spacing: -0.01em;
}
.hero__actions { margin: 40px 0 0; }

/* Телефон: обложка компактная, чтобы товары начинались на первом экране; кнопка «Смотреть каталог»
   не нужна — каталог сразу ниже. */
@media (max-width: 599px) {
  .hero { gap: 22px; padding: 28px 0 24px; }
  .hero__eyebrow { margin-bottom: 14px; }
  .hero__title { font-size: clamp(2.9rem, 15vw, 4rem); }
  .hero__tagline { margin-top: 14px; font-size: 1.05rem; }
  .hero__actions { display: none; }
}
/* Витрина: настоящий товар каталога под светом, подпись — этикеткой. */
.showcase { display: block; color: var(--text); text-decoration: none; }
.showcase:hover { color: var(--text); }
.showcase .photo { aspect-ratio: 4 / 5; }
.showcase__label {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline;
  margin-top: 14px; padding-top: 12px; border-top: 3px double var(--line-strong);
}
.showcase__kind { grid-column: 1 / -1; color: var(--accent); }
.showcase__name { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.showcase__price { font-variant-numeric: tabular-nums; color: var(--soft); }
/* Узкий экран: витрина компактной строкой — фото слева, этикетка справа, каталог не уезжает вниз. */
@media (max-width: 899px) {
  .showcase { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: end; }
  .showcase__label { margin-top: 0; grid-template-columns: 1fr; }
  .showcase__name { font-size: 1.15rem; }
}
.showcase:hover .showcase__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* ---------- Каталог ---------- */
.catalog-head { margin: 56px 0 16px; scroll-margin-top: 80px; }
.section-title { margin: 0 0 18px; color: var(--muted); }
/* Категории — один переключатель-капсула: общая плашка, внутри только коды; выбранная — светлая
   плашка внутри, как нажатая кнопка. Всегда одна строка; не влезает — листается внутри себя.
   Прилипает под шапкой на всю длину каталога: сменить категорию можно из любого места. */
/* Панель каталога: категории и поиск в одну строку, прилипает под шапкой. */
.catalog-bar {
  position: sticky; top: 0; z-index: 4; margin: 0 calc(-1 * var(--gutter)) 18px; padding: 10px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  background: var(--bg);
}
.js .catalog-bar { top: var(--header-h); }
.chips-nav { min-width: 0; max-width: 100%; }
.chips {
  list-style: none; margin: 0; padding: 4px; display: flex; gap: 2px; width: max-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.chips::-webkit-scrollbar { display: none; }
.chips li { flex: none; }
.chip {
  position: relative; /* скрытая подсказка остаётся внутри листающейся капсулы, страница вбок не растёт */
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border-radius: 10px;
  color: var(--muted); text-decoration: none; transition: color 0.16s, background-color 0.16s;
}
.chip__code { font-size: 0.72rem; letter-spacing: 0.14em; color: inherit; }
.chip:hover { color: var(--text); }
.chip[aria-current="page"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip:active { transform: scale(0.97); }

/* Код категории + подсказка + метка NEW в одной строке над названием товара. */
.card__category { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; color: var(--muted); }
.cat-code { color: var(--soft); }
.cat-sub { font-family: var(--serif); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 0.9rem; color: var(--muted); }
.badge-new { padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--accent); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em; }

/* Поля и кнопки */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { color: var(--muted); }
input, select, textarea {
  width: 100%; min-height: var(--control-h); padding: 10px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--field-border); border-radius: var(--radius);
}
textarea { resize: vertical; }
input[type="checkbox"] { accent-color: var(--accent); }
input::placeholder { color: var(--muted); }
[aria-invalid="true"] { border-color: var(--danger); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 12px 26px; font: inherit; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; text-decoration: none;
  color: var(--button-ink); background: var(--button); border: 1px solid var(--button-flat); border-radius: var(--radius);
  box-shadow: 0 10px 30px -14px var(--shadow);
  transition: background-color 0.2s, color 0.2s;
  /* При крупном шрифте надпись переносится, а не раздвигает страницу. */
  max-width: 100%; min-width: 0; text-align: center; overflow-wrap: anywhere;
}
.button:hover { color: var(--button-ink); background: var(--button-hover); border-color: var(--button-flat); }
.button:active { transform: scale(0.97); }
.button--ghost { color: var(--text); background: var(--surface); border-color: var(--line-strong); box-shadow: none; }
.button--ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--soft); }
.button--primary { width: 100%; }
.button--danger { color: var(--danger-ink); background: var(--danger); border-color: var(--danger); box-shadow: none; }
.button--danger:hover { color: var(--danger-ink); background: var(--danger); filter: brightness(1.08); }

/* Поиск: поле и кнопка вплотную, той же высоты, что и капсула категорий. */
.filters { display: flex; align-items: center; gap: 8px; margin: 0; flex: 1 1 240px; max-width: 420px; }
.filters .field--search { flex: 1 1 auto; min-width: 0; }
.filters input { min-height: 46px; }
.filters .button { flex: none; min-height: 46px; padding: 0 20px; white-space: nowrap; }
/* Категорию выбирает капсула; скрытый список остаётся в форме, чтобы поиск
   не сбрасывал выбранную категорию (скрытое поле формы отправляется). */
.filters .field--category { display: none; }
/* Место под «Найдено: N · Сбросить» есть всегда: при переключении «Все» ↔ категория список не прыгает. */
.catalog-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; min-height: calc(0.85rem * 1.6); margin: -6px 0 18px; font-size: 0.85rem; line-height: 1.6; }
/* .catalog-status остаётся в разметке и пустой: это ещё и область объявлений для диктора. */
/* Пока подгружается новый список — старый приглушён, без скачков высоты. */
.is-loading #results { opacity: 0.5; transition: opacity 0.15s; }
/* Список не короче экрана: при переходе в почти пустую категорию страница не схлопывается,
   и браузер не подбрасывает прокрутку вверх. */
.results { min-height: calc(100vh - var(--header-h) - 80px); min-height: calc(100svh - var(--header-h) - 80px); }
.count { margin: 0; color: var(--muted); }
.reset { color: var(--soft); }

/* «Покупателям» под каталогом: каждая тема — своя плашка. Раскрытая растёт только вниз,
   на всю длину текста, без внутренней прокрутки; соседние плашки не двигаются вбок. */
.info { margin: 72px 0 24px; padding-top: 28px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .info { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; }
}
.info__list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.info-item { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.info-item[open] { border-color: var(--line-strong); }
.info-item > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 12px clamp(18px, 3vw, 26px); cursor: pointer; list-style: none;
  border-radius: var(--radius-lg);
}
.info-item > summary::-webkit-details-marker { display: none; }
.info-item > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.info-item__title { min-width: 0; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
@media (hover: hover) {
  .info-item > summary:hover .info-item__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
}
/* Метка: плюс, у раскрытой вертикальная черта гаснет — остаётся минус. */
.info-item__mark { position: relative; flex: none; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 999px; }
.info-item__mark::before, .info-item__mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px;
  background: var(--accent); transition: transform 0.25s var(--ease), opacity 0.25s;
}
.info-item__mark::after { transform: rotate(90deg); }
.info-item[open] .info-item__mark { border-color: var(--accent); }
.info-item[open] .info-item__mark::after { transform: rotate(90deg) scaleX(0); opacity: 0; }
/* Текст — под двойной линейкой, как этикетка товара. */
.info-item__body.description { margin: 0 clamp(18px, 3vw, 26px); padding: 16px 0 20px; border-top: 3px double var(--line-strong); }
.info-item__body p:last-child { margin-bottom: 0; }
/* Плавное раскрытие там, где браузер умеет; в остальных — просто открывается сразу. */
@supports (interpolate-size: allow-keywords) {
  .info__list { interpolate-size: allow-keywords; }
  .info-item::details-content { height: 0; overflow: clip; transition: height 0.3s var(--ease), content-visibility 0.3s allow-discrete; }
  .info-item[open]::details-content { height: auto; }
}

/* Сообщения: рамка целиком, без цветной полосы сбоку */
.notice { margin: 0 0 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); }
.notice--warn { border-color: var(--warn); }
.notice--error { border-color: var(--danger); }
.notice--ok { border-color: var(--ok); }
.muted { color: var(--muted); }

/* Сетка товаров: воздух между позициями, подпись под фото — этикеткой с двойной линейкой */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 360px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 12px; } }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 28px; } }
@media (min-width: 1140px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 64px 32px; } }
.card { min-width: 0; }
.card__link { display: block; color: var(--text); text-decoration: none; }
.card__link:hover { color: var(--text); }
.card__link .card__category { margin: 14px 0 6px; padding-top: 10px; border-top: 3px double var(--line-strong); }
.card__title { margin: 0; font-family: var(--serif); font-size: 1.05rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }
.card__link:hover .card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.card__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-top: 10px; }
.card__link .photo img { transition: opacity 0.3s; }
.card__link:hover .photo img { opacity: 0.9; }

/* Фото: единый формат 4:5 на нейтральной подложке */
.photo { position: relative; overflow: hidden; width: 100%; aspect-ratio: 4 / 5; background: var(--photo-bg); border-radius: var(--radius-lg); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo--empty {
  display: flex; align-items: center; justify-content: center; color: var(--muted);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
}
/* EXIF-ориентация (сам EXIF удалён при загрузке). Для поворота на 90° картинка
   занимает «перевёрнутый» прямоугольник рамки 4:5 и поворачивается в нём. */
.orient-2 { transform: scaleX(-1); }
.orient-3 { transform: rotate(180deg); }
.orient-4 { transform: scaleY(-1); }
.photo img.orient-5, .photo img.orient-6, .photo img.orient-7, .photo img.orient-8 {
  position: absolute; left: 50%; top: 50%; width: 125%; height: 80%;
}
.photo img.orient-5 { transform: translate(-50%, -50%) rotate(90deg) scaleX(-1); }
.photo img.orient-6 { transform: translate(-50%, -50%) rotate(90deg); }
.photo img.orient-7 { transform: translate(-50%, -50%) rotate(270deg) scaleX(-1); }
.photo img.orient-8 { transform: translate(-50%, -50%) rotate(270deg); }

/* Цена и наличие */
.price { margin: 0; font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.price--ask { color: var(--muted); font-weight: 500; }
.stock { margin: 0; color: var(--muted); font-size: 0.62rem; }
.stock--no { color: var(--danger); }

/* ---------- Страница товара: фото и этикетка ---------- */
.back { margin: 24px 0 24px; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }
.back a { color: var(--muted); text-decoration: none; }
.back a:hover { color: var(--text); }
.product { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
  .product__info { position: sticky; top: 96px; }
}
/* Галерея: на компьютере все фото крупно (главное и под ним по два в ряд), на телефоне —
   лента, которая листается пальцем, следующее фото выглядывает справа. */
.gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gallery__more { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 899px) {
  .gallery {
    flex-direction: row; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery__more { display: contents; }
  .gallery > .photo, .gallery__more > li { flex: 0 0 86%; scroll-snap-align: start; }
  .gallery__more > li > .photo { height: 100%; }
}
/* Этикетка: двойная рамка, как на флаконе. */
.product__info {
  min-width: 0; padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: 0 24px 70px -20px var(--shadow);
}
.product__info .card__category { margin: 0 0 18px; }
.product__title { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 24px; }
.product__meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; padding: 14px 0; border-top: 3px double var(--line-strong); border-bottom: 1px solid var(--line); }
.product__meta .price { font-size: clamp(1.4rem, 2.8vw, 1.8rem); }
.product__meta .price--ask { font-size: 1.2rem; }
.description { margin: 22px 0 28px; color: var(--soft); overflow-wrap: anywhere; }
.description p { margin: 0 0 12px; }
.prose { max-width: 66ch; }
.contact { display: flex; flex-direction: column; gap: 14px; }
/* Телефон: «Обсудить с менеджером» всегда под пальцем — прилипает к низу экрана. */
@media (max-width: 899px) {
  .contact > .button--primary {
    position: fixed; z-index: 6; left: var(--gutter); right: var(--gutter); width: auto;
    bottom: max(12px, env(safe-area-inset-bottom)); box-shadow: 0 16px 40px -8px var(--shadow);
  }
  .page:has(.contact > .button--primary) { padding-bottom: 84px; }
}

/* «Написать менеджеру» на остальных страницах: небольшая кнопка в правом нижнем углу. */
.float-contact {
  position: fixed; z-index: 6; right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-2);
  color: var(--text); text-decoration: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  box-shadow: 0 16px 40px -10px var(--shadow);
}
.float-contact:hover { color: var(--text); border-color: var(--accent); }
.float-contact:active { transform: scale(0.97); }
.page:has(> .float-contact) { padding-bottom: 72px; }
/* Телефон: поиск в одну строку (поле и кнопка рядом), отступ перед каталогом меньше,
   кнопка менеджера короче — меньше перекрывает содержимое. */
@media (max-width: 639px) {
  .catalog-head { margin-top: 28px; }
  .filters { flex-basis: 100%; max-width: none; }
  .float-contact { padding: 8px 14px; }
  .float-contact__long { display: none; }
}
@media (min-width: 640px) { .float-contact__short { display: none; } }
.age-note { margin: 0; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 0.82rem; }

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

/* Окно 18+: без JS скрыто (пометки 18+ остаются в шапке, карточке и подвале).
   При увеличенном тексте окно прокручивается — обе кнопки остаются доступны. */
.age-gate {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto;
  display: flex; padding: var(--gutter); background: var(--overlay);
}
.no-js .age-gate, .age-ok .age-gate { display: none; }
.age-gate__box {
  margin: auto; width: 100%; max-width: 440px; min-width: 0; padding: clamp(26px, 6vw, 40px) clamp(18px, 5vw, 32px); text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 30px 90px -20px var(--shadow);
}
.age-gate__box h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; }
.age-gate__box p { margin: 0; color: var(--soft); }
.age-gate__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.age-gate__actions .button { flex: 1 1 150px; }
.age-gate__box h2 { overflow-wrap: anywhere; }

/* ---------- Админка: та же гамма, проще и спокойнее ---------- */
.content--narrow { max-width: calc(760px + 2 * var(--gutter)); }
.site-header__inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
/* .field в фильтрах растягивается по ширине; в колонке это стало бы высотой. */
.stack .field { flex: none; }
.stack .button { align-self: flex-start; }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 0.875rem; }
.admin-nav a { color: var(--muted); text-decoration: none; }
.admin-nav a:hover { color: var(--text); text-decoration: underline; }
.admin-nav form { margin: 0; }
.hint { margin: 2px 0 0; color: var(--muted); font-size: 0.875rem; }
.field-error { margin: 2px 0 0; color: var(--danger); font-size: 0.875rem; }
.checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.checkbox input { width: 22px; height: 22px; min-height: 0; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.admin-links { padding-left: 20px; }
.admin-links li { margin: 8px 0; }
.admin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.admin-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.admin-row__main { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.admin-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.admin-row .field-error { flex-basis: 100%; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0; }
.inline-form input { flex: 1 1 140px; width: auto; min-width: 0; }
.inline-form .input-short { flex: 0 0 72px; }
input[type="file"] { padding: 8px; }
.photo-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.photo-item { border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.photo-item__actions { display: flex; flex-direction: column; gap: 6px; }
.photo-item__actions form { margin: 0; }
.photo-item__actions .button { width: 100%; padding: 6px 10px; font-size: 0.68rem; min-height: 38px; letter-spacing: 0.12em; }
.badge-main { display: inline-block; padding: 6px 10px; font-size: 0.68rem; text-align: center; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--accent); border: 1px solid var(--accent); }
.logo-preview { margin-bottom: 10px; }
.logo-preview img { display: block; max-height: 80px; width: auto; max-width: 100%; background: var(--surface-2); padding: 6px; }
section { margin-top: 28px; }
.hero { margin-top: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.stats-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.stats-table th:first-child { text-align: left; white-space: nowrap; }
.stats-table thead th { color: var(--muted); font-weight: 600; font-size: 0.875rem; }
.badge-partial { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: 0.75rem; font-weight: 600;
  color: var(--warn); border: 1px solid var(--warn); }
.help-toc { padding-left: 20px; columns: 2 200px; }
.help-toc li { margin: 4px 0; }
.top-list { padding-left: 22px; }
.top-list li { margin: 6px 0; overflow-wrap: anywhere; }

/* ---------- Жидкое стекло: слой управления над витриной ----------
   Стекло видно только когда под ним что-то есть, поэтому шапка и панель каталога прозрачные,
   а товары проезжают под ними. Материал один: линза (размытие + насыщенность), блик сверху,
   кромка-линза и мягкая глубина. Капсулы — полностью круглые края. */
.site-header, .chips, .filters input, .float-contact, .button--ghost, .age-gate__box, .info-item__mark {
  background: var(--glass-sheen), var(--glass);
  -webkit-backdrop-filter: var(--glass-lens); backdrop-filter: var(--glass-lens);
}
.button--ghost, .age-gate__box { position: relative; }   /* .float-contact и так fixed */
.float-contact, .button--ghost, .age-gate__box { border-color: transparent; box-shadow: var(--glass-depth); }
.chips { border-color: transparent; box-shadow: var(--glass-rim-flat), var(--glass-depth); }
.float-contact::before,.button--ghost::before, .age-gate__box::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--glass-rim);
  -webkit-mask: var(--mask-solid) content-box, var(--mask-solid);
  mask: var(--mask-solid) content-box, var(--mask-solid);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* Шапка — тонкий стеклянный лист во всю ширину, блик по нижней кромке. */
.site-header { border-bottom-color: transparent; box-shadow: inset 0 -1px 0 var(--line-strong); background: var(--glass-sheen), var(--glass-strong); }
/* Под капсулами — размытый край: проезжающие товары видны пятнами цвета, но их надписи
   не читаются и не спорят с кнопками. Нижняя кромка растворяется, без жёсткой линии. */
.catalog-bar {
  background: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-edge-lens); backdrop-filter: var(--glass-edge-lens);
  -webkit-mask-image: var(--mask-fade-bottom); mask-image: var(--mask-fade-bottom);
}
.chips { border-radius: 999px; padding: 4px; }
.chip { border-radius: 999px; }
.chip[aria-current="page"] { background: var(--glass-press); box-shadow: inset 0 1px 0 var(--line-strong); color: var(--text); }
.filters input { border-radius: 999px; padding-left: 20px; border-color: var(--line-strong); box-shadow: inset 0 1px 0 var(--line); }
.filters .button { border-radius: 999px; }
.float-contact { border: 0; }
.float-contact:hover { border: 0; background: var(--glass-sheen), var(--glass-strong); }
.button--ghost:hover { background: var(--glass-sheen), var(--glass-strong); }
.info-item__mark { border-color: var(--line-strong); }
/* Окно 18+: страница за ним размыта, само окно — толстое стекло. */
.age-gate { background: var(--overlay-glass); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.age-gate__box { background: var(--glass-sheen), var(--glass-strong); }
/* Нажатие: капля чуть «прогибается». */
.chip:active, .float-contact:active, .button--ghost:active { transform: scale(0.96); }
.chip, .float-contact, .button--ghost { transition: transform 0.18s var(--ease), background-color 0.16s, color 0.16s; }

/* Нет размытия в браузере или включено «Уменьшить прозрачность» — плотные поверхности. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header, .chips, .filters input, .float-contact, .button--ghost, .age-gate__box, .info-item__mark { background: var(--glass-solid); }
  .age-gate { background: var(--overlay); }
  .catalog-bar { background: var(--bg); }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .chips, .filters input, .float-contact, .button--ghost, .age-gate__box, .info-item__mark {
    background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  .age-gate { background: var(--overlay); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .catalog-bar { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

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