/* SPB SMART — витрина. Один файл, без внешних зависимостей: в РФ CDN ненадёжны. */

:root {
  color-scheme: dark;
  --bg: #0a0c12;
  --bg-elev: #11141c;
  --surface: #161a24;
  --surface-2: #1d222e;
  --line: #262c3a;
  --line-soft: #1e2431;
  --text: #eef1f7;
  --text-dim: #a2abbd;
  --text-mute: #6f7a90;
  --accent: #4f8dff;
  --accent-2: #22d3ee;
  --accent-ink: #04070f;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow: 0 20px 50px -24px rgb(0 0 0 / 0.75);
  --shadow-card: 0 2px 4px rgb(0 0 0 / 0.2), 0 16px 40px -28px rgb(0 0 0 / 0.6);
  --ring: 0 0 0 3px rgb(79 141 255 / 0.35);
  --maxw: 1280px;
  --header-h: 106px; /* две строки шапки: логотип+поиск и полоса категорий */
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --line: #e2e6ef;
  --line-soft: #edf0f6;
  --text: #101423;
  --text-dim: #4d566b;
  --text-mute: #7b8497;
  --accent: #2563eb;
  --accent-2: #0891b2;
  --accent-ink: #ffffff;
  --shadow: 0 20px 50px -30px rgb(16 20 35 / 0.28);
  --shadow-card: 0 1px 2px rgb(16 20 35 / 0.05), 0 12px 30px -22px rgb(16 20 35 / 0.25);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) {
    color-scheme: light;
    --bg: #f6f7fb; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f1f3f9;
    --line: #e2e6ef; --line-soft: #edf0f6; --text: #101423; --text-dim: #4d566b;
    --text-mute: #7b8497; --accent: #2563eb; --accent-2: #0891b2; --accent-ink: #ffffff;
    --shadow: 0 20px 50px -30px rgb(16 20 35 / 0.28);
    --shadow-card: 0 1px 2px rgb(16 20 35 / 0.05), 0 12px 30px -22px rgb(16 20 35 / 0.25);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; display: block; }
input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

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

/* ---------- draft banner ---------- */
.draft-bar {
  background: linear-gradient(135deg, #b45309, #92400e);
  color: #fff7ed; font-size: 13px; padding: 8px 0;
}
.draft-bar .wrap { display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; flex-wrap: wrap; }
.draft-bar strong { font-weight: 650; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { height: 64px; display: flex; align-items: center; gap: 18px; }

/* категории — отдельной строкой: в одной строке с поиском они наезжали друг на друга */
.header-strip { border-top: 1px solid var(--line-soft); }
.header-strip .nav {
  display: flex; gap: 2px; overflow-x: auto; padding-top: 5px; padding-bottom: 7px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.header-strip .nav::-webkit-scrollbar { display: none; }

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 19px; flex-shrink: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; font-size: 15px;
  box-shadow: 0 6px 18px -8px var(--accent);
}
.logo small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-mute); letter-spacing: 0.04em; text-transform: uppercase; margin-top: -3px; }

.nav a {
  padding: 8px 12px; border-radius: 10px; font-size: 14.5px; color: var(--text-dim);
  white-space: nowrap; transition: background .18s, color .18s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { color: var(--text); background: var(--surface); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer;
  transition: background .18s, border-color .18s, transform .18s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* в кнопке темы лежат оба значка — показываем только текущий */
#theme-btn svg { display: none; }
#theme-btn svg:first-child { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) #theme-btn svg:first-child { display: none; }
  :root:not([data-theme='dark']) #theme-btn svg:last-child { display: block; }
}
:root[data-theme='light'] #theme-btn svg:first-child { display: none; }
:root[data-theme='light'] #theme-btn svg:last-child { display: block; }
:root[data-theme='dark'] #theme-btn svg:first-child { display: block; }
:root[data-theme='dark'] #theme-btn svg:last-child { display: none; }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; line-height: 1;
  border: 2px solid var(--bg);
}
.cart-count[hidden] { display: none; }

.burger { display: none; }

