/* ==========================================================================
   Швейное предприятие «Заря» — дизайн-система сайта
   Палитра: бордовый / графит / белый, акценты — латунь и синий (кадеты)
   ========================================================================== */

/* --- 1. Токены ---------------------------------------------------------- */
:root {
  /* Цвет */
  --brand:        #8a1538;
  --brand-dark:   #6b0f2b;
  --brand-soft:   #f7edf0;
  --ink:          #1a1a1d;
  --ink-2:        #4a4a52;
  --ink-3:        #6f6f79;
  --line:         #e4e1de;
  --line-strong:  #cdc8c3;
  --bg:           #ffffff;
  --bg-soft:      #f8f6f4;
  --bg-dark:      #16161a;
  --accent:       #a8762c;
  --navy:         #1f3a63;
  --ok:           #1f7a4d;
  --err:          #b3261e;

  /* Типографика */
  --font-head: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --fs-h1: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.35rem);
  --fs-h3: clamp(1.15rem, 1.02rem + 0.55vw, 1.5rem);
  --fs-lead: clamp(1.02rem, 0.97rem + 0.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-sm: 0.9rem;
  --fs-xs: 0.8rem;

  /* Ритм */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;
  --wrap: 1200px;
  --wrap-narrow: 820px;

  /* Форма */
  --radius-s: 6px;
  --radius: 12px;
  --radius-l: 20px;
  --shadow-1: 0 1px 2px rgba(26,26,29,.06), 0 2px 8px rgba(26,26,29,.05);
  --shadow-2: 0 4px 12px rgba(26,26,29,.08), 0 12px 32px rgba(26,26,29,.08);
  --shadow-3: 0 12px 24px rgba(26,26,29,.12), 0 32px 64px rgba(26,26,29,.14);

  /* Движение */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 220ms;

  /* Слои */
  --z-header: 100;
  --z-drawer: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* --- 2. Сброс и база ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, video { max-width: 100%; display: block; }
img { height: auto; }
/* picture по умолчанию строчный — из-за этого картинка внутри него не слушается height: 100% */
picture { width: 100%; height: 100%; }
picture > img { display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25em; }
li { margin-bottom: var(--space-2); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

::selection { background: var(--brand); color: #fff; }

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

.skip-link {
  position: absolute; left: var(--space-4); top: -60px; z-index: 500;
  background: var(--brand); color: #fff; padding: var(--space-3) var(--space-5);
  border-radius: 0 0 var(--radius) var(--radius); font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: #fff; }

/* --- 3. Раскладка ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: clamp(40px, 3vw + 28px, 80px); }
.section--tight { padding-block: clamp(28px, 2vw + 20px, 52px); }
.section--soft { background: var(--bg-soft); }
.section--brand { background: var(--brand-soft); }
.section--dark { background: var(--bg-dark); color: #f2f0ee; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #cfcdca; }

.section-head { margin-bottom: var(--space-6); max-width: 760px; }
.section-head p { color: var(--ink-2); font-size: var(--fs-lead); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: var(--space-3);
}
.section--dark .eyebrow { color: #d9a441; }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* --- 4. Кнопки ---------------------------------------------------------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  --btn-bd: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 12px 24px;
  border: 1.5px solid var(--btn-bd);
  border-radius: var(--radius-s);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-head);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { --btn-bg: var(--brand-dark); --btn-bd: var(--brand-dark); color: #fff; box-shadow: var(--shadow-1); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-strong); }
.btn--ghost:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); color: #fff; }

.btn--light { --btn-bg: #fff; --btn-fg: var(--brand); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: var(--brand-soft); --btn-bd: var(--brand-soft); color: var(--brand-dark); }

.btn--wide { width: 100%; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-xs); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- 5. Шапка ----------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__top {
  background: var(--ink);
  color: #d7d5d2;
  font-size: var(--fs-xs);
}
.header__top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 38px;
  flex-wrap: wrap;
}
.header__top a { color: #fff; text-decoration: none; }
.header__top a:hover { color: #f0c987; }
.header__top-note { color: #a9a6a2; }

.header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.logo__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; }
.logo__sub { font-size: .7rem; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__list li { margin: 0; }
.nav__link {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--brand); border-color: var(--brand); }
.nav__link[aria-current="page"] { color: var(--brand); border-color: var(--brand); font-weight: 600; }

.header__actions { display: flex; align-items: center; gap: var(--space-3); }

.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  cursor: pointer;
}
.burger span {
  display: block; width: 20px; height: 2px; background: var(--ink);
  position: relative; transition: background var(--dur) var(--ease);
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(360px, 88vw);
  background: #fff;
  z-index: var(--z-drawer);
  padding: var(--space-6) var(--space-5) var(--space-7);
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  overflow-y: auto;
  box-shadow: var(--shadow-3);
}
.drawer.is-open { transform: translateX(0); }
.drawer__list { list-style: none; margin: 0 0 var(--space-6); padding: 0; }
.drawer__list li { margin: 0; border-bottom: 1px solid var(--line); }
.drawer__list a {
  display: block; padding: var(--space-4) 0; color: var(--ink);
  text-decoration: none; font-family: var(--font-head); font-weight: 600;
}
.drawer__list a:hover, .drawer__list a[aria-current="page"] { color: var(--brand); }
.drawer__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px; border: none; background: var(--bg-soft);
  border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--ink);
}
.overlay {
  position: fixed; inset: 0; background: rgba(22,22,26,.5);
  z-index: var(--z-drawer); opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.overlay.is-open { opacity: 1; visibility: visible; }

/* --- 6. Первый экран ---------------------------------------------------- */
.hero {
  position: relative;
  background: var(--bg-soft);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--space-7);
  align-items: center;
  padding-block: clamp(32px, 4vw, 72px);
}
.hero__title { margin-bottom: var(--space-5); }
.hero__title em {
  font-style: normal;
  color: var(--brand);
}
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--ink-2);
  max-width: 54ch;
  margin-bottom: var(--space-6);
}
.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5) var(--space-6);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-strong);
}
@media (max-width: 1100px) { .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact__num {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.fact__label { font-size: var(--fs-xs); color: var(--ink-2); margin-top: var(--space-1); max-width: 20ch; }

.hero__media {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  background: #fff;
  aspect-ratio: 4 / 5;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero__badge {
  position: absolute;
  left: var(--space-4); bottom: var(--space-4);
  background: rgba(255,255,255,.96);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-1);
  max-width: 80%;
}
.hero__badge strong { display: block; font-family: var(--font-head); font-size: .95rem; }
.hero__badge span { font-size: var(--fs-xs); color: var(--ink-2); }

/* --- 7. Карточки -------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-5);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.card__icon {
  width: 44px; height: 44px; border-radius: var(--radius-s);
  background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; margin-bottom: var(--space-4);
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--ink-2); font-size: var(--fs-sm); }

/* Категория-плитка */
.tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  aspect-ratio: 3 / 4;
  background: var(--ink);
  isolation: isolate;
}
.tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
  transition: transform 480ms var(--ease);
}
.tile::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(18,18,22,.86) 8%, rgba(18,18,22,.28) 52%, rgba(18,18,22,.06) 100%);
}
.tile:hover img { transform: scale(1.05); }
.tile:hover { color: #fff; }
.tile__body { position: absolute; left: 0; right: 0; bottom: 0; padding: var(--space-5); }
.tile__title {
  display: block;
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  margin-bottom: var(--space-2);
}
.tile__meta { display: block; font-size: var(--fs-xs); color: #d9d6d2; line-height: 1.45; }

/* --- 8. Каталог --------------------------------------------------------- */
.filters { margin-bottom: var(--space-6); }
.filters__row {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: 40px; padding: 8px 16px;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink);
  font-family: var(--font-head); font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip__count {
  font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__count { color: rgba(255,255,255,.75); }

.filters__tools {
  /* выравнивание по верху: подписи полей стоят на одной линии,
     пояснение под полем не смещает соседей */
  display: flex; flex-wrap: wrap; align-items: start; gap: var(--space-5);
  padding: var(--space-5); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: var(--space-5);
}
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 190px; }
.field label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-s);
  background: #fff; color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs-body);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 120px; padding-top: 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(138,21,56,.14);
}
.field__hint { font-size: var(--fs-xs); color: var(--ink-3); }
/* кнопка в ряду фильтров встаёт на линию полей, а не на линию подписей */
.filters__tools > .btn { margin-top: 28px; }
.field__error { font-size: var(--fs-xs); color: var(--err); font-weight: 600; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err); }
.field.has-error .field__error { display: block; }

