/* ==========================================================================
   GRANPAC — дизайн-система и стили сайта
   Тёмно-зелёная «ботаническая» тема: глубокий лес, стеклянные карточки,
   золотые акценты. Фирменные цвета взяты из логотипа.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Токены */
:root {
  /* Бренд */
  --ink: #0a0b12;
  --brand: #52920a;
  --brand-400: #6fb522;
  --brand-300: #8fd03f;

  /* Лес */
  --forest-900: #071a11;
  --forest-850: #09200f15;
  --forest-800: #0c2418;
  --forest-700: #123020;
  --forest-600: #1a4029;
  --forest-500: #235435;

  /* Акценты */
  --gold: #c9922e;
  --gold-300: #e4b65c;
  --gold-100: #f0d9a8;
  --gold-ink: #2a1d06;
  --terracotta: #8a5a3b;

  /* Нейтральные */
  --cream: #f4f1e6;
  --sand: #dcd5c2;
  --muted: #a9b8a6;
  --tile: #3a3a38; /* фон фотографий товаров — не менять */

  /* Стекло */
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.16);

  /* Размеры */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --wrap: 1240px;
  --bg-wrap: 1440px;   /* ширина фоновой фотографии — чуть шире колонки контента */
  --header-h: 88px;

  /* Отступ плавающих кнопок от края экрана. На широком мониторе они встают
     по краю колонки контента, на узком — просто отступают от края. */
  --float-x: max(22px, calc(50% - var(--wrap) / 2 + 24px));

  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 40px 80px -32px rgba(0, 0, 0, 0.8);

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Manrope', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  /* дисплейный шрифт заголовков: геометрический гротеск с кириллицей
     и румынской диакритикой. Manrope остаётся на кнопках, цифрах и кодах */
  --font-display: 'Unbounded', 'Manrope', 'Segoe UI', system-ui, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

/* Цвет холста — на случай, если фотография ещё не загрузилась */
html { background-color: var(--forest-900); }

body {
  position: relative;
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream);
  background: none;            /* фон рисуют два слоя ниже */
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Неподвижная подложка: страница прокручивается поверх неё.
   position: fixed вместо background-attachment: fixed — так надёжнее в мобильных
   браузерах. z-index: -1 держит слой позади всего содержимого.

   Ширина ограничена и отцентрована по колонке сайта: на широком мониторе
   фотография не расползается вправо, а остаётся по центру вместе с контентом. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, var(--bg-wrap));
  margin-inline: auto;
  z-index: -1;
  background: url('../assets/hero/hero-main.jpg') 60% 25% / cover no-repeat;
  /* снимок снят в тёмном ключе и на экране выглядел глухим — поднимаем
     яркость и немного насыщенность прямо в браузере, файл не трогаем */
  filter: brightness(1.22) saturate(1.08);
  pointer-events: none;
}

/* края фотографии растворяются в фоне, чтобы не было видно вертикального стыка */
@media (min-width: 1400px) {
  body::before {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }
}

/* Затемнение и фирменные подсветки поверх фотографии */
body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 8% -8%, rgba(82, 146, 10, 0.18), transparent 62%),
    radial-gradient(900px 620px at 96% 4%, rgba(201, 146, 46, 0.12), transparent 60%),
    linear-gradient(rgba(6, 22, 14, 0.22), rgba(6, 22, 14, 0.22));
}

/* Содержимое ниже первого экрана лежит на полупрозрачной подложке:
   текст читается, а фотография остаётся видна фоном. */
main > section:not(.hero) { background: rgba(6, 22, 14, 0.92); }

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
[hidden] { display: none !important; }

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

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

/* Скроллбар */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--forest-900); }
::-webkit-scrollbar-thumb { background: #23422f; border-radius: 8px; border: 3px solid var(--forest-900); }
::-webkit-scrollbar-thumb:hover { background: #2f5b40; }

/* ----------------------------------------------------------- 3. Типографика */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  /* Unbounded шире Manrope — поджимаем трекинг и кегль, иначе длинные
     русские заголовки перестают помещаться в колонку */
  letter-spacing: -0.035em;
  margin: 0;
  /* базовый цвет — тёплый кремовый, а не чистый белый: на тёмно-зелёном фоне
     белый выглядит холодным пятном и спорит с золотыми акцентами */
  color: var(--cream);
  /* длинные слова вроде «нераздельными» шире узкой колонки карточки —
     разрешаем перенос, иначе текст вылезает за рамку */
  overflow-wrap: break-word;
}

/* Крупные заголовки заливаем фирменным градиентом «кремовый → золото».
   @supports — страховка: без background-clip: text цвет остаётся кремовым,
   иначе прозрачный текст стал бы невидимым */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  /* .mat-card b (зелёный) и .step b (золотой номер шага) сюда не входят —
     у них свой цвет по макету, градиент бы его перекрыл */
  h1, h2, h3, .feature b {
    /* лента заканчивается на 76%, а не на 100%: заголовок в две строки
       занимает не всю ширину блока, и при растянутом до края градиенте
       короткие строки не доходили до золота */
    background-image: linear-gradient(94deg,
      #ffffff 0%, var(--cream) 12%, var(--gold-100) 38%, var(--gold-300) 57%, var(--gold) 76%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  /* Ключевой момент: градиент растягивается по ширине БЛОКА, а не текста.
     Короткий заголовок в широкой колонке попадал только в кремовое начало
     ленты и оставался белым. fit-content прижимает блок к тексту, поэтому
     переход виден целиком на заголовке любой длины */
  h1, h2, h3, .feature b { width: -webkit-fit-content; width: fit-content; max-width: 100%; }

  /* Заголовок первого экрана — самый крупный текст на сайте и занимает три
     строки, поэтому лента для него светлее: заканчивается на gold-300,
     а не на глубоком gold, иначе половина заголовка уходит в тень. */
  h1 {
    background-image: linear-gradient(94deg,
      #ffffff 0%, var(--cream) 15%, var(--gold-100) 48%, var(--gold-300) 80%);
  }
}

h1 { font-size: clamp(1.95rem, 4.2vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.25rem); }
h3 { font-size: clamp(1.02rem, 1.5vw, 1.2rem); letter-spacing: -0.028em; }
h4 { letter-spacing: -0.02em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  color: rgba(244, 241, 230, 0.74);
  max-width: 62ch;
}

.accent {
  background: linear-gradient(100deg, var(--gold-100), var(--gold-300) 50%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.735rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

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

.section { padding: clamp(60px, 8vw, 112px) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 54px); }
.section-head .lead { margin-top: 16px; }

.section-head.between {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.section-head.between > div { max-width: 700px; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
  border: 0;
  margin: 0;
}

/* ---------------------------------------------------------------- 5. Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-100), var(--gold-300) 45%, var(--gold));
  color: var(--gold-ink);
  box-shadow: 0 14px 30px -14px rgba(201, 146, 46, 0.9);
}
.btn-primary:hover { box-shadow: 0 20px 40px -14px rgba(201, 146, 46, 1); }

/* зелёная кнопка — для подтверждающих действий */
.btn-green {
  background: linear-gradient(135deg, var(--brand-400), var(--brand));
  color: #fff;
  box-shadow: 0 14px 30px -14px rgba(111, 181, 34, 0.85);
}

.btn-ghost {
  background: var(--glass);
  border-color: var(--line-2);
  color: var(--cream);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--glass-2); border-color: rgba(228, 182, 92, 0.5); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-300), var(--gold));
  color: #241703;
  box-shadow: 0 14px 30px -14px rgba(201, 146, 46, 0.8);
}

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--gold-300);
  transition: gap 0.18s ease, color 0.18s ease;
}
.link-arrow:hover { gap: 15px; color: var(--brand-300); }
.link-arrow svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------------- 6. Шапка */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 26, 17, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.header.scrolled { background: rgba(7, 26, 17, 0.93); box-shadow: 0 12px 34px -22px #000; }

.header .wrap { display: flex; align-items: center; gap: 22px; }

/* Логотип — главный акцент шапки: светлая «пластина» с фирменным
   зелёным кантом и бликом, который проходит по ней при наведении. */
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(150deg, #fffefa, var(--cream) 55%, #e9e5d6);
  border-radius: 16px;
  padding: 11px 18px;
  flex: none;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 0 1px rgba(143, 208, 63, 0.35),
    0 0 0 5px rgba(82, 146, 10, 0.12),
    0 16px 34px -16px rgba(0, 0, 0, 0.95);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.logo:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(143, 208, 63, 0.6),
    0 0 0 6px rgba(82, 146, 10, 0.2),
    0 20px 40px -16px rgba(0, 0, 0, 0.95);
}
/* блик */
.logo::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.85) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.logo:hover::after { transform: translateX(120%); }

