/* ==========================================================================
   КОВАРУС — мастерская ритуального металла, г. Бор
   Дизайн-система: графит + латунь, антиква в заголовках.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink:      #16181c;
  --ink-2:    #22262c;
  --ink-3:    #2f343c;
  --brass:    #ab8551;
  --brass-l:  #c9a674;
  --brass-d:  #8a6a3d;
  --paper:    #f7f5f2;
  --paper-2:  #efebe5;
  --line:     #e0dad2;
  --line-2:   #cfc7bc;
  --text:     #23262b;
  --muted:    #6e757f;
  --muted-2:  #949aa3;
  --white:    #fff;
  --ok:       #2f7d54;
  --warn:     #a8722a;

  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans:  'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1280px;
  --r:    4px;
  --r-lg: 8px;
  --shadow:    0 1px 2px rgba(22,24,28,.06), 0 8px 24px rgba(22,24,28,.06);
  --shadow-lg: 0 2px 6px rgba(22,24,28,.08), 0 20px 48px rgba(22,24,28,.12);
  --tr: .18s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
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; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
p  { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Шапка ---------- */
.topbar {
  background: var(--ink);
  color: rgba(255,255,255,.72);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .wrap { display: flex; align-items: center; gap: 28px; height: 40px; white-space: nowrap; }
.topbar a:hover { color: var(--brass-l); }
.topbar a { flex-shrink: 0; }
.topbar-spacer { margin-left: auto; }
.topbar-geo { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.topbar-geo svg { flex-shrink: 0; }
/* На узких экранах часы работы уходят: они есть в контактах и в подвале,
   а адрес и кнопка звонка нужнее. */
.geo-short { display: none; }
@media (max-width: 900px) {
  .topbar-hours { display: none; }
  .topbar .wrap { gap: 16px; }
  .geo-full { display: none; }
  .geo-short { display: inline; }
}

.header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 60; }
.header-in { display: flex; align-items: center; gap: 20px; height: 78px; flex-wrap: nowrap; }

.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-mark {
  width: 42px; height: 42px; flex-shrink: 0;
  border: 1px solid var(--brass); border-radius: 2px;
  display: grid; place-items: center;
  color: var(--brass-l);
}
.logo-text { line-height: 1.05; white-space: nowrap; }
/* Обе строки логотипа — блочные: как inline они вставали в одну строку
   и растягивали логотип почти вдвое, отбирая место у меню. */
.logo-name {
  display: block;
  font-family: var(--serif); font-size: 25px; font-weight: 700;
  letter-spacing: .1em; color: var(--white);
}
.logo-sub {
  display: block; margin-top: 2px;
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass-l);
}

/* Меню сжимается первым, но пункты никогда не рвутся на две строки:
   перенос внутри ссылки поднимал высоту шапки и сдвигал телефон. */
.nav {
  display: flex; align-items: center; gap: 18px; font-size: 14px; font-weight: 500;
  flex: 0 1 auto; min-width: 0; overflow: hidden;
}
.nav a {
  color: rgba(255,255,255,.85); padding: 6px 0; white-space: nowrap;
  border-bottom: 1px solid transparent; transition: var(--tr);
}
.nav a:hover, .nav a.is-active { color: var(--white); border-bottom-color: var(--brass); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Только номер, без подписи: контейнер шапки ограничен 1280px, и подпись
   не помещалась рядом с шестью пунктами меню ни на одной ширине экрана. */
.header-phone { line-height: 1.2; white-space: nowrap; padding-right: 4px; transition: var(--tr); }
.header-phone b { font-size: 18px; font-weight: 700; letter-spacing: .01em; }
.header-phone:hover { color: var(--brass-l); }

.icon-btn {
  width: 42px; height: 42px; border-radius: var(--r);
  display: grid; place-items: center; position: relative;
  border: 1px solid rgba(255,255,255,.16); color: var(--white); transition: var(--tr);
}
.icon-btn:hover { border-color: var(--brass); color: var(--brass-l); }
.icon-btn .badge {
  position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brass); color: var(--ink); border-radius: 10px;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.burger { display: none; }

/* Мега-меню каталога */
.cat-trigger {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--brass); color: var(--ink); font-weight: 600; font-size: 14.5px;
  padding: 11px 18px; border-radius: var(--r); transition: var(--tr);
}
.cat-trigger:hover { background: var(--brass-l); }
.megamenu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--white); color: var(--text);
  box-shadow: var(--shadow-lg); border-top: 3px solid var(--brass);
  display: none; z-index: 70;
}
.megamenu.is-open { display: block; }
.megamenu-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 28px 0 32px; }
.mm-card { padding: 18px 20px; border-radius: var(--r); transition: var(--tr); display: block; }
.mm-card:hover { background: var(--paper-2); }
.mm-card h4 { font-size: 19px; margin-bottom: 6px; }
.mm-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.45; }
.mm-count { font-size: 12px; color: var(--brass-d); font-weight: 600; margin-top: 8px; display: block; }
.mm-nav { display: none; border-top: 1px solid var(--line); padding: 18px 0 26px; }
.mm-nav a { display: block; padding: 11px 0; font-weight: 600; font-size: 16px; border-bottom: 1px solid var(--line); }
.mm-nav a:last-of-type { border-bottom: 0; }
.mm-nav .mm-phone { font-family: var(--serif); font-size: 26px; font-weight: 700; padding-top: 16px; }
/* Шапка перестраивается раньше, чем начнёт ломаться: сперва уходит подпись
   под телефоном, затем горизонтальное меню целиком переезжает в выпадающий
   «Каталог» — и одновременно появляется кнопка-бургер, иначе на промежуточных
   ширинах разделы оказывались недоступны. */