.result-count { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: var(--space-4); }
.result-count b { color: var(--ink); font-variant-numeric: tabular-nums; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-5);
}
.product {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.product__media {
  position: relative; background: var(--bg-soft); aspect-ratio: 3 / 4; overflow: hidden;
}
.product__media picture { display: block; width: 100%; height: 100%; }
.product__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 500ms var(--ease);
}
.product:hover .product__media img { transform: scale(1.04); }
.product__tag {
  position: absolute; top: var(--space-3); left: var(--space-3);
  background: rgba(255,255,255,.94); color: var(--ink);
  font-size: var(--fs-xs); font-weight: 600; padding: 4px 10px; border-radius: 999px;
}
.product__fav {
  position: absolute; top: var(--space-2); right: var(--space-2);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.9); cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.product__fav:hover { background: #fff; color: var(--brand); }
.product__fav[aria-pressed="true"] { color: var(--brand); }
.product__fav svg { width: 20px; height: 20px; }
.product__fav[aria-pressed="true"] svg { fill: currentColor; }
/* «Живое фото» в карточке */
.product__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 260ms var(--ease);
  pointer-events: none;
}
/* ролик проявляется, только когда действительно играет */
.product__video.is-playing { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .product:hover .product__video,
  .product:focus-within .product__video { opacity: 1; }
}
.product__live {
  position: absolute; left: var(--space-3); bottom: var(--space-3);
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(22,22,26,.82); color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 9px 4px 6px; border-radius: 999px;
}
.product__live svg { width: 13px; height: 13px; }

