/* =========================================================
   STUGNUM pood — стили
   Самостоятельный файл (site.css не нужен). Цвета — палитра сайта:
   зелёный #2D4A2B, бежевые фоны, почти чёрные заголовки.
   Добавлен один акцент для скидок — «кортен» (ржавая сталь очагов).

   1. Токены  2. База  3. Оболочка (панель, меню, подвал, корзина)
   4. Компоненты  5. Экраны  6. Адаптив (1180 / 960 / 640)  7. Печать
   ========================================================= */

/* 1. Токены */
:root {
  --green: #2D4A2B;
  --green-d: #1F3620;
  --green-tint: rgba(45, 74, 43, .09);
  --bg: #F5EFE3;
  --bg-warm: #EDE6D6;
  --bg-soft: #F9F4E8;
  --white: #FFFFFF;
  --ink: #14140F;
  --text: #3D3D38;
  --muted: #6B6B62;
  --line: #D8D2C2;
  --line-soft: #E6E0D2;
  --corten: #A8542A;
  --corten-tint: rgba(168, 84, 42, .12);
  --danger: #A33;

  --ff-head: "Golos Text", system-ui, sans-serif;             /* заголовки: у Cal Sans нет кириллицы */
  --ff-num: "Cal Sans", "Golos Text", system-ui, sans-serif;  /* цифры: цены, номера */
  --ff-body: "Golos Text", system-ui, sans-serif;

  --top-h: 68px;
  --side-w: 264px;
  --r-lg: 28px;
  --r: 18px;
  --r-sm: 12px;
  --r-pill: 100px;
  --shadow: 0 1px 2px rgba(20, 20, 15, .04), 0 8px 24px rgba(20, 20, 15, .06);
  --shadow-up: 0 2px 4px rgba(20, 20, 15, .05), 0 18px 40px rgba(20, 20, 15, .12);
  --ease: .25s cubic-bezier(.4, 0, .2, 1);

  /* Тон заглушек и плиток по разделам */
  --t-svet: #EADFC2;
  --t-ohrana: #D9DDD2;
  --t-kino: #D9D4CA;
  --t-ogon: #E9D2BF;
  --t-steklo: #D5DFDB;
  --t-dekor: #DCE2CC;
}

/* 2. База */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.55 var(--ff-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--ff-head); font-weight: 800; color: var(--ink); margin: 0; line-height: 1.1; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--green); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nojs { padding: 40px; font-size: 18px; }

/* 3. Оболочка ------------------------------------------------ */

/* Верхняя панель — тёмно-зелёная */
.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  background: var(--green);
  color: var(--white);
}
.top-inner { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; width: calc(var(--side-w) - 42px); flex-shrink: 0; }
.brand-deer { height: 38px; filter: brightness(0) invert(1); }
.brand-word { height: 15px; filter: brightness(0) invert(1); }
.brand-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .14);
}
.search { flex: 1; max-width: 560px; position: relative; display: flex; align-items: center; }
.search i { position: absolute; left: 16px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 44px;
  border: 0; border-radius: var(--r-pill);
  background: var(--bg-soft); color: var(--ink); font-size: 16px;
}
.search input::placeholder { color: var(--muted); }
.top-phone { margin-left: auto; color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; opacity: .92; }
.top-phone i { margin-right: 6px; opacity: .8; }
.top-btn { width: 44px; height: 44px; border-radius: 50%; color: inherit; display: grid; place-items: center; font-size: 18px; }
.top-btn:hover { background: rgba(255, 255, 255, .12); }
.top-btn.lang { font-size: 14px; font-weight: 700; letter-spacing: .06em; border: 1px solid rgba(255, 255, 255, .35); }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 18px 0 16px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--ink); transition: transform var(--ease);
}
.cart-btn:hover { transform: translateY(-1px); }
.cart-btn > i { font-size: 18px; color: var(--green); }
.cart-btn-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.cart-btn-text small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cart-btn-text b { font-size: 15px; white-space: nowrap; }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--corten); color: var(--white);
  font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--green);
}