@media (max-width: 1400px) {
  .header-phone b { font-size: 17px; }
  .nav { gap: 16px; }
}
/* 1260 — та ширина, на которой шесть пунктов ещё помещаются целиком.
   Ниже меню целиком уходит в выпадающий «Каталог», иначе последний пункт
   начинает обрезаться. */
@media (max-width: 1260px) {
  .nav { display: none; }
  .burger { display: grid; }
  .header-phone { display: none; }
  .mm-nav { display: block; }
}
/* Самые узкие телефоны: подпись логотипа снимается последней */
@media (max-width: 360px) {
  .logo-sub { display: none; }
  .header-in { gap: 10px; }
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: var(--r); font-weight: 600; font-size: 15px;
  transition: var(--tr); border: 1px solid transparent; text-align: center;
}
.btn-primary { background: var(--brass); color: var(--ink); }
.btn-primary:hover { background: var(--brass-l); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-3); }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: var(--white); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { border-color: rgba(255,255,255,.3); color: var(--white); }
.btn-ghost-light:hover { border-color: var(--brass); color: var(--brass-l); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Общие секции ---------- */
.section { padding: 76px 0; }
.section-tight { padding: 52px 0; }
.section-dark { background: var(--ink); color: var(--white); }
.section-paper { background: var(--paper-2); }
.section-white { background: var(--white); }
.section-head { margin-bottom: 38px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.eyebrow {
  font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass-d); font-weight: 700; margin-bottom: 12px; display: block;
}
.section-dark .eyebrow { color: var(--brass-l); }
.lead { font-size: 17.5px; color: var(--muted); max-width: 62ch; }
.section-dark .lead { color: rgba(255,255,255,.7); }

/* ---------- Главный экран ---------- */
.hero { position: relative; background: var(--ink); color: var(--white); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; opacity: .28; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--ink) 26%, rgba(22,24,28,.82) 55%, rgba(22,24,28,.5) 100%);
}
.hero-in { position: relative; z-index: 2; padding: 96px 0 104px; max-width: 720px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--brass-l); }
.hero-lead { font-size: 18px; color: rgba(255,255,255,.78); max-width: 56ch; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 46px; }
.hero-facts { display: flex; gap: 44px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); padding-top: 26px; }
.hero-fact b { font-family: var(--serif); font-size: 33px; color: var(--brass-l); display: block; line-height: 1; }
.hero-fact span { font-size: 13.5px; color: rgba(255,255,255,.62); }

/* ---------- Плашка преимуществ ---------- */
.usp { background: var(--ink-2); color: var(--white); }
.usp-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.usp-item { padding: 26px 26px 26px 0; display: flex; gap: 14px; align-items: flex-start; }
.usp-item + .usp-item { border-left: 1px solid rgba(255,255,255,.1); padding-left: 26px; }
.usp-item svg { color: var(--brass); flex-shrink: 0; margin-top: 2px; }
.usp-item b { display: block; font-size: 14.5px; margin-bottom: 3px; }
.usp-item span { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.45; }

