/* =========================================================================
   IVANCOV DECOR — стили сайта
   ========================================================================= */
:root {
  --bg: #f4f3f1;
  --bg-card: #ffffff;
  --ink: #161616;
  --ink-soft: #55524e;
  --line: #dedbd6;
  --concrete: #c9c6c1;
  --accent: #161616;
  --ozon-blue: #005bff;
  --cdek-green: #1a7a3c;
  --radius: 4px;
  --font-head: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; } /* height:auto — атрибуты width/height не ломают aspect-ratio */
a { color: inherit; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .h-style {
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
h1 { font-size: clamp(28px, 4.5vw, 52px); }
h2 { font-size: clamp(22px, 3vw, 34px); margin-bottom: 24px; }
h3 { font-size: 19px; }

/* ---------- Шапка ---------- */
.topbar {
  background: var(--ink);
  color: #d8d5d0;
  font-size: 13px;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }

header.site {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 20px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo img.mark { width: 40px; height: 38px; }
.logo .word {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo .word span { color: var(--ink-soft); font-weight: 300; }

nav.main { display: flex; gap: 26px; }
nav.main a {
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
nav.main a:hover, nav.main a.active { border-color: var(--ink); }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Герой ---------- */
.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(1200px 500px at 85% -10%, #e6e4e0 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero .container { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.hero p.lead { margin: 20px 0 32px; color: var(--ink-soft); font-size: 18px; max-width: 560px; }
.hero .mark-big { width: 100%; max-width: 300px; margin: 0 auto; opacity: 0.92; }

.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: 0.2s;
  background: var(--ink);
  color: #fff;
}
.btn:hover { background: #333; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.ozon { background: var(--ozon-blue); border-color: var(--ozon-blue); }
.btn.ozon:hover { background: #0047cc; }
.btn.cdek { background: var(--cdek-green); border-color: var(--cdek-green); }
.btn.cdek:hover { background: #14602f; }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Преимущества ---------- */
.features { padding: 56px 0; }
.features .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
}
.feature .num { font-family: var(--font-head); font-size: 30px; color: var(--concrete); }
.feature h3 { margin: 8px 0 8px; font-size: 16px; }
.feature p { font-size: 14px; color: var(--ink-soft); }

/* ---------- Каталог ---------- */
.catalog-section { padding: 24px 0 72px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .chip { display: inline-block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: var(--bg-card); padding: 9px 18px; border-radius: 30px; font-size: 14px; transition: .15s; }
.filters .chip:hover { border-color: var(--ink); }
.filters .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-row .lbl { font-size: 13px; color: var(--ink-soft); margin-right: 2px; }
.filter-row .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.filter-row .sw.grafit { background: #4a4b4d; }
.filter-row .sw.belyi { background: #f1efeb; }
.products-grid .empty { grid-column: 1 / -1; color: var(--ink-soft); padding: 24px 0; }
.filters button {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 9px 18px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: 0.15s;
}
.filters button:hover { border-color: var(--ink); }
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08); transform: translateY(-3px); }
.card a.imglink { aspect-ratio: 3 / 4; overflow: hidden; background: #f1efeb; }  /* портрет, как карточка Ozon */
.card a.imglink picture { display: block; width: 100%; height: 100%; }
.card a.imglink img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .cat { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 6px; }
.card h3 { font-size: 15px; font-family: var(--font-body); font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.prices { margin-top: auto; margin-bottom: 14px; font-size: 14px; }
.prices .p-cdek { font-size: 22px; font-weight: 800; }
.prices .p-cdek small { font-size: 12px; font-weight: 600; color: var(--cdek-green); margin-left: 6px; }
.prices .p-ozon { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.card .btns { display: grid; gap: 8px; }
.card .btns .btn { padding: 11px 10px; font-size: 13px; text-align: center; }

/* ---------- Страница товара ---------- */
.product-page { padding: 48px 0 72px; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-photo { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #e9e7e4; aspect-ratio: 3 / 4; }
.product-photo picture { display: block; width: 100%; height: 100%; }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery { position: sticky; top: 24px; align-self: start; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--radius); overflow: hidden; background: #e9e7e4; cursor: pointer; aspect-ratio: 3 / 4; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs button.on { border-color: var(--ink); }
.thumbs { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.thumbs button.is-video { position: relative; }
.thumbs .play { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: rgba(0,0,0,.55); box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.thumbs .play::after { content: ""; position: absolute; left: 12px; top: 8px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent #fff; }
.product-photo video { width: 100%; height: 100%; object-fit: cover; background: #111; display: block; }
.product-photo [hidden] { display: none; }
.p-videonote { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
/* видео на главной */
.video-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.video-card { margin: 0; }
.video-card video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border-radius: var(--radius); border: 1px solid var(--line); background: #e9e7e4; }
.video-card figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.video-card figcaption a { color: inherit; }
@media (max-width: 900px) { .video-strip { grid-template-columns: repeat(2, 1fr); } }
.p-h2 { margin-top: 32px; font-size: 20px; }
.p-text { color: var(--ink-soft); margin-top: 8px; }
.p-note { color: var(--ink-soft); font-size: 14px; margin-top: 12px; }
.p-list { margin: 8px 0 0 18px; color: var(--ink-soft); }
.p-list li { margin: 4px 0; }
.specs { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.specs th { text-align: left; font-weight: 600; color: var(--ink-soft); padding: 8px 12px 8px 0; width: 34%; vertical-align: top; border-bottom: 1px solid var(--line); }
.specs td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.product-info h1 { font-size: clamp(24px, 3vw, 36px); text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 800; }
.price-box {
  border: 1px solid var(--line);
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  margin: 24px 0;
}
.price-box .row { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; }
.price-box .row + .row { border-top: 1px dashed var(--line); }
.price-box .val { font-size: 24px; font-weight: 800; }
.price-box .val.cdek { color: var(--cdek-green); }
.price-box .note { font-size: 13px; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Блог ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
}
.post-card .date { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.post-card h3 { margin-bottom: 12px; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.post-card .more { margin-top: auto; font-weight: 700; font-size: 14px; }

article.post { max-width: 780px; margin: 0 auto; padding: 48px 0 72px; }
article.post h1 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 10px; }
article.post .meta { color: var(--ink-soft); font-size: 14px; margin-bottom: 32px; }
article.post h2 { margin-top: 36px; font-size: 24px; }
article.post p { margin: 16px 0; }
article.post ul, article.post ol { margin: 16px 0 16px 24px; }

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section.alt { background: #ecebe8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.seo-text p { margin: 14px 0; color: var(--ink-soft); }

/* ---------- Модальное окно заказа ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 6px;
  max-width: 460px;
  width: 100%;
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow: auto;
}
.modal .close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 26px; cursor: pointer; line-height: 1; }
.modal h3 { margin-bottom: 6px; }
.modal .sub { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; }
.modal label { display: block; font-size: 13px; font-weight: 700; margin: 14px 0 5px; }
.modal input, .modal textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-family: var(--font-body);
  font-size: 15px;
}
.modal input:focus, .modal textarea:focus { outline: 2px solid var(--ink); border-color: var(--ink); }
.modal .send-row { display: grid; gap: 10px; margin-top: 20px; }
.modal .hint { font-size: 12px; color: var(--ink-soft); margin-top: 12px; }

/* ---------- Чекаут (визард) ---------- */
body.no-scroll { overflow: hidden; }
.checkout-modal { max-width: 560px; padding: 28px 28px 24px; }
.ck-progress { display: flex; gap: 8px; margin-bottom: 14px; }
.ck-progress span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.ck-progress span.on { background: var(--ink); }
.ck-progress span.done { background: var(--cdek-green); }
.checkout-modal h3 { font-family: var(--font-head); font-weight: 500; font-size: 24px; margin-bottom: 14px; }
.ck-name { font-weight: 700; font-size: 15px; line-height: 1.35; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 40px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty button:hover { background: var(--bg); }
.qty b { min-width: 36px; text-align: center; }
.ck-total, .ck-summary { margin-top: 16px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius); font-size: 14px; }
.ck-total .row, .ck-summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.ck-total .row.save, .ck-summary .row.save { color: var(--cdek-green); }
.ck-summary .val { text-align: right; color: var(--ink-soft); }
.ck-summary .hint { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.ck-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ck-line img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius); background: var(--concrete); }
.ck-line-price { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.ck-line-price b { color: var(--cdek-green); }
.ck-line-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ck-methods { display: grid; gap: 10px; margin-bottom: 14px; }
.ck-method { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.ck-method.on { border-color: var(--cdek-green); box-shadow: inset 0 0 0 1px var(--cdek-green); }
.ck-method input { width: 18px; height: 18px; margin: 0; }
.ck-m-text b { display: block; font-size: 14px; }
.ck-m-text small { color: var(--ink-soft); font-size: 12px; }
.ck-m-price { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.ck-m-price small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
.ck-map { height: 380px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.ck-map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink-soft); font-size: 14px; }
.ck-pvz { padding: 12px 14px; border: 1px solid var(--cdek-green); border-radius: var(--radius); font-size: 14px; }
.ck-pvz-name { font-weight: 700; }
.ck-pvz-addr, .ck-pvz-time { color: var(--ink-soft); }
.linklike { border: 0; background: none; padding: 0; margin-top: 8px; font: inherit; font-size: 13px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }
.linklike:hover { color: var(--ink); }
.ck-err { color: #b3261e; font-size: 13px; min-height: 18px; margin-top: 6px; }
.checkout-modal input.err, .checkout-modal textarea.err { border-color: #b3261e; }
.ck-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.ck-nav { display: flex; gap: 10px; margin-top: 20px; }
.ck-nav .btn { flex: 1; text-align: center; }
.ck-nav .btn:disabled { opacity: 0.6; cursor: default; }
.ck-alt { font-size: 13px; color: var(--ink-soft); margin-top: 12px; text-align: center; }
.ck-alt .linklike { margin: 0; }
.ck-thanks { text-align: center; padding: 10px 0 4px; }
.ck-check { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--cdek-green); color: #fff; font-size: 30px; line-height: 56px; }
.ck-msg { font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
.checkout-modal .send-row { margin-top: 0; margin-bottom: 14px; }
.checkout-modal textarea[readonly] { font-size: 13px; color: var(--ink-soft); background: var(--bg); }
@media (max-width: 640px) {
  .modal-backdrop.checkout { padding: 0; align-items: stretch; }
  .checkout-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 22px 18px; }
  .ck-map { height: 60vh; }
}

/* ---------- Корзина: иконка в шапке ---------- */
.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  color: var(--ink); text-decoration: none;
  border: 1px solid transparent; border-radius: var(--radius);
}
.cart-btn:hover { border-color: var(--line); background: #fff; }
.cart-count {
  position: absolute; top: 2px; right: 0;
  min-width: 18px; height: 18px;             /* фиксированный размер: бейдж не двигает шапку */
  padding: 0 4px;
  border-radius: 9px;
  background: var(--cdek-green); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.cart-count[hidden] { display: none; }

/* ---------- Корзина: выдвижная панель ---------- */
.cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,20,20,0.55);
  display: none;
  z-index: 110;
}
.cart-backdrop.open { display: block; }
.cart-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 100%;
  background: #fff;
  display: flex; flex-direction: column;
  box-shadow: -14px 0 40px rgba(0,0,0,0.18);
}
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 20px; margin: 0; }
.cart-head .close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; }
.cart-body { padding: 16px 20px 24px; overflow: auto; flex: 1; }
.cart-stale { font-size: 13px; color: var(--ink-soft); background: var(--bg); border-radius: var(--radius); padding: 8px 10px; margin-bottom: 12px; }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-pic img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); background: var(--concrete); }
.cart-title { font-size: 14px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.cart-title:hover { text-decoration: underline; }
.cart-price { font-size: 14px; margin-top: 4px; }
.cart-price b { color: var(--cdek-green); }
.cart-ozon { font-size: 12px; color: var(--ink-soft); }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cart-side .qty button { width: 32px; height: 32px; }
.cart-side .qty b { min-width: 28px; }
.cart-ship { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
.cart-ship.free { color: var(--cdek-green); font-weight: 700; }
.cart-ship .bar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.cart-ship .bar i { display: block; height: 100%; background: var(--cdek-green); }
.cart-upsell { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.cart-upsell h4 { font-family: var(--font-head); font-weight: 500; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.cart-up-row { display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.cart-up-row img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius); background: var(--concrete); }
.cart-up-row a { text-decoration: none; }
.cart-up-row a:hover { text-decoration: underline; }
.cart-up-price { color: var(--cdek-green); font-weight: 700; }
.cart-up-add { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.cart-up-add:hover { border-color: var(--cdek-green); color: var(--cdek-green); }
.cart-total { margin-top: 18px; padding: 12px 14px; background: var(--bg); border-radius: var(--radius); font-size: 14px; }
.cart-total .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.cart-total .row.save { color: var(--cdek-green); }
.cart-checkout { width: 100%; margin-top: 14px; text-align: center; }
.cart-continue { text-align: center; margin-top: 10px; font-size: 13px; }
.cart-empty { text-align: center; padding: 28px 0; color: var(--ink-soft); }
.cart-empty .btn { margin-top: 14px; }

/* Кнопка «В корзину» в состоянии «уже добавлено» */
.btn.cdek.in-cart { background: #fff; color: var(--cdek-green); }
.btn.cdek.in-cart:hover { background: var(--bg); }

.card .btn-note, .btn-note { font-size: 11px; color: var(--cdek-green); text-align: center; margin-top: 6px; }

/* ---------- Sticky-покупка на карточке товара ---------- */
.buy-sticky {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
  padding: 10px 0;
  display: none;
}
.buy-sticky .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.buy-sticky .bs-price { font-size: 18px; font-weight: 800; color: var(--cdek-green); }
.buy-sticky .btn { padding: 12px 18px; }
.buy-sticky[hidden] { display: none; }

/* ---------- Страница cart.html ---------- */
.cart-page-box { max-width: 720px; }

@media (max-width: 640px) {
  .cart-panel { width: 100%; }
  .buy-sticky { display: block; }
  .buy-sticky[hidden] { display: none; }
}

/* ---------- Подвал ---------- */
footer.site {
  background: var(--ink);
  color: #b8b5b0;
  padding: 52px 0 30px;
  margin-top: 0;
}
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
footer h4 { color: #fff; font-family: var(--font-head); text-transform: uppercase; letter-spacing: 0.08em; font-size: 15px; margin-bottom: 14px; }
footer a { color: #d8d5d0; text-decoration: none; display: block; padding: 3px 0; font-size: 14px; }
footer a:hover { color: #fff; }
footer .foot-logo { display: flex; align-items: center; gap: 10px; color: #fff; margin-bottom: 14px; }
footer .foot-logo img { width: 34px; filter: invert(1); }
footer .copy { border-top: 1px solid #2e2c2a; padding-top: 20px; font-size: 13px; }

/* ---------- Хлебные крошки ---------- */
.crumbs { font-size: 13px; color: var(--ink-soft); padding: 18px 0 0; }
.crumbs a { color: var(--ink-soft); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .features .grid { grid-template-columns: repeat(2, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero .mark-big { display: none; }
  footer .cols { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .product-layout, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card .btns .btn { font-size: 12px; padding: 10px 6px; }
  nav.main {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 16px;
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .burger { display: block; }
  .blog-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; }
}
@media (max-width: 440px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ---------- Главная: hero с фото и новые секции ---------- */
.hero-photo { padding: 56px 0 56px; }
.hero-photo .container { grid-template-columns: 1fr 1.05fr; gap: 56px; }
.hero .eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; }
.hero-fig { margin: 0; }
.hero-fig img { width: 100%; height: auto; border-radius: 6px; display: block; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.hero-fig figcaption { font-size: 12px; color: var(--ink-soft); margin-top: 10px; text-align: right; }
.trust { list-style: none; display: flex; gap: 28px; flex-wrap: wrap; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.trust li { display: flex; flex-direction: column; }
.trust b { font-family: var(--font-head); font-size: 26px; font-weight: 500; line-height: 1; }
.trust span { font-size: 13px; color: var(--ink-soft); margin-top: 6px; max-width: 150px; }
.sec-head { max-width: 720px; margin-bottom: 32px; }
.sec-head h2 { margin-bottom: 12px; }
.sec-head p { color: var(--ink-soft); font-size: 17px; }
.center-cta { text-align: center; margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sub { color: var(--ink-soft); font-size: 17px; margin-bottom: 18px; max-width: 560px; }
.cats { padding: 40px 0 8px; }
.cats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-tile { position: relative; display: block; text-decoration: none; color: #fff; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--concrete); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-body { position: absolute; inset: auto 0 0 0; padding: 22px; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 100%); }
.cat-body h3 { color: #fff; font-size: 22px; }
.cat-body p { font-size: 13px; color: #e6e3de; margin-top: 4px; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.why-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.why-card h3 { font-size: 17px; margin: 18px 20px 8px; }
.why-card p { font-size: 14px; color: var(--ink-soft); margin: 0 20px 22px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line); }
.facts div { display: flex; flex-direction: column; }
.facts b { font-family: var(--font-head); font-size: 28px; font-weight: 500; line-height: 1.1; }
.facts span { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.steps { list-style: none; counter-reset: st; display: grid; gap: 14px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.steps li::before { content: counter(st, decimal-leading-zero); font-family: var(--font-head); font-size: 24px; color: var(--concrete); line-height: 1; grid-row: span 2; }
.steps b { font-size: 15px; }
.steps span { grid-column: 2; font-size: 13.5px; color: var(--ink-soft); }
.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.build-tile { display: grid; grid-template-columns: 1fr 1fr; text-decoration: none; color: inherit; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.build-tile img { width: 100%; height: 100%; min-height: 200px; object-fit: cover; display: block; }
.build-tile div { padding: 22px; align-self: center; }
.build-tile h3 { font-size: 20px; margin-bottom: 8px; }
.build-tile p { font-size: 14px; color: var(--ink-soft); }
.series { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.series div { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.series h3 { font-size: 16px; margin-bottom: 8px; }
.series p { font-size: 14px; color: var(--ink-soft); }
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reviews-grid blockquote { margin: 0; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.reviews-grid p { font-size: 15px; line-height: 1.55; flex: 1; }
.reviews-grid p::before { content: "\201C"; color: var(--concrete); font-size: 28px; line-height: 0; margin-right: 4px; }
.reviews-grid footer { margin-top: 14px; font-size: 12px; color: var(--ink-soft); letter-spacing: .04em; }
/* блок отзывов из data/reviews.json (карточка товара, категория, главная) */
.reviews-block { margin-top: 40px; }
.reviews-block h2 { font-size: 24px; margin-bottom: 16px; }
.reviews-block .reviews-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.reviews-block .review { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.reviews-block .review footer { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.care-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.care-list div { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; }
.care-list b { font-size: 15px; }
.care-list span { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.buy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.buy-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; padding: 26px; }
.buy-card.accent { border-color: var(--cdek-green); box-shadow: inset 0 3px 0 var(--cdek-green); }
.buy-card h3 { font-size: 19px; margin-bottom: 10px; }
.buy-card p { font-size: 14.5px; color: var(--ink-soft); }
.buy-card ul { margin: 14px 0 18px 18px; font-size: 14px; color: var(--ink); }
.buy-card li { margin: 4px 0; }
.faq h2 { margin-bottom: 20px; }
.faq-list { max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 16px 0; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--font-head); font-size: 22px; color: var(--ink-soft); line-height: 1; }
.faq-list details[open] summary::after { content: "\2013"; }
.faq-list details p { padding: 0 0 18px; color: var(--ink-soft); font-size: 15px; max-width: 720px; }
.seo-text.narrow { max-width: 820px; }
.seo-text .tagline { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-top: 24px; }
@media (max-width: 960px) {
  .hero-photo .container { grid-template-columns: 1fr; }
  .cats-grid, .why-grid, .series, .reviews-grid { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .build-grid, .buy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cats-grid, .why-grid, .series, .reviews-grid, .care-list { grid-template-columns: 1fr; }
  .cat-tile { aspect-ratio: 16 / 9; }
  .build-tile { grid-template-columns: 1fr; }
  .trust { gap: 18px; }
  .hero-photo { padding: 36px 0 40px; }
}

/* ---------- Главная: конструктор, сравнение, мастерская, гарантия ---------- */
.builder { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 6px; padding: 24px; margin-bottom: 24px; }
.b-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.b-row:last-child { border-bottom: 0; }
.b-lbl { font-size: 13px; color: var(--ink-soft); padding-top: 8px; }
.b-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.b-opts button { border: 1px solid var(--line); background: var(--bg); border-radius: 30px; padding: 7px 14px; font-family: var(--font-body); font-size: 13.5px; cursor: pointer; }
.b-opts button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.b-opts .sw { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.b-opts .sw.grafit { background: #4a4b4d; } .b-opts .sw.belyi { background: #f1efeb; }
.builder-result { border-left: 1px solid var(--line); padding-left: 24px; display: flex; flex-direction: column; }
.builder-result img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--concrete); }
.builder-result h3 { font-size: 16px; margin: 14px 0 6px; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; }
.builder-result .br-price { font-size: 24px; font-weight: 800; color: var(--cdek-green); }
.builder-result .br-price small { font-size: 13px; color: var(--ink-soft); font-weight: 400; margin-left: 6px; }
.builder-result .br-line { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.builder-result .br-save { font-size: 13px; color: var(--cdek-green); font-weight: 700; margin-top: 6px; }
.builder-result .btn-row { margin-top: 16px; }
.builder-result .btn { padding: 12px 18px; font-size: 13px; }
.builder-result .br-empty { color: var(--ink-soft); font-size: 14px; }
.compare-wrap { margin-top: 40px; }
.compare-title { font-size: 20px; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; background: var(--bg-card); }
.compare th, .compare td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.compare thead th { background: var(--bg); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-weight: 500; font-size: 13px; }
.compare tbody th { width: 160px; color: var(--ink-soft); font-weight: 600; background: var(--bg); }
.compare td.good { background: #eef4ee; }
.compare-note { font-size: 14px; color: var(--ink-soft); margin-top: 12px; max-width: 760px; }
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.look-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); display: block; }
.guar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.guar-grid div { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.guar-grid b { font-size: 15px; margin-bottom: 6px; }
.guar-grid span { font-size: 13.5px; color: var(--ink-soft); }
@media (max-width: 960px) { .guar-grid { grid-template-columns: 1fr 1fr; } .builder { grid-template-columns: 1fr; } .builder-result { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; } }
@media (max-width: 640px) { .guar-grid, .look-grid { grid-template-columns: 1fr; } .b-row { grid-template-columns: 1fr; } .b-lbl { padding-top: 0; } }

/* ---------- таблицы и списки в статьях ---------- */
article.post .md-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; background: var(--bg-card); }
article.post .md-table th, article.post .md-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
article.post .md-table th { background: var(--bg); font-weight: 700; }
article.post ol, article.post ul { margin: 12px 0 12px 22px; }
article.post li { margin: 6px 0; }
article.post blockquote { border-left: 3px solid var(--concrete); padding: 8px 16px; color: var(--ink-soft); margin: 16px 0; }

/* ---------- врезки в статьях: фото и карточки товаров ---------- */
article.post .post-fig { margin: 24px 0; }
article.post .post-fig img { width: 100%; border-radius: 6px; display: block; }
article.post .post-fig figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
article.post .post-products { grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 28px; }
article.post .post-products .card h3 { font-size: 14px; }
article.post .post-products .card .btns .btn { font-size: 12px; padding: 9px 6px; }
@media (max-width: 680px) { article.post .post-products { grid-template-columns: 1fr 1fr; } }
@media (max-width: 440px) { article.post .post-products { grid-template-columns: 1fr; } }