/* Две колонки: меню разделов + содержимое */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side {
  position: sticky; top: var(--top-h); align-self: start;
  height: calc(100vh - var(--top-h)); overflow-y: auto;
  background: var(--bg-warm); border-right: 1px solid var(--line-soft);
  padding: 20px 14px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { margin: 18px 12px 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px;
  transition: background var(--ease), color var(--ease);
}
.side-item i { width: 20px; text-align: center; color: var(--green); opacity: .8; }
.side-item span { flex: 1; }
.side-item em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, .6); border-radius: var(--r-pill); padding: 1px 8px; }
.side-item:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.side-item.on { background: var(--white); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.side-item.on i { opacity: 1; }
.side-sale i, .side-sale em { color: var(--corten); }
.side-hot i { color: var(--corten); }
.side-small { font-size: 14px; padding: 8px 12px; }
.side-site {
  display: block; padding: 14px 16px; border-radius: var(--r); background: var(--green); color: var(--white);
  text-decoration: none; font-size: 13px; line-height: 1.35;
}
.side-site span { display: block; opacity: .8; margin-bottom: 6px; }
.side-site b { font-size: 15px; }
.side-site i { font-size: 11px; margin-left: 4px; }
.side-head { display: none; }

.main-col { min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - var(--top-h)); }
#view { flex: 1; padding: 28px 36px 64px; max-width: 1360px; width: 100%; outline: none; }

.foot { padding: 22px 36px 28px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 10px; }
.foot-links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.foot-links a:hover { color: var(--green); }
.foot-withdraw { margin-left: auto; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); }
.foot-seller a { color: inherit; }

/* Выдвижные панели */
.scrim { position: fixed; inset: 0; background: rgba(20, 20, 15, .45); opacity: 0; pointer-events: none; transition: opacity var(--ease); z-index: 50; }
body.cart-open .scrim, body.nav-open .scrim { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(420px, 100%);
  background: var(--bg-soft); box-shadow: -20px 0 60px rgba(20, 20, 15, .2);
  transform: translateX(105%); transition: transform var(--ease);
  display: flex; flex-direction: column;
}
body.cart-open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.drawer-head em { font: 700 13px var(--ff-body); background: var(--green); color: var(--white); border-radius: var(--r-pill); padding: 2px 9px; }
.mini { list-style: none; margin: 0; padding: 10px 22px; flex: 1; overflow-y: auto; }
.mini li { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.mini-media .media { aspect-ratio: 1; border-radius: var(--r-sm); }
.mini-media .media-stub span { display: none; }
.mini-title { display: block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.mini small { display: block; margin: 2px 0 8px; font-size: 13px; }
.drawer-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line-soft); display: grid; gap: 12px; background: var(--white); }
.drawer .empty { margin: auto; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 140%);
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px;
  background: var(--ink); color: var(--white); border-radius: var(--r-pill); box-shadow: var(--shadow-up);
  font-weight: 500; font-size: 15px; transition: transform var(--ease), visibility var(--ease); white-space: nowrap; visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast i { color: #9BC27F; }
.toast button { padding: 6px 14px; border-radius: var(--r-pill); background: var(--white); color: var(--ink); font-weight: 700; font-size: 14px; }

/* 4. Компоненты ---------------------------------------------- */

/* Фото / заглушка */
.media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--bg-warm); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.media img.ok { opacity: 1; }
.media-stub { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(45, 74, 43, .55); }
.media-stub i { font-size: 44px; }
.media-stub span { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(20, 20, 15, .35); }
.media-xl { aspect-ratio: 1; }
.media-xl .media-stub i { font-size: 88px; }
.tint-svet { background: var(--t-svet); }
.tint-ohrana { background: var(--t-ohrana); }
.tint-kino { background: var(--t-kino); }
.tint-ogon { background: var(--t-ogon); }
.tint-steklo { background: var(--t-steklo); }
.tint-dekor { background: var(--t-dekor); }

/* Ярлыки на фото */
.tags { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; letter-spacing: .02em; background: var(--white); color: var(--ink); }
.tag-sale { background: var(--corten); color: var(--white); }
.tag-hit i { color: var(--corten); }
.tag-set { background: var(--green); color: var(--white); }