.logo img { height: 40px; width: auto; position: relative; z-index: 1; }
.logo-footer { padding: 16px 22px; border-radius: 18px; }
.logo-footer img { height: 62px; }

/* Крупный блок с полным логотипом — для страницы «О компании» */
.brand-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 3vw, 34px) clamp(26px, 4vw, 46px);
  border-radius: var(--r-xl);
  background: linear-gradient(150deg, #fffefa, var(--cream) 60%, #e6e2d2);
  box-shadow:
    0 0 0 1px rgba(143, 208, 63, 0.4),
    0 0 0 8px rgba(82, 146, 10, 0.12),
    0 30px 60px -28px rgba(0, 0, 0, 0.9);
}
.brand-plate img { width: min(420px, 100%); height: auto; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav a {
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  color: rgba(244, 241, 230, 0.78);
  transition: color 0.16s ease, background 0.16s ease;
}
.nav a:hover { color: #fff; background: var(--glass); }
.nav a.active { color: #fff; background: var(--glass-2); }

.header-tools { display: flex; align-items: center; gap: 10px; flex: none; }

.header-phone {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.93rem;
  white-space: nowrap;
  padding: 8px 4px;
  transition: color 0.16s ease;
}
.header-phone:hover { color: var(--brand-300); }

/* Переключатель языка */
.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
}
.lang button {
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 230, 0.6);
  transition: color 0.16s ease, background 0.16s ease;
}
.lang button:hover { color: #fff; }
.lang button.active { background: var(--brand); color: #fff; }

/* Кнопка заявки */
.req-btn { position: relative; }
.req-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #241703;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
  border: 2px solid var(--forest-900);
}
.req-count:empty, .req-count[data-empty='1'] { display: none; }

/* Бургер */
.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  align-items: center;
  justify-content: center;
  flex: none;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  position: relative;
  transition: background 0.2s ease;
}
.burger span::before, .burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.24s ease;
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded='true'] span { background: transparent; }
.burger[aria-expanded='true'] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное меню */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: auto;
  left: 0;
  z-index: 55;
  background: rgba(7, 26, 17, 0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 18px 0 26px;
  transform: translateY(-14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.mobile-nav.open { opacity: 1; transform: none; pointer-events: auto; }
.mobile-nav a {
  display: block;
  padding: 13px 4px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav .btn { margin-top: 18px; }

/* ------------------------------------------------------------------ 7. Hero */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(700px, 86vh);
  padding: clamp(44px, 6vw, 78px) 0 clamp(56px, 6vw, 84px);
  overflow: hidden;
}

/* Первый экран показывает общую подложку страницы как есть,
   добавляя только затемнение слева — чтобы читался заголовок. */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* затемнение нужно только под текстом слева — справа снимок открываем */
  background: linear-gradient(100deg, rgba(5, 20, 13, 0.9) 0%, rgba(5, 20, 13, 0.76) 28%,
                              rgba(6, 22, 14, 0.22) 56%, transparent 74%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }
/* колонка уже половины экрана — справа на фотографии торт, его не перекрываем */
.hero-copy { max-width: 600px; }

.hero h1 { margin-bottom: 22px; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.hero .lead { margin-bottom: 34px; max-width: 42ch; }
/* Плашка «всё в наличии»: главный коммерческий аргумент, поэтому золотая
   рамка, живая точка и дисплейный шрифт — её видно раньше кнопок */
.stock-banner {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 30px;
  padding: 14px 22px 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(228, 182, 92, 0.5);
  background: linear-gradient(120deg, rgba(201, 146, 46, 0.2), rgba(7, 26, 17, 0.55));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
  max-width: 100%;
}
.stock-dot {
  width: 11px;
  height: 11px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-300);
  box-shadow: 0 0 0 0 rgba(143, 208, 63, 0.65);
  animation: stock-pulse 2.4s ease-out infinite;
}
@keyframes stock-pulse {
  70% { box-shadow: 0 0 0 12px rgba(143, 208, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(143, 208, 63, 0); }
}
.stock-text { display: grid; gap: 3px; min-width: 0; }
.stock-text b {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  color: var(--gold-300);
  line-height: 1.15;
}
.stock-text em {
  font-style: normal;
  font-size: 0.87rem;
  color: rgba(244, 241, 230, 0.72);
}
@media (max-width: 560px) {
  .stock-banner { border-radius: 20px; padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) { .stock-dot { animation: none; } }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 28px;
  border-top: 1px solid var(--line-2);
  max-width: 560px;
}
.hero-stat span {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(244, 241, 230, 0.62);
  margin-top: 6px;
}

/* Знак-печать справа вверху. Лежит внутри .wrap, поэтому прижимается
   к правому краю колонки контента, а не к краю экрана. */
.hero-seal {
  position: absolute;
  top: -6px;
  right: 24px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 260px;
}
.hero-seal-mark {
  width: 62px;
  height: 62px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 182, 92, 0.55);
  box-shadow: inset 0 0 0 4px rgba(201, 146, 46, 0.14);
  color: var(--gold-300);
}
.hero-seal-mark svg { width: 26px; height: 26px; }
.hero-seal span {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 230, 0.9);
}

/* ------------------------------------------------------ 7a. Полоса преимуществ */
main > section.features {
  position: relative;
  padding: 22px 0;
  background: linear-gradient(180deg, rgba(28, 68, 44, 0.7), rgba(16, 47, 30, 0.84));
  -webkit-backdrop-filter: blur(4px) saturate(130%);
  backdrop-filter: blur(4px) saturate(130%);
  border-top: 1px solid rgba(143, 208, 63, 0.16);
  border-bottom: 1px solid rgba(143, 208, 63, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.features .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Карточка с «бегущей» рамкой: под ней вращается конический градиент,
   а сверху лежит заливка с отступом в 1px — видно только светящееся кольцо. */
.feature {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* --------------------------------------------------------------------------
   Перелив по контуру («border beam»)
   Под карточкой крутится конический градиент, а поверх него лежит заливка,
   отступающая на 1px, — от градиента остаётся только светящаяся рамка.
   Хосту нужны position: relative, isolation и overflow: hidden, иначе
   градиент вылезет за границы и перекроет соседей.
   -------------------------------------------------------------------------- */
.feature,
.counter-card,
.glass-card,
.mat-card,
.contact-card,
.review-card,
.fact,
.filters,
.search-panel,
.cta-band,
.prose-block,
.cat-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.feature::before,
.counter-card::before,
.glass-card::before,
.mat-card::before,
.contact-card::before,
.review-card::before,
.fact::before,
.filters::before,
.search-panel::before,
.cta-band::before,
.prose-block::before,
.cat-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -2;
  background: conic-gradient(
    from 0turn,
    rgba(255, 255, 255, 0.08) 0turn 0.6turn,
    rgba(228, 182, 92, 0.35) 0.72turn,
    var(--gold-300) 0.79turn,
    #fffaf0 0.83turn,
    var(--brand-300) 0.87turn,
    rgba(143, 208, 63, 0.3) 0.93turn,
    rgba(255, 255, 255, 0.08) 1turn
  );
  animation: border-beam 7s linear infinite;
}

/* внутренняя заливка — оставляет от градиента только рамку.
   .cat-card сюда не входит: заливка перекрыла бы фотографию, у неё роль
   заливки играет сам снимок, отодвинутый от края на 1px (см. .cat-card-img) */
.feature::after,
.counter-card::after,
.glass-card::after,
.mat-card::after,
.contact-card::after,
.review-card::after,
.fact::after,
.filters::after,
.search-panel::after,
.cta-band::after,
.prose-block::after {
  content: '';
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  left: 1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(20, 54, 34, 0.9), rgba(12, 38, 24, 0.94));
}

/* CTA-полоса светлее остальных карточек — сохраняем её собственный фон */
.cta-band::after {
  background:
    radial-gradient(170px at calc(100% - 110px) 100px, rgba(201, 146, 46, 0.24), transparent 68%),
    radial-gradient(700px 320px at 12% 0%, rgba(82, 146, 10, 0.4), transparent 70%),
    linear-gradient(140deg, var(--forest-700), var(--forest-800));
}

/* лучи расходятся по фазе, чтобы карточки не мигали в такт */
.feature:nth-child(2)::before,
.mat-card:nth-child(2)::before,
.contact-card:nth-child(2)::before,
.review-card:nth-child(2)::before,
.fact:nth-child(2)::before,
.cat-card:nth-child(2)::before,
.prose-block:nth-child(2)::before { animation-delay: -1.75s; }

.feature:nth-child(3)::before,
.mat-card:nth-child(3)::before,
.contact-card:nth-child(3)::before,
.review-card:nth-child(3)::before,
.fact:nth-child(3)::before,
.cat-card:nth-child(3)::before { animation-delay: -3.5s; }

.feature:nth-child(4)::before,
.mat-card:nth-child(4)::before,
.contact-card:nth-child(4)::before,
.review-card:nth-child(4)::before,
.fact:nth-child(4)::before,
.cat-card:nth-child(4)::before { animation-delay: -5.25s; }

.fact:nth-child(5)::before,
.cat-card:nth-child(5)::before,
.review-card:nth-child(5)::before { animation-delay: -0.9s; }
.fact:nth-child(6)::before,
.cat-card:nth-child(6)::before,
.review-card:nth-child(6)::before { animation-delay: -2.6s; }
.cat-card:nth-child(7)::before { animation-delay: -4.3s; }
.cat-card:nth-child(8)::before { animation-delay: -6s; }
.cat-card:nth-child(9)::before { animation-delay: -1.2s; }
.cat-card:nth-child(10)::before { animation-delay: -3s; }
.cat-card:nth-child(11)::before { animation-delay: -4.8s; }

/* transform, а не отдельное свойство rotate: последнее Safari понимает
   только с 14.1, а карточка центрируется тем же transform — поэтому
   в кадре повторяем и сдвиг, иначе градиент уедет из центра */
@keyframes border-beam {
  from { transform: translate(-50%, -50%) rotate(0turn); }
  to { transform: translate(-50%, -50%) rotate(1turn); }
}

.feature-icon {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 182, 92, 0.5);
  background: radial-gradient(circle at 50% 35%, rgba(201, 146, 46, 0.2), rgba(201, 146, 46, 0.04) 70%);
  color: var(--gold-300);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover .feature-icon {
  border-color: var(--gold-300);
  transform: translateY(-2px);
  box-shadow: 0 0 0 5px rgba(201, 146, 46, 0.1);
}
.feature-icon svg { width: 23px; height: 23px; }

.feature b {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.feature span { font-size: 0.82rem; line-height: 1.4; color: rgba(244, 241, 230, 0.62); }

/* ------------------------------------------------------------- 8. Категории */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
}

.cat-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3.1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--tile);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(228, 182, 92, 0.5);
  box-shadow: var(--shadow);
}

