/* Component styles */

/* Button */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 0 16px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-text);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  white-space: nowrap;
  position: relative;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn[data-size="sm"] { height: 32px; padding: 0 12px; font-size: 13px; }
.btn[data-size="lg"] { height: 48px; padding: 0 22px; font-size: 15px; }
.btn[data-block] { width: 100%; }

.btn[data-variant="primary"] {
  background: var(--c-primary);
  color: var(--c-primary-ink);
}
.btn[data-variant="primary"]:hover:not(:disabled) { background: var(--c-primary-hover); }
.btn[data-variant="primary"]:active:not(:disabled) { transform: translateY(1px); }

.btn[data-variant="accent"] {
  background: var(--c-accent);
  color: var(--c-accent-ink);
}
.btn[data-variant="accent"]:hover:not(:disabled) { background: var(--c-accent-hover); }

.btn[data-variant="secondary"] {
  background: var(--c-surface-2);
  border-color: var(--c-border);
  color: var(--c-text);
}
.btn[data-variant="secondary"]:hover:not(:disabled) {
  background: var(--c-surface);
  border-color: var(--c-border-strong);
}

.btn[data-variant="ghost"] {
  background: transparent;
  color: var(--c-text);
}
.btn[data-variant="ghost"]:hover:not(:disabled) { background: var(--c-surface); }

.btn[data-variant="danger"] {
  background: var(--c-danger);
  color: white;
}

.btn[data-variant="link"] {
  padding: 0; height: auto;
  color: var(--c-primary);
  background: transparent;
}
.btn[data-variant="link"]:hover { text-decoration: underline; }

.btn[data-icon-only] {
  width: 40px; padding: 0;
}
.btn[data-icon-only][data-size="sm"] { width: 32px; }
.btn[data-icon-only][data-size="lg"] { width: 48px; }

/* Icon button (circular header style) */
.iconbtn {
  appearance: none; border: 1px solid var(--c-border);
  background: var(--c-surface-2);
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-text);
  position: relative;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.iconbtn:hover { background: var(--c-surface); border-color: var(--c-border-strong); }
.iconbtn .dot {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--c-accent); color: var(--c-accent-ink);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-bg);
}

/* Input */
.input, .select, .textarea {
  appearance: none;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--c-surface-2);
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--c-text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: var(--shadow-focus);
}
.textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; }

.input-wrap { position: relative; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .leading {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--c-text-3); pointer-events: none;
}

/* Checkbox / radio */
.check {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 14px; color: var(--c-text);
}
.check input { appearance: none; width: 18px; height: 18px; border: 1.5px solid var(--c-border-strong);
  border-radius: 4px; background: var(--c-surface-2); display: grid; place-items: center; transition: var(--t-fast); }
.check input:checked { background: var(--c-primary); border-color: var(--c-primary); }
.check input:checked::after {
  content: ""; width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}
.check.radio input { border-radius: 999px; }
.check.radio input:checked::after { width: 8px; height: 8px; background: white; border-radius: 999px; }

/* Switch */
.switch {
  width: 36px; height: 20px; background: var(--c-border-strong);
  border-radius: 999px; position: relative; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.switch[aria-checked="true"] { background: var(--c-primary); }
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; background: white; border-radius: 999px;
  transition: transform var(--t-fast) var(--ease);
}
.switch[aria-checked="true"]::after { transform: translateX(16px); }

/* Stepper */
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface-2);
  height: 36px;
}
.stepper button {
  width: 32px; height: 100%; border: 0; background: transparent; color: var(--c-text);
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper button:hover { background: var(--c-surface); }
.stepper .val {
  min-width: 32px; text-align: center; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Badge / Chip */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 600; line-height: 1;
  font-family: var(--font-display);
}
.badge[data-tone="sale"] { background: var(--c-danger); color: white; }
.badge[data-tone="hit"]  { background: var(--c-accent); color: var(--c-accent-ink); }
.badge[data-tone="new"]  { background: transparent; color: var(--c-primary); border: 1px solid var(--c-primary); }
.badge[data-tone="out"]  { background: var(--c-surface-3); color: var(--c-text-2); }
.badge[data-tone="ok"]   { background: color-mix(in oklab, var(--c-success) 15%, transparent); color: var(--c-success); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  font-size: 13px; font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.chip:hover { background: var(--c-surface); }
.chip[aria-pressed="true"], .chip.active {
  background: var(--c-primary);
  color: var(--c-primary-ink);
  border-color: var(--c-primary);
}
.chip.filter {
  background: var(--c-primary-soft);
  border-color: transparent;
  color: var(--c-primary);
}
[data-theme="dark"] .chip.filter { color: var(--c-text); }
.chip .x { display: inline-flex; opacity: 0.7; }
.chip .x:hover { opacity: 1; }

/* Card */
.card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--card-pad);
}