/* Цена */
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.price-now { font-family: var(--ff-num); font-size: 22px; color: var(--ink); white-space: nowrap; }
.price-now small { font-family: var(--ff-body); font-size: 14px; color: var(--muted); margin-left: 2px; }
.price.is-sale .price-now { color: var(--corten); }
.price-old { color: var(--muted); font-size: 15px; }

/* Кнопки */
.buy {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--green); color: var(--white); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background var(--ease), transform var(--ease);
}
.buy:hover { background: var(--green-d); }
.buy:active { transform: scale(.98); }
.buy-lg { height: 54px; font-size: 16px; width: 100%; }
.ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--white); color: var(--ink); font-weight: 600; text-decoration: none;
}
.ghost:hover { border-color: var(--green); color: var(--green); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--bg-warm); color: var(--ink); }
.icon-btn-sm { width: 26px; height: 26px; font-size: 12px; display: inline-grid; vertical-align: middle; }

/* Счётчик в корзине */
.stepper {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 4px;
  height: 42px; padding: 3px; border-radius: var(--r-pill); background: var(--green-tint); color: var(--ink);
}
.stepper button { width: 36px; height: 36px; border-radius: 50%; background: var(--white); color: var(--green); font-size: 13px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.stepper button:hover { background: var(--green); color: var(--white); }
.stepper span { font-size: 14px; white-space: nowrap; padding: 0 4px; }
.stepper input { width: 44px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stepper-sm { height: 40px; }
.stepper-sm button { width: 34px; height: 34px; }
.stepper-xs { height: 34px; }
.stepper-xs button { width: 28px; height: 28px; font-size: 11px; }
.stepper-xs span { min-width: 28px; text-align: center; }

/* Карточка товара */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow); transition: transform var(--ease), box-shadow var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.card-media { position: relative; display: block; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-cat i { color: var(--green); margin-right: 4px; }
.card-title { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; line-height: 1.3; flex: 1; }
.card-title:hover { color: var(--green); }
.card .buy, .card .stepper { width: 100%; margin-top: 4px; }
.card .buy { background: var(--bg-warm); color: var(--ink); }
.card .buy:hover { background: var(--green); color: var(--white); }

/* Сетки */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Заголовок секции */
.sec { margin-top: 56px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.sec-head h2 { font-size: 34px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; padding-bottom: 4px; }
.more:hover { gap: 12px; }

/* Поля формы */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-weight: 400; color: var(--muted); }
.req { color: var(--danger); }
.field input, .field textarea, .promo input {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft);
  transition: border-color var(--ease), background var(--ease);
}
.field input:focus, .field textarea:focus, .promo input:focus { outline: none; border-color: var(--green); background: var(--white); box-shadow: 0 0 0 3px var(--green-tint); }
.field .invalid { border-color: var(--danger); background: #FFF6F4; }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.err { color: var(--danger); font-weight: 600; font-size: 14px; }

/* Сегменты и фишки */
.seg { display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--bg-warm); gap: 2px; }
.seg button, .seg label { position: relative; padding: 8px 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; }
.seg .on { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg-wide { display: flex; margin-bottom: 16px; }
.seg-wide label { flex: 1; text-align: center; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--white); font-size: 14px; font-weight: 600; }
.chip i { color: var(--muted); font-size: 12px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip.on i { color: var(--white); }

/* Пусто */
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty > i { font-size: 44px; color: var(--green); opacity: .5; }
.empty h1, .empty h2 { font-size: 28px; }
.empty p { color: var(--muted); max-width: 420px; }
.empty-lg { padding-top: 64px; }

/* 5. Экраны --------------------------------------------------- */

/* Главная: хит сезона */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  min-height: 460px; border-radius: var(--r-lg); overflow: hidden;
  background: var(--green); color: var(--white);
}
.hero-text { padding: 48px 48px 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero-kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .12); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-kicker i { color: #F0A46E; }
.hero h1 { color: var(--white); font-size: clamp(34px, 3.6vw, 54px); }
.hero-text > p { font-size: 18px; opacity: .85; max-width: 440px; }
.price-hero .price-now { font-size: 44px; color: var(--white); }
.price-hero.is-sale .price-now { color: #F0A46E; }
.price-hero .price-old { color: rgba(255, 255, 255, .6); font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-actions .buy.on-dark { background: var(--bg); color: var(--ink); height: 50px; padding: 0 26px; font-size: 16px; }
.hero-actions .buy.on-dark:hover { background: var(--white); }
.hero-actions .stepper.on-dark { background: rgba(255, 255, 255, .14); color: var(--white); height: 50px; }
.ghost.on-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .4); height: 50px; }
.ghost.on-dark:hover { border-color: var(--white); color: var(--white); }
.hero-note { font-size: 14px; opacity: .75; }
.hero-note i { margin-right: 6px; }
.hero-photo { position: relative; display: block; min-height: 300px; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; }
.hero-photo .tags { top: 18px; left: 18px; }
.hero-photo .tag { font-size: 14px; padding: 6px 14px; }

.perks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.perks li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--white); border-radius: var(--r); font-size: 13px; color: var(--muted); line-height: 1.35; }
.perks i { font-size: 20px; color: var(--green); width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--green-tint); }
.perks b { display: block; color: var(--ink); font-size: 15px; }