.product__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.product__name { font-family: var(--font-head); font-size: 1.02rem; font-weight: 700; margin: 0; }
.product__art { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.product__sizes { font-size: var(--fs-xs); color: var(--ink-2); }
.product__feats { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: auto; padding-top: var(--space-2); }
.product__feat {
  font-size: .72rem; color: var(--ink-2); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
}
.product__actions { display: flex; gap: var(--space-2); padding: 0 var(--space-4) var(--space-4); }
.product__actions .btn { flex: 1; }

.empty {
  padding: var(--space-8) var(--space-5);
  text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--ink-2);
}

/* --- 9. Модальное окно -------------------------------------------------- */
.modal {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--space-4);
  background: rgba(22,22,26,.55);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  background: #fff; border-radius: var(--radius-l);
  width: min(920px, 100%); max-height: min(88vh, 900px);
  overflow-y: auto; box-shadow: var(--shadow-3);
  transform: translateY(12px) scale(.985);
  transition: transform var(--dur) var(--ease);
}
.modal.is-open .modal__box { transform: none; }
.modal__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  z-index: 3;
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.96); color: var(--ink);
  cursor: pointer; font-size: 1.5rem; line-height: 1;
  box-shadow: var(--shadow-2);
}
/* пока открыто окно просмотра, панель заявки не мешает */
body.modal-open .cart-bar.is-visible { transform: translateX(-50%) translateY(200%); }
.modal__grid { display: grid; grid-template-columns: 1fr 1fr; }
.modal__media { background: var(--bg-soft); position: relative; overflow: hidden; }
.modal__media picture { display: block; width: 100%; height: 100%; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.modal__video { display: none; width: 100%; height: 100%; object-fit: cover; background: #000; }

.modal__strip {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: var(--space-2);
  padding: var(--space-3);
  background: linear-gradient(to top, rgba(18,18,22,.72), transparent);
  overflow-x: auto;
}
.modal__thumb {
  position: relative; flex: 0 0 auto;
  width: 54px; height: 72px; padding: 0;
  border: 2px solid transparent; border-radius: var(--radius-s);
  overflow: hidden; cursor: pointer; background: var(--bg-soft);
}
.modal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal__thumb.is-active { border-color: #fff; }
.modal__thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(22,22,26,.45); color: #fff;
}
.modal__thumb-play svg { width: 20px; height: 20px; }
.modal__body { padding: var(--space-6); }
.modal__body h3 { margin-bottom: var(--space-2); }

.spec-list { list-style: none; margin: var(--space-4) 0; padding: 0; }
.spec-list li {
  display: flex; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line);
  font-size: var(--fs-sm); margin: 0;
}
.spec-list dt, .spec-list__key { color: var(--ink-3); }
.spec-list__val { font-weight: 600; text-align: right; }

/* --- 10. Отзывы --------------------------------------------------------- */
.review {
  display: flex; flex-direction: column; gap: var(--space-4);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--space-5);
  break-inside: avoid;
}
.review__text { font-size: var(--fs-sm); color: var(--ink-2); }
.review__text::before { content: '«'; color: var(--brand); font-weight: 700; }
.review__text::after { content: '»'; color: var(--brand); font-weight: 700; }
.review__author { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm); }
.review__place { font-size: var(--fs-xs); color: var(--ink-3); }
.review__photos { display: flex; gap: var(--space-2); }
.review__photos img {
  width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-s);
  cursor: zoom-in; transition: transform var(--dur) var(--ease);
}
.review__photos img:hover { transform: scale(1.03); }
.reviews-masonry { columns: 3 300px; column-gap: var(--space-5); }
.reviews-masonry .review { margin-bottom: var(--space-5); display: inline-flex; width: 100%; }