.cat-card-img { position: absolute; top: 1px; right: 1px; bottom: 1px; left: 1px; overflow: hidden; border-radius: inherit; }
.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.cat-card:hover .cat-card-img img { transform: scale(1.06); }
.cat-card-img::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(4, 16, 10, 0.55) 62%, rgba(4, 16, 10, 0.92) 100%);
}

.cat-card-body {
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 18px 17px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.cat-card-body > div { min-width: 0; }
.cat-card-body h3 { font-size: 1rem; line-height: 1.25; margin-bottom: 5px; }
.cat-card-count {
  font-size: 0.82rem;
  color: var(--gold-300);
  font-family: var(--font-head);
  font-weight: 700;
}

.cat-card-go {
  width: 38px;
  height: 38px;
  flex: none;
  margin-left: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cat-card-go svg { width: 16px; height: 16px; }
.cat-card:hover .cat-card-go {
  background: linear-gradient(135deg, var(--gold-100), var(--gold));
  border-color: transparent;
  color: var(--gold-ink);
  transform: translateX(3px);
}

/* --------------------------------------------------------- 9. Стеклокарточки */
.glass-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 20px;
}

.glass-card {
  padding: 30px 28px 32px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}
/* прежняя световая полоска сверху убрана — её заменил перелив по контуру */
.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 208, 63, 0.35);
  background: var(--glass-2);
}
.glass-card h3 { margin-bottom: 12px; }
.glass-card p { color: rgba(244, 241, 230, 0.68); font-size: 0.95rem; }

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: linear-gradient(145deg, rgba(111, 181, 34, 0.26), rgba(111, 181, 34, 0.06));
  border: 1px solid rgba(143, 208, 63, 0.3);
  color: var(--brand-300);
}
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge.gold {
  background: linear-gradient(145deg, rgba(201, 146, 46, 0.26), rgba(201, 146, 46, 0.06));
  border-color: rgba(228, 182, 92, 0.32);
  color: var(--gold-300);
}

/* -------------------------------------------------------------- 11. Материалы */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 18px; }

.mat-card {
  padding: 26px 24px 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.mat-card:hover { transform: translateY(-4px); border-color: rgba(143, 208, 63, 0.4); }
.mat-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-300);
  line-height: 1;
}
.mat-card em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin: 10px 0 14px;
  font-weight: 600;
}
.mat-card p { font-size: 0.9rem; color: rgba(244, 241, 230, 0.66); }

.mat-note {
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: var(--r);
  border: 1px dashed rgba(228, 182, 92, 0.34);
  background: rgba(201, 146, 46, 0.06);
  font-size: 0.9rem;
  color: rgba(244, 241, 230, 0.74);
}

/* ------------------------------------------------------------------ 12. Шаги */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 20px; counter-reset: step; }

.step { position: relative; padding-top: 30px; counter-increment: step; }
.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-2);
}
.step::after {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-300);
}
.step b {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--gold-300);
  display: block;
  margin-bottom: 12px;
}
.step b::before { content: '0' counter(step) ' — '; }
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { font-size: 0.9rem; color: rgba(244, 241, 230, 0.66); }

/* ------------------------------------------------------------------- 13. CTA */
.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(143, 208, 63, 0.26);
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(82, 146, 10, 0.4), transparent 70%),
    linear-gradient(140deg, var(--forest-700), var(--forest-800));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  flex-wrap: wrap;
}
/* золотое свечение справа вверху переехало в .cta-band::after выше —
   псевдоэлемент понадобился под внутреннюю заливку перелива */
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: 12px; }
.cta-band .lead { max-width: 54ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 14. Подвал */
.footer {
  margin-top: clamp(60px, 8vw, 104px);
  padding: clamp(46px, 6vw, 72px) 0 30px;
  border-top: 1px solid var(--line);
  background: rgba(4, 15, 10, 0.9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
  gap: 40px 30px;
  margin-bottom: 44px;
}
.footer h4 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 18px;
  font-weight: 700;
}
.footer p, .footer li { font-size: 0.9rem; color: rgba(244, 241, 230, 0.62); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { transition: color 0.16s ease; }
.footer ul a:hover { color: var(--brand-300); }
.footer-brand .logo { margin-bottom: 20px; }
.footer-bottom {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: rgba(244, 241, 230, 0.45);
}

/* ------------------------------------------------------- 15. Страница каталога */
.page-head {
  padding: clamp(38px, 5vw, 62px) 0 clamp(26px, 3vw, 40px);
  position: relative;
}
.page-head::after {
  content: '';
  position: absolute;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 20%, var(--line-2) 80%, transparent);
}

/* Хлебные крошки оформлены как надзаголовок: золотая чёрточка и капслок.
   Отдельная строка-надзаголовок под ними убрана — путь её заменяет. */
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 0.735rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 18px;
}
.crumbs::before {
  content: '';
  flex: none;
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.crumbs a { color: rgba(228, 182, 92, 0.66); transition: color 0.16s ease; }
.crumbs a:hover { color: var(--gold-100); }
/* разделители «/» — те span'ы, у которых нет своего текста из словаря */
.crumbs span:not([data-i18n]):not([data-cat-name]) { color: rgba(228, 182, 92, 0.32); }

/* Фильтры */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 30;
  margin: 26px 0 30px;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: rgba(9, 32, 20, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.filters-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.filters-row + .filters-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

.field {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease;
}
.field:focus-within { border-color: rgba(143, 208, 63, 0.5); }
.field svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.field input {
  border: 0;
  background: none;
  outline: none;
  width: 170px;
  font-size: 0.9rem;
}
.field input::placeholder { color: rgba(244, 241, 230, 0.35); }

select.field {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b8a6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 15px;
  font-size: 0.9rem;
  cursor: pointer;
}
select.field option { background: var(--forest-800); color: var(--cream); }

.filter-label {
  font-family: var(--font-head);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(244, 241, 230, 0.42);
  flex: none;
}

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: rgba(244, 241, 230, 0.75);
  transition: all 0.16s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--line-2); color: #fff; }
.chip.active {
  background: linear-gradient(135deg, var(--gold-100), var(--gold-300) 50%, var(--gold));
  border-color: transparent;
  color: var(--gold-ink);
  font-weight: 700;
}

.result-count {
  font-family: var(--font-head);
  font-size: 0.86rem;
  color: rgba(244, 241, 230, 0.55);
  margin-left: auto;
  white-space: nowrap;
}
.result-count b { color: var(--gold-300); }

/* Сетка товаров */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(204px, 1fr));
  gap: 16px;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  overflow: hidden;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 208, 63, 0.45);
  box-shadow: var(--shadow);
}