/* Популярные — лента с номерами */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 26px 4px 18px; margin: -26px -4px 0;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.rail .card { scroll-snap-align: start; overflow: visible; }
.rail .card-media { border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.rank {
  position: absolute; top: -26px; right: 10px; z-index: 2;
  font-family: var(--ff-num); font-size: 64px; line-height: 1; color: var(--bg);
  -webkit-text-stroke: 2px var(--green); pointer-events: none;
}
.card-ranked:nth-child(-n+3) .rank { color: var(--green); -webkit-text-stroke: 0; }

/* Скидки */
.sec-sale { padding: 32px; border-radius: var(--r-lg); background: var(--corten-tint); }
.sale-max { font-size: 16px; font-weight: 700; letter-spacing: 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--corten); color: var(--white); }

/* Плитки разделов */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cat-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 22px 18px; border-radius: var(--r);
  color: var(--text); text-decoration: none; min-height: 190px; transition: transform var(--ease);
}
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile > i { font-size: 28px; color: var(--green); margin-bottom: 8px; }
.cat-tile b { font-family: var(--ff-head); font-weight: 800; letter-spacing: -.01em; font-size: 24px; color: var(--ink); }
.cat-tile span { font-size: 14px; flex: 1; }
.cat-tile em { font-style: normal; font-weight: 700; font-size: 14px; color: var(--green); }

/* Список товаров */
.list-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.list-icon { width: 64px; height: 64px; border-radius: var(--r); background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.list-head h1 { font-size: 40px; }
.list-head p { color: var(--muted); margin-top: 4px; max-width: 680px; }
.list-head p a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.toolbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 12px 0 22px; border-top: 1px solid var(--line-soft); margin-bottom: 4px; }
.toolbar .count { margin-left: auto; color: var(--muted); font-size: 14px; }

