/* ═══════════════════════════════════════════════════════════
   Restorazia — дизайн-система и стили лендинга
   Палитра: костяной фон + угольные панели + янтарный акцент.
   Все компоненты используют только переменные из :root.
   ═══════════════════════════════════════════════════════════ */

/* ─── Шрифты (self-hosted, внешних запросов нет) ─── */
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-cyrillic.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── Токены ─── */
:root {
  --bg: #FCFBFA;
  --surface: #FFFFFF;
  --surface-alt: #F4F2EF;
  --text: #13181A;
  --muted: #5F6A70;
  --line: #EAE6E1;
  --line-strong: #D9D3CC;

  --ink: #13181A;
  --ink-2: #1E2528;
  --on-ink: #F3EFE9;
  --on-ink-dim: #A3ADB2;

  --accent: #C0551B;
  --accent-hover: #A6470F;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(192, 85, 27, 0.10);

  --shadow-sm: 0 1px 2px rgba(19, 24, 26, .06), 0 2px 8px rgba(19, 24, 26, .04);
  --shadow-md: 0 4px 12px rgba(19, 24, 26, .07), 0 16px 40px rgba(19, 24, 26, .08);
  --shadow-lg: 0 8px 24px rgba(19, 24, 26, .10), 0 32px 64px rgba(19, 24, 26, .12);

  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --wrap: 1240px;
  --gutter: 24px;
  --sec-y: clamp(72px, 8.5vw, 124px);
  /* Отступ, при котором горизонтальная лента выравнивается по .wrap */
  --rail-pad: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));

  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --body-font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101314;
    --surface: #171B1D;
    --surface-alt: #14181A;
    --text: #ECEAE6;
    --muted: #98A2A7;
    --line: #262D30;
    --line-strong: #333B3F;

    --ink: #080A0B;
    --ink-2: #131819;
    --on-ink: #F0EDE8;
    --on-ink-dim: #98A2A7;

    --accent: #E07B33;
    --accent-hover: #EE9250;
    --on-accent: #1A0E05;
    --accent-soft: rgba(224, 123, 51, 0.14);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, .5), 0 32px 64px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  --bg: #101314;
  --surface: #171B1D;
  --surface-alt: #14181A;
  --text: #ECEAE6;
  --muted: #98A2A7;
  --line: #262D30;
  --line-strong: #333B3F;
  --ink: #080A0B;
  --ink-2: #131819;
  --on-ink: #F0EDE8;
  --on-ink-dim: #98A2A7;
  --accent: #E07B33;
  --accent-hover: #EE9250;
  --on-accent: #1A0E05;
  --accent-soft: rgba(224, 123, 51, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .5), 0 32px 64px rgba(0, 0, 0, .45);
}

/* ─── База ─── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  font-family: var(--body-font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.sr-only {
  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; top: -60px; left: 16px; z-index: 200;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: var(--r-sm);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─── Типографика ─── */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.9rem); }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 700; letter-spacing: -0.015em; }