/* Rating */
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--c-text-2); }
.rating .stars { display: inline-flex; color: var(--c-accent); }
.rating .stars svg { width: 14px; height: 14px; fill: currentColor; stroke: none; }

/* Price block */
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price .now {
  font-family: var(--font-display);
  font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: 22px; color: var(--c-text);
  letter-spacing: -0.01em;
}
.price.lg .now { font-size: 36px; line-height: 1.1; }
.price .was {
  color: var(--c-text-3);
  text-decoration: line-through;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.price .pct {
  background: var(--c-danger-soft);
  color: var(--c-danger);
  padding: 2px 6px; border-radius: 4px;
  font-weight: 600; font-size: 12px;
}

/* Product card */
.product-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--card-pad);
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  position: relative;
}
.product-card:hover {
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-3);
  transform: translateY(-4px);
}
.product-card .prod-art { transition: transform var(--t-slow) var(--ease); }
.product-card:hover .prod-art { transform: scale(1.06); }
.product-card .ph-img {
  aspect-ratio: 1 / 1;
  background: var(--c-surface);
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.product-card .ph-img .badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.product-card .ph-img .acts {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transform: translateX(6px);
  transition: var(--t-base) var(--ease);
}
.product-card:hover .ph-img .acts { opacity: 1; transform: none; }
.product-card .iconbtn { width: 32px; height: 32px; }
.product-card .title {
  font-weight: 500; color: var(--c-text);
  font-size: 14px; line-height: 20px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .specs {
  font-size: 12px; color: var(--c-text-2); line-height: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 32px;
}
.product-card .bottom { margin-top: auto; display: flex; gap: 6px; align-items: center; }

/* Skeleton */
.skel {
  background: linear-gradient(90deg, var(--c-surface) 0%, var(--c-surface-3) 50%, var(--c-surface) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
  border-radius: var(--r-sm);
}
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Tabs */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--c-border);
  overflow-x: auto;
}
.tabs button {
  appearance: none; background: transparent; border: 0;
  padding: 12px 16px;
  font-size: 14px; font-weight: 500; color: var(--c-text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--c-text); }
.tabs button[aria-selected="true"] {
  color: var(--c-text); border-bottom-color: var(--c-primary); font-weight: 600;
}

/* Breadcrumb */
.crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--c-text-2); }
.crumb a:hover { color: var(--c-text); text-decoration: underline; }
.crumb svg { width: 14px; height: 14px; color: var(--c-text-3); }

/* Image placeholder — product / category */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--c-surface) 100%, transparent) 0 12px,
      color-mix(in oklab, var(--c-surface-3) 100%, transparent) 12px 13px);
  display: grid; place-items: center;
  color: var(--c-text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  background: var(--c-surface-2);
  padding: 4px 8px; border-radius: 4px;
  border: 1px solid var(--c-border);
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--c-text); color: var(--c-bg);
  padding: 12px 18px; border-radius: var(--r-md);
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-2);
  z-index: 9100;
  font-size: 14px; font-weight: 500;
  animation: toast-in 220ms var(--ease);
}
@keyframes toast-in { from { transform: translate(-50%, 20px); opacity: 0; } }

/* Sticky mini-bar */
.minibar {
  position: sticky; bottom: 0; z-index: 50;
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  padding: 12px 0;
  box-shadow: var(--shadow-1);
}

/* Logo */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-text);
}
.brand .lamp { display: inline-flex; }
.brand .word-gold { color: var(--c-accent); }
.brand .word-blue { color: var(--c-primary); }
[data-theme="dark"] .brand .word-blue { color: var(--c-text); }