/* ---------- search ---------- */
.search { position: relative; flex: 1; max-width: 560px; }
.search input {
  width: 100%; height: 40px; padding: 0 38px 0 38px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-soft); transition: border-color .18s, background .18s;
}
.search input:focus { border-color: var(--accent); background: var(--bg-elev); box-shadow: var(--ring); outline: none; }
.search input::placeholder { color: var(--text-mute); }
.search .search-icon { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--text-mute); pointer-events: none; }
.search .search-clear { position: absolute; right: 8px; top: 8px; width: 24px; height: 24px; border: 0; background: none; cursor: pointer; color: var(--text-mute); border-radius: 6px; }
.search .search-clear:hover { color: var(--text); background: var(--surface-2); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 44px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto; height: 520px;
  background: radial-gradient(ellipse at 30% 40%, rgb(79 141 255 / 0.22), transparent 60%),
              radial-gradient(ellipse at 75% 30%, rgb(34 211 238 / 0.16), transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.hero h1 {
  margin: 0 0 16px; font-size: clamp(32px, 4.4vw, 54px); line-height: 1.08;
  letter-spacing: -0.03em; font-weight: 780;
}
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin: 0 0 26px; font-size: clamp(16px, 1.3vw, 18.5px); color: var(--text-dim); max-width: 52ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.hero-stats div span { font-size: 13px; color: var(--text-mute); }

.hero-art {
  aspect-ratio: 4/3; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--line-soft); box-shadow: var(--shadow); overflow: hidden;
  display: grid; place-items: center; position: relative;
}
.hero-art svg { width: 78%; height: auto; }
.hero-art.has-photo { padding: 26px; display: block; }
.hero-tag {
  position: absolute; left: 14px; bottom: 14px; max-width: calc(100% - 28px);
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(16, 20, 35, .78); color: #fff; backdrop-filter: blur(6px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary { background: var(--grad); color: var(--accent-ink); box-shadow: 0 12px 28px -14px var(--accent); }
.btn-primary:hover { box-shadow: 0 16px 34px -14px var(--accent); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* ---------- sections ---------- */
.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.025em; font-weight: 720; }
.section-head p { margin: 6px 0 0; color: var(--text-dim); font-size: 14.5px; }
.link-more { color: var(--accent); font-weight: 600; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.link-more:hover { text-decoration: underline; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.cat {
  position: relative; padding: 20px 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line-soft); cursor: pointer; text-align: left;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 12px; min-height: 128px;
}
.cat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-card); }
.cat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.cat-icon svg { width: 22px; height: 22px; }
.cat strong { font-size: 15.5px; font-weight: 640; letter-spacing: -0.01em; }
.cat span { font-size: 12.5px; color: var(--text-mute); margin-top: auto; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }

.card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), border-color .22s, box-shadow .22s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: var(--shadow-card); }
.card-media {
  aspect-ratio: 1/1; background: linear-gradient(160deg, var(--surface-2), var(--surface));
  display: grid; place-items: center; cursor: pointer; padding: 18px; position: relative;
}
.card-media svg { width: 100%; height: 100%; }

/* ---------- реальные фото товаров ----------
   Съёмка каталожная, на белом фоне, поэтому подложка под фото всегда светлая —
   в тёмной теме тоже, иначе вокруг товара получается грязная серая рамка. */
