/*
  Стили «Постер на стену».
  Верстаем сначала под телефон (ТЗ 6.6, Р-147): базовые правила — для экранов 320–430 px,
  медиазапросы ниже — расширение для планшета и компьютера.
  Цвета и элементы — ТЗ 6.1–6.4: сайт светлый, цвет только точечно (кнопки, цены, бейджи).
*/

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-VF.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  /* Второй шрифт для сравнения на прототипе (ТЗ 6.2): грузится, только если включён (?font=montserrat) */
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f9f7fd;
  --text: #1f1535;
  --muted: #6e6885;
  --violet: #4b1d8f;
  --violet-hover: #3c1673;
  --pink: #ec4f8f;
  --lavender: #efe9fb;
  --pink-soft: #fde8f1;
  --buy: #d6336f;  /* кнопки покупки (Р-198) */
  --buy-hover: #bb2a60;
  --yellow: #ffc23d;
  --green: #1fa774;
  --line: #e7e2f2;
  --night: #17213f;  /* плитка «Карта звёздного неба» — единственная тёмная заливка на главной (ТЗ 6: «одно-два цветных решения») */
  --tile-pink: #fce9ef;
  --tile-peach: #fdeee3;
  --header-h: 61px;  /* высота шапки на телефоне — под ней закрепляется панель фильтров каталога */
  --radius: 18px;
  --tap: 48px; /* высота кнопок: больше минимума 44 px для пальца (ТЗ 6.6, п. 3) */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sticky-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Атрибут hidden прячет всегда, даже если у блока свой display (grid, flex) — скрипты прячут поля именно им. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden; /* никакой горизонтальной прокрутки (ТЗ 6.6, п. 1) */
}
body.font-montserrat { font-family: "Montserrat", system-ui, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.page-narrow { max-width: 720px; padding-top: 24px; padding-bottom: 24px; }
.section { padding-top: 28px; padding-bottom: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head a { font-weight: 600; text-decoration: none; padding: 10px 0; white-space: nowrap; flex: none; }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* --- Строки над шапкой ------------------------------------------------------------------------ */
.top-strip {
  background: var(--lavender);
  color: var(--violet);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 6px 12px;
}
.test-banner {
  background: var(--yellow);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 6px 12px;
}

/* --- Шапка: логотип, корзина и меню всегда видны (ТЗ 6.6, п. 9) -------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.header-row { display: flex; align-items: center; gap: 6px; min-height: 60px; }
/* Логотип «На гвоздике» (Р-105, Р-189): картинка с надписью в кривых — одинаково на любом устройстве. */
.logo { display: flex; align-items: center; text-decoration: none; flex: 1; min-width: 0; }
.logo-full { height: 44px; width: auto; }
.logo-mark { display: none; height: 40px; width: 40px; }
.icon-btn {
  min-width: 44px; min-height: 44px; border: 0; background: transparent; border-radius: 12px;
  font-size: 22px; color: var(--text); cursor: pointer; display: inline-grid; place-items: center;
}
.menu-toggle svg { width: 26px; height: 26px; }
.cart-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: 999px; background: var(--violet); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px;
}
.cart-icon { display: none; width: 20px; height: 20px; flex: none; }
/* Значки поиска и «Избранного» в шапке (ТЗ 7 пп. 3, 9). */
.header-icon { display: inline-grid; place-items: center; position: relative; flex: none; color: var(--violet); text-decoration: none; }
.header-icon svg { width: 24px; height: 24px; }
.fav-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
/* Узкий телефон (ТЗ 6.6, п. 9): логотип, город, поиск и корзина видны всегда. Корзина — круглым значком
   со счётчиком в углу, «Избранное» — в меню «☰» и сердечками на карточках. */
@media (max-width: 479px) {
  .header-row { gap: 2px; }
  .logo-full { height: 40px; }
  .cart-pill { position: relative; padding: 0; width: 44px; justify-content: center; flex: none; }
  .cart-pill .cart-label { display: none; }
  .cart-pill .cart-icon { display: inline-block; }
  .cart-pill .cart-count { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; font-size: 11px; padding: 0 4px; }
  .fav-icon { display: none; }
}
/* Совсем узкий экран (320 px): надпись не помещается рядом с городом — остаётся знак «На гвоздике» (Р-155),
   поиск — первой строкой в меню «☰». */
@media (max-width: 359px) {
  .logo-full { display: none; }
  .logo-mark { display: block; }
  .search-icon { display: none; }
}
.cart-count { background: var(--pink); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-grid; place-items: center; font-size: 13px; padding: 0 6px; }
/* Меню «☰» на телефоне (Р-195): что заказать, фильтры каталога списками, покупателям. Своя прокрутка —
   иначе в закреплённой шапке низ длинного меню был бы недоступен. */
.site-nav { border-top: 1px solid var(--line); background: #fff; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain; }
.site-nav .container { display: flex; flex-direction: column; padding-bottom: 24px; }
.site-nav .container > a { display: flex; align-items: center; gap: 8px; padding: 12px 0; min-height: var(--tap); text-decoration: none; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }
.nav-caption { margin: 18px 0 2px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.nav-group { border-bottom: 1px solid var(--line); }
.nav-group summary { min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; font-weight: 600; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; font-size: 22px; color: var(--violet); }
.nav-group[open] summary::after { content: "−"; }
.nav-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 14px; }
.nav-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: var(--bg-soft);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 13px; }
.swatch-dot { width: 18px; height: 18px; flex: none; }
/* Меню на компьютере (Р-195) и большое меню «Каталог»: раскрывается с задержкой — не мигает, когда мышь
   просто проходит мимо (Baymard: 300–500 мс), работает и с клавиатуры (focus-within). */
.main-nav { display: none; }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(31, 21, 53, 0.12); visibility: hidden; opacity: 0;
  transition: opacity 0.15s ease 0.3s, visibility 0s linear 0.45s; }