.product-open {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
}

/* Фотографии производителя квадратные и сняты на тёмном фоне —
   contain показывает товар целиком, а фон сливается с плашкой. */
.product-photo {
  display: block;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--tile);
  overflow: hidden;
}
.product-photo img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.product-card:hover .product-photo img { transform: scale(1.05); }

.product-body { padding: 13px 14px 4px; display: flex; flex-direction: column; gap: 7px; flex: 1; }

.product-code {
  display: block;
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.1;
}

.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.82rem;
  line-height: 1.35;
  color: rgba(244, 241, 230, 0.62);
  margin-top: -2px;
}

.product-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: rgba(244, 241, 230, 0.55);
}
.tag { display: inline-block; }

.tag {
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(143, 208, 63, 0.14);
  border: 1px solid rgba(143, 208, 63, 0.24);
  color: var(--brand-300);
  white-space: nowrap;
}
.tag.gold {
  background: rgba(201, 146, 46, 0.14);
  border-color: rgba(228, 182, 92, 0.26);
  color: var(--gold-300);
}
.tag.plain {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
  color: rgba(244, 241, 230, 0.7);
}

.product-lines { font-size: 0.78rem; color: rgba(244, 241, 230, 0.5); display: grid; gap: 3px; margin-top: auto; padding-top: 8px; }
.product-lines > span { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; white-space: nowrap; }
.product-lines > span > span { flex: none; }
.product-lines i {
  font-style: normal;
  color: rgba(244, 241, 230, 0.88);
  font-weight: 600;
  text-align: right;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-add {
  margin: 0 14px 14px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.16s ease;
}
.product-add:hover { background: var(--brand); border-color: transparent; color: #fff; }
.product-add.done { background: rgba(143, 208, 63, 0.18); border-color: rgba(143, 208, 63, 0.45); color: var(--brand-300); }
.product-add svg { width: 14px; height: 14px; }

.empty-state {
  padding: 70px 20px;
  text-align: center;
  color: rgba(244, 241, 230, 0.55);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
}

/* --------------------------------------------------------- 16. Модалка товара */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: grid;
  /* start + auto-поля: короткое окно встаёт по центру, высокое — прижимается
     к верху и не обрезается прокруткой, как это бывает при place-items: center */
  align-items: start;
  justify-items: center;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(3, 12, 8, 0.82); backdrop-filter: blur(6px); }

.modal-box {
  position: relative;
  width: min(1120px, 100%);
  margin-block: auto;
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, #12301f, #0a2015);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(0.985);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal.open .modal-box { transform: none; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--cream);
  transition: background 0.16s ease, transform 0.16s ease;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.7); transform: rotate(90deg); }
.modal-close svg { width: 17px; height: 17px; }

.modal-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); }

/* фон повторяет студийную подложку фотографий, чтобы снимок не «висел в рамке» */
.modal-photo {
  background: radial-gradient(circle at 30% 22%, #4d4d4d, #242424 72%);
  display: grid;
  place-items: center;
  padding: 30px;
  min-height: 340px;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
}
.modal-photo img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
}

.modal-info { padding: clamp(22px, 2.4vw, 30px); }
.modal-info .eyebrow { margin-bottom: 10px; }
.modal-info h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-bottom: 6px; }
.modal-name {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--brand-300);
  margin-bottom: 16px;
}
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 0.9rem; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th {
  text-align: left;
  font-weight: 500;
  color: rgba(244, 241, 230, 0.55);
  padding: 7px 12px 7px 0;
  width: 46%;
}
.spec-table td {
  text-align: right;
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  padding: 7px 0;
}

.modal-desc {
  padding: 14px 16px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  color: rgba(244, 241, 230, 0.72);
  margin-bottom: 18px;
}

.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

.qty {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  flex: none;
}
.qty button { width: 40px; height: 100%; font-size: 1.15rem; color: var(--cream); transition: background 0.16s ease; }
.qty button:hover { background: rgba(255, 255, 255, 0.09); }
.qty input {
  width: 52px;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* --------------------------------------------------------- 17. Панель заявки */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  pointer-events: none;
}
.drawer.open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(3, 12, 8, 0.75);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer.open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(480px, 100%);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #102c1d, #071a11);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.open .drawer-panel { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-head h3 { font-size: 1.28rem; }
.drawer-head .result-count { margin-left: 0; }
.drawer-head .modal-close { position: static; margin-left: auto; }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.drawer-foot { flex: none; padding: 18px 24px 24px; border-top: 1px solid var(--line); }
.drawer-foot .btn + .btn { margin-top: 10px; }

.req-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 13px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.req-item:last-child { border-bottom: 0; }
.req-item-img { border-radius: 9px; background: var(--tile); overflow: hidden; aspect-ratio: 1/1; }
.req-item-img img { width: 100%; height: 100%; object-fit: contain; }
.req-item b { font-family: var(--font-head); font-size: 1rem; display: block; }
.req-item small { font-size: 0.78rem; color: rgba(244, 241, 230, 0.5); }
.req-item .qty { height: 36px; }
.req-item .qty button { width: 30px; font-size: 1rem; }
.req-item .qty input { width: 42px; font-size: 0.88rem; }
.req-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.req-remove { font-size: 0.75rem; color: rgba(244, 241, 230, 0.42); transition: color 0.16s ease; }
.req-remove:hover { color: #e8846b; }

/* Формы */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.input-wrap { display: flex; flex-direction: column; gap: 7px; }
.input-wrap label {
  font-family: var(--font-head);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 230, 0.5);
}
.input-wrap label span { color: var(--gold-300); }