.card-media img, .product-media img, .cart-item-media img, .hero-art img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.card-media.has-photo, .product-media.has-photo, .cart-item-media.has-photo, .hero-art.has-photo {
  background: #fff;
}
.card-media.has-photo img { transition: transform .28s ease; }
.card:hover .card-media.has-photo img { transform: scale(1.045); }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gthumb {
  width: 70px; height: 70px; padding: 5px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.gthumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gthumb:hover { border-color: var(--accent); }
.gthumb.active { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: -1px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-brand { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.card-title { font-size: 14.8px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; cursor: pointer; }
.card-title:hover { color: var(--accent); }
.card-price-row { margin-top: auto; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price { font-size: 19px; font-weight: 720; letter-spacing: -0.02em; }
.price-old { font-size: 13.5px; color: var(--text-mute); text-decoration: line-through; }
.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: var(--grad); color: var(--accent-ink);
  letter-spacing: .01em;
}
.badge-sale { background: linear-gradient(135deg, #f43f5e, #fb7185); color: #fff; }

.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.stock.order::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }

/* ---------- catalog layout ---------- */
.catalog { display: grid; grid-template-columns: 268px 1fr; gap: 28px; align-items: start; padding: 32px 0 60px; }
.filters {
  position: sticky; top: calc(var(--header-h) + 18px); background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 22px;
}
.filter-group h4 { margin: 0 0 11px; font-size: 12.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); font-weight: 650; }
.check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 14.5px; color: var(--text-dim); }
.check:hover { color: var(--text); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.check span.count { margin-left: auto; font-size: 12px; color: var(--text-mute); }

.range-row { display: flex; gap: 10px; align-items: center; }
.range-row input {
  width: 100%; height: 38px; padding: 0 10px; border-radius: 9px;
  background: var(--bg-elev); border: 1px solid var(--line); text-align: center;
}
.range-row input:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }

.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.catalog-head h1 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.025em; }
.catalog-head .muted { color: var(--text-mute); font-size: 14px; }
select.sort {
  height: 40px; padding: 0 36px 0 14px; border-radius: 11px; background: var(--surface);
  border: 1px solid var(--line); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f7a90' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px;
}
select.sort:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-soft);
  font-size: 13px; cursor: pointer;
}
.chip:hover { border-color: var(--line); }
.chip button { border: 0; background: none; cursor: pointer; color: var(--text-mute); line-height: 1; padding: 0; }
.chip button:hover { color: var(--danger); }

.empty { text-align: center; padding: 64px 20px; color: var(--text-dim); }
.empty svg { width: 56px; height: 56px; margin: 0 auto 16px; color: var(--text-mute); }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; padding: 28px 0 56px; align-items: start; }
.product-media {
  border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-soft); padding: 40px; display: grid; place-items: center; aspect-ratio: 1/1;
}
.product-media.has-photo { padding: 26px; }
.price-note { font-size: 12.5px; color: var(--text-mute); }
.price-note-block { font-size: 13.5px; color: var(--text-mute); margin: 0 0 14px; }
.product h1 { margin: 6px 0 12px; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.03em; line-height: 1.15; }
.product .price-block { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 8px; flex-wrap: wrap; }
.product .price-block .price { font-size: 32px; }
.product .short { color: var(--text-dim); font-size: 16px; margin: 0 0 20px; }
.product-buy { display: flex; gap: 12px; margin: 24px 0; flex-wrap: wrap; }
.product-buy .btn { min-width: 190px; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.spec-table tr { border-bottom: 1px solid var(--line-soft); }
.spec-table tr:last-child { border-bottom: 0; }
.spec-table td { padding: 11px 0; font-size: 14.5px; vertical-align: top; }
.spec-table td:first-child { color: var(--text-mute); width: 42%; padding-right: 16px; }
.pill-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; padding: 0; list-style: none; }
.pill-list li {
  font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2);
  border: 1px solid var(--line-soft); color: var(--text-dim);
}
.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 26px; }
.trust {
  display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-soft); font-size: 13px; color: var(--text-dim);
}
.trust svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }

.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--text-mute); padding: 22px 0 0; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- advantages / info blocks ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature {
  padding: 22px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line-soft);
}
.feature-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; color: var(--accent-ink); margin-bottom: 14px; }
.feature-icon svg { width: 21px; height: 21px; }
.feature h3 { margin: 0 0 7px; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.feature p { margin: 0; font-size: 14px; color: var(--text-dim); }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.info-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.info-card h3 { margin: 0 0 14px; font-size: 17px; letter-spacing: -0.02em; }
.info-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; }
.info-list li { display: flex; flex-direction: column; gap: 3px; font-size: 14.5px; }
.info-list strong { font-weight: 620; }
.info-list span { color: var(--text-mute); font-size: 13.5px; }

.page-copy { max-width: 76ch; padding: 8px 0 56px; }
.page-copy h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; margin: 22px 0 18px; }
.page-copy h2 { font-size: 20px; margin: 32px 0 12px; letter-spacing: -0.02em; }
.page-copy p, .page-copy li { color: var(--text-dim); font-size: 15.5px; }
.page-copy ul { padding-left: 20px; }