/* Mega menu */
.megamenu {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: min(1080px, 92vw);
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 16px;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 16px;
  z-index: 200;
}
.megamenu .cats { display: flex; flex-direction: column; gap: 2px; }
.megamenu .cats button {
  appearance: none; border: 0; background: transparent;
  padding: 10px 12px; border-radius: var(--r-md);
  text-align: left; font-size: 14px; color: var(--c-text);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.megamenu .cats button:hover, .megamenu .cats button.active { background: var(--c-surface); }
.megamenu .panel {
  background: var(--c-surface);
  border-radius: var(--r-md);
  padding: 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 24px;
}
.megamenu .panel h5 {
  font-size: 13px; font-weight: 600; color: var(--c-text);
  font-family: var(--font-display);
  margin: 0 0 6px;
}
.megamenu .panel a {
  display: block; padding: 4px 0; font-size: 13px; color: var(--c-text-2);
}
.megamenu .panel a:hover { color: var(--c-primary); }

/* Filter group */
.fgroup { border-bottom: 1px solid var(--c-border); padding: 16px 0; }
.fgroup:last-child { border-bottom: 0; }
.fgroup-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 14px; cursor: pointer; user-select: none;
}
.fgroup-body { padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fgroup .opts { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; }
.fgroup .opts .count { color: var(--c-text-3); font-size: 12px; margin-left: auto; }

/* Range slider (dual) */
.range {
  position: relative; height: 24px;
  display: flex; align-items: center;
}
.range .track {
  position: absolute; left: 0; right: 0; height: 4px;
  background: var(--c-surface-3); border-radius: 999px;
}
.range .fill {
  position: absolute; height: 4px; background: var(--c-primary); border-radius: 999px;
}
.range input[type=range] {
  position: absolute; left: 0; right: 0; width: 100%;
  appearance: none; background: transparent; height: 24px; pointer-events: none;
}
.range input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; background: var(--c-primary);
  border: 3px solid var(--c-surface-2);
  box-shadow: var(--shadow-1);
  border-radius: 999px; pointer-events: all; cursor: grab;
}
.range input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; background: var(--c-primary);
  border: 3px solid var(--c-surface-2); border-radius: 999px; pointer-events: all;
}

