/* ============================================================
   BOZEX Store — магазин техники.
   Фирменный шрифт Monument Extended (как на bozex.ru) + Inter.
   Три темы оформления переключаются в шапке: graphite, light, neon.
   ============================================================ */

@font-face {
  font-family: "Monument Extended";
  src: url("/shop-assets/fonts/MonumentExtended-Regular.woff2") format("woff2"),
       url("/shop-assets/fonts/MonumentExtended-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Monument Extended";
  src: url("/shop-assets/fonts/MonumentExtended-Bold.woff2") format("woff2"),
       url("/shop-assets/fonts/MonumentExtended-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/shop-assets/fonts/inter-cyrillic.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("/shop-assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

/* ── Светлая тема (по умолчанию) ─────────────────────────── */
:root, :root[data-theme="light"] {
  --bg: #f7f6f3;
  --bg-deep: #efece6;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --line: #e6e2d9; --line-solid: #e6e2d9; --line-strong: #cec8ba;
  --text: #14120e; --text-2: #56514a; --text-3: #8b857c;

  --accent: #b4472d; --accent-2: #c9553a; --accent-ink: #ffffff;
  --accent-glow: rgba(180, 71, 45, 0.2);
  --success: #157f45; --warn: #b47600; --danger: #c0392b;

  --radius-s: 3px; --radius: 4px; --radius-l: 6px;
  --shadow-1: none;
  --shadow-2: 0 12px 30px rgba(20, 18, 14, 0.1);
  --shadow-glow: 0 10px 26px var(--accent-glow);

  --hero-grad: radial-gradient(900px 460px at 80% -10%, #f0e6dc 0%, transparent 60%);
  --card-grad: none;
  --photo-bg: #efece6;
  color-scheme: light;
}

/* ── Тёмная тема: фуксия, как в прежнем неоновом варианте ── */
:root[data-theme="dark"] {
  --bg: #06040c;
  --bg-deep: #030208;
  --surface: #120d1e;
  --surface-2: #1a1230;
  --surface-glass: rgba(18, 13, 30, 0.8);
  --line: #2e1f4d; --line-solid: #2e1f4d; --line-strong: #462f74;
  --text: #f7f2ff; --text-2: #b3a4d4; --text-3: #7d6ea3;

  --accent: #c026d3; --accent-2: #f0abfc; --accent-ink: #ffffff;
  --accent-glow: rgba(192, 38, 211, 0.42);
  --success: #34d399; --warn: #fbbf24; --danger: #fb7185;

  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 20px 50px rgba(76, 8, 92, 0.55);
  --shadow-glow: 0 0 44px var(--accent-glow);

  --hero-grad: radial-gradient(900px 520px at 12% -8%, #3b0d55 0%, transparent 60%),
               radial-gradient(760px 480px at 92% 6%, #12224f 0%, transparent 58%);
  --card-grad: linear-gradient(160deg, rgba(240, 171, 252, 0.07), rgba(255,255,255,0));
  --photo-bg: #0d0817;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--hero-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.3s ease;
}

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

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.12; letter-spacing: -0.03em; font-weight: 700; }
h1 { font-size: clamp(32px, 5vw, 62px); }
h2 { font-size: clamp(24px, 3vw, 38px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0 0 14px; color: var(--text-2); max-width: 70ch; }

/* Фирменная типографика бренда — как на bozex.ru */
.brand-type { font-family: "Monument Extended", "Inter", sans-serif; letter-spacing: 0.02em; }

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1280px, 100% - 48px); margin: 0 auto; }
@media (max-width: 720px) { .wrap { width: min(1280px, 100% - 32px); } }

/* ── Шапка ───────────────────────────────────────────────── */
header.top {
  position: sticky; top: 0; z-index: 200;
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--line-solid);
}
.top-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }

.logo {
  font-family: "Monument Extended", sans-serif; font-weight: 700;
  font-size: 19px; letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 9px;
  white-space: nowrap;
}
.logo .spark {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 14px var(--accent); animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.82); } }