/* Товар */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--text); text-decoration: none; }
.crumbs a:hover { color: var(--green); }
.crumbs i { font-size: 11px; }
.pdp { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 32px; align-items: start; }
.pdp-main { position: relative; border-radius: var(--r-lg); overflow: hidden; }
.pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pdp-thumbs button { width: 84px; border-radius: var(--r-sm); overflow: hidden; border: 2px solid transparent; }
.pdp-thumbs button.on { border-color: var(--green); }
.pdp-thumbs .media-stub span { display: none; }
.pdp-thumbs .media-stub i { font-size: 22px; }
.pdp-buy {
  position: sticky; top: calc(var(--top-h) + 20px);
  background: var(--white); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px;
}
.pdp-buy h1 { font-size: 34px; }
.pdp-short { font-size: 17px; color: var(--muted); }
.pdp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pdp-price .price-now { font-size: 44px; }
.pdp-price .price-old { font-size: 18px; }
.opt-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--bg-soft); }
.opt i { font-size: 18px; color: var(--muted); }
.opt b { display: block; font-size: 15px; color: var(--ink); }
.opt small { font-size: 13px; color: var(--muted); }
.opt.on { border-color: var(--green); background: var(--green-tint); }
.opt.on i { color: var(--green); }
.pdp-row { display: flex; align-items: center; gap: 12px; }
.pdp-sum { margin-left: auto; font-family: var(--ff-num); font-weight: 400; font-size: 26px; color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); height: 46px; background: var(--bg-soft); }
.qty button { width: 44px; height: 44px; color: var(--green); font-size: 13px; }
.qty input { width: 52px; border: 0; background: transparent; text-align: center; font-size: 17px; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; }
.in-cart { display: flex; align-items: center; gap: 8px; justify-content: center; font-weight: 600; text-decoration: none; font-size: 15px; }
.pdp-perks { list-style: none; padding: 16px 0 0; margin: 4px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 10px; font-size: 14px; }
.pdp-perks i { width: 22px; color: var(--green); }
.pdp-info { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; margin-top: 44px; }
.pdp-info h2 { font-size: 26px; margin-bottom: 14px; }
.pdp-info p { font-size: 17px; line-height: 1.65; }
.specs { margin: 0; background: var(--white); border-radius: var(--r); overflow: hidden; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; font-size: 15px; }
.specs div:nth-child(odd) { background: var(--bg-soft); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

/* Корзина и оформление */
.checkout-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.step { background: var(--white); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: var(--shadow); margin-bottom: 18px; }
.step h2 { font-size: 24px; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-no { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.freebar { margin-bottom: 8px; }
.freebar-track { height: 8px; border-radius: var(--r-pill); background: var(--bg-warm); overflow: hidden; }
.freebar-track span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .4s; }
.freebar p { font-size: 14px; margin-top: 8px; color: var(--muted); }
.freebar p i { color: var(--green); }
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 96px 38px; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.line-media .media { aspect-ratio: 1; border-radius: var(--r-sm); }
.line-media .media-stub span { display: none; }
.line-media .media-stub i { font-size: 26px; }
.line-info { display: flex; flex-direction: column; gap: 3px; }
.line-title { color: var(--ink); text-decoration: none; font-weight: 600; }
.line-sum { text-align: right; font-size: 17px; color: var(--ink); }
.switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; margin-top: 4px; cursor: pointer; }
.switch small { white-space: nowrap; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { width: 34px; height: 20px; border-radius: var(--r-pill); background: var(--line); position: relative; transition: background var(--ease); flex-shrink: 0; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform var(--ease); }
.switch input:checked + .switch-ui { background: var(--green); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--green); outline-offset: 2px; }
.delivery-line { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r-sm); background: var(--green-tint); font-size: 14px; }
.delivery-line i { color: var(--green); }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.pay-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); cursor: pointer; }
.pay-opt input { position: absolute; opacity: 0; }
.pay-opt > i { font-size: 20px; color: var(--green); }
.pay-opt b { display: block; color: var(--ink); font-size: 15px; }
.pay-opt small { color: var(--muted); font-size: 13px; }
.pay-opt.on { border-color: var(--green); background: var(--green-tint); }
.pay-opt.off { opacity: .5; cursor: not-allowed; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.agree input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

.receipt {
  position: sticky; top: calc(var(--top-h) + 20px);
  background: var(--white); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  /* «чековый» зубчатый низ */
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 50% 100% / 22px 100% repeat-x;
  mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 50% 100% / 22px 100% repeat-x;
  padding-bottom: 34px;
}
.receipt h2 { font-size: 24px; margin-bottom: 6px; }
.r-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.r-save { color: var(--corten); font-weight: 600; }
.r-promo { color: var(--green); font-weight: 600; }
.promo { display: flex; gap: 8px; margin-top: 6px; }
.promo input { padding: 10px 14px; text-transform: uppercase; }
.promo button { padding: 0 18px; border-radius: var(--r-sm); background: var(--ink); color: var(--white); font-weight: 700; }
.r-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; margin-top: 6px; border-top: 2px dashed var(--line); }
.r-total span { font-weight: 600; color: var(--ink); }
.r-total b { font-family: var(--ff-num); font-weight: 400; font-size: 32px; color: var(--ink); }
.back-shop { text-align: center; font-size: 14px; font-weight: 600; text-decoration: none; margin-top: 4px; }