.input {
  width: 100%;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  outline: none;
  font-size: 0.93rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.input:focus { border-color: rgba(143, 208, 63, 0.55); background: rgba(255, 255, 255, 0.075); }
.input::placeholder { color: rgba(244, 241, 230, 0.32); }
textarea.input { min-height: 104px; resize: vertical; }
.input.invalid { border-color: #d97b62; }

.form-hint { font-size: 0.8rem; color: rgba(244, 241, 230, 0.45); margin-top: 12px; line-height: 1.5; }

/* Тост */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 120;
  transform: translate(-50%, 24px);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(12, 36, 24, 0.96);
  border: 1px solid rgba(143, 208, 63, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------- 18. О компании / контакты */
.prose-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; }
.prose-block { padding: 26px 24px; border-radius: var(--r-lg); }
.prose-block h3 { margin-bottom: 14px; }
.prose-block p { color: rgba(244, 241, 230, 0.72); font-size: 0.97rem; }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.fact { padding: 26px 22px; background: rgba(9, 32, 20, 0.9); }
.fact b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--brand-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact span { display: block; font-size: 0.8rem; color: rgba(244, 241, 230, 0.55); margin-top: 8px; }

.about-photo {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-2);
  position: relative;
  min-height: 300px;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.about-photo::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(160deg, rgba(7, 26, 17, 0.2), rgba(7, 26, 17, 0.72));
}
/* для готовых макетов с текстом затемнение не нужно — оно съедает надписи */
.about-photo.plain::after { display: none; }

/* вертикальное фото рядом с текстом: тянется на всю высоту колонки,
   кадр смещён вниз, чтобы упаковка не обрезалась при широком экране */
/* растягивается на всю высоту строки сетки (align-items: stretch по умолчанию),
   min-height — только нижняя граница для узкого экрана, где колонки складываются */
.about-photo-tall { align-self: stretch; min-height: 420px; }
.about-photo-tall img { object-position: 50% 58%; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }

.contact-card {
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.contact-card:hover { border-color: rgba(143, 208, 63, 0.4); transform: translateY(-3px); }
.contact-card h4 {
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-300);
  margin: 0 0 12px;
  font-weight: 700;
}
.contact-card .value {
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  display: block;
  color: #fff;
  transition: color 0.16s ease;
}
a.value:hover { color: var(--brand-300); }
.contact-card .sub { font-size: 0.82rem; color: rgba(244, 241, 230, 0.5); margin-top: 6px; }

.map-frame {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line-2);
  height: 380px;
  background: var(--forest-800);
}
/* OSM отдаёт светлую карту — приводим её к тёмной теме сайта */
.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: invert(1) hue-rotate(180deg) saturate(0.55) brightness(0.92) contrast(0.95);
}

.draft-mark {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(201, 146, 46, 0.16);
  border: 1px solid rgba(228, 182, 92, 0.34);
  color: var(--gold-300);
  vertical-align: middle;
  cursor: help;
}

/* ------------------------------------------------- 18a. Подбор упаковки */
.search-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.search-side { position: sticky; top: calc(var(--header-h) + 18px); }

.search-panel {
  border-radius: var(--r-lg);
  background: rgba(9, 32, 20, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px 20px 22px;
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.search-panel-head h2 { font-size: 1.15rem; }

.active-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #241703;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  margin-left: auto;
}

.filter-block { padding-top: 18px; }
.filter-block .filter-label { display: block; margin-bottom: 10px; }

.range-row { display: flex; gap: 10px; }
.range-row .field { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
.range-row .field > span {
  font-size: 0.76rem;
  color: rgba(244, 241, 230, 0.42);
  flex: none;
}
.range-row .field input { width: 100%; min-width: 0; }
.field input[type='number'] { -moz-appearance: textfield; }
.field input[type='number']::-webkit-outer-spin-button,
.field input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.field.wide { width: 100%; }
.field.wide input { width: 100%; }

.filter-actions { padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line); }
.filter-actions .btn + .btn { margin-top: 10px; }

.search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-bar .result-count { margin-left: 0; font-size: 0.95rem; }
.search-bar .result-count b { font-size: 1.05rem; }

.search-more { display: flex; justify-content: center; margin-top: 28px; }

@media (max-width: 980px) {
  .search-layout { grid-template-columns: 1fr; }
  .search-side { position: static; }
  .search-panel { max-height: none; overflow: visible; }
}

/* ------------------------------------------------ 18b. Верхняя полоса и соцсети */
.topbar {
  background: rgba(4, 15, 10, 0.92);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 44px;
  flex-wrap: wrap;
}

.topbar-follow { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-follow > b {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-300);
  white-space: nowrap;
}

.social-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(244, 241, 230, 0.8);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.social-link svg { width: 16px; height: 16px; }
.social-link:hover {
  background: linear-gradient(135deg, var(--gold-100), var(--gold));
  border-color: transparent;
  color: var(--gold-ink);
  transform: translateY(-2px);
}
.social-link.is-empty { opacity: 0.4; cursor: default; }
.social-link.is-empty:hover { transform: none; background: rgba(255, 255, 255, 0.05); color: rgba(244, 241, 230, 0.8); border-color: var(--line-2); }

/* широкий вариант — в подвале */
[data-social='wide'] { gap: 10px; }
[data-social='wide'] .social-link {
  width: auto;
  height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-follow { margin-top: 22px; }
.footer-follow h4 { margin-bottom: 14px; }

/* -------------------------------------------------- 18c. «Сладкие идеи» */
.sweet {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--forest-800), var(--forest-700) 55%, #14311f);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 3vw, 44px);
  padding: clamp(30px, 4vw, 46px);
}
.sweet h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); margin-bottom: 14px; }
.sweet p { color: rgba(244, 241, 230, 0.7); font-size: 0.95rem; margin-bottom: 24px; }

.sweet-uses {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  text-align: center;
}
.sweet-use span {
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(244, 241, 230, 0.68);
}
.sweet-use i {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(228, 182, 92, 0.4);
  color: var(--gold-300);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.sweet-use:hover i { border-color: var(--gold-300); transform: translateY(-3px); }
.sweet-use i svg { width: 22px; height: 22px; }

.sweet-photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  /* пропорции ровно по снимку — вертикальный постер не обрезается */
  aspect-ratio: 900 / 1125;
  border: 1px solid var(--line);
}
/* готовый макет с собственной надписью — затемнять его нечем и незачем */
.sweet-photo.plain::after { display: none; }
.sweet-photo img { width: 100%; height: 100%; object-fit: cover; }
.sweet-photo::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(160deg, rgba(7, 26, 17, 0.1), rgba(7, 26, 17, 0.6));
}
.sweet-photo b {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 1;
  max-width: 70%;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--gold-100);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* -------------------------------------------------------- 18d. Сравнение */
.product-card { position: relative; }

.product-compare {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 13, 0.6);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(244, 241, 230, 0.85);
  transition: all 0.18s ease;
}
.product-compare svg { width: 15px; height: 15px; }
.product-compare:hover { background: rgba(6, 20, 13, 0.9); color: #fff; transform: scale(1.06); }
.product-compare.active {
  background: linear-gradient(135deg, var(--gold-100), var(--gold));
  border-color: transparent;
  color: var(--gold-ink);
}

.btn[data-cmp-code] svg { width: 16px; height: 16px; }
.btn[data-cmp-code].active {
  background: linear-gradient(135deg, var(--gold-100), var(--gold));
  border-color: transparent;
  color: var(--gold-ink);
}

/* полоска выбранного для сравнения */
.compare-bar {
  position: fixed;
  left: var(--float-x);
  bottom: 22px;
  z-index: 49;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.compare-bar.show { transform: none; opacity: 1; }

.compare-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border-radius: 999px;
  background: rgba(9, 32, 20, 0.94);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}
.compare-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: rgba(244, 241, 230, 0.6);
}
.compare-bar-label svg { width: 17px; height: 17px; color: var(--gold-300); }
.compare-bar-label b { color: #fff; }

.compare-thumbs { display: flex; gap: 7px; }
.compare-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tile);
  border: 1px solid var(--line);
  padding: 0;
}
.compare-thumb img { width: 100%; height: 100%; object-fit: contain; }
.compare-thumb.empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}
.compare-thumb-x {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 13, 0.8);
  color: #fff;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.compare-thumb-x svg { width: 14px; height: 14px; }
.compare-thumb:hover .compare-thumb-x { opacity: 1; }

.compare-bar-clear {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(244, 241, 230, 0.45);
  transition: color 0.16s ease, background 0.16s ease;
}
.compare-bar-clear svg { width: 14px; height: 14px; }
.compare-bar-clear:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* таблица сравнения */
.cmp-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.cmp-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(244, 241, 230, 0.75);
  cursor: pointer;
}
.cmp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cmp-switch i {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line-2);
  position: relative;
  transition: background 0.2s ease;
}
.cmp-switch i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cream);
  transition: transform 0.2s ease, background 0.2s ease;
}
.cmp-switch input:checked + i { background: linear-gradient(135deg, var(--gold-300), var(--gold)); border-color: transparent; }
.cmp-switch input:checked + i::after { transform: translateX(18px); background: var(--gold-ink); }