nav.main { display: flex; gap: 26px; margin-left: 8px; }
nav.main a {
  color: var(--text-2); font-size: 15px; font-weight: 500; position: relative;
  padding: 8px 0; transition: color 0.2s ease;
}
nav.main a::after {
  content: ""; position: absolute; inset: auto 0 2px 0; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
nav.main a:hover { color: var(--text); }
nav.main a:hover::after, nav.main a[aria-current="page"]::after { transform: scaleX(1); }
nav.main a[aria-current="page"] { color: var(--text); }

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

/* Переключатель тем — три кнопки */
.theme-switch {
  display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-solid);
}
.theme-switch button {
  width: 36px; height: 32px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-3); display: grid; place-items: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button:active { transform: scale(0.94); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px var(--accent-glow);
}
.theme-switch svg { width: 17px; height: 17px; }

.cart-button {
  position: relative; display: inline-flex; align-items: center; gap: 9px;
  height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border: 0; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 6px 18px var(--accent-glow);
  transition: transform 0.16s ease, box-shadow 0.25s ease, background 0.2s ease;
}
.cart-button:hover { background: var(--accent-2); box-shadow: 0 10px 26px var(--accent-glow); }
.cart-button:active { transform: scale(0.97); }
.cart-button svg { width: 18px; height: 18px; }
.cart-count {
  min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.22); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ── Кнопки ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 26px; border-radius: 14px; cursor: pointer; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15.5px;
  box-shadow: 0 8px 22px var(--accent-glow);
  transition: transform 0.16s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease, background 0.2s ease;
}
.btn:hover { background: var(--accent-2); box-shadow: 0 14px 34px var(--accent-glow); transform: translateY(-1px); }
.btn:active { transform: scale(0.98) translateY(0); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--text-3); transform: translateY(-1px); }
.btn.wide { width: 100%; }
.btn svg { width: 19px; height: 19px; }