/* ---------- Категории ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-card {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--ink); color: var(--white); min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px; transition: var(--tr);
}
.cat-card:first-child, .cat-card:nth-child(2) { grid-column: span 1; min-height: 320px; }
.cat-card img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .5; transition: transform .5s cubic-bezier(.4,0,.2,1), opacity var(--tr);
}
.cat-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(22,24,28,.94) 12%, rgba(22,24,28,.35) 62%, rgba(22,24,28,.15) 100%);
}
.cat-card:hover img { transform: scale(1.05); opacity: .62; }
.cat-card > * { position: relative; z-index: 2; }
.cat-card h3 { margin-bottom: 6px; }
.cat-card p { font-size: 13.5px; color: rgba(255,255,255,.68); margin: 0 0 14px; line-height: 1.45; }
.cat-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.cat-card-meta b { color: var(--brass-l); font-weight: 600; }
.cat-card-meta span { color: rgba(255,255,255,.55); }

/* ---------- Карточка товара в сетке ---------- */
.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pcard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; transition: var(--tr); position: relative;
}
.pcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.pcard-media { position: relative; aspect-ratio: 4/3; background: var(--paper-2); overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .4s; }
.pcard:hover .pcard-media img { transform: scale(1.04); }
.pcard-noimg { display: grid; place-items: center; height: 100%; color: var(--muted-2); gap: 8px; font-size: 12.5px; }
.pcard-fav {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--muted);
  transition: var(--tr); z-index: 3;
}
.pcard-fav:hover { color: var(--brass-d); }
.pcard-fav.is-on { color: #c0392b; }
.pcard-tag {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: var(--ink); color: var(--brass-l); font-size: 10.5px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 2px;
}
.pcard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pcard-cat { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.pcard-name { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 10px; }
.pcard-name a:hover { color: var(--brass-d); }
.pcard-attrs { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.pcard-colors { display: flex; gap: 6px; margin-bottom: 14px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); transition: var(--tr); position: relative;
}
.swatch.is-on { border-color: var(--brass); }
.pcard-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.price { font-family: var(--serif); font-size: 25px; font-weight: 700; line-height: 1; }
.price span { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.price-from { font-size: 11.5px; color: var(--muted-2); display: block; margin-bottom: 2px; }

/* ---------- Каталог: сетка страницы ---------- */
.catalog-layout { display: grid; grid-template-columns: 274px 1fr; gap: 32px; align-items: start; }
.filters {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  position: sticky; top: 96px; overflow: hidden;
}
.filters-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.filters-head b { font-size: 15px; }
.filters-reset { font-size: 13px; color: var(--brass-d); font-weight: 600; }
.filters-reset:hover { text-decoration: underline; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; font-weight: 600; font-size: 14px; text-align: left;
}
.fgroup-head svg { transition: transform var(--tr); color: var(--muted); }
.fgroup.is-closed .fgroup-head svg { transform: rotate(-90deg); }
.fgroup-body { padding: 0 20px 18px; }
.fgroup.is-closed .fgroup-body { display: none; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.check input { position: absolute; opacity: 0; }
.check-box {
  width: 18px; height: 18px; border: 1.5px solid var(--line-2); border-radius: 3px;
  flex-shrink: 0; display: grid; place-items: center; transition: var(--tr); background: var(--white);
}
.check input:checked + .check-box { background: var(--ink); border-color: var(--ink); }
.check input:checked + .check-box::after {
  content: ''; width: 5px; height: 9px; border: solid var(--white);
  border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px);
}
.check-count { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.check:hover .check-box { border-color: var(--ink-3); }
.check-color { display: flex; align-items: center; gap: 9px; }

.range-row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.range-input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 14px; background: var(--white);
}
.range-input:focus { outline: none; border-color: var(--brass); }
.range-sep { color: var(--muted-2); }
.slider { position: relative; height: 24px; margin: 0 4px; }
.slider input[type=range] {
  position: absolute; width: 100%; height: 3px; top: 10px; margin: 0;
  -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--white); box-shadow: 0 1px 3px rgba(0,0,0,.3);
  pointer-events: auto; cursor: grab;
}
.slider-track { position: absolute; left: 0; right: 0; top: 10px; height: 3px; background: var(--line-2); border-radius: 2px; }
.slider-fill { position: absolute; top: 10px; height: 3px; background: var(--brass); border-radius: 2px; }

/* Панель управления каталогом */
.catalog-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.catalog-count { font-size: 14px; color: var(--muted); }
.catalog-count b { color: var(--text); }
.select {
  padding: 9px 34px 9px 13px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e757f' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 14px; appearance: none; cursor: pointer;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--white); border: 1px solid var(--line-2); border-radius: 20px; font-size: 13px;
}
.chip button { color: var(--muted); display: grid; place-items: center; }
.chip button:hover { color: var(--text); }
.filters-mobile-btn { display: none; }

.search-box { position: relative; }
.search-box input {
  width: 100%; padding: 11px 14px 11px 40px; border: 1px solid var(--line-2);
  border-radius: var(--r); font-size: 14px; background: var(--white);
}
.search-box input:focus { outline: none; border-color: var(--brass); }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty h3 { margin-bottom: 10px; color: var(--text); }

/* ---------- Хлебные крошки ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 18px 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brass-d); }
.crumbs span { color: var(--muted-2); }

/* ---------- Карточка товара ---------- */
.product-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start; }
.product-gallery { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; position: sticky; top: 96px; }
.product-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-title { margin-bottom: 12px; }
.product-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.product-price-row { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.product-price { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1; }
.product-price-unit { font-size: 15px; color: var(--muted); }
.stock { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ok); font-weight: 600; margin-bottom: 26px; }
.stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.opt-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; display: block; }
.colors-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.color-opt {
  display: flex; align-items: center; gap: 9px; padding: 8px 13px 8px 9px;
  border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white);
  font-size: 13.5px; transition: var(--tr);
}
.color-opt:hover { border-color: var(--line-2); }
.color-opt.is-on { border-color: var(--ink); }
.color-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--white); }
.qty button { width: 42px; height: 46px; display: grid; place-items: center; color: var(--muted); transition: var(--tr); }
.qty button:hover { color: var(--text); background: var(--paper-2); }
.qty input { width: 62px; height: 46px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); font-weight: 600; }
.qty input:focus { outline: none; }
.buy-row { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.buy-row .btn { height: 48px; }

.specs { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 26px; }
.spec-row { display: grid; grid-template-columns: 210px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-row dt { color: var(--muted); }
.spec-row dd { margin: 0; font-weight: 500; }

.mini-note {
  display: flex; gap: 12px; padding: 14px 16px; background: var(--paper-2);
  border-radius: var(--r); font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-bottom: 14px;
}
.mini-note svg { color: var(--brass-d); flex-shrink: 0; margin-top: 2px; }
.mini-note b { color: var(--text); }

/* ---------- Калькулятор ---------- */
.calc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.calc-head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.calc-head h3 { font-size: 21px; }
.calc-head svg { color: var(--brass); }
.calc-body { padding: 26px; }
.calc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 22px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 7px; display: block; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  font-size: 15px; background: var(--white); transition: var(--tr);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px rgba(171,133,81,.14); }
.field-hint { font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.field-full { grid-column: 1 / -1; }

.suggest { position: relative; }
.suggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); max-height: 280px; overflow-y: auto; display: none;
}
.suggest-list.is-open { display: block; }
.suggest-item { padding: 10px 14px; cursor: pointer; font-size: 14.5px; display: flex; justify-content: space-between; gap: 12px; }
.suggest-item:hover, .suggest-item.is-active { background: var(--paper-2); }
.suggest-item small { color: var(--muted-2); font-size: 12.5px; white-space: nowrap; }