.eyebrow {
  font-family: var(--body-font);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow--light { color: #F0A868; }

.section { padding-block: var(--sec-y); }
.section--alt { background: var(--surface-alt); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 24px 56px;
  align-items: end;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.sec-head--row { align-items: center; grid-template-columns: 1fr auto; }
.sec-head__lead {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 52ch;
  padding-bottom: 4px;
}

/* ─── Кнопки ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: var(--r-sm);
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.005em;
  border: 1px solid transparent;
  transition: background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease), transform .18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 9px 18px; font-size: .875rem; }
.btn--lg { padding: 16px 30px; font-size: 1rem; }
.btn--block { width: 100%; }

.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); }

.btn--outline { border-color: var(--line-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--text); }

.btn--glass {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .35);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn--glass:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .9rem;
  color: var(--accent);
}
.link-arrow::after {
  content: "→";
  transition: transform .2s var(--ease);
}
a:hover .link-arrow::after, .link-arrow:hover::after { transform: translateX(4px); }

/* ─── Полоса объявлений ─── */
.topbar {
  background: var(--ink);
  color: var(--on-ink-dim);
  font-size: .8125rem;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 42px;
  padding-block: 8px;
}
.topbar__msg { display: flex; align-items: center; gap: 10px; color: var(--on-ink); }
.topbar__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  flex: none;
}
.topbar__links { display: flex; gap: 24px; }
.topbar__links a:hover { color: var(--on-ink); }
.topbar__phone { color: var(--on-ink); font-weight: 500; }

/* ─── Шапка ─── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.header.is-stuck { box-shadow: var(--shadow-sm); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 76px;
}

.logo { display: flex; align-items: center; gap: 11px; flex: none; }
.logo__mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 9px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
}
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.logo__text strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.03em;
}
.logo__text small {
  font-size: .6875rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* Три зоны: логотип слева, меню по центру, действия справа. Без этого
   меню прижималось влево, а кнопка уезжала к самому краю. */
.nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 9px 13px;
  border-radius: var(--r-xs);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--muted);
  transition: color .15s var(--ease), background-color .15s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); background: var(--surface-alt); }
.nav__chev { width: 11px; transition: transform .2s var(--ease); }
.nav__toggle[aria-expanded="true"] { color: var(--text); background: var(--surface-alt); }
.nav__toggle[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.header__actions { display: flex; align-items: center; gap: 14px; flex: none; }
.header__phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9375rem; font-weight: 500;
  color: var(--text);
}
.header__phone svg { width: 18px; height: 18px; color: var(--accent); }
.header__phone:hover { color: var(--accent); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  position: relative;
  flex: none;
}
.burger span {
  position: absolute; left: 12px; right: 12px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: top .22s var(--ease), transform .22s var(--ease), opacity .16s var(--ease);
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ─── Мега-меню ─── */
.mega {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: megaIn .2s var(--ease);
}
.mega[hidden] { display: none; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-8px); } }

.mega__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding-block: 32px 36px;
}
.mega__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 32px;
  align-content: start;
}
.mega__cat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-xs);
  font-size: .9375rem;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.mega__cat:hover { background: var(--surface-alt); color: var(--accent); }
.mega__cat em {
  font-style: normal;
  font-size: .8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mega__cat--accent { color: var(--accent); font-weight: 600; }

.mega__promo {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.mega__promo img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.mega__promo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8, 10, 11, .96) 0%, rgba(8, 10, 11, .78) 45%, rgba(8, 10, 11, .3) 100%);
}
.mega__promo:hover img { transform: scale(1.05); }
.mega__promo-body { padding: 20px; color: #fff; }
.mega__promo-title {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  margin-bottom: 10px; letter-spacing: -.015em;
}
.mega__promo .link-arrow { color: #F0A868; }

/* ─── Hero ─── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 88vh, 860px);
  padding-block: clamp(72px, 12vh, 130px);
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(8, 10, 11, .93) 0%, rgba(8, 10, 11, .78) 42%, rgba(8, 10, 11, .30) 78%),
    linear-gradient(to top, rgba(8, 10, 11, .65), transparent 45%);
}
.hero__inner { position: relative; color: #fff; }
.hero__title { max-width: 17ch; color: #fff; }
.hero__lead {
  margin-top: 22px;
  max-width: 54ch;
  font-size: clamp(1.02rem, 1.3vw, 1.175rem);
  color: rgba(255, 255, 255, .82);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__scroll {
  position: absolute;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  display: grid; justify-items: center;
  padding-top: 8px;
}
.hero__scroll span {
  width: 3px; height: 8px; border-radius: 2px;
  background: rgba(255, 255, 255, .8);
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: .2; }
}

/* ─── Полоса преимуществ ─── */
.assurance { background: var(--surface); border-bottom: 1px solid var(--line); }
.assurance__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.assurance__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 30px 28px;
}
.assurance__item:first-child { padding-left: 0; }
.assurance__item + .assurance__item { border-left: 1px solid var(--line); }
.assurance__item svg { width: 30px; height: 30px; color: var(--accent); flex: none; }
.assurance__item strong {
  display: block;
  font-family: var(--display); font-weight: 700; font-size: .975rem;
  letter-spacing: -.01em;
}
.assurance__item span { display: block; font-size: .875rem; color: var(--muted); margin-top: 3px; }

/* ─── Офферы ─── */
.offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}
.offer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.offer:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.offer__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.offer__media img { width: 100%; height: 100%; object-fit: cover; }
.offer__num {
  position: absolute; left: 20px; top: 20px;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--display); font-weight: 800; font-size: .8125rem;
  padding: 6px 12px; border-radius: 100px;
  letter-spacing: .06em;
}
.offer__body { padding: clamp(24px, 3vw, 34px); display: flex; flex-direction: column; gap: 16px; flex: 1; }
.offer__body > p { color: var(--muted); }