/* ── Дисклеймер ──────────────────────────────────────────── */
.notice {
  display: flex; gap: 16px; align-items: flex-start; margin: 24px 0 0;
  padding: 20px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(240, 180, 41, 0.12), rgba(240, 180, 41, 0.04));
  border: 1px solid rgba(240, 180, 41, 0.32);
}
.notice .icon { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: rgba(240, 180, 41, 0.16); color: var(--warn); }
.notice .icon svg { width: 21px; height: 21px; }
.notice h4 { margin: 0 0 6px; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.notice p { margin: 0; font-size: 14.5px; color: var(--text-2); max-width: none; }

/* ── Экран знакомства ────────────────────────────────────── */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.hero-title { font-family: "Monument Extended", sans-serif; font-size: clamp(30px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.01em; }
.hero-lead { font-size: 18.5px; line-height: 1.6; margin-top: 20px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-stats { display: flex; gap: 34px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat .value { font-size: 27px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-stat .label { font-size: 13px; color: var(--text-3); }

.hero-visual { position: relative; }
.hero-photo {
  border-radius: var(--radius-l); overflow: hidden; aspect-ratio: 1;
  background: var(--photo-bg); border: 1px solid var(--line-solid); box-shadow: var(--shadow-2);
  animation: floaty 7s ease-in-out infinite;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ── Фильтры каталога ────────────────────────────────────── */
.filters {
  position: sticky; top: 72px; z-index: 60; padding: 16px 0;
  background: linear-gradient(180deg, var(--bg) 55%, transparent);
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-solid); background: var(--surface);
  color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.14s ease;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 16px var(--accent-glow); }
.chip .dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25); }
.chip .count { font-size: 12px; opacity: 0.65; font-variant-numeric: tabular-nums; }

.sort-select {
  height: 40px; padding: 0 38px 0 14px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-solid);
  font-size: 14px; 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='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}

/* ── Сетка товаров ───────────────────────────────────────── */
.grid-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

.model-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); background-image: var(--card-grad);
  border: 1px solid var(--line-solid); border-radius: var(--radius-l);
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease, border-color 0.3s ease;
}
.model-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
/* 3:4 — та же пропорция, что у съёмки на Wildberries: инфографика видна целиком */
.model-photo { position: relative; aspect-ratio: 3 / 4; background: var(--photo-bg); overflow: hidden; }
.model-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.model-photo img.hidden { opacity: 0; }
.model-card:hover .model-photo img { transform: scale(1.05); }

.tag {
  padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em;
  backdrop-filter: blur(10px); background: rgba(0,0,0,0.55); color: #fff;
}
.tag.accent { background: var(--accent); }
.tag.warn { background: rgba(240, 180, 41, 0.92); color: #241a00; }
.tag.rating { display: inline-flex; align-items: center; gap: 4px; }

.model-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.model-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.model-brand { font-family: "Monument Extended", sans-serif; font-size: 14px; letter-spacing: 0.1em; color: var(--text-2); }
.model-name { font-size: 17px; font-weight: 620; letter-spacing: -0.01em; line-height: 1.25; }
.stock-line { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.wb-mark { color: #e112bd; font-weight: 600; }

.swatches { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: transform 0.18s ease, border-color 0.2s ease;
}
.swatch:hover { transform: scale(1.14); }
.swatch[aria-pressed="true"] { border-color: var(--accent); transform: scale(1.1); }

.model-foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 6px; }
.price-block { display: flex; flex-direction: column; gap: 2px; }
.price { font-size: 22px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.price-old { font-size: 13.5px; color: var(--text-3); text-decoration: line-through; }
.add-mini {
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line-strong); cursor: pointer;
  background: var(--surface-2); color: var(--text); display: grid; place-items: center;
  transition: background 0.2s ease, transform 0.16s ease, border-color 0.2s ease, color 0.2s ease;
}
.add-mini:hover { background: var(--accent); border-color: transparent; color: var(--accent-ink); transform: scale(1.06); }
.add-mini:active { transform: scale(0.94); }
.add-mini svg { width: 20px; height: 20px; }

/* ── Страница модели ─────────────────────────────────────── */
.product { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 52px; padding: 34px 0 20px; align-items: start; }
.gallery { position: sticky; top: 96px; display: grid; gap: 14px; }
.gallery-main {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-l); overflow: hidden;
  background: var(--photo-bg); border: 1px solid var(--line-solid); cursor: pointer;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none;
}
.gallery-main.swipeable { cursor: grab; }
.gallery-main.swipeable:active { cursor: grabbing; }
.gallery-main:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Стрелки листания: на мыши появляются при наведении, на телефоне видны всегда */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(12, 10, 20, 0.55); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.22s ease, background 0.2s ease, transform 0.16s ease;
}
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery-arrow svg { width: 22px; height: 22px; }
.gallery-arrow:hover { background: rgba(12, 10, 20, 0.82); }
.gallery-arrow:active { transform: translateY(-50%) scale(0.92); }
.gallery-main:hover .gallery-arrow, .gallery-main:focus-within .gallery-arrow { opacity: 1; }

.gallery-zoom {
  position: absolute; top: 12px; right: 12px; z-index: 4; width: 42px; height: 42px;
  border-radius: 50%; border: 0; cursor: pointer; padding: 0; display: grid; place-items: center;
  background: rgba(12, 10, 20, 0.55); color: #fff; backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 0.22s ease, background 0.2s ease;
}
.gallery-zoom svg { width: 19px; height: 19px; }
.gallery-zoom:hover { background: rgba(12, 10, 20, 0.82); }
.gallery-main:hover .gallery-zoom, .gallery-main:focus-within .gallery-zoom { opacity: 1; }

.gallery-counter {
  position: absolute; top: 12px; left: 12px; z-index: 4; padding: 5px 11px; border-radius: 999px;
  background: rgba(12, 10, 20, 0.55); color: #fff; font-size: 12.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; backdrop-filter: blur(8px);
}

.gallery-nav {
  position: absolute; inset: auto 0 16px 0; display: flex; justify-content: center; gap: 6px; z-index: 3;
  padding: 0 60px; flex-wrap: wrap;
}
.gallery-nav.many { gap: 4px; }
.gallery-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.4); border: 0; padding: 0; cursor: pointer; transition: all 0.25s ease; }
.gallery-nav.many .gallery-dot { width: 6px; height: 6px; }
.gallery-dot[aria-pressed="true"] { width: 22px; border-radius: 999px; background: #fff; }
.gallery-nav.many .gallery-dot[aria-pressed="true"] { width: 16px; }

.thumbs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.thumb-slot { position: relative; }
.thumb {
  padding: 0; border: 1px solid var(--line-solid); border-radius: 12px; overflow: hidden; cursor: pointer;
  background: var(--photo-bg); transition: border-color 0.2s ease, transform 0.18s ease; width: 100%; display: block;
}
.thumb:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.thumb[aria-pressed="true"] { border-color: var(--accent); }
.thumb img { aspect-ratio: 1; object-fit: cover; width: 100%; }

/* ── Правка карточки прямо на странице (видно только владельцу) ── */
.thumb-remove {
  position: absolute; top: -7px; right: -7px; z-index: 3; width: 24px; height: 24px; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer; display: grid; place-items: center;
  background: var(--danger); color: #fff; opacity: 0; transition: opacity 0.18s ease, transform 0.15s ease;
}
.thumb-remove svg { width: 12px; height: 12px; }
.thumb-slot:hover .thumb-remove { opacity: 1; }
.thumb-remove:hover { transform: scale(1.12); }
.thumb-slot.busy { opacity: 0.4; pointer-events: none; }

.thumb-add {
  display: grid; place-items: center; gap: 2px; cursor: pointer; aspect-ratio: 1;
  border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); color: var(--text-3);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.thumb-add:hover { border-color: var(--accent); color: var(--text); background: var(--surface); }
.thumb-add .plus { font-size: 22px; line-height: 1; font-weight: 300; }
.thumb-add .label { font-size: 9.5px; text-align: center; letter-spacing: 0.02em; padding: 0 4px; }
.thumb-add.busy { opacity: 0.5; pointer-events: none; }
.thumbs.drop-target { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 8px; }

.owner-restore {
  display: inline-flex; align-items: center; gap: 8px; align-self: start; cursor: pointer;
  padding: 8px 14px; border-radius: 3px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--text-2); font-size: 13px;
}
.owner-restore:hover { color: var(--text); border-color: var(--accent); }
.owner-restore svg { width: 15px; height: 15px; }