/* --- 11. Формы и заявка ------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.form-note { font-size: var(--fs-xs); color: var(--ink-3); }
.form-note a { color: var(--ink-2); }

.checkbox {
  display: flex; align-items: flex-start; gap: var(--space-3);
  font-size: var(--fs-xs); color: var(--ink-2);
}
.checkbox input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.checkbox.has-error { color: var(--err); font-weight: 600; }
.checkbox.has-error input { outline: 2px solid var(--err); outline-offset: 2px; }

.form-status { margin-top: var(--space-4); font-size: var(--fs-sm); font-weight: 600; }
.form-status--ok { color: var(--ok); }
.form-status--err { color: var(--err); }

/* Заявка-подвал */
.cart-bar {
  position: fixed; left: 50%; bottom: var(--space-5); transform: translateX(-50%) translateY(200%);
  z-index: var(--z-toast);
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--ink); color: #fff;
  border-radius: 999px; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  box-shadow: var(--shadow-3);
  transition: transform 320ms var(--ease);
  max-width: calc(100vw - 32px);
}
.cart-bar.is-visible { transform: translateX(-50%) translateY(0); }
/* Пока висит уведомление о cookie, панель заявки поднимается над ним */
body.has-cookie .cart-bar.is-visible { transform: translateX(-50%) translateY(calc(-1 * var(--cookie-h, 96px))); }
.cart-bar__text { font-size: var(--fs-sm); }
.cart-bar__text b { font-variant-numeric: tabular-nums; }

/* --- 12. Прочие блоки --------------------------------------------------- */
.breadcrumbs { font-size: var(--fs-xs); color: var(--ink-3); padding-block: var(--space-4); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: '/'; margin-right: var(--space-2); color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }

.page-head { padding-block: var(--space-6) var(--space-5); }
.page-head p { color: var(--ink-2); font-size: var(--fs-lead); max-width: 70ch; }

.steps { counter-reset: step; display: grid; gap: var(--space-5); }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: var(--space-4);
  align-items: start;
}
.step__num {
  counter-increment: step;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
}
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: var(--space-1); }
.step p { color: var(--ink-2); font-size: var(--fs-sm); }

.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  width: 100%; padding: var(--space-5) 0;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 600; color: var(--ink);
}
.faq__q:hover { color: var(--brand); }
.faq__icon { flex-shrink: 0; width: 24px; height: 24px; position: relative; }
.faq__icon::before, .faq__icon::after {
  content: ''; position: absolute; top: 50%; left: 50%; background: currentColor;
  transform: translate(-50%, -50%); transition: transform var(--dur) var(--ease);
}
.faq__icon::before { width: 14px; height: 2px; }
.faq__icon::after { width: 2px; height: 14px; }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__a { display: none; padding-bottom: var(--space-5); color: var(--ink-2); font-size: var(--fs-sm); max-width: 75ch; }
.faq__a.is-open { display: block; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
td { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-soft); }