.has-mega:hover .mega, .has-mega:focus-within .mega { visibility: visible; opacity: 1; transition: opacity 0.15s ease 0.2s, visibility 0s linear 0.2s; }
.mega-grid { display: grid; grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)); gap: 24px; padding-top: 24px; padding-bottom: 28px; }
.mega-col { display: flex; flex-direction: column; min-width: 0; }
.mega-title { font-weight: 800; margin: 0 0 6px; }
.mega-col a { display: flex; align-items: center; gap: 6px; padding: 5px 0; color: var(--text); text-decoration: none; font-size: 15px; }
.mega-col a:hover { color: var(--violet); text-decoration: underline; }
.nav-search, .search-form { display: flex; gap: 8px; }
.nav-search { padding: 12px 0; border-bottom: 1px solid var(--line); }
.nav-search input, .search-form input { flex: 1; min-width: 0; min-height: var(--tap); font: inherit; font-size: 16px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.nav-search .btn, .search-form .btn { padding: 0 18px; }

/* --- «Избранное»: сердечко на карточке и на странице товара (ТЗ 7 п. 9) ------------------------------- */
.card-wrap { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card-wrap > .card { flex: 1; }
/* Р-321: картинка и текст карточки — две ссылки, между ними — кружки цветов. */
.card-wrap > .card-media-link { flex: none; }
/* Ряд шире карточки на 4 px с каждой стороны (поля внутри): обводка выбранного кружка у края не срезается. */
.card-colors { display: flex; align-items: center; gap: 0; margin: 2px -4px -6px; padding: 0 4px; min-height: 44px; flex-wrap: nowrap; overflow: hidden; }
/* Р-373: кружки и плитки ужимаются под ширину карточки (flex-shrink), а не по ширине экрана: в ленте на главной
   карточка уже, чем в сетке каталога (на телефоне 390 px — 158 px против 173), и «+3», «+17» обрезались. */
.card-swatch { flex: 0 1 26px; min-width: 17px; display: grid; place-items: center; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.card-swatch svg { width: min(20px, calc(100% - 3px)); height: auto; aspect-ratio: 1 / 1; border-radius: 50%; box-shadow: 0 0 0 1px rgba(40, 30, 60, 0.18); }
.card-swatch[aria-pressed="true"] svg { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--violet); }
.card-swatch:focus-visible { outline: 3px solid var(--pink); outline-offset: -6px; border-radius: 8px; }
.card-colors-more { display: none; flex: none; white-space: nowrap; font-size: 12px; color: var(--muted); padding-left: 2px; }
/* Р-373: узоры на карточке — квадратные плитки под кружками цвета, «+N» видно всегда. */
.card-patterns { display: flex; align-items: center; margin: 0 -4px -6px; padding: 0 4px; min-height: 44px; flex-wrap: nowrap; overflow: hidden; }
.card-pattern { flex: 0 1 28px; min-width: 20px; display: grid; place-items: center; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.card-pattern img { width: min(22px, calc(100% - 5px)); height: auto; aspect-ratio: 1 / 1; border-radius: 5px; box-shadow: 0 0 0 1px rgba(40, 30, 60, 0.18); }
.card-pattern[aria-pressed="true"] img { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--violet); }
.card-pattern:focus-visible { outline: 3px solid var(--pink); outline-offset: -6px; border-radius: 8px; }
.card-patterns .card-patterns-more { display: inline; }
@media (max-width: 560px) {
  .card-swatch:nth-of-type(n+7) { display: none; }
  .card-colors-more { display: inline; }
  .card-swatch { flex-basis: 24px; }
}
/* Самые узкие телефоны (320 px): карточка ~127–138 px — «+3» и «+17» мельче, кружки и плитки ужимаются сами. */
@media (max-width: 359px) {
  .card-colors-more { font-size: 11px; padding-left: 1px; }
}
.fav-form { margin: 0; }
.card-wrap > .fav-form { position: absolute; top: 12px; right: 12px; }
.fav-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.92); box-shadow: 0 1px 4px rgba(31, 21, 53, 0.18); color: var(--violet); }
.fav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav-btn[aria-pressed="true"] svg { fill: var(--pink); stroke: var(--pink); }
.fav-form.is-inline .fav-btn { display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-height: var(--tap);
  padding: 0 16px 0 12px; background: #fff; box-shadow: none; border: 1px solid var(--line); font: inherit; font-weight: 600; color: var(--text); }
.product-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.share-btn svg { width: 18px; height: 18px; }
/* «В интерьере» — автомокапы, листаются пальцем (ТЗ 20.2 п. 27). */
.mockup-block { margin: 12px 0; }
.mockup-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 88%; gap: 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.mockup-gallery > a { scroll-snap-align: start; display: block; }
.mockup-gallery img { width: 100%; height: auto; border-radius: 12px; display: block; }
/* Внутри блока картинки товара действует правило для постера (пропорция листа, обрезка) — мокапу оно не нужно. */
.preview-box .mockup-gallery img {
  width: 100%; max-width: none; max-height: none; aspect-ratio: auto; object-fit: contain; box-shadow: none; border-radius: 12px; }
/* Лента «фото товара + мокапы» на странице постера и комплекта: один кадр на экран, листается пальцем. */
.media-carousel.has-mockups { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; align-items: center; }
.media-carousel.has-mockups > * { scroll-snap-align: center; }
.product-media .media-carousel .mockup-img { width: 100%; max-width: none; max-height: none; aspect-ratio: auto;
  object-fit: contain; box-shadow: none; border-radius: 10px; }
.media-hint { margin: 8px 0 0; text-align: center; }
@media (min-width: 960px) { .mockup-gallery { grid-auto-columns: 48%; } }
.share-box { background: var(--bg-soft); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; margin: 8px 0; }
.share-box p { margin: 0; }
.share-row { display: flex; gap: 8px; }
/* 16 px — иначе iPhone приближает страницу при нажатии на поле (ссылка на макет и на заказ, Р-365). */
.share-row input { flex: 1; min-width: 0; min-height: var(--tap); font: inherit; font-size: 16px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.share-images { display: grid; gap: 12px; margin: 12px 0; justify-items: center; }
.share-images img { width: 100%; max-width: 520px; height: auto; border-radius: 4px; box-shadow: 0 4px 18px rgba(31, 21, 53, 0.16); }
.share-images.is-set { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.share-cta { max-width: 520px; margin: 12px auto 0; display: grid; gap: 6px; text-align: center; }
.share-page h1, .share-page .lead { text-align: center; }
/* Всплывающее уведомление (Р-203): появляется плавно, через 5 секунд медленно гаснет (core/js/site.js). */
/* Раскладка — сеткой: текст слева, крестик всегда справа вверху, ссылка — под текстом. Длинный текст
   переносится внутри своей колонки и не выталкивает крестик на новую строку. */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: 460px; margin: 0 auto;
  background: var(--text); color: #fff; border-radius: 14px; padding: 6px 4px 6px 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text close" "link close"; column-gap: 4px;
  align-items: start; box-shadow: 0 8px 28px rgba(31, 21, 53, 0.28);
  opacity: 0; transform: translateY(14px); transition: opacity 0.9s ease, transform 0.35s ease; }
.toast.is-on { opacity: 1; transform: none; }
.toast-text { grid-area: text; display: flex; gap: 10px; align-items: flex-start; padding: 10px 0 6px; line-height: 1.35; }
.toast-text::before { content: "✓"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #2f9e6a; color: #fff; font-size: 13px; font-weight: 700; margin-top: -1px; }
.toast-error .toast-text::before { content: "!"; background: #fff; color: #9b1c3f; }
.toast.toast-error { background: #9b1c3f; }
.toast a { color: #fff; font-weight: 700; min-height: 40px; display: inline-flex; align-items: center; text-underline-offset: 3px; }
.toast-link { grid-area: link; justify-self: start; margin-left: 32px; }
.toast-close { grid-area: close; align-self: start; background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
  min-width: 44px; min-height: 44px; cursor: pointer; border-radius: 10px; }
.toast-close:hover { background: rgba(255, 255, 255, 0.12); }
.cart-pill.is-bumped .cart-count { animation: cart-bump 0.45s ease; }
@keyframes cart-bump { 40% { transform: scale(1.35); } }
/* На компьютере — справа вверху, под кнопкой «Корзина»: рядом с тем, что изменилось, и не спорит
   с плашкой cookie и полосой кнопки внизу экрана. */
@media (min-width: 960px) {
  .toast { left: auto; right: 24px; bottom: auto; top: calc(var(--header-h) + 12px); margin: 0; width: 420px; transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; transform: none; }
  .cart-pill.is-bumped .cart-count { animation: none; }
}

/* Сортировка каталога и лента «Вы недавно смотрели» (листается пальцем). */
.info-box .benefit-list { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.benefit-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: baseline; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.benefit-list b { font-size: 18px; }
.benefit-list small { grid-column: 1 / -1; color: var(--muted); }
.sort-links { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.sort-links a { min-height: var(--tap); display: inline-flex; align-items: center; }
.sort-links a[aria-current="page"] { font-weight: 700; color: var(--text); text-decoration: none; }
/* Р-442: на телефоне — постер почти на ширину экрана, следующий виден краем; с 480 px — по два. */
.grid.grid-recent { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 80%); overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
@media (min-width: 480px) { .grid.grid-recent { grid-auto-columns: minmax(150px, 44%); } }
.grid.grid-recent > * { scroll-snap-align: start; }

/* --- Кнопки-«таблетки» (ТЗ 6.3) ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; text-align: center;
}
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-hover); }
/* Кнопки покупки (Р-198): «В корзину», «Перейти к оформлению», «Утвердить и оплатить», «Оплатить».
   Свой цвет, который больше нигде на сайте не встречается крупно, — кнопку видно сразу (Baymard: у кнопки
   покупки уникальный стиль; эффект изоляции). Розовый из палитры бренда, чуть глубже логотипа, чтобы белый
   текст читался: контраст 4,6 : 1 (норма WCAG AA — 4,5). Фиолетовый остаётся для меню, ссылок и остальных кнопок. */
.btn-primary.btn-buy { background: var(--buy); }
.btn-primary.btn-buy:hover { background: var(--buy-hover); }
.btn-outline { background: #fff; color: var(--violet); border-color: var(--violet); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* --- Бейджи и цены (ТЗ 5.1, 6.3) --------------------------------------------------------------- */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-violet { background: var(--lavender); color: var(--violet); }
.badge-pink { background: var(--pink); color: #fff; }
.badge-new { background: var(--pink-soft); color: #b0245e; }
.badge-hit { background: var(--violet); color: #fff; }  /* «Хит продаж», «Популярно сейчас» */
.badge-pick { background: #fff; color: var(--violet); box-shadow: inset 0 0 0 1px var(--lavender); }  /* «Выбор магазина» */
.price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.price-old { color: var(--muted); text-decoration: line-through; white-space: nowrap; }
.price-note { color: var(--muted); font-size: 14px; }

.nowrap { white-space: nowrap; }
.notice { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: var(--lavender); font-weight: 600; }
.notice-success { background: #e7f7ef; color: #0f6b47; }
.notice-warning, .notice-error { background: var(--pink-soft); color: #8f1d4b; }

/* --- Первый экран (Р-190): заголовок и кнопки, рядом — комплект на стене крупным кадром ---------- */
.hero { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-soft) 70%, #fff 100%); padding: 20px 0 8px; }
.hero h1 { font-size: 30px; letter-spacing: -0.02em; }
.hero-grid { display: grid; gap: 18px; }
.lead { font-size: 17px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; }
.hero-actions .btn { flex: 1 1 100%; } /* на телефоне кнопки друг под другом, во всю ширину */
.hero-trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; color: var(--muted); }
.hero-trust li::before { content: "✓ "; color: var(--violet); font-weight: 700; }
.trust-line { font-size: 14px; color: var(--muted); }
.hero-set { position: relative; display: block; text-decoration: none; color: var(--text); background: #fff; border-radius: 24px; overflow: hidden;
  box-shadow: 0 18px 40px rgba(75, 29, 143, 0.12); }
/* Р-305 (ты: «немного увеличь постеры в интерьере на главной, где они сами перелистываются»): кадр «крупно» общий
   с карточками, на первом экране он приближен на 20 % к постерам — они чуть выше середины кадра (mockups.closeup_box). */
.hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transform: scale(1.2); transform-origin: 50% 45%; }
.hero-set .set-strip { padding: 12px 12px 72px; }
.hero-price { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); background: rgba(255, 255, 255, 0.95); border-radius: 14px;
  padding: 8px 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; box-shadow: 0 4px 14px rgba(31, 21, 53, 0.12); }
.hero-price-name { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--muted); }
.hero-price s { color: var(--muted); }
.hero-price strong { font-size: 20px; }
/* Показ примеров на первом экране (Р-190): лента со «снапом» — листается пальцем и без скриптов,
   скрипт листает её сам раз в 6 секунд (site.js). Точки и пауза — под картинкой, цели нажатия 44 px. */
.hero-slider { position: relative; border-radius: 24px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(75, 29, 143, 0.12); }
.hero-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { position: relative; display: block; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; text-decoration: none; color: var(--text); }
.hero-dots { display: flex; justify-content: center; align-items: center; margin-top: 4px; }
.hero-dot, .hero-pause { display: inline-grid; place-items: center; width: 40px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.hero-dot span { width: 9px; height: 9px; border-radius: 50%; background: #cfc6e4; transition: width 0.2s, background 0.2s; }
.hero-dot[aria-current="true"] span { width: 24px; border-radius: 999px; background: var(--violet); }
.hero-pause { width: 44px; color: var(--violet); }
.hero-pause svg { width: 18px; height: 18px; }
.hero-pause .i-play, .hero-pause[aria-pressed="true"] .i-pause { display: none; }
/* Р-443: слайдов 13 (по категории) — на телефоне точки уже, чтобы ряд помещался в 360 px; ещё уже экран — перенос. */
@media (max-width: 479px) {
  .hero-dots { flex-wrap: wrap; }
  .hero-dot { width: 22px; }
  .hero-dot[aria-current="true"] span { width: 18px; }
  .hero-pause { width: 40px; }
}
.hero-pause[aria-pressed="true"] .i-play { display: inline; }
.set-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.set-strip.size-2 { grid-template-columns: repeat(2, 1fr); }
.set-strip img { width: 100%; aspect-ratio: 1 / 1.4142; object-fit: cover; border-radius: 4px; box-shadow: 0 2px 8px rgba(31, 21, 53, 0.12); }

.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.why-list li { background: var(--bg-soft); border-radius: 14px; padding: 14px 16px; }
.steps { padding-left: 22px; margin: 0; display: grid; gap: 8px; }

/* --- Сетки карточек (Р-193): картинка крупно на мягкой подложке, без рамок; постер — с тенью, как на стене -- */
.grid { --grid-gap-x: 12px; display: grid; gap: 22px var(--grid-gap-x); margin-top: 8px; }
/* Р-442: на телефоне — один постер в ряд (ты: «в мобильной версии 2 в ряд постеры не читаются, надо 1 постер на
   экран»). Две колонки — с 480 px (телефон боком, маленький планшет), с 640 px — три, с 960 px — четыре. */
.grid-posters { grid-template-columns: minmax(0, 1fr); }
.grid-sets { grid-template-columns: 1fr; }
/* Каталог: постеры и комплекты одним списком; от двух колонок комплект занимает две — его фото на стене широкое. */
.grid-products { grid-template-columns: minmax(0, 1fr); grid-auto-flow: dense; }
@media (min-width: 480px) {
  .grid-posters, .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-products > .is-set { grid-column: span 2; }
}
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.card-media { position: relative; background: var(--bg-soft); border-radius: 16px; padding: 14px; overflow: hidden; transition: background 0.2s; }
.card:hover .card-media { background: var(--lavender); }
.card-media img { width: 100%; aspect-ratio: 1 / 1.4142; object-fit: cover; border-radius: 2px;
  box-shadow: 0 8px 18px rgba(31, 21, 53, 0.14), 0 1px 3px rgba(31, 21, 53, 0.12); }
.card-media.has-room { padding: 0; }
.card-media.has-room .room-img { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; transition: transform 0.4s; }
.card:hover .card-media.has-room .room-img { transform: scale(1.03); }
/* Каталог (Р-225): фото комплекта на стене — той же высоты, что картинка постера в соседней колонке. Кадр
   обрезается сверху и снизу (стена, диван), постеры в нём не мельчают. Высота постера рядом: колонка
   W = (S − зазор) / 2, картинка (W − 2 · 14) · 1,4142 + 2 · 14 → 70,71 % ширины комплекта S минус поправка. */
.grid-products > .is-set .card-media.has-room { container-type: inline-size; }
.grid-products > .is-set .card-media.has-room .room-img { aspect-ratio: 3 / 2; object-position: 50% 42%; }
@supports (height: 1cqw) {
  .grid-products > .is-set .card-media.has-room .room-img {
    aspect-ratio: auto; height: calc(70.71cqw - 0.7071 * var(--grid-gap-x) - 11.6px); }
}
/* Р-442: на телефоне комплект на стене — крупнее (ты: «в мобильной версии комплекты тоже читаются плохо, надо
   увеличить … в других категориях тоже»). В кадре «крупно» постеры занимают 55 % ширины, по центру, чуть выше
   середины (mockups.services.closeup_box). Высота 1,2375 ширины при object-fit: cover увеличивает кадр в 1,65 раза:
   постеры — около 90 % ширины карточки (у комплекта из 3 — по ~100 px, из 2 — по ~150 px на экране 390 px), стена и
   мебель по краям обрезаются. Все карточки комплектов: каталог, ленты главной, избранное, поиск, «Вы смотрели». */
@media (max-width: 479px) {
  .is-set .card-media.has-room .room-img,
  .grid-products > .is-set .card-media.has-room .room-img {
    aspect-ratio: 1 / 1.2375; height: auto; object-fit: cover; object-position: 50% 45%; }
}
.card-badge { position: absolute; top: 10px; left: 10px; }
.set-flag { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, 0.95); color: var(--violet); font-size: 13px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; box-shadow: 0 2px 8px rgba(31, 21, 53, 0.12); }
.card-body { padding: 10px 2px 2px; display: grid; gap: 3px; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.card-prices { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card-hint { font-size: 13px; color: var(--muted); line-height: 1.35; }
.card-members { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-line { font-size: 13px; color: var(--violet); font-weight: 600; }  /* «С именем малыша», «Серия из 3» (ТЗ 5.1) */
.page-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 12px; }
.room-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 14px; border-radius: 999px; background: var(--bg-soft); color: var(--violet); font-size: 13px; font-weight: 600; text-decoration: none; }
.trust-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; color: var(--muted); }
.trust-list li::before { content: "✓ "; color: var(--violet); font-weight: 700; }

/* --- Каталог: переключатель «Все / Постеры / Комплекты» ---------------------------------------- */
.segmented { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.segmented a, .segmented button {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; text-decoration: none; color: var(--text); font-weight: 600; background: #fff; font: inherit; cursor: pointer;
}
.segmented .is-active, .segmented [aria-current="page"], .segmented [aria-pressed="true"] { background: var(--violet); color: #fff; border-color: var(--violet); }

/* --- Страница товара ---------------------------------------------------------------------------- */
.product { padding-top: 12px; padding-bottom: 24px; }
.product-media { background: var(--bg-soft); border-radius: var(--radius); padding: 12px; }
/* На телефоне постер не выше ~46 % экрана: название и цена видны на первом экране (ТЗ 6.6). */
.product-media img { width: auto; max-width: 100%; max-height: 46vh; margin: 0 auto; aspect-ratio: 1 / 1.4142; object-fit: cover; box-shadow: 0 6px 24px rgba(31, 21, 53, 0.16); border-radius: 3px; }
.product-info { display: grid; gap: 10px; padding-top: 12px; }
.mood { color: var(--muted); font-size: 16px; }
.price-block { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price-block .price { font-size: 26px; }
.format-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.format-picker a { min-height: 56px; border: 2px solid var(--line); border-radius: 14px; display: grid; place-content: center; text-align: center; text-decoration: none; color: var(--text); font-weight: 700; line-height: 1.2; }
.format-picker a small { font-weight: 500; color: var(--muted); }
.format-picker a[aria-current="true"] { border-color: var(--violet); background: var(--lavender); }
/* Бумага (Р-268): под форматом, те же плитки. */
.paper-picker { margin-top: 12px; }
.paper-label { font-weight: 700; margin: 0 0 6px; }
.info-box { background: var(--bg-soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; }
/* Р-446: «Заказ № … ждёт оплаты» в корзине. */
.unpaid-order { margin-bottom: 16px; display: grid; gap: 6px; }
.unpaid-order p { margin: 0; }
.unpaid-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 6px; }
.info-box ul { margin: 6px 0 0; padding-left: 18px; }
.box-note { margin: 8px 0 0; }
/* Встроенные стили запрещены политикой безопасности (CSP, core.middleware) — только классы. */
details.faq { border-bottom: 1px solid var(--line); }
details.faq summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 700; cursor: pointer; }
details.faq p { color: var(--muted); }
.in-sets { display: grid; gap: 12px; }
.set-offer { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.set-offer-top { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--text); }
.set-offer-top strong { display: block; }
.set-offer .set-strip { width: 132px; flex: none; }
.savings { color: var(--green); font-weight: 700; font-size: 14px; }
.composition { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.composition a { text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; display: grid; gap: 6px; }
.composition img { aspect-ratio: 1 / 1.4142; object-fit: cover; border-radius: 3px; box-shadow: 0 2px 8px rgba(31, 21, 53, 0.12); }

/* --- Закреплённая внизу главная кнопка с суммой (ТЗ 6.6, пп. 2 и 11) -------------------------- */
body.has-sticky-cta main { padding-bottom: calc(var(--sticky-h) + var(--safe-bottom) + 12px); }
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + var(--safe-bottom));
  box-shadow: 0 -6px 24px rgba(31, 21, 53, 0.08);
}
.sticky-cta form, .sticky-cta .sticky-inner { max-width: 720px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.sticky-cta .btn { flex: 1; min-height: 52px; font-size: 17px; }
/* Две кнопки внизу («В корзину · 590 ₽» и «Купить сейчас», Тексты 4.4): главная шире, текст чуть мельче. */
.sticky-inner.two .btn { font-size: 15px; padding-left: 10px; padding-right: 10px; line-height: 1.2; }
.sticky-inner.two .buy-now { flex: 0 1 auto; }
.sticky-summary { flex: none; font-size: 13px; color: var(--muted); line-height: 1.25; }
/* Стиль портрета питомца (ТЗ 3.8, Р-200): плитки 4 в ряд с примером на нашем псе, статус художника под ними.
   Классы art-*: «style-tile» уже занят плитками «Найдите своё» на главной. */
.style-picker { min-width: 0; }
/* Телефон: 4 стиля портрета (Р-240) — 2 × 2, без одинокой плитки в последнем ряду; в метрике питомца 5 плиток
   («Фото как есть» + 4) — 3 в ряд. В 4 колонки названия («Королевский портрет») рвались посреди слова. */
.art-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
/* Р-244: потолок расходов исчерпан — предупреждение до загрузки фото: портрет нарисуем вручную. */
.style-rest { margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--pink-soft); color: var(--text); font-size: .95rem; }
@media (min-width: 640px) {
  .art-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .portrait-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
/* Метрика питомца: 9 плиток («Фото как есть» + 8 стилей) — на компьютере 5 в ряд, блок по желанию не занимает пол-экрана. */
.art-tile { position: relative; cursor: pointer; min-width: 0; }
/* «Портрет по фото» (ТЗ 3.14): группы стилей — «Графика», «Линии», «Мозаика», «Под живопись». */
.art-field .art-group { margin: 14px 0 6px; font-weight: 700; color: var(--muted, #6b6475); font-size: 14px; }
.art-field .art-group:first-of-type { margin-top: 4px; }
.art-hint { font-size: 12px; line-height: 1.25; color: var(--muted, #6b6475); }
.art-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.art-card { display: grid; align-content: start; gap: 6px; padding: 4px 4px 8px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; text-align: center; height: 100%; }
.art-img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; display: block; background: var(--bg-soft); }
.art-name { font-size: 13px; font-weight: 700; line-height: 1.2; overflow-wrap: normal; }
@media (max-width: 359px) { .art-name { font-size: 12px; } }
.art-tile input:checked + .art-card { border-color: var(--violet); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--violet); }
.art-tile input:focus-visible + .art-card { outline: 3px solid var(--pink); outline-offset: 2px; }
.style-status { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: var(--bg-soft); }
.style-status.is-error { background: #fdecef; color: #8f1d3b; }
.style-status.is-done { background: #e8f6ee; color: #17603f; }
.style-message { margin: 0; font-weight: 600; }
.style-progress { height: 6px; margin-top: 10px; border-radius: 999px; background: #e6def5; overflow: hidden; }
.style-progress span { display: block; width: 40%; height: 100%; border-radius: 999px; background: var(--violet);
  animation: style-progress 1.4s ease-in-out infinite; }
@keyframes style-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.style-email { margin-top: 10px; }
[data-style-again] { margin-top: 10px; }
/* Пока художник рисует — над превью надпись, сам макет приглушён. */
.preview-box.is-drawing img { opacity: 0.55; }
.preview-box.is-drawing::after { content: "Художник рисует…"; position: absolute; left: 50%; top: 42%; transform: translateX(-50%);
  padding: 8px 14px; border-radius: 999px; background: rgba(31, 21, 53, 0.82); color: #fff; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .style-progress span { animation: none; width: 100%; opacity: 0.5; } }
/* Выбор шрифта надписей (Р-206): кнопки с образцом — название варианта его же шрифтом. */
.font-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.font-option { position: relative; cursor: pointer; }
.font-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.font-sample { display: grid; place-items: center; min-height: 52px; min-width: 96px; padding: 6px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: #fff; }
.font-sample img { height: 36px; width: auto; max-width: 100%; }
.font-option input:checked + .font-sample { border-color: var(--violet); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--violet); }
.font-option input:focus-visible + .font-sample { outline: 3px solid var(--violet); outline-offset: 2px; }
/* Кнопка и её состояние «✓ В корзине — перейти» (Р-204): зелёная — видно, что товар уже положен. */
.cart-state { display: flex; flex: 1; min-width: 0; }
.cart-state > .btn { flex: 1; }
.btn.btn-in-cart { background: #e6f5ec; color: #17603f; border: 2px solid #9fd6b6; }
.btn.btn-in-cart:hover { background: #d3eedf; color: #0f4d31; }
.btn-in-cart::before { content: "✓"; margin-right: 8px; font-weight: 800; }
.btn-sub { font-weight: 500; }
/* Кнопка покупки в колонке (Р-204). Телефон — как раньше: полоса внизу экрана всегда (ТЗ 6.6, п. 2).
   Компьютер — кнопка рядом с ценой, где её ищут глазами; полоса внизу выезжает, только когда эта кнопка
   ушла за край экрана (core/js/site.js ставит body.sticky-on). Без скрипта — только кнопка в колонке. */
.inline-cta { display: none; }
.sticky-summary strong { display: block; color: var(--text); font-size: 17px; }

/* --- Корзина: одна колонка (ТЗ 6.6, п. 7) ------------------------------------------------------ */
.cart-page { padding-top: 16px; padding-bottom: 24px; }
.cart-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.cart-line { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.cart-line-top { display: flex; gap: 12px; align-items: flex-start; }
.cart-line-top > div { flex: 1; min-width: 0; }
.edit-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 15px; }
.remove-x { flex: none; min-width: 44px; min-height: 44px; margin: -10px -8px 0 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; border-radius: 12px; }
.cart-thumbs, .cart-line-top > .cart-thumbs { display: flex; gap: 4px; flex: none; }
.cart-thumbs img { width: 44px; aspect-ratio: 1 / 1.4142; object-fit: cover; border-radius: 2px; box-shadow: 0 1px 4px rgba(31, 21, 53, 0.15); }
.cart-line-title { font-weight: 700; line-height: 1.3; }
/* Р-379: на странице заказа название строки — ссылка на макет в соседней вкладке; выглядит как название. */
a.order-line-link { display: block; color: inherit; text-decoration: none; }
a.order-line-link:hover { text-decoration: underline; }
.cart-thumbs a { display: block; line-height: 0; }
.cart-line-meta { font-size: 14px; color: var(--muted); }
.cart-line-meta summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--violet); font-weight: 600; }
.cart-line-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { min-width: 44px; min-height: 44px; border: 0; background: transparent; font-size: 20px; color: var(--violet); cursor: pointer; font-weight: 700; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.line-prices { text-align: right; }
.remove-btn { border: 0; background: transparent; color: var(--muted); text-decoration: underline; font: inherit; font-size: 14px; min-height: 44px; cursor: pointer; padding: 0; }
.totals { margin-top: 16px; border-radius: var(--radius); background: var(--bg-soft); padding: 14px 16px; }
.totals dl { margin: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-weight: 600; white-space: nowrap; }
.totals .discount { color: var(--green); }
.totals .grand { font-size: 20px; font-weight: 800; color: var(--text); }
.hints { display: grid; gap: 8px; margin-top: 12px; }
.hint { background: var(--pink-soft); border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 15px; }
/* Полоска до бесплатной доставки — стандартный <progress>: ширина задаётся атрибутами, без встроенных стилей (CSP). */
progress.progress { display: block; width: 100%; height: 8px; margin-top: 8px; border: 0; border-radius: 999px; background: #fff; overflow: hidden; -webkit-appearance: none; appearance: none; }
progress.progress::-webkit-progress-bar { background: #fff; border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--yellow); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--yellow); border-radius: 999px; }
.empty-cart { text-align: center; padding: 40px 0; }

/* --- Конструктор постера с данными (ТЗ 3.6, 6.6 пп. 4–6) --------------------------------------- */
.js .js-hide { display: none; }
.preview-box { background: var(--bg-soft); border-radius: var(--radius); padding: 12px; position: relative; }
.preview-box img, .set-previews img { width: auto; max-width: 100%; max-height: 52vh; margin: 0 auto; aspect-ratio: 1 / 1.4142; object-fit: contain; border-radius: 3px; box-shadow: 0 6px 24px rgba(31, 21, 53, 0.16); background: #fff; }
.preview-box.is-loading img, .set-previews.is-loading img { opacity: 0.6; transition: opacity 0.2s; }
.preview-caption { text-align: center; margin: 8px 0 0; }
/* На телефоне постеры комплекта — лента, которая листается пальцем: каждый почти во всю ширину (ТЗ 6.6, п. 8). */
.set-previews { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  background: var(--bg-soft); border-radius: var(--radius); padding: 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.set-previews .preview-link { scroll-snap-align: center; }
.set-previews img { max-height: none; width: 100%; }
/* Р-453: колонка формы не шире экрана — иначе одно широкое поле (у полей iOS своя ширина) раздувало её и страницу. */
.constructor-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
.constructor-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.constructor-form legend, .field > label { font-weight: 700; margin-bottom: 6px; display: block; padding: 0; }
.field { display: grid; gap: 6px; }
.field input[type=text], .field input[type=date], .field input[type=time], .field input[type=file], .phrase-list input[type=text] {
  width: 100%; min-height: var(--tap); font: inherit; font-size: 16px; /* не меньше 16 px — иначе iPhone увеличивает страницу */
  padding: 10px 14px; border: 1px solid #cfc7e3; border-radius: 12px; background: #fff; color: var(--text);
}
.field input:focus { border-color: var(--violet); outline: 2px solid var(--lavender); }
/* Р-444: iPhone — поля даты и времени были шире остальных и вылезали за край экрана (ты: «в мобильной версии в метрике
   малыша 2 строки длиннее, чем остальные»). У Safari у этих полей большая собственная ширина, а элемент сетки по
   умолчанию не уже своего содержимого (min-width: auto) — колонка .field раздувалась. Значение — слева, как в других. */
.field { grid-template-columns: minmax(0, 1fr); }
.field input[type=date], .field input[type=time] { display: block; min-width: 0; max-width: 100%; text-align: left; }
.field input[type=date]::-webkit-date-and-time-value, .field input[type=time]::-webkit-date-and-time-value { text-align: left; }
.field.has-error input { border-color: var(--pink); }
.field-error { color: #b0245e; font-weight: 600; font-size: 14px; margin: 0; }
.segmented.wrap { flex-wrap: wrap; overflow: visible; }
.chip { position: relative; }
.chip input, .format-option input, .swatch input, .phrase-option input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--violet); color: #fff; border-color: var(--violet); }
.chip input:focus-visible + span, .format-option input:focus-visible + span, .phrase-option input:focus-visible + span, .swatch input:focus-visible + svg { outline: 3px solid var(--pink); outline-offset: 2px; }
.format-option { position: relative; display: block; }
.format-option span { min-height: 56px; border: 2px solid var(--line); border-radius: 14px; display: grid; place-content: center; text-align: center; font-weight: 700; line-height: 1.2; cursor: pointer; }
.format-option span small { font-weight: 500; color: var(--muted); }
.format-option input:checked + span { border-color: var(--violet); background: var(--lavender); }
.phrase-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.phrase-option { position: relative; display: block; }
.phrase-option span { display: block; min-height: 44px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; line-height: 1.35; }
.phrase-option input:checked + span { border-color: var(--violet); background: var(--lavender); font-weight: 600; }
/* .field > label.toggle — сильнее правила подписей полей «.field > label» (там display: block): квадратик — в строку
   с текстом, по центру, с зазором. */
.toggle, .field > label.toggle { display: flex; align-items: center; gap: 12px; min-height: var(--tap); margin-bottom: 0;
  cursor: pointer; }
.toggle input { width: 24px; height: 24px; margin: 0; accent-color: var(--violet); flex: none; }
/* Пояснение под галочкой — сразу под её текстом (24px квадратик + 12px зазор), Р-266. */
.field .toggle ~ p.small { margin: -6px 0 0 36px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; cursor: pointer; font-size: 14px; }
.swatch svg { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); padding: 2px; }
.swatch input:checked + svg { border-color: var(--violet); }
/* Узор бумаги (Р-280): квадратные плитки-образцы на выбранном цвете, подпись под плиткой. */
.pattern-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 10px 8px; }
.pattern-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-size: 13px; text-align: center; line-height: 1.2; }
.pattern-tile input { position: absolute; opacity: 0; pointer-events: none; }
.pattern-tile img { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--line); padding: 2px; background: #fff; }
.pattern-tile input:checked + img { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.pattern-tile input:focus-visible + img { outline: 3px solid var(--pink); outline-offset: 2px; }

/* --- Доставка и выбор города (ТЗ 10.5) --------------------------------------------------------- */
.delivery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.delivery-head a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.delivery-options { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.delivery-options li { display: grid; gap: 2px; }
.delivery-options .muted { font-size: 14px; }
.countdown { font-weight: 700; color: #8f1d4b; }
.narrow { max-width: 720px; padding-top: 16px; padding-bottom: 24px; }
.city-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.city-buttons .btn { min-height: 44px; padding: 0 16px; }
.city-form { display: grid; gap: 6px; margin-bottom: 16px; }
.city-form label { font-weight: 700; }
.inline-field { display: flex; gap: 8px; align-items: stretch; }
.inline-field input, .inline-field select { flex: 1; min-width: 0; }

/* --- Оформление и страница заказа (ТЗ 8.1, 9.2) ---------------------------------------------- */
.checkout, .order-page { padding-top: 16px; padding-bottom: 24px; max-width: 720px; }
.checkout-form { display: grid; gap: 20px; }
.form-section { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 12px; }
.form-section legend { font-size: 20px; font-weight: 800; margin-bottom: 4px; padding: 0; }
.field input[type=email], .field input[type=tel], .field select, .field textarea, .inline-field input, .inline-field select {
  width: 100%; min-height: var(--tap); font: inherit; font-size: 16px; padding: 10px 14px;
  border: 1px solid #cfc7e3; border-radius: 12px; background: #fff; color: var(--text);
}
.field textarea { min-height: 88px; resize: vertical; }
.field select:focus, .field textarea:focus { border-color: var(--violet); outline: 2px solid var(--lavender); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--pink); }
/* Фото по клеткам (ТЗ 3.11): 4 клетки в ряд, квадратные, подпись месяца внизу. */
.photos-field, .checks-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.photo-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.photo-slot { position: relative; aspect-ratio: 1; border: 1px dashed #cfc7e3; border-radius: 10px; background: #faf7fd;
  padding: 0; overflow: hidden; cursor: pointer; display: grid; place-items: end center; }
.photo-slot.is-filled { border-style: solid; border-color: var(--lavender); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot-label { position: relative; width: 100%; padding: 2px 4px; font-size: 12px; font-weight: 600; color: var(--text);
  background: rgba(255, 255, 255, .85); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-slot:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
/* Ручной кадр фото (Р-357): кнопки по 48 px — удобно пальцем; на узком экране переносятся. */
.frame-tools { display: grid; gap: 8px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); }
.frame-tools-title { margin: 0; font-size: 14px; font-weight: 600; }
.frame-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.frame-btn { width: var(--tap); height: var(--tap); padding: 0; border: 1px solid #cfc7e3; border-radius: 12px; background: #fff;
  color: var(--violet); font: inherit; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; }
.frame-btn:hover { border-color: var(--violet); }
.frame-btn:focus-visible, .frame-pick-item:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.frame-reset { margin-left: 6px; }
.frame-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.frame-pick-item { position: relative; width: var(--tap); height: var(--tap); padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; background: #faf7fd; cursor: pointer; }
.frame-pick-item[aria-pressed="true"] { border-color: var(--violet); }
.frame-pick-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Галочки (ТЗ 3.12): «Правила» — список, отмеченные — с фоном. */
.check-list { display: grid; gap: 6px; }
.check-option { position: relative; display: flex; gap: 10px; align-items: center; min-height: var(--tap); padding: 8px 12px;
  border: 1px solid #e3ddf0; border-radius: 12px; cursor: pointer; background: #fff; }
.check-option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--violet); }
.check-option:has(input:checked) { border-color: var(--violet); background: var(--lavender); }
.check-more summary { cursor: pointer; color: var(--violet); font-weight: 700; min-height: var(--tap); display: flex; align-items: center; }
.check-more[open] summary { margin-bottom: 6px; }
/* Важные даты календаря (ТЗ 3.10): «день · месяц · подпись · ×» в одну строку и на телефоне. */
.events-field { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.event-row { display: grid; grid-template-columns: 5.4rem minmax(7.2rem, 1fr) minmax(0, 1.2fr) 2.75rem; gap: 6px; align-items: center; }
.event-row select, .event-row input[type=text] { padding-left: 10px; padding-right: 6px; }
.event-remove { min-height: var(--tap); border: 0; border-radius: 12px; background: var(--lavender); color: var(--violet);
  font-size: 22px; line-height: 1; cursor: pointer; }
.link-button { justify-self: start; min-height: var(--tap); border: 0; background: none; padding: 0; color: var(--violet);
  font: inherit; font-weight: 700; cursor: pointer; }
.link-button:hover, .event-remove:hover { text-decoration: underline; }
.field-hint { margin: 0; font-size: 14px; color: var(--muted); }
.toggle.has-error span { color: #b0245e; }
.sub-fields { display: grid; gap: 12px; padding-left: 12px; border-left: 3px solid var(--lavender); }
.sub-caption { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row .sub-caption { grid-column: 1 / -1; }
.method-option { position: relative; display: block; }
.method-option input { position: absolute; opacity: 0; pointer-events: none; }
.method-option span { display: block; min-height: 56px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; line-height: 1.35; }
.method-option small { display: block; color: var(--muted); font-size: 14px; }
.method-option input:checked + span { border-color: var(--violet); background: var(--lavender); }
.method-option input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
.plain-list { margin: 4px 0 8px; padding-left: 18px; }
.approve { display: grid; gap: 12px; }
.approve h2 { margin: 0; }
.approve-row { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.approve-title { font-weight: 700; margin: 0 0 8px; }
.approve-images { display: grid; gap: 10px; }
.approve-images img { width: 100%; height: auto; aspect-ratio: 1 / 1.4142; object-fit: contain; border-radius: 3px; box-shadow: 0 6px 24px rgba(31, 21, 53, 0.16); background: #fff; }
.approve-images.is-set { grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.approve-images.is-set a { scroll-snap-align: center; }
.approve-images:not(.is-set) a { max-width: 420px; width: 100%; margin: 0 auto; }
.city-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 4px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; max-width: 8.5em; flex: none; }
.city-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-link svg { width: 14px; height: 14px; flex: none; color: var(--violet); }
.consents { gap: 4px; }
.pay-note { margin: 0; }
/* Р-371: !important — иначе «.field input[type=file] { width: 100% }» растягивал скрытое поле фото, и страница на телефоне
   становилась шире экрана на 16 px. */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.status-scale { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 6px; }
.status-scale li { position: relative; padding-left: 28px; min-height: 24px; color: var(--muted); }
.status-scale li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.status-scale li.is-done { color: var(--text); }
.status-scale li.is-done::before { background: var(--violet); border-color: var(--violet); }
.status-scale li.is-current { color: var(--text); font-weight: 800; }
.status-scale li.is-current::before { border-color: var(--violet); background: var(--pink); }
.order-edit { margin: 12px 0 4px; }
.order-edit p { margin: 6px 0 0; }
.details-list { margin: 0 0 12px; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; }
.details-list dt { color: var(--muted); }
.details-list dd { margin: 0; overflow-wrap: anywhere; }
.stack { display: grid; gap: 10px; margin-top: 16px; }

/* --- Плашка cookie и объявление (ТЗ 15; 20.1, п. 12) ------------------------------------------ */
.cookie-banner { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--safe-bottom)); z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 8px 28px rgba(31, 21, 53, 0.18); max-width: 720px; margin: 0 auto; font-size: 14px; }
.cookie-banner p { margin: 0 0 10px; padding-right: 36px; }
/* Р-412: крестик «Закрыть» = только необходимые cookie; зона нажатия 44 × 44. */
.cookie-close { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: none;
  font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 12px; }
.cookie-close:hover, .cookie-close:focus-visible { color: var(--text); background: var(--bg-soft); }
.cookie-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cookie-buttons .btn { flex: 1 1 140px; min-height: 44px; }
/* Над закреплённой главной кнопкой страницы, а не поверх неё. */
body.has-sticky-cta .cookie-banner { bottom: calc(var(--sticky-h) + var(--safe-bottom) + 8px); }
.trap { display: none; } /* поле-ловушка: люди его не видят, боты заполняют по HTML */
.thanks h2 { font-size: 20px; margin-bottom: 8px; }
.announcement { background: #fff1c2; color: #5c4400; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 16px; }
.info h2 { margin-top: 24px; }
.info-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 8px; }
.info-links a { display: inline-flex; align-items: center; min-height: 44px; }
.table-wrap { overflow-x: auto; }
.info-table { border-collapse: collapse; width: 100%; font-size: 15px; }
.info-table th, .info-table td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }

/* --- Печать вашего фото или дизайна (ТЗ 3.4) -------------------------------------------------- */
.print-page .segmented { margin: 4px 0 12px; }
.print-file { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 10px; }
.print-file-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-file-head .remove-btn { margin-left: auto; }
.print-file input[type=range] { width: 100%; min-height: 44px; accent-color: var(--violet); }
/* Печать фото: лист бывает и альбомным — превью той же формы, что отпечаток, без книжной рамки постеров (Р-257). */
.print-file .preview-box img { aspect-ratio: auto; }
.fragments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.fragments figure { margin: 0; }
.fragments img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: #fff; }
.fragments figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 4px; }
.promo-box { display: grid; gap: 10px; }
.promo-box h2 { margin: 0; }

/* --- Промокод в корзине (ТЗ 20.2, п. 26) ---------------------------------------------------- */
.promo-box-cart summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--violet); font-weight: 600; }
.promo-box-cart .inline-field { margin: 4px 0 8px; }
.promo-box-cart input { text-transform: uppercase; }
.promo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.cert-note { margin: -4px 0 8px; }  /* что покрыл сертификат — сразу под строкой с кодом */

/* --- Отзывы (ТЗ 20.2, п. 25) ------------------------------------------------------------------ */
.reviews { display: grid; gap: 12px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.review-head { margin: 0 0 6px; }
.stars { color: #e0a100; letter-spacing: 1px; margin-right: 6px; }
.review-photos { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.review-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; }
.review-reply { background: var(--bg-soft); border-radius: 12px; padding: 8px 12px; margin: 8px 0 0; font-size: 15px; }

/* --- Чат «Есть вопрос?» (ТЗ 12.1) -------------------------------------------------------------- */
.chat-page section { margin-top: 20px; }
.chat-answers, .chat-log { display: grid; gap: 10px; }
.bubble { border-radius: 16px; padding: 10px 14px; max-width: 92%; }
.bubble p { margin: 4px 0; }
.bubble.bot { background: var(--bg-soft); justify-self: start; }
.bubble.me { background: var(--lavender); justify-self: end; }
.chat-fab { position: fixed; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 35; display: inline-flex;
  align-items: center; gap: 6px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--violet);
  border: 2px solid var(--violet); font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(31, 21, 53, 0.15); }
body.has-sticky-cta .chat-fab { bottom: calc(var(--sticky-h) + var(--safe-bottom) + 12px); }
@media (min-width: 960px) {
  .inline-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 6px 0 4px; }
  .inline-cta .btn { min-height: 54px; font-size: 17px; padding-left: 28px; padding-right: 28px; }
  .inline-cta .cart-state { flex: 0 1 auto; min-width: 300px; }
  .inline-cta > .btn-buy { min-width: 300px; }
  .totals .inline-cta { display: grid; }
  body.has-inline-cta main { padding-bottom: 32px; }
  body.has-inline-cta .sticky-cta { transform: translateY(110%); visibility: hidden; transition: transform 0.25s ease, visibility 0s linear 0.25s; }
  body.has-inline-cta.sticky-on .sticky-cta { transform: none; visibility: visible; transition: transform 0.25s ease; }
  body.has-inline-cta:not(.sticky-on) .chat-fab { bottom: calc(12px + var(--safe-bottom)); }
  body.has-inline-cta:not(.sticky-on) .cookie-banner { bottom: calc(8px + var(--safe-bottom)); }
}
@media (min-width: 960px) and (prefers-reduced-motion: reduce) {
  body.has-inline-cta .sticky-cta, body.has-inline-cta.sticky-on .sticky-cta { transition: none; }
}

/* --- Подвал (Р-190): логотип и колонки ссылок; на телефоне — две колонки ---------------------------- */
.site-footer { background: var(--bg-soft); padding: 32px 0 calc(40px + var(--safe-bottom)); margin-top: 40px; }
.footer-brand { font-weight: 800; color: var(--violet); }
.footer-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.footer-about { grid-column: 1 / -1; }
.footer-logo { height: 46px; width: auto; margin-bottom: 6px; }
.footer-col { display: flex; flex-direction: column; min-width: 0; }
.footer-title { font-weight: 800; margin: 8px 0 0; }
.footer-col a { display: flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; line-height: 1.25; }
.footer-col a:hover { color: var(--violet); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 4px 0 8px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); }
.footer-docs { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 6px; }
.footer-docs a { color: var(--muted); font-size: 14px; }
.legal h1 { font-size: 26px; } .legal h2 { font-size: 20px; margin-top: 24px; } .legal table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.legal td, .legal th { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }

/* --- Каталог (ТЗ 7 п. 2; Р-191): панель «Фильтры · Сортировка», выбранные фильтры, список, «Показать ещё» -- */
.catalog-head { padding-top: 16px; }
.catalog-head h1 { margin-bottom: 10px; }
.catalog-note { margin: 4px 0 0; }
.catalog-layout { padding-bottom: 8px; }
/* Панель над списком закреплена под шапкой: фильтры под пальцем, сколько бы ни пролистали (Baymard). */
.catalog-toolbar { position: sticky; top: var(--header-h); z-index: 15; display: flex; align-items: center; gap: 8px; margin: 0 -16px;
  padding: 8px 16px; background: rgba(255, 255, 255, 0.97); border-bottom: 1px solid var(--line); }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.tool-btn svg { width: 18px; height: 18px; color: var(--violet); }
.tool-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--violet);
  color: #fff; font-size: 12px; }
.result-count { margin: 0 0 0 auto; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sort-inline { display: none; }
.sort-inline a { min-height: var(--tap); display: inline-flex; align-items: center; }
.sort-inline a[aria-current="page"] { font-weight: 700; color: var(--text); text-decoration: none; }
/* Выбранные фильтры — «таблетками» с крестиком (Baymard: 66 % мобильных сайтов их не показывают). */
.applied { list-style: none; display: flex; gap: 8px; overflow-x: auto; margin: 0; padding: 12px 0 2px; scrollbar-width: none; }
.applied li { flex: none; }
.applied-chip, .applied-reset { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.applied-chip { background: var(--lavender); color: var(--violet); }
.applied-chip span { font-size: 18px; line-height: 1; }
.applied-reset { color: var(--muted); }
.catalog-results .grid-products { margin-top: 14px; }
.more-row { text-align: center; margin: 24px 0 8px; }
.empty-state { padding: 32px 0; text-align: center; }
.catalog-foot { margin-top: 28px; }
.crumbs { margin: 0 0 4px; }
.others-title { margin-top: 32px; font-size: 20px; }
/* Панели на телефоне: фильтры — на весь экран, сортировка — снизу. Без скриптов открываются по ссылке
   (#filters, #sort), со скриптами — без прыжка страницы (site.js, класс is-open). */
.sheet { display: none; }
.sheet:target, .sheet.is-open { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 70; background: #fff; }
.sort-sheet:target, .sort-sheet.is-open { top: auto; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgba(31, 21, 53, 0.22);
  padding-bottom: var(--safe-bottom); }
body.sheet-open { overflow: hidden; }
/* Р-453 (ты: «В моб версии карточка товара двигается влево и вправо — такого не должно быть»). Safari на iPhone пальцем
   сдвигает страницу вбок, даже когда у неё overflow-x: hidden, если что-то внутри хоть немного шире экрана. clip
   у html и body обрезает лишнее по ширине у самой страницы и не делает body прокручиваемым — липкая шапка и панель
   картинки на компьютере работают. Панель фильтров держит страницу через html (site.js ставит html.sheet-open).
   Браузеры без clip (iOS до 16) — как раньше. */
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
  html.sheet-open { overflow: hidden; }
  body.sheet-open { overflow: visible; overflow-x: clip; }
}
/* Ленты, которые листаются пальцем, дойдя до края, не тянут за собой страницу. */
.mockup-gallery, .media-carousel.has-mockups, .hero-track, .rail, .grid.grid-recent, .segmented, .applied,
.approve-images.is-set, .set-previews { overscroll-behavior-x: contain; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-close { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; font-size: 30px; line-height: 1; color: var(--text); text-decoration: none; }
.filter-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.facets { flex: 1; overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.facet { border: 0; margin: 0; padding: 14px 0; min-width: 0; border-bottom: 1px solid var(--line); }
.facet legend { font-weight: 800; padding: 0; margin-bottom: 10px; float: left; width: 100%; }
.facet-options { clear: both; display: flex; flex-wrap: wrap; gap: 8px; }
.facet-option { position: relative; }
.facet-option input { position: absolute; opacity: 0; pointer-events: none; }
.facet-option span { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.facet-option small { color: var(--muted); font-weight: 600; }
.facet-option input:checked + span { background: var(--violet); border-color: var(--violet); color: #fff; }
.facet-option input:checked + span small { color: #e2d8f6; }
.facet-option input:disabled + span { opacity: 0.45; cursor: default; }
.facet-option input:focus-visible + span { outline: 3px solid var(--pink); outline-offset: 2px; }
/* Цвет в фильтрах — кружками без подписей (Р-211): название и количество — в подсказке (title) и для диктора.
   Выбранный — с рамкой и галочкой (по одному цвету его не отличить людям с особенностями цветового зрения). */
.facet-swatch { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.facet-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-ring { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; }
.swatch-ring svg { grid-area: 1 / 1; width: 30px; height: 30px; display: block; }
.facet-swatch input:checked + .swatch-ring { border: 2px solid var(--violet); }
.facet-swatch input:checked + .swatch-ring::after { content: "✓"; grid-area: 1 / 1; color: #fff; font-weight: 800; font-size: 15px;
  text-shadow: 0 0 2px rgba(31, 21, 53, 0.9), 0 0 4px rgba(31, 21, 53, 0.6); }
.facet-swatch input:disabled + .swatch-ring { opacity: 0.35; cursor: default; }
.facet-swatch input:focus-visible + .swatch-ring { outline: 3px solid var(--pink); outline-offset: 2px; }
/* Длинные группы: первые 8 значений (цветов — 14), остальное по «Ещё N» (core/js/site.js). Без скрипта видно всё. */
.js .facet:not(.is-expanded) .is-extra { display: none; }
.facet-more { display: none; }
.js .facet-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0; border: 0; background: none;
  color: var(--violet); font: inherit; font-weight: 700; cursor: pointer; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); background: #fff; }
.sheet-foot .btn-primary { flex: 1; }
.sheet-list { display: flex; flex-direction: column; padding: 4px 0 12px; }
.sheet-list a { display: flex; align-items: center; min-height: 52px; padding: 0 16px; color: var(--text); text-decoration: none; font-weight: 600; }
.sheet-list a[aria-current="page"] { color: var(--violet); }
.sheet-list a[aria-current="page"]::after { content: "✓"; margin-left: auto; font-weight: 800; }

/* --- Главная (Р-190): «Что мы делаем», ленты, комнаты, стили, цвета, «Почему мы» ------------------- */
.section-head h2 { margin-bottom: 8px; }
.section-lead { margin-top: -2px; }
.what-we-do { padding-top: 24px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--bg-soft); }
.tile-media { display: block; padding: 16px 16px 0; }
.tile-media img { width: 64%; margin: 0 auto; aspect-ratio: 1 / 1.4142; object-fit: cover; border-radius: 3px;
  box-shadow: 0 12px 24px rgba(31, 21, 53, 0.2); transform: rotate(-2deg); transition: transform 0.25s; }
.tile:hover .tile-media img { transform: rotate(0deg) scale(1.03); }
.tile-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px; flex: 1; }
.tile-title { font-weight: 800; font-size: 16px; line-height: 1.25; }
.tile-text { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: auto; padding-top: 8px; }
.tile-price { font-weight: 800; }
.tile-cta { font-size: 13px; font-weight: 700; color: var(--violet); }
.tile-pink { background: var(--tile-pink); }
.tile-peach { background: var(--tile-peach); }
.tile-lavender { background: var(--lavender); }
.tile-sky { background: #e8f1fc; }
/* «Что мы делаем»: нечётная последняя плитка на телефоне — на всю ширину, без пустой клетки. */
.tiles > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tiles > .tile:last-child:nth-child(odd) .tile-media img { width: 36%; }
/* «Портреты по фото» (Р-216): два больших выбора — люди и питомец. */
.portrait-choices { display: grid; gap: 14px; margin-top: 16px; }
.tile-big .tile-title { font-size: 20px; }
.tile-big .tile-text { font-size: 15px; }
.tile-big .tile-cta { font-size: 15px; }
/* «Без рамки — отправляем свёрнутым в тубусе. Подойдёт рамка 30 × 42 см (A3)» (Р-264): заметно, но спокойно. */
.frame-note { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; padding: 10px 12px; border-radius: 12px;
  background: var(--lavender); color: var(--text); font-size: 14px; line-height: 1.4; }
.frame-note-icon { width: 22px; height: 22px; flex: none; color: var(--violet); }
.frame-note [data-frame-size] { white-space: nowrap; } /* «30 × 42 см» не рвётся на две строки */
/* Оформление портрета (Р-232): две плитки со схемой листа — «С кличкой» и «На весь лист». */
.layout-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.layout-tile { position: relative; cursor: pointer; min-width: 0; }
.layout-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.layout-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; border: 2px solid var(--line);
  background: #fff; height: 100%; }
.layout-pic { width: 36px; height: 50px; flex: none; }
.layout-text { display: grid; gap: 2px; min-width: 0; }
.layout-name { font-weight: 700; font-size: 15px; line-height: 1.2; }
.layout-hint { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.layout-tile input:checked + .layout-card { border-color: var(--violet); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--violet); }
.layout-tile input:focus-visible + .layout-card { outline: 3px solid var(--pink); outline-offset: 2px; }
/* Праздничный повод над стилями (Р-233) и пример на странице повода. */
.occasion-picker { margin-bottom: 14px; }
.occasion-sample img { width: min(320px, 100%); height: auto; border-radius: 14px; display: block; }
/* «Портрет питомца» (Р-246): стили сразу под текстом — карточка-ссылка в конструктор с этим стилем. */
.portrait-styles-title { margin: 22px 0 10px; font-size: 20px; }
a.portrait-style { display: flex; flex-direction: column; align-items: center; color: inherit; text-decoration: none; padding-bottom: 12px; transition: border-color .15s, box-shadow .15s; }
a.portrait-style:hover, a.portrait-style:focus-visible { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.portrait-style-hint { font-size: 13px; color: var(--muted); line-height: 1.3; padding: 0 6px; }
.portrait-style-cta { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--violet); }  /* по низу карточки: подписи разной длины */
.portrait-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 18px; }
.tile-night { background: var(--night); color: #fff; }
.tile-night .tile-text { color: #c9cfe6; }
.tile-night .tile-cta { color: #f5e6c4; }
.badge-soon { background: var(--yellow); color: #3b2a00; }
.more-kinds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.more-kinds a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--bg-soft);
  color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; }
.more-kinds a:hover { background: var(--lavender); color: var(--violet); }
/* Ленты на телефоне листаются пальцем (следующая карточка видна краем — понятно, что можно листать). */
/* Р-442: на телефоне — постер почти на ширину экрана; с 480 px — по два. Ленты комплектов и стилей задают свою ширину
   ниже (.rail-sets, .style-tiles) — эти правила стоят после и перекрывают. */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; margin: 8px -16px 0; padding: 0 16px 6px; scroll-padding-left: 16px; }
@media (min-width: 480px) { .rail { grid-auto-columns: 44%; } }
.rail > * { scroll-snap-align: start; }
.rail-sets { grid-auto-columns: 84%; }
.room-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.room-tile { position: relative; display: block; border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--text); background: var(--bg-soft); }
.room-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s; }
.room-tile:hover img { transform: scale(1.04); }
.room-name { position: absolute; left: 8px; bottom: 8px; background: rgba(255, 255, 255, 0.95); padding: 6px 12px; border-radius: 999px; font-weight: 700;
  font-size: 14px; box-shadow: 0 2px 8px rgba(31, 21, 53, 0.12); }
.room-name small { color: var(--muted); font-weight: 600; margin-left: 2px; }
.find-yours h2 { margin-bottom: 4px; }
.find-title { margin: 18px 0 8px; font-size: 16px; }
.style-tiles { grid-auto-columns: 30%; }
.style-tile { display: grid; gap: 8px; text-align: center; text-decoration: none; color: var(--text); font-weight: 700; font-size: 14px; }
.style-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line); }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--bg-soft);
  color: var(--text); font-weight: 600; text-decoration: none; }
.chip-cloud a:hover { background: var(--lavender); color: var(--violet); }
.chip-cloud small { color: var(--muted); }
.swatch-row { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.swatch-row a { display: grid; justify-items: center; gap: 4px; min-width: 64px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; }
.swatch-row svg { width: 44px; height: 44px; filter: drop-shadow(0 1px 2px rgba(31, 21, 53, 0.2)); }
.usp-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.usp-grid li { display: flex; flex-direction: column; gap: 4px; background: var(--bg-soft); border-radius: 18px; padding: 16px; }
.usp-grid svg { width: 28px; height: 28px; color: var(--violet); margin-bottom: 4px; }
.usp-grid strong { font-size: 15px; line-height: 1.3; }
.usp-grid span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.steps-row { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.steps-row li { display: flex; gap: 12px; align-items: flex-start; }
.steps-row b { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; }
.steps-row span { padding-top: 6px; }
/* Карта звёздного неба — скоро (Р-194). */
.star-illustration { width: 60%; max-width: 280px; margin: 8px auto 20px; border-radius: 4px; box-shadow: 0 14px 30px rgba(23, 33, 63, 0.3); }

/* --- Расширение для планшета и компьютера ------------------------------------------------------ */
@media (min-width: 640px) {
  h1 { font-size: 36px; }
  .hero-actions .btn { flex: 0 1 auto; white-space: nowrap; }
  .grid-posters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-sets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail { grid-auto-columns: 30%; }
  .rail-sets { grid-auto-columns: 48%; }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  h2 { font-size: 28px; }
  .section { padding-top: 40px; }
  .hero { padding: 40px 0 16px; }
  .hero h1 { font-size: 46px; }
  .hero-grid { grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
  .product-media img { max-height: none; width: 100%; }
  .set-previews { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  .approve-images.is-set { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  /* Р-382 (ты: «если комплект из 2, можно ли отцентровать?»): две колонки того же размера, что у комплекта из 3,
     по центру — а не пустая третья справа. Зазор 10px: колонка = (вся ширина − 2 зазора) / 3. */
  .set-previews.is-pair, .approve-images.is-pair { grid-template-columns: repeat(2, calc((100% - 20px) / 3)); justify-content: center; }
  .grid { --grid-gap-x: 20px; gap: 32px var(--grid-gap-x); }
  .grid-posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-sets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .grid.grid-recent { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  /* Главная: ленты становятся сетками. */
  /* «Что мы делаем» (Р-276): 8 плиток — по 4 в ряд, два ряда. */
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .tiles > .tile:last-child:nth-child(odd) { grid-column: auto; }
  .tiles > .tile:last-child:nth-child(odd) .tile-media img { width: 64%; }
  .tile-title { font-size: 19px; }
  .tile-text { font-size: 14px; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin: 8px 0 0; padding: 0; gap: 32px 20px; }
  .rail-sets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .room-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .usp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .steps-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .footer-top { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 32px; }
  .footer-about { grid-column: auto; }
  /* Каталог: фильтры — колонкой слева, всегда на виду (Baymard: до ~8 групп — колонка лучше, чем панель сверху). */
  .catalog-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
  /* Р-211: колонка идёт вместе со страницей — без своей прокрутки (ты: «убрал бы этот скрол с фильтрами»);
     значения компактнее и по нескольку в ряд — мышью в 34 px попасть легко (на телефоне — 44 px, ТЗ 6.6 п. 3). */
  .filter-panel.sheet { display: block; position: static; max-height: none; overflow: visible; inset: auto; z-index: auto;
    background: transparent; border-radius: 0; box-shadow: none; }
  .filter-panel .sheet-head, .filter-panel .sheet-close { display: none; }
  .filter-panel .facets { padding: 0; overflow: visible; }
  .filter-panel .facet { padding: 12px 0; }
  .filter-panel .facet:first-child { padding-top: 0; }
  .filter-panel .facet legend { margin-bottom: 8px; }
  .filter-panel .facet-options { gap: 6px; }
  .filter-panel .facet-option span { min-height: 34px; padding: 0 11px; font-size: 14px; }
  .filter-panel .facet-swatch { width: 34px; height: 34px; }
  .filter-panel .swatch-ring { width: 32px; height: 32px; }
  .filter-panel .swatch-ring svg { width: 24px; height: 24px; }
  .filter-panel .facet-more { min-height: 32px; font-size: 14px; }
  .filter-panel .sheet-foot { position: static; padding: 12px 0; border-top: 0; }
  .js .filter-panel .sheet-foot .btn-primary { display: none; }  /* со скриптами фильтр применяется сразу */
  .catalog-toolbar { position: static; margin: 0; padding: 0; border: 0; background: none; flex-wrap: wrap; }
  .filter-open, .sort-open, .sort-sheet { display: none !important; }
  .sort-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; }
  .catalog-results .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); --grid-gap-x: 20px; gap: 32px var(--grid-gap-x); }
}
@media (min-width: 1100px) {
  /* Меню на компьютере (Р-195): пункты в шапке, «☰» не нужен. От 1100 px всё помещается в одну строку
     без наложений (раньше «Доставка и оплата» наезжала на город). */
  :root { --header-h: 73px; }
  .menu-toggle { display: none; }
  .site-nav, .site-nav[hidden] { display: none !important; }
  .header-row { min-height: 72px; gap: 8px; }
  .logo { flex: 0 0 auto; margin-right: 8px; }
  .logo-full { height: 50px; }
  .main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; }
  .nav-link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 999px; color: var(--text);
    font-weight: 600; text-decoration: none; white-space: nowrap; }
  .nav-link:hover, .has-mega:hover > .nav-link, .has-mega:focus-within > .nav-link { background: var(--bg-soft); color: var(--violet); }
  .nav-link[aria-current="page"] { background: var(--lavender); color: var(--violet); }
  .nav-link .chev { width: 12px; height: 12px; }
}
/* Пункты меню плотнее — не заезжают на город, когда на «Корзине» счётчик (Р-349: шире 1240 px «Доставка» наезжала
   на значок города; шапка шире 1 240 px не растёт — контейнер). На самом узком компьютере — ещё плотнее. */
@media (min-width: 1100px) {
  .main-nav { gap: 0; }
  .nav-link { padding: 0 8px; }
}
@media (min-width: 1100px) and (max-width: 1199px) {
  .nav-link { padding: 0 6px; }
}

/* --- «Рассмотреть детали» (Р-220): картинка товара целиком на экране, детали — в просмотре на весь экран ---- */
.zoom-link { position: relative; display: inline-block; vertical-align: top; max-width: 100%; cursor: zoom-in; }
.zoom-link > img { display: block; }
/* Одна картинка в блоке — по центру, значок лупы — в её углу. */
.preview-box > .zoom-link, .media-carousel:not(.has-mockups) > .zoom-link { display: block; width: fit-content; margin-inline: auto; }
.media-carousel:not(.has-mockups) { text-align: center; }
.media-carousel.has-mockups > .zoom-link { justify-self: center; }
.zoom-badge { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94); color: var(--violet); display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(31, 21, 53, 0.25); pointer-events: none; }
.zoom-badge svg { width: 22px; height: 22px; }
.zoom-set > .zoom-badge { right: 8px; bottom: 8px; }
html.zoom-open, html.zoom-open body { overflow: hidden; }
.zoom-viewer { position: fixed; inset: 0; z-index: 200; background: #140e22; touch-action: none; }
.zoom-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* В просмотре: одна картинка или постеры комплекта рядом (Р-222); увеличивается и двигается всё вместе. */
.zoom-content { display: flex; align-items: center; transform-origin: center center; transition: transform 0.2s ease;
  cursor: zoom-in; will-change: transform; }
.zoom-img { max-width: 94vw; max-height: 86vh; max-height: 86svh; width: auto; height: auto; flex: none;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); background: #fff; }
.zoom-viewer.is-zoomed .zoom-content { cursor: grab; }
.zoom-viewer.is-dragging .zoom-content { transition: none; }
.zoom-viewer.is-dragging.is-zoomed .zoom-content { cursor: grabbing; }
/* Комплект на странице — одна лупа в углу последнего постера, нажатие в любом месте открывает весь комплект. */
.zoom-set { position: relative; cursor: zoom-in; }
.zoom-set:focus-visible { outline: 3px solid var(--pink); outline-offset: 4px; }
.zoom-btn { position: absolute; z-index: 1; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.16);
  color: #fff; font: inherit; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.zoom-btn:hover, .zoom-btn:focus-visible { background: rgba(255, 255, 255, 0.3); }
.zoom-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.zoom-prev, .zoom-next { top: 50%; transform: translateY(-50%); font-size: 34px; }
.zoom-prev { left: 12px; }
.zoom-next { right: 12px; }
.zoom-hint, .zoom-count { position: absolute; z-index: 1; margin: 0; color: #d9d2e6; font-size: 14px; pointer-events: none; }
.zoom-hint { left: 50%; transform: translateX(-50%); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); white-space: nowrap; }
.zoom-count { left: 16px; top: calc(24px + env(safe-area-inset-top, 0px)); }
@media (min-width: 960px) {
  /* Постер целиком в высоту экрана рядом с ценой; колонка с картинкой «прилипает» при прокрутке. */
  .product-layout > .product-media, .product-layout > .preview-box { position: sticky; top: calc(var(--header-h) + 12px); }
  .product-media img { width: auto; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100svh - 170px); }
  .product-media .media-carousel .mockup-img { width: auto; max-width: 100%; max-height: calc(100vh - 170px); max-height: calc(100svh - 170px); }
  /* Комплект: постеры рядом, все целиком — над ними заголовок, поэтому выше не берём. */
  .product-media .set-strip { display: flex; justify-content: center; gap: 12px; width: fit-content; max-width: 100%; margin-inline: auto; }
  .product-media .set-strip > a { flex: 0 1 auto; min-width: 0; }
  .product-media .set-strip img { width: auto; max-width: 100%; }
  .product-media .set-strip img, .product > .product-media .media-carousel .mockup-img {
    max-height: max(340px, calc(100vh - 360px)); max-height: max(340px, calc(100svh - 360px)); }
  .preview-box img { max-height: max(52vh, calc(100vh - 360px)); max-height: max(52svh, calc(100svh - 360px)); }
}
.constructor-side { display: grid; gap: 16px; align-content: start; min-width: 0; }
/* Миниатюры под картинкой товара (Р-223): постер или комплект и фото в интерьере; выбранное — с рамкой. */
.media-carousel { position: relative; }
.media-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.media-thumbs button { width: 60px; height: 60px; padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; cursor: pointer; flex: none; }
.media-thumbs button[aria-current="true"] { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }
.media-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-set { display: flex; gap: 2px; height: 100%; align-items: center; justify-content: center; padding: 6px 4px; background: var(--bg-soft); }
.thumb-set img { width: auto; height: 100%; max-width: 33%; object-fit: contain; }
/* Город в шапке на компьютере — значком (Р-224). */
@media (min-width: 1100px) {
  .city-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .city-link { min-width: 44px; justify-content: center; }
}
@media (min-width: 1100px) { .city-link svg { width: 20px; height: 20px; } }
/* Поиск по длинному списку (Р-226): поле и подсказки под ним; выбранная клавишами — подсвечена. */
.searchable { position: relative; }
.inline-field .searchable { flex: 1; min-width: 0; }  /* поиск города рядом с кнопкой (Р-228) */
.searchable input:focus { border-color: var(--violet); outline: 2px solid var(--lavender); }
.searchable input { width: 100%; min-height: var(--tap); font: inherit; font-size: 16px; padding: 10px 14px;
  border: 1px solid #cfc7e3; border-radius: 12px; background: #fff; color: var(--text);
  scroll-margin-top: calc(var(--header-h) + 12px); }  /* на телефоне поле поднимается к шапке, не под неё */
/* Подсказки — над полосой с кнопкой внизу экрана (у неё z-index 30). */
.searchable-list { position: absolute; z-index: 31; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px 0; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(31, 21, 53, 0.16);
  max-height: 320px; overflow-y: auto; }
.searchable-list li { padding: 10px 14px; cursor: pointer; display: grid; gap: 2px; min-height: 44px; }
.searchable-list li small { color: var(--muted); font-size: 13px; }
.searchable-list li[aria-selected="true"], .searchable-list li:hover { background: var(--bg-soft); }
.searchable-list li.is-empty { cursor: default; color: var(--muted); font-size: 14px; }
/* Портрет (Р-239): счётчик бесплатных портретов и «Ваши портреты» — уже нарисованные варианты. */
.style-free { margin: 2px 0 10px; font-size: 14px; color: var(--muted); }
.style-free b { color: var(--text); }
.style-free.is-out b { color: #b0245e; }
.style-gallery { margin-top: 14px; }
.style-gallery-title { margin: 0 0 8px; font-weight: 700; font-size: 15px; }
.style-gallery-list { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.style-gallery-item { flex: none; display: grid; gap: 4px; justify-items: center; width: 96px; padding: 4px; border: 2px solid var(--line);
  border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-size: 12px; color: var(--text); min-height: 44px; }
.style-gallery-item img { width: 84px; height: 105px; object-fit: cover; border-radius: 8px; display: block; }
.style-gallery-item[aria-pressed="true"] { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet); }


/* Р-326: комната в новом цвете бумаги грузится — кадр полупрозрачный, потом подменяется. */
.mockup-gallery .is-loading img { opacity: .55; transition: opacity .2s; }

/* Р-328: «Нарисовать портрет» и проверка данных перед рисованием. */
.style-draw { margin-top: 14px; }
.style-check { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); border: 2px solid var(--violet); }
.style-check-title { margin: 0 0 8px; font-weight: 700; }
.style-check-list { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 10px; }
.style-check-list dt { color: var(--muted); }
.style-check-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.style-check-once { margin: 0 0 12px; }
.style-check-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.style-check-actions .btn { flex: 1 1 180px; }