.ticks { display: grid; gap: 11px; margin-top: 2px; }
.ticks li {
  position: relative;
  padding-left: 30px;
  font-size: .9375rem;
}
.ticks li::before {
  content: "";
  position: absolute; left: 0; top: .35em;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.ticks li::after {
  content: "";
  position: absolute; left: 5px; top: .62em;
  width: 8px; height: 4px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks .link-arrow { margin-top: auto; }
.offer__body .link-arrow { margin-top: auto; align-self: flex-start; }

.ticks--light li { color: var(--on-ink); }
.ticks--light li::before { background: rgba(224, 123, 51, .18); }

/* ─── Каталог ─── */
.cats-feature {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.cat-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
}
.cat-card__media { position: absolute; inset: 0; z-index: -2; }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.cat-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8, 10, 11, .92) 8%, rgba(8, 10, 11, .45) 50%, rgba(8, 10, 11, .1) 100%);
  transition: background .3s var(--ease);
}
.cat-card:hover .cat-card__media img { transform: scale(1.06); }
.cat-card__body { padding: 22px; color: #fff; }
.cat-card__body h3 { color: #fff; }
.cat-card__body p { font-size: .8125rem; color: rgba(255, 255, 255, .7); margin-top: 6px; }

.cats-rest {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: .9375rem;
  font-weight: 500;
  transition: border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.cat-row:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.cat-row em {
  font-style: normal; font-size: .8125rem; color: var(--muted);
  flex: none; font-variant-numeric: tabular-nums;
}
.cat-row--accent {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.cat-row--accent em { color: rgba(255, 255, 255, .8); }
.cat-row--accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
:root[data-theme="dark"] .cat-row--accent em { color: rgba(26, 14, 5, .7); }

/* ─── Карусель поступлений ─── */
.carousel__nav { display: flex; gap: 10px; }
.cbtn {
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid; place-items: center;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.cbtn svg { width: 16px; height: 16px; }
.cbtn:hover { background: var(--text); border-color: var(--text); color: var(--bg); }
.cbtn[disabled] { opacity: .35; cursor: default; }
.cbtn[disabled]:hover { background: none; border-color: var(--line-strong); color: inherit; }

.carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Без этого mandatory-снап подтягивает ленту на величину внутреннего
     отступа и первая карточка уезжает за левый край экрана. */
  scroll-padding-inline: var(--rail-pad);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel__track {
  display: flex;
  gap: 20px;
  padding-inline: var(--rail-pad);
  padding-block: 4px 8px;
}

.prod {
  scroll-snap-align: start;
  flex: 0 0 clamp(260px, 27vw, 320px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.prod:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.prod__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-alt); }
.prod__media img { width: 100%; height: 100%; object-fit: contain; }
.badge {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255, 255, 255, .94);
  color: #13181A;
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px;
  backdrop-filter: blur(6px);
}
.prod__body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.prod__brand {
  font-size: .6875rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
}
.prod__spec { font-size: .875rem; color: var(--muted); }
.prod__foot {
  margin-top: auto; padding-top: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--line);
}
.prod__price { font-family: var(--display); font-weight: 700; font-size: .9375rem; }

.prod--more {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}
.prod__more-body { padding: 26px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.prod__more-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-size: 1.1rem;
}
.prod--more h3 { color: var(--on-ink); }
.prod--more p { font-size: .875rem; color: var(--on-ink-dim); }
.prod--more .link-arrow { margin-top: auto; color: #F0A868; }

/* ─── Промо-баннер ─── */
.promo {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(440px, 60vh, 620px);
  padding-block: clamp(64px, 8vw, 110px);
  background: var(--ink);
}
.promo__media { position: absolute; inset: 0; z-index: -2; }
.promo__media img { width: 100%; height: 100%; object-fit: cover; }
.promo::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(95deg, rgba(8, 10, 11, .92) 0%, rgba(8, 10, 11, .70) 45%, rgba(8, 10, 11, .28) 100%);
}
.promo__inner { position: relative; }
.promo__card { max-width: 620px; color: #fff; }
.promo__card h2 { color: #fff; }
.promo__card > p { margin: 18px 0 30px; color: rgba(255, 255, 255, .82); max-width: 50ch; }

/* ─── Цифры ─── */
.stats { background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(48px, 6vw, 76px); }
.stats__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.stats__lead { display: flex; flex-direction: column; gap: 10px; }
.stats__big {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 8vw, 6rem);
  line-height: .95;
  letter-spacing: -.045em;
  color: var(--accent);
}
.stats__lead p { color: var(--muted); max-width: 34ch; }
.stats__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-left: 1px solid var(--line);
  padding-left: clamp(24px, 4vw, 56px);
}
.stats__list dt {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1; letter-spacing: -.035em;
}
.stats__list dd { font-size: .875rem; color: var(--muted); margin-top: 8px; }

/* ─── Шаги ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.step {
  background: var(--surface);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex; flex-direction: column; gap: 9px;
  transition: background-color .2s var(--ease);
}
.step:hover { background: var(--surface-alt); }
.step__num {
  font-family: var(--display); font-weight: 800;
  font-size: 1.5rem; line-height: 1;
  color: var(--accent);
  letter-spacing: -.03em;
  margin-bottom: 4px;
}
.step p { font-size: .875rem; color: var(--muted); }

/* ─── Экспертиза ─── */
.expertise { background: var(--ink); color: var(--on-ink); }
.expertise__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  padding-block: var(--sec-y);
}
.expertise__media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; }
.expertise__media img { width: 100%; height: 100%; object-fit: cover; }
.expertise__text h2 { color: var(--on-ink); }
.expertise__text > p { margin: 18px 0 24px; color: var(--on-ink-dim); max-width: 52ch; }
.expertise__text .ticks { margin-bottom: 30px; }

/* ─── Галерея ─── */
/* Раскладка задана явно: 8 фото ровно заполняют сетку 4×3,
   иначе авто-размещение оставляет дыры в последнем ряду. */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, 200px);
  gap: 14px;
}
.gallery__item {
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--surface-alt);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }

.gallery__item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery__item:nth-child(2) { grid-column: 3 / 4; grid-row: 1; }
.gallery__item:nth-child(3) { grid-column: 4 / 5; grid-row: 1; }
.gallery__item:nth-child(4) { grid-column: 3 / 4; grid-row: 2; }
.gallery__item:nth-child(5) { grid-column: 4 / 5; grid-row: 2; }
.gallery__item:nth-child(6) { grid-column: 1 / 2; grid-row: 3; }
.gallery__item:nth-child(7) { grid-column: 2 / 4; grid-row: 3; }
.gallery__item:nth-child(8) { grid-column: 4 / 5; grid-row: 3; }

/* ─── FAQ ─── */
.faq__wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq__head { position: sticky; top: 108px; }
.faq__head .sec-head__lead { margin-top: 16px; }
.faq { display: grid; gap: 10px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color .2s var(--ease);
}
.faq__item[open] { border-color: var(--line-strong); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 54px 20px 22px;
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.012em;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "";
  position: absolute; right: 22px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .22s var(--ease);
}
.faq__item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__body { padding: 0 22px 22px; }
.faq__body p { color: var(--muted); font-size: .9375rem; }

/* ─── Контакты ─── */
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.contact__info .sec-head__lead { margin-top: 16px; }