.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2);
}
.badge svg { width: 16px; height: 16px; color: var(--accent); }

.cta {
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(28px, 4vw, 56px);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--space-6); align-items: center;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.88); margin-bottom: 0; }
.cta__actions { display: flex; flex-direction: column; gap: var(--space-3); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-1); }
/* фотографии классов сняты горизонтально — при вертикальном кропе срезало головы */
.split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center 40%; }
.split__media--portrait img { aspect-ratio: 4/5; object-position: center top; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.gallery img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-s); cursor: zoom-in; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; margin-top: 3px; }
.contact-list strong { display: block; font-family: var(--font-head); font-size: var(--fs-sm); }
.contact-list span { font-size: var(--fs-sm); color: var(--ink-2); }
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--brand); }

.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 380px; }
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

.prose { max-width: 75ch; }
.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose ul { padding-left: 1.2em; }
.prose li { color: var(--ink-2); }

/* --- 13. Подвал --------------------------------------------------------- */
.footer { background: var(--bg-dark); color: #b9b6b2; padding-block: var(--space-7) var(--space-5); font-size: var(--fs-sm); }
.footer a { color: #e8e6e3; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--space-6); }
.footer h3 { color: #fff; font-size: .95rem; margin-bottom: var(--space-4); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: var(--space-3); }
.footer__logo { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer__logo .logo__mark { background: #fff; color: var(--brand); }
.footer__logo .logo__name { color: #fff; }
.footer__bottom {
  margin-top: var(--space-7); padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between;
  font-size: var(--fs-xs); color: #8e8b88;
}

/* --- 14. Cookie --------------------------------------------------------- */
.cookie {
  position: fixed; left: var(--space-4); right: var(--space-4); bottom: var(--space-4);
  z-index: var(--z-toast);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-3);
  padding: var(--space-4) var(--space-5);
  display: none; gap: var(--space-4); align-items: center; flex-wrap: wrap;
  max-width: 720px; margin-inline: auto;
}
.cookie.is-visible { display: flex; }
.cookie p { font-size: var(--fs-xs); color: var(--ink-2); margin: 0; flex: 1 1 320px; }

/* --- 15. Адаптив -------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .modal__grid { grid-template-columns: 1fr; }
  /* на узком экране картинка занимает фиксированную полосу, а не растягивает окно */
  .modal__media { height: 46vh; min-height: 280px; }
  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .burger { display: inline-flex; margin-left: auto; }
  .header__actions .btn { display: none; }
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero__media { aspect-ratio: 3 / 4; max-height: 60vh; }
  .split { grid-template-columns: 1fr; gap: var(--space-5); }
  .reviews-masonry { columns: 1; }
}

@media (max-width: 560px) {
  :root { --fs-body: 1rem; }
  .header__top .wrap { min-height: 34px; font-size: .72rem; }
  .header__top-note { display: none; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
  .product__body { padding: var(--space-3); }
  .product__actions { padding: 0 var(--space-3) var(--space-3); flex-direction: column; }
  .filters__tools { padding: var(--space-4); gap: var(--space-4); }
  .filters__tools > .btn { margin-top: 0; width: 100%; }
  .field { min-width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
  .hero__facts { gap: var(--space-4) var(--space-5); }
  .review__photos img { width: 72px; height: 72px; }
  .cart-bar { left: var(--space-3); right: var(--space-3); transform: translateY(200%); border-radius: var(--radius); }
  .cart-bar.is-visible { transform: translateY(0); }
  body.has-cookie .cart-bar.is-visible { transform: translateY(calc(-1 * var(--cookie-h, 150px))); }
  body.modal-open .cart-bar.is-visible { transform: translateY(200%); }
}

/* --- 16. Движение ------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 520ms var(--ease), transform 520ms var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- 17. Печать --------------------------------------------------------- */
@media print {
  .header, .footer, .cookie, .cart-bar, .burger, .btn { display: none !important; }
  body { color: #000; }
  .wrap { max-width: none; }
}