[data-owner-price] { cursor: text; border-radius: 4px; transition: box-shadow 0.2s ease; }
[data-owner-price]:hover { box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 6px var(--surface-2); }
.price-input {
  font: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; color: var(--text);
  width: 5.5ch; min-height: 0; padding: 0 6px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--accent); font-variant-numeric: tabular-nums;
}

.product-info h1 { font-size: clamp(26px, 3vw, 40px); }
.rating-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text-2); }
.stars { display: inline-flex; gap: 2px; color: var(--warn); }
.stars svg { width: 16px; height: 16px; }

.price-large { font-size: 40px; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.color-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.color-option {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid var(--line-solid); background: var(--surface); cursor: pointer; color: var(--text-2);
  font-size: 14px; transition: border-color 0.2s ease, color 0.2s ease, transform 0.16s ease;
}
.color-option:hover { transform: translateY(-1px); color: var(--text); border-color: var(--line-strong); }
.color-option[aria-pressed="true"] { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent) inset; }
.color-option .dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2); }

.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; }
.qty button { width: 46px; height: 52px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 19px; transition: background 0.2s ease; }
.qty button:hover { background: var(--surface); }
.qty span { min-width: 46px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }

.specs { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.specs td { padding: 12px 0; border-bottom: 1px solid var(--line-solid); vertical-align: top; }
.specs td:first-child { color: var(--text-3); width: 45%; }

.pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-solid); font-size: 13.5px; color: var(--text-2);
}
.pill svg { width: 15px; height: 15px; color: var(--success); }

/* ── Отзывы ──────────────────────────────────────────────── */
.reviews-head { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; margin-bottom: 26px; }
.reviews-score { text-align: center; }
.reviews-score .value { font-size: 54px; font-weight: 780; line-height: 1; letter-spacing: -0.03em; }
.bars { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-3); }
.bar { flex: 1; height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--warn); transition: width 0.9s cubic-bezier(0.22,1,0.36,1); }

.reviews { columns: 3 300px; column-gap: 18px; }
.review {
  break-inside: avoid; margin-bottom: 18px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line-solid);
}
.review-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 15px;
}
.review-name { font-weight: 600; font-size: 14.5px; }
.review-date { font-size: 12.5px; color: var(--text-3); }
.review p { font-size: 14.5px; color: var(--text); margin: 0 0 8px; }
.review .pros-cons { font-size: 13.5px; color: var(--text-2); }
.review-photos { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.review-photos img { width: 66px; height: 66px; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: transform 0.2s ease; }
.review-photos img:hover { transform: scale(1.06); }
.review-answer { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }

/* ── Корзина ─────────────────────────────────────────────── */
.drawer-back {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.drawer-back.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 310; width: min(440px, 100%);
  background: var(--surface); border-left: 1px solid var(--line-solid);
  display: flex; flex-direction: column; transform: translateX(102%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1); box-shadow: var(--shadow-2);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line-solid); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { padding: 20px 24px 26px; border-top: 1px solid var(--line-solid); display: grid; gap: 14px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-solid); cursor: pointer;
  background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; transition: all 0.2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }

.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; animation: slideIn 0.35s cubic-bezier(0.22,1,0.36,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.cart-item img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--photo-bg); }
.cart-item .title { font-size: 14.5px; font-weight: 550; line-height: 1.3; }
.cart-item .meta { font-size: 12.5px; color: var(--text-3); }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-solid); border-radius: 10px; overflow: hidden; }
.cart-qty button { width: 30px; height: 32px; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; }
.cart-qty span { min-width: 30px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; }

.total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; color: var(--text-2); }
.total-row.big { font-size: 21px; font-weight: 750; color: var(--text); }

/* ── Оформление ──────────────────────────────────────────── */
.checkout { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 32px; align-items: start; padding: 28px 0 40px; }
.panel { background: var(--surface); border: 1px solid var(--line-solid); border-radius: var(--radius-l); padding: 26px; }
.panel + .panel { margin-top: 18px; }
.summary { position: sticky; top: 96px; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
label.field { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
label.field.wide { grid-column: 1 / -1; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; min-height: 52px; padding: 14px 16px; border-radius: 14px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-solid);
  font: inherit; font-size: 15.5px; transition: border-color 0.2s ease, background 0.2s ease;
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.field .hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
.field .error { font-size: 12.5px; color: var(--danger); }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.radio-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line-solid); background: var(--surface-2); transition: border-color 0.2s ease, transform 0.16s ease;
}
.radio-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.radio-card input { width: 20px; height: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.radio-card .name { font-weight: 600; font-size: 14.5px; color: var(--text); }
.radio-card .desc { font-size: 13px; color: var(--text-3); }
.radio-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

/* ── Служебное ───────────────────────────────────────────── */
.section { padding: 54px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { font-family: "Monument Extended", sans-serif; font-size: 11px; letter-spacing: 0.16em; color: var(--text-3); margin-bottom: 14px; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); } .small { font-size: 13.5px; }
.good { color: var(--success); } .bad { color: var(--danger); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { padding: 24px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line-solid); }
.feature .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--surface-2); color: var(--accent); }
.feature .ico svg { width: 22px; height: 22px; }

footer.bottom { border-top: 1px solid var(--line-solid); margin-top: 60px; padding: 34px 0 46px; color: var(--text-3); font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.visible { opacity: 1; transform: none; }

/* Просмотр фото на весь экран */
.lightbox {
  position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.92);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 92vw; max-height: 88vh; border-radius: 14px; user-select: none; -webkit-user-select: none;
  touch-action: pan-y; animation: zoomIn 0.35s cubic-bezier(0.22,1,0.36,1);
}
@keyframes zoomIn { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox .close { position: absolute; top: 24px; right: 24px; }

/* Листание на весь экран: стрелки, счётчик кадров */
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(8px); transition: background 0.2s ease, transform 0.16s ease;
}
.lightbox-arrow.prev { left: clamp(10px, 3vw, 40px); }
.lightbox-arrow.next { right: clamp(10px, 3vw, 40px); }
.lightbox-arrow svg { width: 26px; height: 26px; }
.lightbox-arrow:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-arrow:active { transform: translateY(-50%) scale(0.92); }
.lightbox.single .lightbox-arrow, .lightbox.single .lightbox-counter { display: none; }
.lightbox-counter {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 6;
  padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,0.12); color: #fff;
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px);
}