/* Hero */
.hero {
  position: relative;
  border-radius: var(--r-2xl);
  overflow: hidden;
  min-height: 440px;
  color: white;
  isolation: isolate;
}
.hero .bg { position: absolute; inset: 0; z-index: -1; }
.hero .inner {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  padding: 48px;
  align-items: center;
  min-height: 440px;
}
.hero h1 {
  color: white;
  font-size: clamp(32px, 4vw, 56px); line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.hero h1 .gold { color: var(--c-accent); }
.hero p.lead { color: rgba(255,255,255,0.78); font-size: 16px; line-height: 24px; max-width: 460px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.hero[data-variant="b"] .inner { grid-template-columns: 1fr; text-align: center; }
.hero[data-variant="b"] p.lead { margin-left: auto; margin-right: auto; }
.hero[data-variant="b"] .ctas { justify-content: center; }
.hero[data-variant="c"] { min-height: 380px; }
.hero[data-variant="c"] .inner { min-height: 380px; padding: 36px; }
.hero[data-variant="c"] h1 { font-size: clamp(28px, 3.4vw, 44px); }

/* Category tile */
.tile {
  position: relative;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
  aspect-ratio: 1 / 1;
  min-height: 140px;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  overflow: hidden;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--c-accent);
  box-shadow: var(--shadow-1);
}
.tile .name { font-weight: 600; font-size: 14px; line-height: 18px; }
.tile .ct   { font-size: 12px; color: var(--c-text-2); margin-top: 2px; }
.tile .icon { color: var(--c-primary); }
.tile:hover .icon { color: var(--c-accent); }

/* Sticky buy block */
.buy-card {
  position: sticky; top: 96px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Order steps */
.step {
  display: flex; gap: 12px;
  padding: 16px; border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-surface-2);
}
.step .num {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.step.done .num { background: var(--c-success); color: white; }
.step .body { flex: 1; }
.step h4 { font-size: 16px; margin-bottom: 6px; }

/* Account sidebar */
.acct-side {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.acct-side button {
  appearance: none; border: 0; background: transparent;
  padding: 10px 12px; border-radius: var(--r-md);
  text-align: left; font-size: 14px; color: var(--c-text);
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.acct-side button:hover { background: var(--c-surface); }
.acct-side button.active { background: var(--c-primary); color: var(--c-primary-ink); }
.acct-side .ct { color: var(--c-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.acct-side button.active .ct { color: rgba(255,255,255,.85); }

/* Mobile bottom-sheet trigger */
.bottom-sheet-handle {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--c-surface-2);
  border-top: 1px solid var(--c-border);
  padding: 12px 16px;
  display: flex; gap: 8px;
  z-index: 70;
}

/* Carousel */
.carousel {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.carousel > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}
.carousel.w4 > * { width: calc((100% - 48px) / 4); }
@media (max-width: 1200px) { .carousel.w4 > * { width: calc((100% - 48px) / 4); } }
@media (max-width: 1024px) { .carousel.w4 > * { width: calc((100% - 32px) / 3); } }
@media (max-width: 768px)  { .carousel.w4 > * { width: 78%; } }
@media (max-width: 480px)  { .carousel.w4 > * { width: 88%; } }

/* ════════════════════════════════════════════════════════════════════
   v2 — редизайн: магия бренда, новые страницы, состояния
   ════════════════════════════════════════════════════════════════════ */

/* Категория-плитки — мягкий подъём + золотая искра звезды */
.tile { transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--c-border-strong); }
.brand-tile:hover { border-color: var(--c-accent); }
.brand-tile:hover span { color: var(--c-text) !important; }

/* Золотая искра на акцентном CTA при наведении */
.btn[data-variant="accent"] { position: relative; overflow: hidden; }
.btn[data-variant="accent"]::after {
  content: ""; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg);
}
.btn[data-variant="accent"]:hover::after { animation: cta-shine .9s var(--ease) forwards; }
@keyframes cta-shine { to { left: 130%; } }

/* Орбита-лоадер — звезда вокруг лампы */
.orbit-loader { position: relative; width: 56px; height: 56px; display: grid; place-items: center; color: var(--c-accent); }
.orbit-loader::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px dashed color-mix(in oklab, var(--c-accent) 45%, transparent);
  animation: orbit-spin 2.4s linear infinite;
}
.orbit-loader .star {
  position: absolute; top: -3px; left: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-accent); box-shadow: 0 0 10px var(--c-accent);
  transform-origin: 0 31px; animation: orbit-spin 2.4s linear infinite;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* Empty / no-results state */
.empty-state {
  text-align: center; padding: 56px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.empty-state h3 { margin-top: 8px; }
.empty-state p { max-width: 420px; margin: 0 auto; }
.empty-state .btn { margin-top: 12px; }
.empty-art {
  width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 8px;
  color: var(--c-accent);
  background: radial-gradient(circle at 50% 40%, var(--c-accent-muted), transparent 70%);
  border-radius: 50%;
}
.empty-art.comet { color: var(--c-primary); }
.lamp-404 { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Модалка / быстрый просмотр */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 12, 28, .55); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  animation: fade-in var(--t-base) var(--ease);
}
.modal {
  position: relative; width: min(820px, 100%); max-height: 90vh; overflow: auto;
  background: var(--c-bg); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  animation: modal-pop var(--t-base) var(--ease);
}
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px; }
.qv-img {
  position: relative; aspect-ratio: 1/1; background: var(--c-surface);
  border-radius: var(--r-lg); display: grid; place-items: center; color: var(--c-text-2);
}
.qv-img .badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.qv-body { display: flex; flex-direction: column; }
@media (max-width: 640px) { .qv-grid { grid-template-columns: 1fr; } }

/* About / Loyalty hero */
.about-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--c-night), var(--c-night-2));
  border-radius: var(--r-2xl); padding: 48px;
}
@media (max-width: 640px) { .about-hero { padding: 32px 24px; } }

/* Сетка преимуществ */
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1024px) { .adv-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .adv-grid { grid-template-columns: 1fr; } }
.adv-card { padding: 24px; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.adv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.adv-ico {
  width: 48px; height: 48px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--c-primary-soft); color: var(--c-primary);
}

/* Реквизиты / строки данных */
.req-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--c-border); font-size: 14px; }
.req-row > span:last-child, .req-row > strong:last-child { text-align: right; }

/* Информационный callout */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--c-accent-muted); color: var(--c-accent-ink);
  border-radius: var(--r-md); padding: 12px 14px; font-size: 13px; line-height: 1.5;
}
[data-theme="dark"] .callout { color: var(--c-text); }
.callout code { background: rgba(0,0,0,.12); padding: 1px 5px; border-radius: 4px; }

/* Sticky mobile buy-bar для карточки товара */
.mobile-buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 400;
  display: flex; gap: 12px; align-items: center;
  background: var(--c-bg); border-top: 1px solid var(--c-border);
  padding: 10px 16px; box-shadow: 0 -8px 24px rgba(15,23,42,.08);
}

/* Валидация инпутов */
.input[aria-invalid="true"], .input.is-error { border-color: var(--c-danger); }
.field-error { color: var(--c-danger); font-size: 12px; margin-top: 4px; }