.after { display: grid; gap: 18px; margin: 34px 0; }
.after li { display: flex; gap: 14px; align-items: flex-start; }
.after li span {
  flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font-family: var(--display); font-weight: 800; font-size: .8125rem;
}
.after strong { font-family: var(--display); font-weight: 700; font-size: .975rem; }
.after p { font-size: .875rem; color: var(--muted); }

.contact__details { display: grid; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.contact__details dt {
  font-size: .75rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.contact__details dd { font-size: 1.0625rem; }
.contact__details a:hover { color: var(--accent); }

/* ─── Формы ─── */
.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 16px;
}
.form__title { margin-bottom: 4px; }
.field { display: grid; gap: 7px; }
.field label {
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .04em; color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: .9375rem;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.field textarea { resize: vertical; min-height: 88px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235F6A70' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; background-size: 12px;
  padding-right: 40px;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); background: var(--surface); outline: none;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .8125rem; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

.form__status { font-size: .875rem; color: var(--accent); min-height: 1.2em; }
.form__status:empty { min-height: 0; }

/* ─── Футер ─── */
.footer { background: var(--ink); color: var(--on-ink-dim); }
.footer__cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 32px 56px;
  align-items: center;
  padding-block: clamp(44px, 5.5vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer__cta h2 { color: var(--on-ink); font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.footer__cta p { margin-top: 12px; max-width: 46ch; font-size: .9375rem; }

.subscribe { display: flex; gap: 12px; flex-wrap: wrap; }
.subscribe input {
  flex: 1 1 220px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  color: var(--on-ink);
  font-size: .9375rem;
}
.subscribe input::placeholder { color: var(--on-ink-dim); }
.subscribe input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, .1); }
.subscribe .form__status { flex: 1 0 100%; color: #F0A868; }

.footer__main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-block: clamp(44px, 5vw, 68px);
}
.footer__brand .logo { margin-bottom: 18px; }
.footer__brand .logo__text strong { color: var(--on-ink); }
.footer__brand .logo__text small { color: var(--on-ink-dim); }
.footer__brand p { font-size: .9375rem; max-width: 34ch; }

.footer__col { display: flex; flex-direction: column; gap: 11px; }
.footer__col h3 {
  color: var(--on-ink);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 6px;
  font-family: var(--body-font);
}
.footer__col a { font-size: .9375rem; transition: color .15s var(--ease); }
.footer__col a:hover { color: var(--on-ink); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  justify-content: space-between;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .8125rem;
}

/* ─── Появление при скролле ─── */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

/* ═══════════ Адаптив ═══════════ */
@media (max-width: 1080px) {
  .cats-feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats-rest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
  .header__phone { display: none; }
  .mega__inner { grid-template-columns: minmax(0, 1fr); }
  .mega__promo { display: none; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }

  .topbar__links a:not(.topbar__phone) { display: none; }
  .topbar__msg { font-size: .78rem; }

  .burger { display: block; }
  .header__inner { min-height: 66px; gap: 16px; }
  /* .nav уходит в fixed и перестаёт распирать флекс — прижимаем действия сами */
  .header__actions { margin-left: auto; }

  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 86vw);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 104px 20px 40px;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { transform: none; }
  .nav__link { padding: 14px 12px; font-size: 1.05rem; }
  .nav__item--has-mega { display: flex; }
  .nav__toggle { width: 100%; justify-content: space-between; }

  /* Внутри выезжающей панели мега-меню работает как обычный аккордеон */
  .mega { position: static; box-shadow: none; border: 0; animation: none; background: none; }
  .mega__inner { padding: 4px 0 12px; max-width: none; }
  .mega__cols { grid-template-columns: minmax(0, 1fr); }
  .mega__cat { padding: 11px 12px; font-size: .9375rem; }

  .sec-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .sec-head--row { grid-template-columns: 1fr auto; align-items: center; }

  .assurance__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assurance__item { padding: 22px 20px; }
  .assurance__item:not(:first-child) { padding-left: 20px; }

  .offers { grid-template-columns: minmax(0, 1fr); gap: 20px; }

  .stats__grid { grid-template-columns: minmax(0, 1fr); }
  .stats__list { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 28px; }

  .expertise__grid { grid-template-columns: minmax(0, 1fr); }
  .expertise__media { order: 2; aspect-ratio: 16 / 10; }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 170px; }
  /* 8 фото в две колонки — ровно 4 ряда, спаны не нужны */
  .gallery__item:nth-child(n) { grid-column: auto; grid-row: auto; }

  .faq__wrap { grid-template-columns: minmax(0, 1fr); }
  .faq__head { position: static; }

  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__cta { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  :root { --gutter: 18px; }

  .topbar__inner { justify-content: center; }
  .topbar__links { display: none; }

  .logo__text small { display: none; }
  .header__actions .btn { display: none; }

  .hero { min-height: auto; padding-block: 96px 84px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__scroll { display: none; }

  .assurance__grid { grid-template-columns: minmax(0, 1fr); }

  .cats-feature { grid-template-columns: minmax(0, 1fr); }
  .cat-card { min-height: 240px; }
  .cats-rest { grid-template-columns: minmax(0, 1fr); }

  .steps { grid-template-columns: minmax(0, 1fr); }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 130px; gap: 10px; }

  .footer__main { grid-template-columns: minmax(0, 1fr); }
  .footer__bottom { justify-content: flex-start; }

  .sec-head--row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .carousel__nav { justify-content: flex-start; }
}

/* ─── Уважение к настройкам движения ─── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─── Страница каталога ─── */
.catalog-page { padding-top: clamp(40px, 5vw, 64px); }
.catalog-page__title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }

.chip {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .875rem;
  font-weight: 500;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.cat-block { margin-bottom: clamp(48px, 6vw, 76px); }
.cat-block__title {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 12px;
}
.cat-block__count {
  font-family: var(--body-font);
  font-size: .8125rem; font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.prod {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.prod:hover, .prod:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.prod__media {
  aspect-ratio: 4 / 3;
  background: var(--surface-alt);
  display: grid; place-items: center;
  overflow: hidden;
}
.prod__media img { width: 100%; height: 100%; object-fit: contain; }
.prod__noimg { color: var(--muted); font-size: .8125rem; }
.prod__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod__name { font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.prod__price { margin-top: auto; font-weight: 700; color: var(--accent); font-size: 1rem; }

/* ─── Характеристики на странице товара ─── */
.modal__specs { display: flex; flex-direction: column; gap: 0; margin-bottom: 26px; }
.modal__specs div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px; padding: 9px 0;
  border-bottom: 1px dotted var(--line);
  font-size: .9375rem;
}
.modal__specs dt { color: var(--muted); }
.modal__specs dd { font-weight: 500; }

@media (max-width: 620px) {
  .prod-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .prod__body { padding: 12px 14px 16px; }
  .prod__name { font-size: .875rem; }
}

/* Ловушка для ботов: остаётся в форме, но скрыта совсем. Убранное за экран
   поле браузер заполнял автозаполнением, и заявка человека уходила в спам;
   скрытое так он не трогает, а боты заполняют все поля подряд */
.trap { display: none; }
/* Ошибка отправки заявки */
.form__status.is-error { color: #C0392B; }

/* ─── Увеличенный просмотр фото ─── */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: rgba(6, 8, 9, .93);
  padding: 56px 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-sm);
  user-select: none;
}
.lightbox__close {
  position: absolute; top: 16px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 1.7rem; line-height: 1;
  transition: background .15s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .24); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 2rem; line-height: 1;
  transition: background .15s var(--ease);
}
.lightbox__nav:hover { background: rgba(255, 255, 255, .26); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }
.lightbox__counter {
  position: absolute; bottom: 18px; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, .75);
  font-size: .875rem; font-variant-numeric: tabular-nums;
}
@media (max-width: 620px) {
  .lightbox { padding: 48px 8px; }
  .lightbox__nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }
}

