/* ==========================================================================
   БРИКС — витрина наборов для кладки. Основной стиль.
   Палитра: терракота/кирпич + тёплый песочный фон.
   ========================================================================== */

:root {
  --brick: #b4531f;
  --brick-dark: #8f3f16;
  --brick-soft: #f3e2d3;
  --ink: #2a2118;
  --ink-soft: #5b4c3d;
  --muted: #8a7761;
  --line: #e9ddcd;
  --line-strong: #ddcdb7;
  --bg: #faf6f0;
  --bg-soft: #f4ebe0;
  --card: #ffffff;
  --ok: #2f9e44;
  --warn: #d97706;
  --danger: #c92a2a;
  --shadow-sm: 0 1px 2px rgba(58, 39, 20, .06), 0 2px 8px rgba(58, 39, 20, .05);
  --shadow-md: 0 6px 24px rgba(58, 39, 20, .10);
  --shadow-lg: 0 18px 50px rgba(58, 39, 20, .16);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --container: 1200px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

h1, h2, h3 { line-height: 1.2; margin: 0; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

svg[data-lucide],
[data-lucide] { width: 20px; height: 20px; stroke-width: 2; }

/* Атрибут hidden всегда должен скрывать элемент, даже если класс задаёт display */
[hidden] { display: none !important; }

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

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  --btn-bg: var(--brick);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 650;
  font-size: .96rem;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg,
.btn [data-lucide] { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(180, 83, 31, .35); outline-offset: 2px; }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--primary { --btn-bg: var(--brick); }
.btn--primary:hover { background: var(--brick-dark); }
.btn--light {
  --btn-bg: #fff; --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--light:hover { background: #fff; border-color: var(--brick); color: var(--brick); }
.btn--outline {
  --btn-bg: transparent; --btn-fg: var(--ink);
  border-color: var(--line-strong);
}
.btn--outline:hover { border-color: var(--brick); color: var(--brick); }
.btn--brick {
  --btn-bg: linear-gradient(135deg, #c2410c, #9a3412);
  --btn-fg: #fff;
}
.btn--block { width: 100%; }

/* ---------- Header ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(26, 20, 14, .96);
  color: #f6ede2;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; }
.brand__mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #c2410c, #9a3412);
  color: #fff; font-weight: 800; font-size: 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 800; font-size: 1.16rem; letter-spacing: .04em; }
.brand__label { font-size: .74rem; color: #c9b7a3; letter-spacing: .02em; }

.nav {
  display: flex;
  gap: 4px;
  margin-inline: auto;
}
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .92rem;
  color: #e4d7c7;
  font-weight: 550;
  transition: background .15s ease, color .15s ease;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: #e9dccc;
  min-width: 210px;
}
.search svg, .search [data-lucide] { width: 18px; height: 18px; color: #c9b7a3; }
.search input {
  border: 0; background: transparent; outline: none;
  color: #fff; font-size: .9rem; width: 100%;
}
.search input::placeholder { color: #b6a591; }

.messenger {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: 999px;
  background: rgba(255,255,255,.10); color: #f2e7d9;
  font-weight: 600; font-size: .88rem;
}
.messenger:hover { background: rgba(255,255,255,.18); }
.messenger svg { width: 17px; height: 17px; }

.icon-button {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #f2e7d9;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.icon-button:hover { background: rgba(255,255,255,.14); }
.icon-button__badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--brick); color: #fff;
  font-size: .72rem; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(26,20,14,1);
}
.icon-button__badge[hidden] { display: none; }

/* ---------- Hero --------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(194, 65, 12, .12), transparent 60%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  padding: clamp(40px, 6vw, 84px) 0;
  border-bottom: 1px solid var(--line);
}
.hero__content { max-width: 760px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-strong);
  color: var(--brick); font-weight: 650; font-size: .84rem;
  box-shadow: var(--shadow-sm);
}
.hero__kicker svg { width: 16px; height: 16px; }
.hero h1 { margin: 18px 0 14px; }
.hero__content > p { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 38px;
}
.hero-proof__item {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow-sm);
}
.hero-proof__item svg { width: 26px; height: 26px; color: var(--brick); flex: none; margin-top: 2px; }
.hero-proof__item span { display: flex; flex-direction: column; }
.hero-proof__item strong { font-size: .98rem; }
.hero-proof__item small { color: var(--muted); font-size: .82rem; }

/* ---------- Sections ----------------------------------------------------- */
.section { padding: clamp(44px, 6vw, 80px) 0; }
.section--soft { background: var(--bg-soft); }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 30px; flex-wrap: wrap;
}
.section__head > div { max-width: 640px; }
.section__head p { color: var(--ink-soft); margin-top: 8px; }
.section__eyebrow, .section__head .section__eyebrow {
  display: inline-block; color: var(--brick);
  font-weight: 700; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 6px;
}

/* subtle brick texture accents on soft sections */
.section--bricks-right, .section--bricks-left { position: relative; overflow: hidden; }
.section--bricks-right::after, .section--bricks-left::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 220px;
  opacity: .5; pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(216,195,172,.0), rgba(216,195,172,.35)),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(200,173,143,.25) 26px 28px),
    repeating-linear-gradient(90deg, transparent 0 54px, rgba(200,173,143,.25) 54px 56px);
}
.section--bricks-right::after { right: -40px; }
.section--bricks-left::after { left: -40px; transform: scaleX(-1); }