/* Доп. контейнерные отступы на больших экранах */
@media (min-width: 1600px) { .container { max-width: 1520px; } }

/* ════════════════════════════════════════════════════════════════════
   v3 — шапка/футер, тотальный адаптив, выравнивание
   ════════════════════════════════════════════════════════════════════ */

/* Переключатель темы в utility-строке */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--c-border); border-radius: var(--r-pill);
  background: var(--c-surface-2); color: var(--c-text-2);
  font-size: 12px; font-weight: 500; line-height: 1;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.theme-toggle:hover { background: var(--c-surface); border-color: var(--c-border-strong); color: var(--c-text); }
.theme-toggle svg { color: var(--c-accent); }

/* Ссылки utility-строки */
.util-link { transition: color var(--t-fast) var(--ease); }
.util-link:hover { color: var(--c-text); }

/* Скрываем промо-слоган на узких десктопах/планшетах */
@media (max-width: 900px) { .util-promo { display: none !important; } }

/* ── Футер ─────────────────────────────────────────────────────────── */
.footer-wrap { padding-top: 48px; padding-bottom: 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px; margin-bottom: 32px;
}
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .footer-wrap { padding-top: 32px; }
}
@media (max-width: 380px) { .footer-grid { grid-template-columns: 1fr; } }

/* ── Hero на мобиле ─────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero { min-height: 360px; }
  .hero .inner { grid-template-columns: 1fr; min-height: 360px; padding: 32px; }
}
@media (max-width: 480px) {
  .hero { min-height: 320px; }
  .hero .inner { padding: 24px; min-height: 320px; }
  .hero p.lead { font-size: 15px; }
  .hero .ctas .btn { flex: 1 1 auto; }
}

/* ── Мастер «Загадай желание» ──────────────────────────────────────── */
.wizard-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
@media (max-width: 860px) {
  .wizard-grid { grid-template-columns: 1fr; gap: 16px; }
  .wizard-grid > :last-child { display: none; } /* лампа-орбита скрыта на узких */
}

/* ── Тотальный адаптив: защита от горизонтального переполнения ──────── */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video { max-width: 100%; }
.prod-art svg { width: 100%; height: 100%; }

/* Сетки товаров переводим на auto-fill, чтобы не ломались на любых ширинах */
.product-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
@media (max-width: 520px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 360px) { .product-grid { grid-template-columns: 1fr; } }

/* ── Выравнивание / «не косо» ──────────────────────────────────────── */
.row { min-width: 0; }                      /* флекс-ряды не распирают контейнер */
.product-card .title, .product-card .specs { overflow-wrap: anywhere; }
.crumb { flex-wrap: wrap; }
.tabs { flex-wrap: wrap; overflow-x: auto; }
.buy-card .btn, .buy-card .iconbtn { min-height: 48px; }   /* единая высота в карточке покупки */

/* На мобиле акцентные ряды кнопок не растягиваем криво */
@media (max-width: 640px) {
  .about-hero h1 { font-size: 30px !important; }
  .empty-art { width: 108px; height: 108px; }
}

/* ════════════════════════════════════════════════════════════════════
   v4 — максимальная адаптивность шапки и поиска (плавно между брейкпоинтами)
   ════════════════════════════════════════════════════════════════════ */

/* Поиск всегда тянется и может сжиматься (не распирает шапку) */
.input-wrap { min-width: 0; }
.app-bar .container { min-width: 0; }

/* Корзина: на узких окнах прячем текст «Корзина / N тов.» → остаётся иконка */
@media (max-width: 1180px) {
  .hdr-cart-label { display: none; }
  .hdr-cart { width: 44px !important; padding: 0 !important; justify-content: center; }
}
/* Каталог: на ещё более узких — только иконка (лейбл скрыт) */
@media (max-width: 920px) {
  .hdr-catalog-label { display: none; }
}

/* Соц-иконки футера — лёгкий hover */
.social-link { transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.social-link:hover { border-color: var(--c-accent); color: var(--c-text); }

/* Карусели: на узких окнах товар занимает почти всю ширину (свайп) */
@media (max-width: 600px) { .carousel.w4 > * { width: 82%; } }

/* Ряд кнопок в карточке покупки и формах — перенос вместо «косого» сжатия */
.buy-card .row { flex-wrap: wrap; }
.buy-card .row > .btn { flex: 1 1 auto; min-width: 140px; }

/* Чипы подкатегорий/фильтров — аккуратный перенос */
.chip { white-space: nowrap; }