.calc-opts { display: flex; gap: 20px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); }
.calc-cargo {
  display: flex; gap: 26px; flex-wrap: wrap; padding: 16px 18px; background: var(--paper-2);
  border-radius: var(--r); margin-bottom: 20px; font-size: 13.5px;
}
.calc-cargo b { display: block; font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.calc-cargo span { color: var(--muted); }

.quotes { display: grid; gap: 12px; }
.quote {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; transition: var(--tr); background: var(--white);
}
.quote.is-best { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass); }
.quote-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; margin-bottom: 5px; }
.quote-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.quote-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink); background: var(--brass-l); padding: 3px 8px; border-radius: 2px;
}
.quote-meta { font-size: 13px; color: var(--muted); line-height: 1.5; }
.quote-total { text-align: right; }
.quote-total b { font-family: var(--serif); font-size: 30px; font-weight: 700; display: block; line-height: 1; }
.quote-total span { font-size: 12.5px; color: var(--muted); }
.quote-rows { grid-column: 1 / -1; border-top: 1px dashed var(--line-2); padding-top: 12px; margin-top: 2px; display: none; }
.quote.is-open .quote-rows { display: block; }
.quote-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--muted); }
.quote-row b { color: var(--text); font-weight: 600; }
.quote-row .free { color: var(--ok); font-weight: 600; }
.quote-toggle { font-size: 13px; color: var(--brass-d); font-weight: 600; margin-top: 8px; }
.quote-warn {
  grid-column: 1 / -1; font-size: 13px; color: var(--warn); display: flex; gap: 8px;
  background: #fdf7ee; padding: 9px 12px; border-radius: var(--r);
}