/* ─── Переключатель темы ─── */
.theme-toggle {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--muted);
  flex: none;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 19px; height: 19px; }
/* Показываем ту иконку, куда переключимся */
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: block; }
}
:root[data-theme="light"] .theme-toggle__sun { display: block; }
:root[data-theme="light"] .theme-toggle__moon { display: none; }

/* Превью показывают товар целиком, а не обрезают его по краям */
.prod__media img { padding: 10px; }
.prod-grid .prod__media { background: var(--surface-alt); }

/* ─── Шапка не должна переполняться ──────────────────────────
   На ноутбуках (~1280px) логотип + меню + телефон + переключатель
   + кнопка не помещались в 1240px: кнопку обрезало краем экрана,
   а переключатель сплющивало. Меню сжимается, телефон в шапке
   прячется раньше — он и так есть в верхней полосе. */
.header__inner { flex-wrap: nowrap; }
.nav { min-width: 0; }
.nav__link { white-space: nowrap; }
.header__actions { flex: none; }
.theme-toggle { flex: 0 0 40px; }
.header__actions .btn { flex: none; }

@media (max-width: 1400px) {
  .header__inner { gap: 20px; }
  .nav { gap: 2px; }
  .nav__link { padding: 9px 10px; font-size: .9rem; }
}
/* Полоса шапки шире контентной сетки: при max-width 1240px логотип +
   меню + телефон + переключатель + кнопка не влезали НИ ПРИ КАКОЙ
   ширине экрана — кнопку обрезало краем окна. */
.header .wrap, .topbar .wrap { max-width: 1400px; }

@media (max-width: 1180px) {
  /* Дальше телефон в шапке лишний — он есть в верхней полосе */
  .header__phone { display: none; }
}

/* ─── Страница товара (генерируется службой) ─── */
.crumbs { padding: 26px 0 4px; font-size: .875rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--text); }

.product-page { padding-top: 20px; }
.product-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.product-page__media { position: sticky; top: 96px; }
.product-page__photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: zoom-in;
}
/* Миниатюры лентой под снимком, а не колонкой сбоку */
.product-page__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.product-page__thumbs a {
  display: block;
  border: 2px solid transparent;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--surface-alt);
  opacity: .7;
  transition: opacity .15s var(--ease), border-color .15s var(--ease);
}
.product-page__thumbs a:hover { opacity: 1; }
.product-page__thumbs a.is-active { border-color: var(--accent); opacity: 1; }
.product-page__thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 4px; }

.product-page__info h1 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin-bottom: 14px; }
.product-page__price {
  font-size: 1.6rem; font-weight: 700; color: var(--accent);
  margin-bottom: 26px; font-variant-numeric: tabular-nums;
}
.product-page__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 22px; }
.product-page__note {
  color: var(--muted); font-size: .9375rem;
  padding-top: 20px; border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  .product-page__grid { grid-template-columns: minmax(0, 1fr); }
  .product-page__media { position: static; }
  .product-page__cta .btn { flex: 1 1 100%; }
}

/* ─── Стрелки листания прямо на снимке товара ─── */
.product-page__stage { position: relative; }
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 1.6rem; line-height: 1;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity .18s var(--ease), background .15s var(--ease), border-color .15s var(--ease);
}
.product-page__stage:hover .photo-nav,
.photo-nav:focus-visible { opacity: 1; }
.photo-nav:hover { border-color: var(--accent); color: var(--accent); }
.photo-nav--prev { left: 12px; }
.photo-nav--next { right: 12px; }
.photo-nav__count {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  font-size: .8125rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* На тач-экранах наведения нет — стрелки прячем, там работают
   миниатюры и свайп в полноэкранном просмотре */
@media (hover: none), (max-width: 900px) {
  .photo-nav { display: none; }
}

/* ─── Плитка товара в сгенерированном каталоге ───────────────
   Обёртка-ссылка без display оставалась строчной, из-за чего блок
   с фотографией не занимал карточку целиком и снимок смещался. */
.prod__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}
/* Товар строго по центру плитки — и по горизонтали, и по вертикали */
.prod__media { display: grid; place-items: center; }
.prod__media img { object-position: center center; margin: auto; }