.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 500; transform: translate(-50%, 24px);
  padding: 14px 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2); font-size: 14.5px; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1024px) {
  .hero, .product, .checkout { grid-template-columns: 1fr; gap: 32px; }
  .gallery, .summary { position: static; }
  .reviews { columns: 2 280px; }
}
@media (max-width: 768px) {
  nav.main { display: none; }
  .reviews { columns: 1; }
  .grid-models { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .hero { padding-top: 32px; }

  /* Превью на телефоне — лента, которая прокручивается вбок, а не мелкая сетка */
  .thumbs {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .thumbs::-webkit-scrollbar { height: 3px; }
  .thumbs::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
  .thumb { flex: 0 0 64px; scroll-snap-align: start; }

  /* На тач-экране стрелки видны сразу: наводить мышь нечем */
  .gallery-arrow, .gallery-zoom { opacity: 1; }
  .gallery-arrow { width: 44px; height: 44px; background: rgba(12, 10, 20, 0.45); }
  .gallery-nav { padding: 0 56px; bottom: 12px; }
  .lightbox-arrow { width: 46px; height: 46px; }
  .lightbox .close { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Оценка: пять звёзд, последняя закрашена частично ────── */
.stars { display: inline-flex; gap: 2px; align-items: center; }
.star { position: relative; width: 15px; height: 15px; display: inline-block; }
.star svg { position: absolute; inset: 0; width: 15px; height: 15px; }
.star-bg { fill: var(--line-strong); }
.star-fill { position: absolute; inset: 0; overflow: hidden; }
.star-fill svg { fill: #ffb400; }
.rating-line { display: inline-flex; align-items: center; gap: 7px; }

/* ── Синяя галочка «Оригинал», как на Wildberries ────────── */
.original {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff;
  background: rgba(10, 20, 40, 0.62); backdrop-filter: blur(8px);
}
.original svg { width: 15px; height: 15px; color: #1a8fe3; }

/* Тот же знак, но под фотографией: без тёмной плашки, в цвет текста */
.original.inline {
  background: none; backdrop-filter: none; padding: 0; color: var(--text-3);
  font-size: 12px; font-weight: 550; letter-spacing: 0.01em;
}

/* ── Состояния наличия ───────────────────────────────────── */
.tag.wb { background: #cb11ab; }
.tag.off { background: rgba(90, 96, 110, 0.9); }
.model-card.out .model-photo img { filter: grayscale(1) opacity(0.5); }
.model-card.out .price { color: var(--text-3); }
.swatch.muted-swatch { opacity: 0.32; }
.add-mini.wb { background: #cb11ab; border-color: transparent; color: #fff; }
.add-mini.wb:hover { background: #e112bd; }

/* Переключатель вариантов сайта */
.theme-switch a {
  width: 34px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  color: var(--text-3); font-weight: 700; font-size: 13px; text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.theme-switch a:hover { color: var(--text); }
.theme-switch a[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ── Три карты на первом экране ──────────────────────────── */
.hero-cards { position: relative; height: clamp(320px, 34vw, 470px); }
.hero-card {
  position: absolute; width: 46%; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden;
  background: var(--photo-bg); border: 1px solid var(--line-solid); box-shadow: var(--shadow-2);
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s ease, z-index 0s;
  display: block;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card .cap {
  position: absolute; inset: auto 0 0 0; padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.82)); color: #fff;
}
.hero-card .cap .n { font-size: 14px; font-weight: 620; }
.hero-card .cap .p { font-size: 13px; opacity: 0.85; }
.hero-card:nth-child(1) { left: 0; top: 8%; transform: rotate(-8deg); z-index: 1; }
.hero-card:nth-child(2) { left: 27%; top: 0; transform: rotate(2deg); z-index: 3; }
.hero-card:nth-child(3) { right: 0; top: 14%; transform: rotate(9deg); z-index: 2; }
.hero-card:hover { transform: rotate(0deg) translateY(-14px) scale(1.04); z-index: 5; box-shadow: var(--shadow-glow), var(--shadow-2); }

/* ── Разделение каталога по брендам ──────────────────────── */
.brand-block { margin-bottom: 44px; }
.brand-head { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; }
.brand-head h3 { font-family: "Monument Extended", sans-serif; font-size: 20px; margin: 0; letter-spacing: 0.04em; }
.brand-head .line { flex: 1; height: 1px; background: var(--line-solid); }
.brand-head .hint { font-size: 13px; color: var(--text-3); }

/* ── Карта выбора пункта выдачи ──────────────────────────── */
.map-box { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-solid); margin-top: 12px; }
.pvz-list { display: grid; gap: 8px; max-height: 220px; overflow-y: auto; margin-top: 12px; }
.pvz-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-solid); background: var(--surface-2); text-align: left; width: 100%;
  transition: border-color 0.2s ease;
}
.pvz-item:hover { border-color: var(--line-strong); }
.pvz-item[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pvz-item .addr { font-size: 14px; color: var(--text); }
.pvz-item .meta { font-size: 12.5px; color: var(--text-3); }


/* ── Журнальная подача каталога ──────────────────────────── */
h1, h2 { letter-spacing: -0.045em; }
.model-card { border-width: 0; border-bottom: 1px solid var(--line-solid); border-radius: 0; background: transparent; }
.model-card:hover { transform: none; box-shadow: none; }
.model-card:hover .model-photo img { transform: scale(1.03); }
.grid-models { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 38px 30px; }
.model-photo { border-radius: 3px; }
.btn { border-radius: 3px; text-transform: uppercase; letter-spacing: 0.07em; font-size: 13px; font-weight: 650; }
.chip, .badge, .tag { border-radius: 2px; }
.hero-card { border-radius: 3px; }
.journal-lead { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.35; color: var(--text); max-width: 22ch; }
.theme-switch { border-radius: 3px; }
.theme-switch button { border-radius: 2px; }
.cart-button { border-radius: 3px; }

/* ── Первый экран на телефоне: карточки не должны наезжать на подписи ── */
@media (max-width: 768px) {
  .hero-cards { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  /* Именно relative, а не static: иначе подпись с ценой абсолютится
     относительно всего блока карточек и уезжает под нижний ряд. */
  .hero-card { position: relative; left: auto; right: auto; top: auto; width: auto; transform: none !important; aspect-ratio: 3 / 4; }
  /* Веер раскладывается в сетку: смещения десктопной раскладки снимаются */
  .hero-card:nth-child(1), .hero-card:nth-child(2), .hero-card:nth-child(3) {
    left: auto; right: auto; top: auto; z-index: auto;
  }
  .hero-card:nth-child(1) { grid-column: span 2; aspect-ratio: 16 / 11; }
  .hero-card .cap { padding: 10px 12px; }
  .hero-card .cap .n { font-size: 13px; line-height: 1.25; }
  .hero-card .cap .p { font-size: 12.5px; }
  .hero-card:hover { transform: none !important; }
  .hero-title, h1 { font-size: clamp(28px, 9vw, 44px); }
  .journal-lead { font-size: 17px; max-width: none; }
}

/* Кнопка кабинета видна только владельцу — сервер отдаёт её лишь локально */
.admin-link { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border-radius: 3px; border: 1px solid var(--line-strong); color: var(--text-2); font-size: 13.5px; }
.admin-link:hover { color: var(--text); border-color: var(--accent); }

/* Первый экран журнальной главной */
.journal-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: end; }
.journal-cards { height: clamp(260px, 26vw, 360px); }
@media (max-width: 900px) {
  .journal-hero { grid-template-columns: 1fr; gap: 24px; }
  .journal-hero .hero-cards, .journal-cards { height: auto; }
}
/* Никакой горизонтальной прокрутки на телефоне */
html, body { max-width: 100%; overflow-x: hidden; }

/* ══ Телефон: витрина как на маркетплейсе ═══════════════════
   Правила идут последними в файле — журнальные переопределения
   каталога выше по тексту иначе перебивают их и оставляют один
   столбец с огромными карточками. */
@media (max-width: 768px) {
  /* Товары — ровно два в ряд, карточка компактная */
  .grid-models { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
  .model-body { padding: 10px 2px 14px; gap: 6px; }
  .model-brand { font-size: 10.5px; letter-spacing: 0.05em; }
  .model-name { font-size: 13px; line-height: 1.3; font-weight: 550; }
  .model-card .rating-line.small { font-size: 12px; }
  .price { font-size: 17px; }
  .swatches { gap: 5px; }
  .swatch { width: 19px; height: 19px; border-width: 1.5px; }
  .add-mini { width: 38px; height: 38px; border-radius: 10px; }
  .add-mini svg { width: 17px; height: 17px; }
  .tag { padding: 3px 7px; font-size: 10px; }
  .original.inline { font-size: 9.5px; gap: 3px; }
  .original svg { width: 11px; height: 11px; }
  .model-meta { gap: 6px; flex-wrap: nowrap; }
  .stock-line { font-size: 11.5px; margin-top: 0; }
  .model-foot { padding-top: 2px; gap: 8px; }
  .brand-block { margin-bottom: 28px; }
  .section { padding: 30px 0; }

  /* Первый экран: три карточки одинакового размера, листаются вбок */
  .hero-cards, .journal-cards {
    display: flex; height: auto; gap: 10px; overflow-x: auto; padding-bottom: 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  }
  .hero-cards::-webkit-scrollbar { height: 3px; }
  .hero-cards::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
  .hero-card, .hero-card:nth-child(1), .hero-card:nth-child(2), .hero-card:nth-child(3) {
    position: relative; flex: 0 0 60%; width: auto; aspect-ratio: 3 / 4;
    left: auto; right: auto; top: auto; z-index: auto; transform: none !important;
    scroll-snap-align: start;
  }
}