/* ---------- cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgb(4 6 12 / 0.62); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 90;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100%); z-index: 100;
  background: var(--bg-elev); border-left: 1px solid var(--line); box-shadow: var(--shadow);
  transform: translateX(102%); transition: transform .3s cubic-bezier(.3,.8,.3,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.drawer-head .icon-btn { margin-left: auto; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer-foot { padding: 18px 20px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 12px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.total-row.grand { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }

.cart-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.cart-item:last-child { border-bottom: 0; }
.cart-item-media { width: 62px; height: 62px; border-radius: var(--radius-sm); background: var(--surface-2); display: grid; place-items: center; padding: 7px; }
.cart-item-title { font-size: 14px; font-weight: 570; line-height: 1.35; }
.cart-item-price { font-size: 13.5px; color: var(--text-mute); margin-top: 3px; }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-top: 8px; }
.qty button { width: 28px; height: 28px; border: 0; background: var(--surface); cursor: pointer; color: var(--text-dim); }
.qty button:hover { background: var(--surface-2); color: var(--text); }
.qty span { min-width: 30px; text-align: center; font-size: 14px; font-weight: 600; }
.cart-item-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.cart-item-sum { font-weight: 650; font-size: 15px; white-space: nowrap; }
.remove-btn { border: 0; background: none; cursor: pointer; color: var(--text-mute); padding: 4px; border-radius: 6px; }
.remove-btn:hover { color: var(--danger); background: var(--surface-2); }

/* ---------- checkout form ---------- */
.form-grid { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; color: var(--text-dim); font-weight: 550; }
.field label .req { color: var(--danger); }
.field input, .field textarea, .field select {
  height: 44px; padding: 0 13px; border-radius: 11px; background: var(--bg);
  border: 1px solid var(--line); transition: border-color .18s, box-shadow .18s;
}
.field textarea { height: auto; min-height: 84px; padding: 11px 13px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }
.field .hint { font-size: 12.5px; color: var(--text-mute); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field .err { font-size: 12.5px; color: var(--danger); display: none; }
.field.invalid .err { display: block; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--line-soft); cursor: pointer; font-size: 14px;
}
.radio:hover { border-color: var(--line); }
.radio input { margin-top: 2px; accent-color: var(--accent); width: 17px; height: 17px; }
.radio strong { font-weight: 600; display: block; }
.radio span { color: var(--text-mute); font-size: 13px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.8px; color: var(--text-mute); }
.consent input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.consent a { color: var(--accent); }

.order-ok { text-align: center; padding: 30px 10px; }
.order-ok .tick {
  width: 62px; height: 62px; margin: 0 auto 18px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 18%, transparent);
  display: grid; place-items: center; color: var(--ok);
}
.order-ok .tick svg { width: 30px; height: 30px; }
.order-ok h3 { margin: 0 0 8px; font-size: 20px; letter-spacing: -0.02em; }
.order-ok p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 6px; }
.order-ok .num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; color: var(--text); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); background: var(--bg-elev); margin-top: 40px; padding: 44px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer h4 { margin: 0 0 14px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-mute); font-weight: 650; }
.footer ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer a, .footer li { font-size: 14px; color: var(--text-dim); }
.footer a:hover { color: var(--accent); }
.footer .about { font-size: 14px; color: var(--text-dim); max-width: 42ch; margin: 12px 0 0; }
.footer-bottom {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.8px; color: var(--text-mute);
}
.todo { color: var(--warn); font-size: 12.5px; }

/* ---------- toast ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 18px; font-size: 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease-out;
  max-width: min(92vw, 460px);
}
.toast svg { width: 18px; height: 18px; color: var(--ok); flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
.sk-card { height: 340px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .header-strip { display: none; }
  .header.nav-open .header-strip {
    display: block; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg-elev); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .header.nav-open .header-strip .nav { flex-direction: column; overflow: visible; padding: 10px 20px 16px; }
  .burger { display: grid; }
  .search { max-width: none; order: 5; flex-basis: 100%; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 10px; }
  :root { --header-h: 104px; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 15px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .price { font-size: 17px; }
  .hero { padding: 34px 0 26px; }
  .hero-stats { gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .section { padding: 34px 0; }
  .product-media { padding: 24px; }
  .product-buy .btn { min-width: 0; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .header, .footer, .drawer, .overlay, .toasts, .draft-bar { display: none !important; }
}