/* ─── Быстрый переход по подкатегориям на странице категории ─── */
.subcats {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 28px 0 44px;
}
.subcats .chip { display: inline-flex; align-items: baseline; gap: 7px; }
.subcats .chip em {
  font-style: normal; font-size: .8125rem; opacity: .65;
  font-variant-numeric: tabular-nums;
}
.cat-block { scroll-margin-top: 96px; }

/* ═══════════ Корзина подбора ═══════════ */
.cart-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  flex: none;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-btn__count {
  position: absolute; top: -6px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: .6875rem; font-weight: 700; line-height: 19px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cart-btn.is-empty .cart-btn__count { display: none; }

/* Кнопка добавления */
.add-cart {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.add-cart:hover { border-color: var(--accent); color: var(--accent); }
.add-cart.is-added { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.add-cart--tile {
  width: 100%; padding: 9px 12px; font-size: .8125rem;
  margin-top: 10px;
}

/* Панель */
.cart { position: fixed; inset: 0; z-index: 250; }
.cart[hidden] { display: none; }
.cart__backdrop { position: absolute; inset: 0; background: rgba(8, 10, 11, .6); }
.cart__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.cart__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.cart__head h2 { font-size: 1.3rem; }
.cart__close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 1.4rem; line-height: 1; color: var(--text);
}
.cart__close:hover { border-color: var(--accent); color: var(--accent); }
.cart__body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.cart__empty { color: var(--muted); padding: 32px 0; }
.cart__foot { padding: 18px 24px 24px; border-top: 1px solid var(--line); }

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.cart-item__media {
  width: 64px; height: 64px; border-radius: var(--r-xs);
  background: var(--surface-alt); overflow: hidden;
  display: grid; place-items: center;
}
.cart-item__media img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item__name { font-size: .9375rem; font-weight: 600; line-height: 1.3; }
.cart-item__name:hover { color: var(--accent); }
.cart-item__price { font-size: .875rem; color: var(--accent); font-weight: 600; margin-top: 4px; }
.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item__del {
  font-size: .75rem; color: var(--muted);
  border-bottom: 1px dotted var(--line-strong);
}
.cart-item__del:hover { color: var(--accent); border-color: var(--accent); }

.qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: var(--r-xs);
  overflow: hidden;
}
.qty button { width: 28px; height: 28px; font-size: 1rem; color: var(--text); }
.qty button:hover { background: var(--surface-alt); color: var(--accent); }
.qty span {
  min-width: 30px; text-align: center; font-size: .875rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cart__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 6px;
}
.cart__total span { color: var(--muted); font-size: .875rem; }
.cart__total strong { font-size: 1.25rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.cart__note { font-size: .8125rem; color: var(--muted); margin-bottom: 14px; }

.cart__form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cart__form input, .cart__form textarea {
  padding: 11px 13px; font: inherit;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text); resize: vertical;
}
.cart__form input:focus, .cart__form textarea:focus { outline: none; border-color: var(--accent); }
.cart__status { font-size: .875rem; color: var(--accent); min-height: 1.2em; text-align: center; }
.cart__status.is-error { color: #C0392B; }
.cart__clear {
  display: block; margin: 14px auto 0;
  font-size: .8125rem; color: var(--muted);
  border-bottom: 1px dotted var(--line-strong);
}
.cart__clear:hover { color: #C0392B; border-color: #C0392B; }

@media (max-width: 620px) {
  .cart__panel { width: 100%; }
  .cart-item { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; }
  .cart-item__media { width: 52px; height: 52px; }
}