.cmp-scroll { overflow-x: auto; padding-bottom: 8px; }

.cmp-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
}
.cmp-table th, .cmp-table td { padding: 14px 16px; text-align: left; vertical-align: top; }
.cmp-table tbody tr { border-radius: var(--r); }
.cmp-table tbody tr:nth-child(odd) td,
.cmp-table tbody tr:nth-child(odd) th { background: rgba(255, 255, 255, 0.028); }
.cmp-table tbody th {
  font-weight: 500;
  font-size: 0.86rem;
  color: rgba(244, 241, 230, 0.55);
  white-space: nowrap;
}
.cmp-table tbody td {
  font-family: var(--font-head);
  font-weight: 700;
  color: #fff;
  font-size: 0.92rem;
}
.cmp-dash { color: rgba(244, 241, 230, 0.3); font-weight: 400; }
.cmp-table tr.cmp-diff td { color: var(--gold-100); }

/* первая колонка с подписями остаётся видимой при прокрутке */
.cmp-table thead th:first-child,
.cmp-table tbody th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #0a2416;
}
.cmp-corner { width: 180px; min-width: 150px; }

.cmp-head {
  width: 200px;
  min-width: 180px;
  position: relative;
  padding-top: 18px !important;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cmp-photo {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--tile);
  margin-bottom: 12px;
}
.cmp-photo img { width: 100%; height: 100%; object-fit: contain; }
.cmp-code {
  display: block;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
}
.cmp-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(244, 241, 230, 0.6);
  margin: 3px 0 12px;
  min-height: 2.2em;
}
.cmp-drop {
  position: absolute;
  top: 24px;
  right: 22px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(6, 20, 13, 0.75);
  border: 1px solid var(--line-2);
  color: rgba(244, 241, 230, 0.8);
  transition: background 0.16s ease, color 0.16s ease;
}
.cmp-drop svg { width: 13px; height: 13px; }
.cmp-drop:hover { background: #7d3b2c; color: #fff; }

.cmp-slot a {
  display: grid;
  place-items: center;
  gap: 10px;
  height: 100%;
  min-height: 240px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r);
  color: rgba(244, 241, 230, 0.45);
  font-size: 0.84rem;
  text-align: center;
  padding: 16px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cmp-slot a:hover { border-color: rgba(228, 182, 92, 0.5); color: var(--gold-300); }
.cmp-slot-plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
}
.cmp-slot-plus svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------- 18e. Отзывы */
/* Бегущая строка: две одинаковые дорожки едут влево на свою ширину,
   за счёт этого лента выглядит бесконечной. */
.marquee {
  --mq-gap: 18px;
  --mq-duration: 35s;
  display: flex;
  gap: var(--mq-gap);
  overflow: hidden;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.marquee-track {
  display: flex;
  flex: none;
  gap: var(--mq-gap);
  align-items: stretch;
  min-width: max-content;
  animation: marquee var(--mq-duration) linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-100% - var(--mq-gap))); }
}

.review-card {
  width: 340px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  /* многослойные внутренние тени дают эффект толстого стекла */
  box-shadow:
    inset 3px 3px 0.5px -3.5px rgba(255, 255, 255, 0.5),
    inset -3px -3px 0.5px -3.5px rgba(255, 255, 255, 0.5),
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.35),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.25),
    inset 0 0 6px 6px rgba(255, 255, 255, 0.05),
    0 18px 40px -22px rgba(0, 0, 0, 0.8);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.review-card:hover { border-color: rgba(228, 182, 92, 0.45); transform: translateY(-3px); }

.review-head { display: flex; align-items: center; gap: 13px; }

.review-avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  color: var(--cream);
  background: linear-gradient(140deg, var(--brand), var(--forest-500));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.review-head b { display: block; font-family: var(--font-head); font-size: 0.98rem; }
.review-head span { display: block; font-size: 0.81rem; color: rgba(244, 241, 230, 0.55); }

.review-card p {
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(244, 241, 230, 0.78);
  margin: 0;
  flex: 1;
}

.review-stars { display: flex; gap: 3px; }
.review-stars svg { width: 16px; height: 16px; fill: var(--gold-300); color: var(--gold-300); }

/* вторая лента едет в обратную сторону */
.marquee.reverse .marquee-track { animation-direction: reverse; }

/* --- Наши клиенты --- */
.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  height: 72px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(244, 241, 230, 0.85);
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
/* когда лентой управляет JS, CSS-анимация выключается */
.marquee.js-marquee .marquee-track { animation: none; }

/* Логотип клиента — на светлой плашке: так виден любой логотип,
   и тёмный, и цветной. Клик по картинке ведёт на сайт клиента. */
.client-chip.has-logo {
  height: 84px;
  padding: 0 26px;
  background: rgba(244, 241, 230, 0.94);
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(143, 208, 63, 0.25), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}
/* белый знак на кремовой плашке пропал бы — такому бренду даём тёмную */
.client-chip.has-logo.on-dark {
  background: rgba(9, 32, 20, 0.92);
  box-shadow: 0 0 0 1px rgba(228, 182, 92, 0.32), 0 14px 30px -18px rgba(0, 0, 0, 0.9);
}
.client-chip.has-logo img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: transform 0.2s ease;
}
a.client-chip.has-logo:hover {
  background: #fff;
  box-shadow: 0 0 0 1px rgba(228, 182, 92, 0.6), 0 18px 36px -18px rgba(0, 0, 0, 0.9);
}
/* у тёмной плашки при наведении фон тоже остаётся тёмным — иначе белый
   знак Dulcinella пропадал бы на побелевшей плашке */
a.client-chip.has-logo.on-dark:hover {
  background: rgba(14, 46, 29, 0.96);
  box-shadow: 0 0 0 1px rgba(228, 182, 92, 0.6), 0 18px 36px -18px rgba(0, 0, 0, 0.9);
}
a.client-chip.has-logo:hover img { transform: scale(1.04); }
.client-chip .client-go { width: 15px; height: 15px; color: var(--gold-300); opacity: 0.65; transition: opacity 0.2s ease; }

a.client-chip:hover {
  border-color: rgba(228, 182, 92, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-2px);
}
a.client-chip:hover .client-go { opacity: 1; }

/* пока в site-config.js не указан адрес сайта — название просто не кликается */
.client-chip.is-empty { opacity: 0.6; }

@media (max-width: 560px) {
  .review-card { width: 280px; padding: 20px 20px 22px; }
  .marquee { --mq-duration: 23s; }
  .client-chip { height: 60px; padding: 0 20px; font-size: 0.9rem; }
  .client-chip.has-logo { height: 68px; padding: 0 20px; }
  .client-chip.has-logo img { height: 38px; max-width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ------------------------------------------------------------ 18f. Счётчик */
.counter-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(30px, 4vw, 48px) clamp(20px, 4vw, 48px);
  text-align: center;
}
.counter-card::before { animation-duration: 9s; }

.counter-value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  /* одинаковая ширина цифр — число не «прыгает» при обновлении */
  font-variant-numeric: tabular-nums;
  background: linear-gradient(110deg, #fff, var(--gold-100) 45%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* короткая вспышка в момент обновления цифры */
.counter-value.tick { animation: counter-tick 0.4s ease; }
@keyframes counter-tick {
  0% { filter: brightness(1); }
  25% { filter: brightness(1.5); }
  100% { filter: brightness(1); }
}

.counter-label {
  display: block;
  margin-top: 12px;
  font-family: var(--font-head);
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: rgba(244, 241, 230, 0.9);
}

.counter-card .eyebrow { margin-bottom: 14px; }

/* ------------------------------------------------- 18g. Отправка форм */
/* поле-ловушка: человек его не видит, робот заполняет */
.pot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.form-done { text-align: center; padding: 26px 10px; }
.form-done-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand-300);
  border: 1px solid rgba(143, 208, 63, 0.45);
  background: radial-gradient(circle at 50% 35%, rgba(111, 181, 34, 0.22), transparent 70%);
}
.form-done-mark svg { width: 26px; height: 26px; }
.form-done b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.form-done p { color: rgba(244, 241, 230, 0.66); font-size: 0.93rem; max-width: 34ch; margin-inline: auto; }