/* Готово */
.done { max-width: 620px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done-badge { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 36px; box-shadow: 0 0 0 10px var(--green-tint); }
.done h1 { font-size: 42px; }
.done-sum { font-size: 18px; }
.summary { width: 100%; text-align: left; margin: 6px 0; background: var(--white); border-radius: var(--r); overflow: hidden; }
.summary div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; font-size: 15px; }
.summary div:nth-child(odd) { background: var(--bg-soft); }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }

/* Отказ */
.withdraw { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.seller { background: var(--bg-warm); border-radius: var(--r-lg); padding: 24px; }
.seller h2 { font-size: 22px; margin-bottom: 12px; }
.seller dl { margin: 0; display: grid; gap: 10px; font-size: 14px; }
.seller dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.seller dd { margin: 0; color: var(--ink); }

/* Условия: доставка, возврат и гарантия */
.terms-tabs { margin-bottom: 22px; }
.terms-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap; }
.terms-tabs a.on { background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.terms-tabs a.on i { color: var(--green); }
.terms-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.terms-facts div { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r); background: var(--green); color: rgba(255, 255, 255, .8); font-size: 14px; line-height: 1.35; }
.terms-facts div:nth-child(even) { background: var(--white); color: var(--muted); }
.terms-facts i { font-size: 20px; margin-bottom: 8px; color: #F0A46E; }
.terms-facts div:nth-child(even) i { color: var(--green); }
.terms-facts b { font-family: var(--ff-num); font-weight: 400; font-size: 26px; color: var(--white); line-height: 1.1; }
.terms-facts div:nth-child(even) b { color: var(--ink); }
.terms-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.terms-main { display: flex; flex-direction: column; gap: 14px; }
.terms-block { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding: 24px 26px; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.terms-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint); color: var(--green); font-size: 19px; }
.terms-block h2 { font-size: 22px; margin: 10px 0 12px; }
.terms-block p { font-size: 16px; line-height: 1.65; }
.terms-block p + p { margin-top: 10px; }
.terms-block b { color: var(--ink); }
.terms-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.terms-list li { position: relative; padding-left: 22px; line-height: 1.6; }
.terms-list li::before { content: ""; position: absolute; left: 4px; top: .65em; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.terms-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.terms-steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 56px; border-radius: var(--r-sm); background: var(--bg-soft); line-height: 1.55; }
.terms-steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font: 400 15px var(--ff-num); }
.terms-steps b { display: block; margin-bottom: 2px; }
.terms-note { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--corten-tint); font-size: 15px !important; }
.terms-note i { color: var(--corten); margin-right: 4px; }
.terms-aside { position: sticky; top: calc(var(--top-h) + 20px); display: flex; flex-direction: column; gap: 14px; }
.terms-help { padding: 24px; border-radius: var(--r-lg); background: var(--white); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.terms-help h2 { font-size: 22px; }
.terms-help p { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.terms-help .ghost { font-size: 14px; }
.terms-withdraw { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--corten); color: var(--white); text-decoration: none; }
.terms-withdraw > i:first-child { font-size: 22px; }
.terms-withdraw span { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.terms-withdraw small { opacity: .8; }
.terms-withdraw:hover { background: #8F4522; }

/* 6. Адаптив ------------------------------------------------- */
.only-mobile { display: none !important; }

@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks, .terms-facts { grid-template-columns: repeat(2, 1fr); }
  .top-phone span { display: none; }
  .checkout-wrap { grid-template-columns: minmax(0, 1fr) 340px; }
  .line { grid-template-columns: 72px minmax(0, 1fr) auto 38px; }
  .line-sum { grid-column: 2; grid-row: 2; text-align: left; }
  .line .stepper { grid-column: 3; grid-row: 1 / span 2; }
  .line .icon-btn { grid-column: 4; grid-row: 1 / span 2; }
  .line-media { grid-row: 1 / span 2; }
}

@media (max-width: 960px) {
  :root { --top-h: 112px; }
  .top-inner { flex-wrap: wrap; align-content: center; gap: 8px 10px; padding: 10px 14px; }
  .only-mobile { display: grid !important; }
  .brand { width: auto; margin-right: auto; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .search input { height: 42px; }
  .top-phone { margin-left: 0; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; height: auto; width: min(320px, 88vw);
    transform: translateX(-105%); transition: transform var(--ease); box-shadow: 20px 0 60px rgba(20, 20, 15, .2);
  }
  body.nav-open .side { transform: none; }
  .side-head { display: flex !important; align-items: center; justify-content: space-between; padding: 0 4px 10px 12px; }
  .side-head b { font-family: var(--ff-head); font-weight: 800; font-size: 24px; color: var(--ink); }
  #view { padding: 20px 18px 48px; }
  .foot { padding: 20px 18px 28px; }
  .foot-withdraw { margin-left: 0; }
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; min-height: 260px; }
  .hero-text { padding: 28px 24px 30px; }
  .pdp, .pdp-info, .checkout-wrap, .withdraw, .terms-wrap { grid-template-columns: minmax(0, 1fr); }
  .terms-aside { position: static; }
  .pdp-buy, .receipt { position: static; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cart-btn { padding: 0 14px; }
  .cart-btn-text { display: none; }
  .cart-count { top: -3px; right: -3px; }
  .brand-tag { display: none; }
  .grid, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px; gap: 6px; }
  .card-title { font-size: 15px; }
  .card-cat { display: none; }
  .price-now { font-size: 19px; }
  .card .buy { height: 38px; padding: 0 10px; font-size: 14px; }
  .card .stepper { height: 38px; }
  .card .stepper button { width: 32px; height: 32px; }
  .card .stepper span { font-size: 0; }
  .card .stepper span b { font-size: 15px; }
  .rail { grid-auto-columns: 200px; gap: 14px; }
  .rank { font-size: 52px; top: -22px; }
  .perks { grid-template-columns: 1fr; gap: 8px; }
  .perks li { padding: 12px 14px; }
  .sec { margin-top: 40px; }
  .sec-head { flex-wrap: wrap; align-items: flex-start; }
  .sec-head h2 { font-size: 28px; }
  .sec-sale { padding: 20px 14px; margin-left: -4px; margin-right: -4px; }
  .cats { grid-template-columns: 1fr; }
  .cat-tile { min-height: 0; }
  .list-head { align-items: flex-start; }
  .list-icon { width: 48px; height: 48px; font-size: 20px; border-radius: var(--r-sm); }
  .list-head h1 { font-size: 30px; }
  .toolbar { gap: 10px; }
  .seg { width: 100%; overflow-x: auto; }
  .seg button { padding: 8px 12px; }
  .toolbar .count { margin-left: 0; }
  .pdp-buy { padding: 20px; }
  .pdp-buy h1 { font-size: 28px; }
  .pdp-price .price-now { font-size: 36px; }
  .opt-group, .pay, .fields-2 { grid-template-columns: 1fr; }
  .step { padding: 20px 16px; border-radius: var(--r); }
  .terms-block { grid-template-columns: 1fr; gap: 0; padding: 20px 16px; border-radius: var(--r); }
  .terms-ic { width: 40px; height: 40px; font-size: 16px; }
  .terms-facts div { padding: 14px; }
  .terms-facts b { font-size: 22px; }
  .terms-tabs { display: flex; }
  .terms-tabs a { flex: 1; justify-content: center; padding: 9px 10px; }
  .line { grid-template-columns: 64px minmax(0, 1fr) 38px; gap: 6px 12px; align-items: start; }
  .line-media { grid-row: 1 / span 2; }
  .line-info { grid-column: 2; }
  .line .icon-btn { grid-column: 3; grid-row: 1; }
  .line .stepper { grid-column: 2; grid-row: 2; justify-self: start; }
  .line-sum { grid-column: 2 / span 2; grid-row: 2; justify-self: end; align-self: center; }
  .done h1 { font-size: 32px; }
  .toast { left: 12px; right: 12px; transform: translateY(calc(100% + 40px)); justify-content: space-between; }
  .toast.show { transform: none; }
}

/* 7. Печать — заявление об отказе */
@media print {
  .top, .side, .foot, .drawer, .scrim, .toast, .done .ghost { display: none !important; }
  .layout { display: block; }
  body { background: #fff; }
}