/* ---------- Калькулятор ограды ---------- */
.fence-calc { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.fence-result { background: var(--ink); color: var(--white); border-radius: var(--r-lg); padding: 24px; }
.fence-result-total { font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1; color: var(--brass-l); margin: 4px 0 4px; }
.fence-line { display: flex; justify-content: space-between; font-size: 13.5px; padding: 7px 0; color: rgba(255,255,255,.7); border-bottom: 1px solid rgba(255,255,255,.1); }
.fence-line b { color: var(--white); font-weight: 600; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column;
}
.review-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review-ava {
  width: 44px; height: 44px; border-radius: 50%; background: var(--paper-2);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px;
  font-weight: 700; color: var(--brass-d); flex-shrink: 0;
}
.review-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.review-date { font-size: 12.5px; color: var(--muted-2); }
.stars { display: flex; gap: 2px; color: var(--brass); margin-bottom: 12px; }
.review p { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin: 0; }

/* ---------- Этапы ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: s; content: '0' counter(s);
  position: absolute; top: 0; left: 0; font-family: var(--serif); font-size: 34px;
  font-weight: 700; color: var(--brass); line-height: 1;
}
.step::after { content: ''; position: absolute; top: 17px; left: 46px; right: -12px; height: 1px; background: var(--line-2); }
.step:last-child::after { display: none; }
.section-dark .step::after { background: rgba(255,255,255,.14); }
.step h4 { font-size: 18px; margin-bottom: 7px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.55; }
.section-dark .step p { color: rgba(255,255,255,.62); }

/* ---------- Галерея производства ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-grid a { border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; background: var(--paper-2); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.06); }

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.62); padding: 60px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer h4 { color: var(--white); font-size: 17px; margin-bottom: 16px; font-family: var(--sans); font-weight: 600; }
.footer a:hover { color: var(--brass-l); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: rgba(255,255,255,.45);
}
.footer-phone { font-family: var(--serif); font-size: 27px; color: var(--white); font-weight: 700; display: block; margin-bottom: 6px; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.socials a {
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--r);
  display: grid; place-items: center; color: rgba(255,255,255,.7); transition: var(--tr);
}
.socials a:hover { border-color: var(--brass); color: var(--brass-l); }

/* ---------- Корзина ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.cart-item {
  display: grid; grid-template-columns: 100px 1fr auto; gap: 18px; padding: 20px 0;
  border-bottom: 1px solid var(--line); align-items: center;
}
.cart-item-img { width: 100px; height: 84px; object-fit: contain; background: var(--paper-2); border-radius: var(--r); padding: 6px; }
.cart-item h4 { font-family: var(--sans); font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.cart-item-meta { font-size: 13px; color: var(--muted); }
.cart-item-right { text-align: right; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.cart-sum {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; position: sticky; top: 96px;
}
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14.5px; color: var(--muted); }
.sum-row b { color: var(--text); font-weight: 600; }
.sum-total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.sum-total b { font-family: var(--serif); font-size: 32px; font-weight: 700; }

/* ---------- Модалка ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(22,24,28,.6); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(2px);
}
.modal-bg.is-open { display: flex; }
.modal {
  background: var(--white); border-radius: var(--r-lg); max-width: 480px; width: 100%;
  padding: 32px; position: relative; max-height: 90vh; overflow-y: auto;
}
.modal-close { position: absolute; top: 16px; right: 16px; color: var(--muted); }
.modal-close:hover { color: var(--text); }
.modal h3 { margin-bottom: 8px; }
.modal .lead { font-size: 14.5px; margin-bottom: 22px; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--white); padding: 14px 22px; border-radius: var(--r);
  font-size: 14.5px; z-index: 300; opacity: 0; pointer-events: none; transition: var(--tr);
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { color: var(--brass-l); }

/* ---------- Плавающая панель связи ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.fab a {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--white); box-shadow: var(--shadow-lg); transition: var(--tr);
}
.fab a:hover { background: var(--brass); color: var(--ink); }

/* ---------- Прочее ---------- */
.page-head { background: var(--ink-2); color: var(--white); padding: 44px 0 52px; }
.page-head h1 { margin-bottom: 12px; }
.page-head .lead { color: rgba(255,255,255,.7); }
.page-head .crumbs { color: rgba(255,255,255,.5); padding-top: 0; }
.page-head .crumbs a:hover { color: var(--brass-l); }

.prose { max-width: 74ch; font-size: 16.5px; line-height: 1.7; }
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 30px 0 12px; }
.prose ul { padding-left: 22px; margin-bottom: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose strong { color: var(--text); }

.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px;
}
.card h4 { font-size: 19px; margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.6; }
.rounded { border-radius: var(--r-lg); overflow: hidden; }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--white); }
.table th, .table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--paper-2); font-weight: 600; font-size: 13.5px; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }

.accordion { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); overflow: hidden; }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:last-child { border-bottom: 0; }
.acc-head { width: 100%; padding: 18px 22px; display: flex; justify-content: space-between; gap: 16px; align-items: center; text-align: left; font-weight: 600; font-size: 15.5px; }
.acc-head svg { color: var(--muted); transition: transform var(--tr); flex-shrink: 0; }
.acc-item.is-open .acc-head svg { transform: rotate(45deg); }
.acc-body { padding: 0 22px 20px; font-size: 14.5px; color: var(--muted); line-height: 1.65; display: none; }
.acc-item.is-open .acc-body { display: block; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .grid-products { grid-template-columns: repeat(3, 1fr); }
  .catalog-layout { grid-template-columns: 240px 1fr; gap: 24px; }
  .megamenu-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .product-layout { grid-template-columns: 1fr; gap: 32px; }
  .product-gallery { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-sum { position: static; }
}
@media (max-width: 900px) {
  .section { padding: 56px 0; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .usp-grid { grid-template-columns: repeat(2, 1fr); }
  .usp-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .usp-item { border-top: 1px solid rgba(255,255,255,.1); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .reviews { grid-template-columns: 1fr; }
  .cols-2, .cols-3, .fence-calc { grid-template-columns: 1fr; gap: 28px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters {
    position: fixed; inset: 0; z-index: 150; border-radius: 0; overflow-y: auto;
    display: none; border: 0;
  }
  .filters.is-open { display: block; }
  .filters-mobile-btn { display: inline-flex; }
  .calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  /* Шапка на телефоне: логотип мельче, «Каталог» остаётся одной иконкой,
     иконки действий плотнее — иначе строка не помещается по ширине. */
  .header-in { gap: 12px; height: 64px; }
  .logo { gap: 9px; }
  .logo-mark { width: 36px; height: 36px; }
  .logo-mark svg { width: 19px; height: 19px; }
  .logo-name { font-size: 20px; }
  .logo-sub { font-size: 9px; letter-spacing: .08em; }
  .cat-trigger { padding: 10px 12px; }
  .cat-trigger span { display: none; }
  .header-actions { gap: 5px; }
  .icon-btn { width: 37px; height: 37px; }
  /* Избранное уезжает в выпадающее меню — в строке шапки места на него нет */
  .fav-btn { display: none; }
  .topbar .wrap { gap: 14px; font-size: 12px; }
  .topbar-geo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .grid-products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard-body { padding: 12px 13px 14px; }
  .pcard-name { font-size: 13.5px; }
  .price { font-size: 20px; }
  .cats { grid-template-columns: 1fr; }
  .hero-in { padding: 60px 0 66px; }
  .hero-facts { gap: 28px; }
  .usp-grid { grid-template-columns: 1fr; }
  .usp-item + .usp-item { border-left: 0; padding-left: 0; }
  .steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .quote { grid-template-columns: 1fr; }
  .quote-total { text-align: left; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item-right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .section-head { flex-direction: column; align-items: flex-start; }
}