/* ---------------------------------------------------------- 19. Появление */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- 20. Адаптив */
@media (max-width: 1180px) {
  .hero-seal { display: none; }
  .sweet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sweet-photo { grid-column: 1 / -1; aspect-ratio: 16 / 6; }
}

@media (max-width: 1000px) {
  .features .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sweet { grid-template-columns: 1fr; }
  .sweet-uses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  /* width обязателен: у блока только абсолютно спозиционированные дети,
     и с одними auto-полями grid-элемент сжался бы до нуля */
  .hero-visual { width: 100%; max-width: 460px; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  .modal-photo { border-radius: var(--r-xl) var(--r-xl) 0 0; min-height: 260px; }
  .modal-photo img { max-width: 220px; }
}

/* Шапка перестраивается раньше остального: логотип крупный,
   пунктов меню пять — на средних экранах им уже тесно. */
@media (max-width: 1180px) {
  .header-phone { display: none; }
}

@media (max-width: 1040px) {
  .nav { display: none; }
  .lang { display: none; }
  .burger { display: flex; }
  .header .wrap { gap: 12px; }
  .mobile-nav .lang { display: flex; width: max-content; margin-top: 18px; }
}

@media (max-width: 860px) {
  :root { --header-h: 78px; }
  .logo { padding: 9px 14px; border-radius: 14px; }
  .logo img { height: 32px; }
  .logo-footer { padding: 14px 18px; }
  .logo-footer img { height: 48px; }
  .hero-stats { grid-template-columns: 1fr; gap: 14px; text-align: left; }
  .hero-stat { display: flex; align-items: baseline; gap: 12px; }
  .hero-stat span { margin-top: 0; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .filters { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
}

@media (max-width: 760px) {
  .topbar-follow { margin-inline: auto; }
  .hero { min-height: 0; }
  /* на узком экране текст идёт поверх фотографии — затемняем сильнее */
  .hero::after {
    background: linear-gradient(180deg, rgba(5, 20, 13, 0.7), rgba(5, 20, 13, 0.86) 45%, rgba(5, 20, 13, 0.92));
  }
  .compare-thumbs { display: none; }
  .compare-bar { left: 16px; bottom: 16px; }
  .compare-bar-inner { padding: 8px 10px 8px 14px; }
  .cmp-corner { width: 130px; min-width: 120px; }
  .cmp-head { width: 170px; min-width: 160px; }
  [data-social='wide'] .social-link span { display: none; }
  [data-social='wide'] .social-link { width: 40px; padding: 0; justify-content: center; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  /* на узком экране в верхней полосе остаются только иконки, помельче */
  .topbar-follow > b { display: none; }
  .topbar .wrap { justify-content: center; }
  .topbar-follow { gap: 8px; }
  .topbar .social-row { gap: 6px; }
  .topbar .social-link { width: 30px; height: 30px; }
  .topbar .social-link svg { width: 14px; height: 14px; }
  .features .wrap { grid-template-columns: 1fr; }
  .sweet-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .glass-card { padding: 24px 20px 26px; }
  .drawer-panel { width: 100%; }
  .req-item { grid-template-columns: 50px 1fr; }
  .req-item-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .modal { padding: 0; }
  /* высоту не задаём: карточка растёт по содержимому, а прокручивается
     подложка целиком — внутренней полосы прокрутки больше нет */
  .modal-box { border-radius: 0; }
  .modal-photo { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* «бегущая» рамка превращается в обычную, чтобы не застыть на ярком пятне */
  .feature::before, .counter-card::before, .glass-card::before, .mat-card::before,
  .contact-card::before, .review-card::before, .fact::before, .filters::before,
  .search-panel::before, .cta-band::before, .prose-block::before,
  .cat-card::before { background: rgba(255, 255, 255, 0.12); animation: none; }
}

/* --------------------------------------------------------------------------
   Телефоны: правки, которые видны только на тачскрине
   -------------------------------------------------------------------------- */

/* iOS Safari сам увеличивает страницу, когда фокус попадает в поле с кеглем
   меньше 16px, и обратно уже не отъезжает. Поэтому на узких экранах
   поля ввода ровно 16px — вёрстка от этого не меняется. */
@media (max-width: 860px) {
  .input, .qty input { font-size: 16px; }
}

/* Кнопки под палец: 34px и меньше — мимо таких промахиваешься.
   Увеличиваем только там, где нет мыши, чтобы не раздувать вид на десктопе. */
@media (hover: none) and (pointer: coarse) {
  .social-link { width: 42px; height: 42px; }
  .social-link svg { width: 19px; height: 19px; }
  /* в подвале кнопки самые крупные — там их удобно нажимать */
  [data-social='wide'] .social-link { width: 44px; height: 44px; }
  /* в верхней полосе шесть иконок в ряд, поэтому компромисс: не 44, но и
     не 30 — иначе полоса переносится на три строки и съедает первый экран */
  .topbar .social-link { width: 38px; height: 38px; }
  .topbar .social-link svg { width: 17px; height: 17px; }
  .lang button { padding: 10px 14px; font-size: 0.78rem; }
  .crumbs a { padding: 4px 0; }
  /* крестик у панели сравнения — рядом с кнопкой «Сравнить», промахнуться легко */
  .compare-bar-clear { width: 38px; height: 38px; }
}

/* приписка под значением в таблице характеристик (цвет дна, оговорки) */
.spec-note {
  display: block;
  margin-top: 3px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(244, 241, 230, 0.5);
}

/* --------------------------------------------------------------------------
   Увеличение фотографии товара
   -------------------------------------------------------------------------- */

/* фото в карточке стало кнопкой — снимаем оформление кнопки по умолчанию */
button.modal-photo {
  border: 0;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  position: relative;
  width: 100%;
}
.modal-photo-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 32, 21, 0.72);
  border: 1px solid rgba(244, 241, 230, 0.22);
  color: var(--cream);
  opacity: 0.75;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.modal-photo-hint svg { width: 18px; height: 18px; }
button.modal-photo:hover .modal-photo-hint,
button.modal-photo:focus-visible .modal-photo-hint { opacity: 1; transform: scale(1.06); }

.photo-zoom {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 120;               /* выше карточки товара */
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 12, 8, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity 0.2s ease;
}
.photo-zoom.open { opacity: 1; pointer-events: auto; }
.photo-zoom img {
  max-width: min(100%, 1100px);
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  cursor: default;
  transform: scale(0.97);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.photo-zoom.open img { transform: scale(1); }
.photo-zoom-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  background: rgba(10, 32, 21, 0.9);
  color: var(--cream);
  cursor: pointer;
}
.photo-zoom-close svg { width: 20px; height: 20px; }
.photo-zoom-close:hover { border-color: rgba(228, 182, 92, 0.6); }
@media (max-width: 560px) {
  .photo-zoom { padding: 16px; }
  .photo-zoom-close { top: 12px; right: 12px; }
}

/* ==========================================================================
   Safari до 15-й версии (iOS 14 и старше) не знает aspect-ratio.
   Без запасного варианта блоки с пропорциями схлопываются в нулевую высоту,
   и фотографии товаров просто исчезают. Подменяем классическим приёмом:
   height: 0 + процентный padding, картинка внутри — абсолютом.
   Современные браузеры сюда не заходят вообще.
   ========================================================================== */
@supports not (aspect-ratio: 1 / 1) {

  /* квадратные плитки: 100% padding от ширины = квадрат */
  .product-photo,
  .cmp-photo,
  .req-item-img { height: 0; padding-bottom: 100%; position: relative; }
  .product-photo img,
  .cmp-photo img,
  .req-item-img img { position: absolute; top: 0; left: 0; }

  /* плитка категории — 4 / 3.1 даёт 77.5% */
  .cat-card { height: 0; padding-bottom: 77.5%; }
  .cat-card-img { position: absolute; }
  .cat-card-body { position: absolute; left: 0; right: 0; bottom: 0; }

  /* вертикальный постер 900 / 1125 = 125% */
  .sweet-photo { height: 0; padding-bottom: 125%; }
  .sweet-photo img { position: absolute; top: 0; left: 0; }

  /* квадрат под переливом рамки задаём через ту же долю от ширины блока */
  .feature::before, .counter-card::before, .glass-card::before, .mat-card::before,
  .contact-card::before, .review-card::before, .fact::before, .filters::before,
  .search-panel::before, .cta-band::before, .prose-block::before,
  .cat-card::before { height: 0; padding-bottom: 190%; }

  @media (max-width: 1080px) {
    /* на узком экране постер становится широким: 16 / 6 = 37.5% */
    .sweet-photo { padding-bottom: 37.5%; }
  }
}

/* --- Плитки категорий на узком экране --- */
/* На телефоне карточка узкая: длинное название поверх фотографии не читалось
   и рвалось посреди слова, а верхние строки уходили под край. Разворачиваем
   карточку в столбик — сначала надпись на сплошном фоне, под ней снимок. */
@media (max-width: 700px) {
  .cat-card {
    aspect-ratio: auto;
    height: auto;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  /* заливка под текстом: иначе сквозь надпись просвечивает перелив рамки */
  .cat-card::after {
    content: '';
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    left: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(20, 54, 34, 0.96), rgba(12, 38, 24, 0.98));
  }
  .cat-card-body {
    order: -1;                 /* надпись выше снимка */
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    /* блоком, а не флексом: стрелка уходит в угол и не отнимает
       у заголовка 40 px ширины — из-за этого рвались слова */
    display: block;
    padding: 13px 14px 11px;
  }
  .cat-card h3 {
    /* 0.8rem подобран под самое длинное слово каталога — «нераздельными»:
       при большем кегле оно не помещается в колонку и рвётся посередине */
    font-size: 0.8rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    /* «Универсальные» и «нераздельными» шире колонки. Перенос по слогам
       со знаком переноса читается нормально, в отличие от разрыва
       посреди слова. Язык берётся из атрибута lang у <html>. */
    -webkit-hyphens: auto;
    hyphens: auto;
  }
  .cat-card-body { padding-left: 12px; padding-right: 12px; }
  .cat-card-count { display: block; padding-right: 38px; }
  .cat-card-go { position: absolute; right: 12px; bottom: 9px; }
  .cat-card-img {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    height: 128px;
    margin: 0 1px 1px;
    border-radius: 0 0 19px 19px;
    /* фон тот же, что запечён в самих снимках, — поля по бокам не видны */
    background: var(--tile);
  }
  /* cover обрезал квадратную фотографию сверху и снизу: у круглых
     контейнеров пропадали края. contain показывает товар целиком. */
  .cat-card-img img { object-fit: contain; }
  /* затемнение внизу фотографии было нужно только под надпись */
  .cat-card-img::after { display: none; }
}
/* --- конец плиток категорий --- */

/* === НАЧАЛО: запасные отступы вместо flex-gap (создано скриптом) === */
/* Класс .no-flexgap ставит js/app.js, если браузер не умеет gap внутри
   flex (Safari до 14.5). Современные браузеры этих правил не видят. */
.no-flexgap .eyebrow > * + * { margin-left: 12px; }
.no-flexgap .section-head.between > * { margin-right: 32px; margin-bottom: 32px; }
.no-flexgap .section-head.between > *:last-child { margin-right: 0; }
.no-flexgap .btn > * + * { margin-left: 10px; }
.no-flexgap .link-arrow > * + * { margin-left: 9px; }
.no-flexgap .header .wrap > * + * { margin-left: 22px; }
.no-flexgap .nav > * + * { margin-left: 4px; }
.no-flexgap .header-tools > * + * { margin-left: 10px; }
.no-flexgap .lang > * + * { margin-left: 2px; }
.no-flexgap .stock-banner > * + * { margin-left: 14px; }
.no-flexgap .hero-cta > * { margin-right: 14px; margin-bottom: 14px; }
.no-flexgap .hero-cta > *:last-child { margin-right: 0; }
.no-flexgap .hero-seal > * + * { margin-left: 16px; }
.no-flexgap .feature > * + * { margin-left: 15px; }
.no-flexgap .cat-card-body > * + * { margin-left: 12px; }
.no-flexgap .cta-band > * { margin-right: 34px; margin-bottom: 34px; }
.no-flexgap .cta-band > *:last-child { margin-right: 0; }
.no-flexgap .cta-actions > * { margin-right: 12px; margin-bottom: 12px; }
.no-flexgap .cta-actions > *:last-child { margin-right: 0; }
.no-flexgap .footer-bottom > * { margin-right: 16px; margin-bottom: 16px; }
.no-flexgap .footer-bottom > *:last-child { margin-right: 0; }
.no-flexgap .crumbs > * { margin-right: 10px; margin-bottom: 10px; }
.no-flexgap .crumbs > *:last-child { margin-right: 0; }
.no-flexgap .filters-row > * { margin-right: 14px; margin-bottom: 14px; }
.no-flexgap .filters-row > *:last-child { margin-right: 0; }
.no-flexgap .field > * + * { margin-left: 9px; }
.no-flexgap .chips > * { margin-right: 7px; margin-bottom: 7px; }
.no-flexgap .chips > *:last-child { margin-right: 0; }
.no-flexgap .product-body > * + * { margin-top: 7px; }
.no-flexgap .product-meta > * { margin-right: 6px; margin-bottom: 6px; }
.no-flexgap .product-meta > *:last-child { margin-right: 0; }
.no-flexgap .product-lines > span > * + * { margin-left: 8px; }
.no-flexgap .product-add > * + * { margin-left: 7px; }
.no-flexgap .modal-tags > * { margin-right: 8px; margin-bottom: 8px; }
.no-flexgap .modal-tags > *:last-child { margin-right: 0; }
.no-flexgap .modal-actions > * { margin-right: 12px; margin-bottom: 12px; }
.no-flexgap .modal-actions > *:last-child { margin-right: 0; }
.no-flexgap .drawer-head > * + * { margin-left: 14px; }
.no-flexgap .req-item-side > * + * { margin-left: 6px; }
.no-flexgap .input-wrap > * + * { margin-top: 7px; }
.no-flexgap .search-panel-head > * + * { margin-left: 10px; }
.no-flexgap .range-row > * + * { margin-left: 10px; }
.no-flexgap .search-bar > * { margin-right: 16px; margin-bottom: 16px; }
.no-flexgap .search-bar > *:last-child { margin-right: 0; }
.no-flexgap .topbar .wrap > * { margin-right: 18px; margin-bottom: 18px; }
.no-flexgap .topbar .wrap > *:last-child { margin-right: 0; }
.no-flexgap .topbar-follow > * + * { margin-left: 12px; }
.no-flexgap .social-row > * { margin-right: 8px; margin-bottom: 8px; }
.no-flexgap .social-row > *:last-child { margin-right: 0; }
.no-flexgap [data-social='wide'] .social-link > * + * { margin-left: 9px; }
.no-flexgap .compare-bar-inner > * + * { margin-left: 14px; }
.no-flexgap .compare-bar-label > * + * { margin-left: 8px; }
.no-flexgap .compare-thumbs > * + * { margin-left: 7px; }
.no-flexgap .cmp-tools > * { margin-right: 18px; margin-bottom: 18px; }
.no-flexgap .cmp-tools > *:last-child { margin-right: 0; }
.no-flexgap .cmp-switch > * + * { margin-left: 10px; }
.no-flexgap .marquee > * + * { margin-left: var(--mq-gap); }
.no-flexgap .marquee-track > * + * { margin-left: var(--mq-gap); }
.no-flexgap .review-card > * + * { margin-top: 14px; }
.no-flexgap .review-head > * + * { margin-left: 13px; }
.no-flexgap .review-stars > * + * { margin-left: 3px; }
.no-flexgap .client-chip > * + * { margin-left: 12px; }

@media (max-width: 1040px) {
  .no-flexgap .header .wrap > * + * { margin-left: 12px; }
}

@media (max-width: 560px) {
  .no-flexgap .topbar-follow > * + * { margin-left: 8px; }
  .no-flexgap .topbar .social-row > * { margin-right: 6px; margin-bottom: 6px; }
  .no-flexgap .topbar .social-row > *:last-child { margin-right: 0; }
}

@media (max-width: 860px) {
  .no-flexgap .hero-stat > * + * { margin-left: 12px; }
}
/* === КОНЕЦ: запасные отступы вместо flex-gap === */