/* ---------- Catalog ------------------------------------------------------ */
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 22px;
}
.catalog-toolbar__left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.catalog-toolbar__title { display: flex; flex-direction: column; line-height: 1.15; }
.catalog-toolbar__title strong { font-size: 1.05rem; }
.catalog-toolbar__title span { color: var(--muted); font-size: .84rem; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink-soft); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--brick); color: var(--brick); }
.chip--active, .chip[aria-pressed="true"] {
  background: var(--brick); border-color: var(--brick); color: #fff;
}

.sort-control {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff;
  color: var(--ink-soft);
}
.sort-control svg { width: 17px; height: 17px; }
.sort-control select {
  border: 0; background: transparent; outline: none;
  font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--ink);
  cursor: pointer;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.product-card__media {
  position: relative; display: block;
  aspect-ratio: 4 / 3; background: var(--bg-soft);
  overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__flag {
  position: absolute; top: 12px; left: 12px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(26,20,14,.86); color: #fff;
  font-size: .74rem; font-weight: 650;
}
.product-card__media-label {
  position: absolute; bottom: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink-soft);
  font-size: .72rem; font-weight: 600;
}
.product-card__fav {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink-soft);
  box-shadow: var(--shadow-sm); transition: color .15s ease, transform .15s ease;
}
.product-card__fav:hover { color: var(--brick); transform: scale(1.06); }
.product-card__fav.is-active { color: var(--brick); }
.product-card__fav svg { width: 18px; height: 18px; }
.product-card__body { padding: 16px 16px 6px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-card__type { color: var(--brick); font-size: .78rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.product-card__body h3 { font-size: 1.05rem; }
.product-card__body h3 a:hover { color: var(--brick); }
.product-card__body > p { color: var(--muted); font-size: .88rem; }
.product-card__features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.product-card__features span {
  padding: 3px 9px; border-radius: 7px; background: var(--bg-soft);
  color: var(--ink-soft); font-size: .76rem; font-weight: 550;
}
.product-card__actions { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.product-card__actions .btn { width: 100%; }

.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--ink); }
.old-price { color: var(--muted); text-decoration: line-through; font-size: .95rem; font-weight: 500; }
.discount {
  padding: 2px 8px; border-radius: 7px;
  background: #fdeae1; color: var(--brick);
  font-size: .8rem; font-weight: 700;
}

.catalog-empty {
  display: none; flex-direction: column; align-items: center; gap: 8px;
  padding: 60px 20px; text-align: center; color: var(--muted);
}
.catalog-empty:not([hidden]) { display: flex; }
.catalog-empty svg { width: 40px; height: 40px; color: var(--line-strong); }
.catalog-empty strong { font-size: 1.1rem; color: var(--ink); }

.product-grid.is-loading { opacity: .55; pointer-events: none; }

.promo-strip { margin-top: 26px; }
.promo-card {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 24px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2a1c12, #43291a);
  color: #f4e7d8;
}
.promo-card__icon {
  width: 54px; height: 54px; flex: none;
  display: grid; place-items: center; border-radius: 14px;
  background: rgba(255,255,255,.10); color: #ffd9b8;
}
.promo-card__icon svg { width: 26px; height: 26px; }
.promo-card__content { flex: 1; min-width: 240px; }
.promo-card__content h3 { color: #fff; margin: 4px 0; }
.promo-card__content p { color: #d8c6b3; font-size: .9rem; }
.promo-card__eyebrow { color: #ffb27a; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Benefits ----------------------------------------------------- */
.benefit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px;
}
.benefit {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.benefit svg { width: 30px; height: 30px; color: var(--brick); }
.benefit h3 { margin: 12px 0 6px; }
.benefit p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Steps -------------------------------------------------------- */
.steps-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.step {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.step__num {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--brick-soft); color: var(--brick);
  font-weight: 800; margin-bottom: 12px;
}
.step h3 { font-size: 1rem; }
.step p { color: var(--ink-soft); font-size: .88rem; margin-top: 5px; }

.video-placeholder {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 300px at 30% 20%, rgba(194,65,12,.25), transparent 60%),
    linear-gradient(135deg, #3a2519, #1f140c);
  display: grid; place-items: center;
  box-shadow: var(--shadow-md);
}
.play-button {
  width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.94); color: var(--brick);
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.play-button:hover { transform: scale(1.06); }
.play-button svg { width: 30px; height: 30px; }

/* ---------- Reviews ------------------------------------------------------ */
.reviews-summary {
  display: flex; align-items: baseline; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.reviews-summary strong { font-size: 2rem; font-weight: 800; color: var(--brick); }
.reviews-summary span { color: var(--ink-soft); }
.reviews-summary small { width: 100%; color: var(--muted); font-size: .8rem; }

.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.review-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
}
.review-card__top { display: flex; align-items: center; justify-content: space-between; }
.review-card__quote { color: var(--line-strong); }
.review-card__quote svg { width: 28px; height: 28px; }
.review-card__score { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; }
.review-card__stars { display: inline-flex; color: #f59f00; }
.review-card__stars svg { width: 16px; height: 16px; fill: currentColor; }
.review-card__stars .is-empty { color: var(--line-strong); fill: none; }
.review-card__verified {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ok); font-size: .78rem; font-weight: 650;
}
.review-card__verified svg { width: 15px; height: 15px; }
.review-card__body h3 { margin: 8px 0 6px; font-size: 1.02rem; }
.review-card__body p { color: var(--ink-soft); font-size: .9rem; }
.review-card__person { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.review-card__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700;
  background: var(--brick-soft); color: var(--brick);
}
.review-card__person span { display: flex; flex-direction: column; line-height: 1.2; }
.review-card__person small { color: var(--muted); font-size: .8rem; }

/* ---------- Delivery ----------------------------------------------------- */
.delivery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.delivery-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.delivery-item svg { width: 28px; height: 28px; color: var(--brick); }
.delivery-item h3 { margin: 12px 0 6px; }
.delivery-item p { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Footer ------------------------------------------------------- */
.site-footer { background: #1c140d; color: #d8c6b3; padding: 54px 0 30px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.footer-col > p { font-size: .9rem; color: #b6a591; max-width: 320px; }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col a { display: block; color: #c9b7a3; font-size: .9rem; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10);
  font-size: .84rem; color: #9c8b78;
}
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.footer-legal a { color: #9c8b78; }
/* Реквизиты продавца (обязательны по закону) */
.seller-requisites {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.10);
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-size: .8rem; line-height: 1.5; color: #9c8b78;
}
.seller-requisites span { white-space: nowrap; }
.seller-requisites span::after { content: "·"; margin-left: 16px; color: rgba(255,255,255,.22); }
.seller-requisites span:last-child::after { content: none; }

/* ---------- Mobile bottom nav ------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  background: rgba(26,20,14,.98); border-top: 1px solid rgba(255,255,255,.08);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr);
}
.mobile-bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #b6a591; font-size: .68rem; font-weight: 600; padding: 4px 0;
}
.mobile-bottom-nav a svg { width: 22px; height: 22px; }
.mobile-bottom-nav a.is-active { color: #ffb27a; }

/* ---------- Breadcrumbs -------------------------------------------------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 20px 0 4px; color: var(--muted); font-size: .86rem;
}
.breadcrumbs a:hover { color: var(--brick); }
.breadcrumbs span { color: var(--line-strong); }

/* ---------- Product page ------------------------------------------------- */
.product-page {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px;
  padding: 20px 0 10px; align-items: start;
}
.product-gallery { display: grid; grid-template-columns: 84px 1fr; gap: 14px; }
.gallery-thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumb {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--line); background: var(--bg-soft); cursor: pointer; padding: 0;
  transition: border-color .15s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--line-strong); }
.gallery-thumb--active { border-color: var(--brick); }
.gallery-main {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.info-panel {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.info-panel h2 { font-size: 1.2rem; margin-bottom: 12px; }
.info-panel h3 { margin: 16px 0 6px; }
.info-panel p { color: var(--ink-soft); font-size: .92rem; margin-bottom: 8px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; font-size: .92rem; vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 600; width: 45%; }
.spec-table td { color: var(--ink); font-weight: 550; }

.buy-panel {
  position: sticky; top: 92px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-md);
}
.rating { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .9rem; font-weight: 600; }
.rating i { color: #f59f00; font-style: normal; }
.rating span { color: var(--muted); font-weight: 500; }
.buy-panel h1 { font-size: 1.5rem; margin: 12px 0 14px; }
.buy-panel .price-row { margin-bottom: 14px; }
.buy-panel__status {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; background: var(--bg-soft);
  font-size: .9rem; margin-bottom: 18px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(47,158,68,.16); }
.buy-panel__status .stock { color: var(--muted); }
.buy-panel__actions { display: flex; flex-direction: column; gap: 10px; }
.buy-panel__actions .btn { width: 100%; }
.mini-facts { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.mini-fact { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .86rem; }
.mini-fact svg { width: 18px; height: 18px; color: var(--brick); flex: none; }

.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.kit-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
}
.kit-item svg { width: 28px; height: 28px; color: var(--brick); }
.kit-item h3 { margin: 12px 0 6px; }
.kit-item p { color: var(--ink-soft); font-size: .9rem; }

.badge-row { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.badge {
  padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 650;
  background: rgba(26,20,14,.86); color: #fff;
}
.badge--new { background: var(--ok); }
.badge--low { background: var(--warn); }
.product-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.product-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); }
.product-dots span:first-child { background: #fff; }

/* ---------- Cart & checkout ---------------------------------------------- */
.page-head { padding: 30px 0 6px; }
.page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-head p { color: var(--ink-soft); margin-top: 6px; }

.cart-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; align-items: start; padding: 20px 0 40px; }
.cart-main { display: flex; flex-direction: column; gap: 14px; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cart-item {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm);
}
.cart-item__media { width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--bg-soft); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cart-item__title { font-weight: 700; font-size: 1rem; }
.cart-item__title a:hover { color: var(--brick); }
.cart-item__meta { color: var(--muted); font-size: .84rem; }
.cart-item__price { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.cart-item__side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-item__remove {
  display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent;
  color: var(--muted); font-size: .82rem; cursor: pointer;
}
.cart-item__remove:hover { color: var(--danger); }
.cart-item__remove svg { width: 15px; height: 15px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.qty__btn {
  width: 34px; height: 34px; border: 0; background: #fff; color: var(--ink);
  font-size: 1.1rem; cursor: pointer; display: grid; place-items: center;
}
.qty__btn:hover { background: var(--bg-soft); color: var(--brick); }
.qty__btn[disabled] { opacity: .4; cursor: not-allowed; }
.qty__value { min-width: 34px; text-align: center; font-weight: 700; font-size: .95rem; }

.cart-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 60px 20px; text-align: center;
  background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.cart-empty svg { width: 46px; height: 46px; color: var(--line-strong); }
.cart-empty strong { font-size: 1.15rem; }
.cart-empty p { color: var(--muted); }

.cart-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.checkout-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-md);
}
.checkout-card h2 { font-size: 1.2rem; margin-bottom: 14px; }
.summary { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-soft); }
.summary-row--total {
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px;
  font-size: 1.15rem; font-weight: 800; color: var(--ink);
}
.summary-row--total span:last-child { color: var(--brick); }

.checkout-form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: .84rem; font-weight: 650; color: var(--ink-soft); }
.field__label span { color: var(--danger); }
.field__control {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: .94rem; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__control:focus { outline: none; border-color: var(--brick); box-shadow: 0 0 0 3px rgba(180,83,31,.14); }
.field__control::placeholder { color: #b6a591; }
textarea.field__control { resize: vertical; min-height: 74px; }
.field__error { color: var(--danger); font-size: .78rem; min-height: 0; }
.field.has-error .field__control { border-color: var(--danger); }

.form-note { color: var(--muted); font-size: .8rem; }

/* Согласие с публичной офертой (чекбокс перед оплатой) */
.offer-consent {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 4px; font-size: .84rem; color: var(--ink-soft); cursor: pointer;
}
.offer-consent input[type="checkbox"] {
  flex: none; width: 18px; height: 18px; margin-top: 1px;
  accent-color: var(--brick); cursor: pointer;
}
.offer-consent a { color: var(--brick); font-weight: 600; }
.offer-consent a[href]:hover { text-decoration: underline; }
.offer-consent a:not([href]) { color: inherit; font-weight: 600; cursor: default; }
.field__error--block { display: block; margin-top: 4px; }

/* Подсказки доменов e-mail */
.input-suggest { position: relative; }
.suggest-pop {
  position: absolute; z-index: 42; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 4px; max-height: 260px; overflow-y: auto;
}
.suggest-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: .92rem; color: var(--ink);
}
.suggest-item:hover { background: var(--bg-soft); }
.suggest-item__dom { color: var(--brick); font-weight: 600; }
.form-note a { color: var(--brick); text-decoration: underline; }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; font-size: .88rem;
}
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert--error { background: #fdeceb; color: #a51f1f; border: 1px solid #f4c9c6; }
.alert--info { background: #eef6ff; color: #1c4e80; border: 1px solid #cfe3f7; }
.alert[hidden] { display: none; }

/* ---------- Карта доставки (Яндекс) ------------------------------------- */
.map-panel { display: flex; flex-direction: column; gap: 8px; }
.map-panel__hint { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: .84rem; }
.map-panel__hint svg { width: 16px; height: 16px; color: var(--brick); flex: none; }
.delivery-map {
  position: relative; height: 320px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--bg-soft);
}
.delivery-map ymaps { border-radius: 14px; }

/* ---------- Кастомный календарь (дата доставки) ------------------------- */
.datepicker { position: relative; }
.datepicker__trigger {
  display: flex; align-items: center; gap: 10px; width: 100%;
  text-align: left; cursor: pointer;
}
.datepicker__trigger > svg:first-child { width: 18px; height: 18px; color: var(--brick); flex: none; }
.datepicker__value { flex: 1; color: var(--ink); }
.datepicker__value.is-placeholder { color: #b6a591; }
.datepicker__caret { width: 18px; height: 18px; color: var(--muted); margin-left: auto; transition: transform .15s ease; }
.datepicker.is-open .datepicker__caret { transform: rotate(180deg); }
.datepicker.is-open .datepicker__trigger { border-color: var(--brick); box-shadow: 0 0 0 3px rgba(180,83,31,.14); }

.datepicker__pop {
  position: absolute; z-index: 55; top: calc(100% + 8px); left: 0;
  width: 304px; max-width: 92vw;
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px;
}
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal__title { font-weight: 700; }
.cal__nav {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  display: grid; place-items: center;
}
.cal__nav svg { width: 18px; height: 18px; }
.cal__nav:hover:not([disabled]) { border-color: var(--brick); color: var(--brick); }
.cal__nav[disabled] { opacity: .35; cursor: not-allowed; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font-size: .72rem; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal__day {
  aspect-ratio: 1 / 1; border: 0; background: transparent; border-radius: 9px;
  cursor: pointer; font-size: .9rem; color: var(--ink);
  display: grid; place-items: center; font-family: inherit;
}
.cal__day:hover:not([disabled]):not(.is-selected) { background: var(--bg-soft); }
.cal__day[disabled] { color: var(--line-strong); cursor: not-allowed; }
.cal__day.is-today { box-shadow: inset 0 0 0 1px var(--brick); color: var(--brick); font-weight: 700; }
.cal__day.is-selected { background: var(--brick); color: #fff; font-weight: 700; box-shadow: none; }
.cal__day.is-empty { visibility: hidden; cursor: default; }
.cal__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal__hint { font-size: .76rem; color: var(--muted); }
.cal__clear { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .84rem; font-family: inherit; }
.cal__clear:hover { color: var(--danger); }

/* ---------- Payment status page ------------------------------------------ */
.status-page { min-height: 60vh; display: grid; place-items: center; padding: 50px 20px; }
.status-card {
  max-width: 520px; width: 100%; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px 30px; box-shadow: var(--shadow-md);
}
.status-card__icon {
  width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center;
}
.status-card__icon svg { width: 38px; height: 38px; }
.status-card--ok .status-card__icon { background: #e6f6ea; color: var(--ok); }
.status-card--pending .status-card__icon { background: #fff4e2; color: var(--warn); }
.status-card--error .status-card__icon { background: #fdeceb; color: var(--danger); }
.status-card h1 { font-size: 1.5rem; margin-bottom: 10px; }
.status-card p { color: var(--ink-soft); }
.status-meta {
  margin: 22px 0; padding: 16px; border-radius: 12px; background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.status-meta__row { display: flex; justify-content: space-between; font-size: .92rem; }
.status-meta__row span:first-child { color: var(--muted); }
.status-meta__row strong { font-weight: 700; }
.status-card__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brick);
  animation: spin .8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toast -------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 120%);
  z-index: 90; max-width: 92vw;
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px; border-radius: 999px;
  background: #1c140d; color: #fff; box-shadow: var(--shadow-lg);
  font-size: .9rem; font-weight: 600;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  opacity: 0; pointer-events: none;
}
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }
.toast svg { width: 18px; height: 18px; color: #ffb27a; }

/* ---------- Skeleton ----------------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--bg-soft); }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-100%); animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 1024px) {
  .steps-layout { grid-template-columns: 1fr; }
  .product-page { grid-template-columns: 1fr; }
  .buy-panel { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .search { display: none; }
  .messenger { display: none; }
  .menu-button {
    display: grid; place-items: center; width: 42px; height: 42px;
    border-radius: 11px; border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06); color: #f2e7d9; cursor: pointer;
  }
  .header-actions { margin-inline-start: auto; }
  .hero__proof { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .mobile-bottom-nav { display: grid; }
  body { padding-bottom: 68px; }
  .product-gallery { grid-template-columns: 1fr; }
  .gallery-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
  .gallery-thumb { width: 70px; height: 70px; flex: none; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item__media { width: 72px; height: 72px; }
  .cart-item__side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
  .catalog-toolbar__left { width: 100%; }
  .sort-control { width: 100%; }
  .section__head { flex-direction: column; align-items: flex-start; }
}

/* Mobile slide-in menu (toggled by JS) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu__backdrop { position: absolute; inset: 0; background: rgba(20,14,8,.55); }
.mobile-menu__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(320px, 84vw);
  background: #1c140d; color: #eaddcd; padding: 22px; display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-lg); overflow-y: auto;
}
.mobile-menu__panel a { padding: 12px 10px; border-radius: 10px; font-weight: 600; color: #e4d7c7; }
.mobile-menu__panel a:hover { background: rgba(255,255,255,.08); }
.mobile-menu__close {
  align-self: flex-end; background: transparent; border: 0; color: #c9b7a3; cursor: pointer;
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px;
}
.mobile-menu__close:hover { background: rgba(255,255,255,.08); color: #fff; }
