/* ═══ BOO — общая дизайн-система ═══════════════════════════════════ */

/* ─── tokens ───────────────────────────────────────────────────────── */
:root {
  --bg:      #FAF9F6;   /* Warm off-white / Alabaster */
  --surface: #FFFFFF;   /* Pure white */
  --fg:      #2A2724;   /* Deep charcoal / warm dark grey */
  --muted:   #6B6862;   /* Muted warm grey (затемнён до WCAG AA ~5.3:1 для мелкого текста) */
  --border:  #E8E3DF;   /* Light warm border */
  --accent:  #F37021;   /* Hermes Signature Orange */
  --brand-gold: #B08D44; /* Логотип и брендовые акценты (крупный/декоративный текст) */
  --brand-gold-deep: #6E561F; /* Золото для мелкого текста: ~6.6:1 на --bg (цена ₽, статус-пилюли) */

  /* derived — do not change */
  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  /* type — display = serif (Hermes style), body = sans */
  --font-display: 'Times New Roman', 'Iowan Old Style', 'Georgia', serif;
  --font-body:    'Helvetica Neue', 'Arial', sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --fs-h1: clamp(36px, 5vw, 56px);
  --fs-h2: clamp(28px, 4vw, 42px);
  --fs-h3: 20px;
  --fs-lead: 16px;
  --fs-body: 15px;
  --fs-meta: 12px;

  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1240px;
  --gutter: 32px;

  /* Premium luxury often relies on sharp corners, zero radius */
  --radius: 0px;
  --radius-lg: 0px;
}

/* ─── reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: normal; }

/* ─── layout primitives ─────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-wide { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.section {
  padding-block: clamp(48px, 8vw, var(--gap-2xl));
}
.section + .section { border-top: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--gap-xl); align-items: start; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: var(--gap-xl); align-items: center; }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}

/* ─── type ──────────────────────────────────────────────────────── */
.h1, h1 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.1; margin: 0; }
.h2, h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.2; margin: 0; }
.h3, h3 { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.3; margin: 0; }
.lead   { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--gap-md);
}
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ─── chrome: nav + footer ──────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklch, var(--bg) 95%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.topnav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 16px;
  transition: padding-block 0.3s ease;
}
.topnav.scrolled .topnav-inner {
  padding-block: 8px;
}
.topnav nav { display: flex; gap: var(--gap-lg); }
.topnav nav.nav-left { justify-content: flex-start; }
.topnav nav.nav-right { justify-content: flex-end; }
.topnav .logo {
  display: flex;
  justify-content: center;
}
.topnav .logo img {
  height: 52px;
  width: auto;
  transition: height 0.3s ease;
}
.topnav.scrolled .logo img {
  height: 32px;
}
.topnav nav a { font-size: 12px; color: var(--fg); text-transform: uppercase; letter-spacing: 0.08em; }
.topnav nav a:hover { opacity: 0.6; }

/* ─── Переключатель языка / валюты ───────────────────────────────── */
.locale-switch { display: inline-flex; align-items: center; gap: 8px; }
.locale-switch .ls-group { display: inline-flex; gap: 6px; align-items: center; }
.locale-switch .ls-sep { color: var(--border); font-size: 11px; }
.topnav nav a.ls-opt { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; line-height: 1; padding-bottom: 1px; border-bottom: 1px solid transparent; }
.topnav nav a.ls-opt:hover { opacity: 1; color: var(--fg); }
.topnav nav a.ls-opt.active { color: var(--brand-gold); border-bottom-color: var(--brand-gold); }

.pagefoot { padding-block: var(--gap-xl); background: var(--surface); border-top: 1px solid var(--border); }
.pagefoot .foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-lg); margin-bottom: var(--gap-xl); }
.pagefoot h4 { font-family: var(--font-display); font-size: 16px; margin-bottom: 24px; color: var(--fg); }
.pagefoot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.pagefoot a { color: var(--muted); font-size: 13px; }
.pagefoot a:hover { color: var(--accent); text-decoration: underline; }
.pagefoot-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* ─── buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  width: 100%;
}
.btn-auto { width: auto; }
.btn-primary { background: var(--fg); color: var(--surface); border-color: var(--fg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: transparent; padding-inline: 8px; }
.btn-ghost:hover { color: var(--accent); }

/* Лёгкая редакционная текст-ссылка (например «Вернуться в бутик») */
.return-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 1px;
  transition: color 0.2s ease, gap 0.2s ease;
}
.return-link:hover { color: var(--accent); gap: 14px; }
.return-link .arrow { transition: transform 0.2s ease; }
.return-link:hover .arrow { transform: translateX(4px); }

/* Брендовый акцент: вордмарк «BOO BY ELLIN» и заголовки «Об Эллин» / «Философия…» */
.brand-name, .brand-head { color: var(--accent); }

/* ─── gallery ───────────────────────────────────────────────────── */
.gallery-wrapper {
  position: relative;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
}
.gallery {
  display: flex;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery::-webkit-scrollbar { display: none; }

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  position: relative;
}
.gallery-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}

.first-slide .hover-img {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.5s ease;
}
.first-slide.show-hover .hover-img {
  opacity: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  padding-bottom: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--fg);
  transition: background 0.2s, opacity 0.2s;
}
.gallery-arrow:hover { background: rgba(255,255,255,0.95); }
.gallery-arrow.prev { left: 16px; }
.gallery-arrow.next { right: 16px; }
.gallery-dots {
  position: absolute;
  bottom: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s;
}
.dot.active {
  background: var(--fg);
  border-color: var(--fg);
  transform: scale(1.2);
}
.quick-cart-icon {
  position: absolute;
  bottom: 24px;
  right: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  color: var(--fg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}
.quick-cart-icon:hover { transform: scale(1.05); border-color: var(--fg); }

/* ─── thumbnails ────────────────────────────────────────────────── */
.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: opacity 0.2s, border-color 0.2s;
}
.thumb:hover { opacity: 0.8; }
.thumb.active { border-color: var(--fg); }

/* ─── hero / product layout ─────────────────────────────────────── */
.banner-wrapper {
  width: 100%;
  max-width: var(--container);     /* выровнен с .container, как карточка товара ниже */
  margin: 0 auto;
  line-height: 0;
  padding: var(--gap-lg) var(--gutter) 0;
}
.banner-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ─── Hero-слайдер ──────────────────────────────────────────────── */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .hero-track { position: relative; aspect-ratio: 16 / 9; line-height: 0; }
.hero-slider .hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slider .hero-slide.active { opacity: 1; pointer-events: auto; }

.hero-slider .hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.85);
  border: none; border-radius: 50%;
  font-size: 32px; line-height: 1; padding: 0 0 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--fg);
  z-index: 2; opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.hero-slider:hover .hero-arrow { opacity: 1; }
.hero-slider .hero-arrow:hover { background: #fff; }
.hero-slider .hero-arrow.prev { left: 20px; }
.hero-slider .hero-arrow.next { right: 20px; }

.hero-slider .hero-dots {
  position: absolute; bottom: 18px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px;
  z-index: 2;
}
.hero-slider .hero-dot {
  width: 28px; height: 4px;
  background: rgba(255,255,255,0.5);
  border: none; padding: 0; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-slider .hero-dot:hover { background: rgba(255,255,255,0.8); }
.hero-slider .hero-dot.active { background: #fff; }

@media (max-width: 920px) {
  .hero-slider .hero-arrow { display: none; }
  .hero-slider .hero-dot { width: 22px; }
}
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-2xl); align-items: start; }
.product-details { max-width: 440px; margin: 0 auto; width: 100%; padding-top: 24px; display: flex; flex-direction: column; }
.product-details .eyebrow { order: 1; }
.product-details h1 { order: 2; }
.product-details .lead { order: 3; }
.product-details .price { order: 4; }
.product-details .inline-shades { order: 5; }
.product-details #add-to-cart-form { order: 6; }
.product-details .btn-primary { order: 6; }
.product-details ul { order: 7; }
.price { font-size: 24px; font-family: var(--font-body); margin-block: 24px; color: var(--fg); }

/* Inline shades */
.inline-shades { margin-bottom: 32px; }
.shade-info { margin-bottom: 16px; font-family: var(--font-body); font-size: 14px; }
.shade-grid-inline { display: flex; gap: 16px; }
.shade-dot-wrap {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  padding: 2px;
  cursor: pointer;
  transition: border-color 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.shade-dot-wrap:hover { border-color: var(--muted); }
.shade-dot-wrap.active { border-color: var(--fg); border-width: 2px; }
.shade-dot-wrap .swatch { width: 100%; height: 100%; border-radius: 50%; }

.mobile-only { display: none; }
@media (max-width: 920px) {
  .banner-wrapper { padding: 0; } /* Full width flush to top on mobile */
  .hero-split { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .mobile-only { display: inline-block; }
  .product-details { margin-top: 0; padding-top: 0; }
  .product-details .inline-shades { order: 3; margin-top: 24px; margin-bottom: 24px; }
  .product-details #add-to-cart-form { order: 4; margin-bottom: 24px; }
  .product-details .btn-primary { order: 4; margin-bottom: 24px; }
  .product-details .lead { order: 5; }
  .product-details .price { order: 6; margin-top: 0; }
  .topnav-inner {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "logo" "nav";
    gap: 8px;
    padding-block: 12px;
  }
  .topnav .logo { grid-area: logo; }
  .topnav .logo img { height: 36px; }
  .topnav nav.nav-left { display: none; }
  .topnav nav.nav-right {
    grid-area: nav;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
  .topnav nav.nav-right a { font-size: 11px; letter-spacing: 0.06em; }
  .gallery-arrow { display: none; } /* Mobile uses swipe */
  .quick-cart-icon { width: 48px; height: 48px; bottom: 16px; right: 16px; }
  .pagefoot .foot-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .pagefoot ul { align-items: center; }
  .pagefoot-bottom { flex-direction: column; gap: 16px; align-items: center; text-align: center; }
}

/* ─── catalog / product card ────────────────────────────────────── */
.product-card { text-align: center; }
.product-card .ph-img, .product-card .square { margin-bottom: 24px; border: none; background: var(--surface); }
.product-card h3 { font-size: 16px; margin-bottom: 8px; font-family: var(--font-body); }
.product-card .price { font-size: 15px; margin-block: 8px; color: var(--muted); }

/* ─── Accordions ────────────────────────────────────────────────── */
.accordion {
  border-bottom: 1px solid var(--border);
}
.accordion-summary {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 32px 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-summary::-webkit-details-marker {
  display: none;
}
.accordion-summary::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23333' stroke-width='0.75'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.3s ease;
}
.accordion[open] .accordion-summary::after {
  transform: rotate(180deg);
}
.accordion-content {
  padding-bottom: 32px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ─── shade tray (drawer) ───────────────────────────────────────── */
.drawer-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 100;
}
.drawer {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--surface);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 101;
  padding: 40px 0 max(40px, env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.05);
}
.drawer.open { transform: translateY(0); }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 32px; }
.drawer-close { background: none; border: none; font-size: 32px; cursor: pointer; color: var(--muted); padding: 0; line-height: 1; }

.drawer-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; min-width: 44px; }
.drawer-item .swatch {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border);
  padding: 2px;
  background-clip: content-box;
  transition: all 0.2s;
}
.drawer-item:hover .swatch { border-color: var(--muted); }
.drawer-item.active .swatch { border: 2px solid var(--fg); transform: scale(1.05); }
.drawer-item .shade-name { font-size: 13px; text-align: center; color: var(--fg); margin-top: 12px; }

/* ─── Video Container ───────────────────────────────────────────── */
.video-showcase-container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  background: var(--surface);
}
@media (min-width: 920px) {
  .video-showcase-container {
    padding: 64px var(--gutter);
  }
  .video-showcase-container video {
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius);
  }
}
@media (max-width: 920px) {
  .video-showcase-container { padding: 0; } /* во всю ширину на мобиле */
}

/* ═══ Формы (Hermes: острые углы, hairline) ════════════════════════ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.field label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea, .field select {
  font: inherit; color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.2s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--fg);
}
/* Видимый фокус с клавиатуры для всех интерактивных элементов (WCAG 2.4.7).
   Мышиные клики фокус-кольцо не показывают (:focus-visible). */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
/* Программный фокус на <main> (через skip-link) не рисует кольцо вокруг всей области. */
[tabindex="-1"]:focus { outline: none; }
/* Skip-link: видим только при фокусе с клавиатуры (WCAG 2.4.1 Bypass Blocks). */
.skip-link {
  position: fixed; left: 8px; top: -56px; z-index: 1000;
  background: var(--fg); color: #fff; padding: 10px 16px;
  border-radius: var(--radius); font-size: 14px; text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }
.field .error { color: #B3261E; font-size: 12px; }
.field.has-error input, .field.has-error textarea { border-color: #B3261E; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* ═══ Корзина и чекаут ═════════════════════════════════════════════ */
.checkout-steps {
  display: flex; justify-content: center; gap: 24px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 56px;
}
.checkout-steps .step.active { color: var(--fg); }
.checkout-steps .step-sep { color: var(--border); }

.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: start; }
@media (max-width: 920px) { .checkout-grid { grid-template-columns: 1fr; gap: 40px; } }
/* Шаг доставки (карта CDEK должна быть ≥800px): 2 колонки держим ТОЛЬКО пока карта не уже 800px
   (при контейнере 1280 и колонке 340px это ≈ viewport ≥1252px), ниже — одна колонка, карта во всю
   ширину. Отдельный класс с повышенной специфичностью — чтобы не влиять на .checkout-grid оплаты. */
.checkout-grid.checkout-grid--wide { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
@media (max-width: 1251px) { .checkout-grid.checkout-grid--wide { grid-template-columns: 1fr; gap: 40px; } }

.cart-item {
  display: grid; grid-template-columns: 96px 1fr auto; gap: 24px;
  padding-block: 24px; border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item:first-child { border-top: 1px solid var(--border); }
.cart-item img { width: 96px; height: 96px; object-fit: cover; }
.cart-item .item-title { font-size: 14px; letter-spacing: 0.03em; }
.cart-item .item-shade { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cart-item .item-price { font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) {
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item .item-right { grid-column: 2; }
}

.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); margin-top: 12px; }
.qty-control button {
  background: none; border: none; width: 44px; height: 44px;
  font-size: 16px; color: var(--fg); line-height: 1; cursor: pointer;
}
.qty-control button:hover { background: var(--fg-soft); }
.qty-control .qty-num { width: 36px; text-align: center; font-size: 13px; }
.item-remove {
  background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 10px 0; margin-top: 8px; min-height: 44px;
}
.item-remove:hover { color: var(--fg); text-decoration: underline; }

.summary-box { border: 1px solid var(--border); background: var(--surface); padding: 32px; }
.summary-box h3 { font-size: 16px; margin-bottom: 24px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding-block: 8px; }
.summary-row.total {
  border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px;
  font-size: 16px;
}
.summary-row .muted { color: var(--muted); }

.payment-notice {
  border: 1px solid var(--border); background: var(--bg);
  padding: 20px 24px; font-size: 13px; line-height: 1.6; color: var(--muted);
  margin-bottom: 24px;
}
.payment-notice strong { color: var(--fg); }

.delivery-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.delivery-method {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  cursor: pointer;
}
.delivery-method:has(input:checked) { border-color: var(--fg); }
.delivery-method input { margin-top: 4px; accent-color: var(--fg); }
.delivery-method strong { display: block; font-size: 14px; font-weight: 500; }
.delivery-method small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.cdek-suggest {
  border: 1px solid var(--border);
  background: var(--surface);
  margin-top: -4px;
  max-height: 240px;
  overflow: auto;
}
.cdek-suggest-item,
.cdek-point {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  padding: 12px 14px;
  text-align: left;
}
.cdek-suggest-item:hover,
.cdek-point:hover { background: var(--fg-soft); }
.cdek-panel { margin-bottom: 24px; }
.cdek-widget-shell {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-top: 12px;
}
.cdek-widget-map {
  width: 100%;
  height: 600px;
  min-height: 480px;
}
.cdek-widget-map > * {
  min-height: inherit;
}
.cdek-widget-shell .payment-notice {
  margin: 0;
  border: none;
}
/* Оверлей загрузки карты ПВЗ: виден, пока виджет инициализируется (onReady снимает класс) */
.cdek-map-loader {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--surface);
  z-index: 2;
}
.cdek-widget-shell.is-map-loading .cdek-map-loader { display: flex; }
.cdek-map-spinner {
  width: 34px;
  height: 34px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cdek-map-spin 0.8s linear infinite;
}
.cdek-map-loader-text {
  color: var(--muted);
  font-size: var(--fs-meta);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@keyframes cdek-map-spin { to { transform: rotate(360deg); } }
/* Оверлей ошибки карты: показываем вместо «белого виджета», с кнопкой повтора загрузки */
.cdek-map-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  z-index: 3;
}
.cdek-map-error p { margin: 0; color: var(--muted); max-width: 34ch; }
.cdek-map-retry { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .cdek-map-spinner { animation-duration: 2.4s; }
}
.cdek-points {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
}
.cdek-point {
  border: 1px solid var(--border);
  background: var(--surface);
}
.cdek-point strong,
.cdek-point span,
.cdek-point small,
.cdek-point-selected strong,
.cdek-point-selected span { display: block; }
.cdek-point strong,
.cdek-point-selected strong { font-size: 13px; font-weight: 500; }
.cdek-point span,
.cdek-point small,
.cdek-point-selected span { color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 3px; }
.cdek-point-selected,
.cdek-quote {
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.cdek-quote {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
}
.cdek-quote small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.cdek-quote.is-error { border-color: #B3261E; color: #B3261E; }
.cdek-muted { color: var(--muted); font-size: 13px; padding: 12px 0; }
button[disabled],
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
@media (max-width: 640px) {
  .delivery-methods { grid-template-columns: 1fr; }
  .cdek-widget-map { height: 460px; }
}

.success-block { text-align: center; padding-block: 64px; }
.success-block .order-no {
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.1em;
  border: 1px solid var(--border); display: inline-block; padding: 12px 24px;
  margin-block: 24px; background: var(--surface);
}

/* ═══ Cookie-баннер ═════════════════════════════════════════════════ */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.06);
  z-index: 200;
}
.cookie-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; padding-block: 20px;
}
.cookie-banner p { margin: 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
.cookie-banner a { text-decoration: underline; color: var(--fg); }
.cookie-banner-actions { display: flex; gap: 12px; flex-shrink: 0; }
.cookie-banner-actions .btn { padding: 12px 24px; font-size: 12px; }
@media (max-width: 640px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-banner-actions { justify-content: center; }
}

/* ═══ Страница истории (.page-story) ═══════════════════════════════ */
.page-story {
  --fs-h1: clamp(40px, 6vw, 72px);
  --fs-h2: clamp(32px, 5vw, 48px);
  --fs-lead: 18px;
  --container: 1000px; /* Narrower container for reading */
  line-height: 1.7;
}
.page-story p { margin: 0 0 1.5em; }
.page-story h1 { margin: 0 0 0.5em; }
.page-story h2 { margin: 0 0 32px; }
.page-story .section { padding-block: clamp(64px, 10vw, 120px); }
.page-story .lead { font-family: var(--font-display); font-size: var(--fs-lead); line-height: 1.6; color: var(--fg); max-width: 50ch; }

.drop-cap::first-letter {
  float: left; font-family: var(--font-display); font-size: 5rem;
  line-height: 0.8; padding-top: 8px; padding-right: 12px;
  color: var(--accent);
}
.pull-quote {
  font-family: var(--font-display); font-size: clamp(24px, 4vw, 36px);
  line-height: 1.3; color: var(--fg); margin: 64px 0; text-align: center;
  position: relative;
}
.pull-quote::before {
  content: '“'; position: absolute; font-size: 80px; color: var(--border);
  top: -40px; left: 50%; transform: translateX(-50%); z-index: -1;
}

.editorial-hero { padding-top: 0; margin-bottom: var(--gap-xl); }
.hero-img-wrap { width: 100%; height: 60vh; min-height: 400px; overflow: hidden; margin-bottom: var(--gap-xl); background: var(--border); }
.hero-img-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.article-body { max-width: 680px; margin-inline: auto; color: #4A4641; font-size: 16px; }
.article-body p { margin-bottom: 2em; }
.article-image { margin: 64px 0; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.article-image img { width: 100%; max-height: 70vh; object-fit: cover; }
.article-image.contained { width: 100%; margin-left: auto; margin-right: auto; position: static; left: auto; right: auto; }
.article-image.contained img { max-height: unset; aspect-ratio: 4/5; object-fit: cover; }

@media (max-width: 500px) {
  .hero-img-wrap { height: 50vh; }
}

/* ═══ Правовые страницы (.page-legal) ══════════════════════════════ */
.page-legal {
  --container: 800px;
  line-height: 1.7;
}
.page-legal p { margin: 0 0 1.5em; }
.page-legal h1, .page-legal h2, .page-legal h3, .page-legal h4 { margin: 0 0 0.5em; }
.page-legal .section { padding-block: 80px; }
.page-legal .section + .section { border-top: none; }

.legal-content { max-width: 720px; margin: 0 auto; color: #4A4641; }
.legal-content h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 40px; color: var(--fg); }
.legal-content h3 { font-size: 20px; margin-top: 40px; margin-bottom: 16px; color: var(--fg); }

/* ═══ Личный кабинет — доп. компоненты ═════════════════════════════ */
.status-pill {
  display: inline-block; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--border); color: var(--muted);
}
.status-paid, .status-processing { border-color: #2E7D32; color: #2E7D32; }
.status-awaiting_payment, .status-pending, .status-not_shipped, .status-awaiting_assembly { border-color: var(--brand-gold); color: var(--brand-gold-deep); }
.status-shipped, .status-delivered, .status-in_transit, .status-assembling, .status-assembled { border-color: var(--fg); color: var(--fg); }
.status-cancelled, .status-refunded, .status-returned { border-color: #B3261E; color: #B3261E; }

.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--fg);
  text-decoration: underline; text-underline-offset: 2px;
}
.link-btn:hover { color: var(--accent); }

.account-banner {
  background: var(--accent-soft); border: 1px solid var(--brand-gold);
  padding: 14px 18px; margin-bottom: 24px; font-size: 13px;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}

.form-error {
  background: color-mix(in oklch, #B3261E 8%, transparent);
  border: 1px solid #B3261E; color: #B3261E;
  padding: 12px 16px; font-size: 13px;
}

.addr-check { display: flex; gap: 8px; align-items: center; padding: 8px 0; font-size: 13px; cursor: pointer; }
.addr-check input { width: 16px; height: 16px; accent-color: var(--brand-gold); }

/* ═══ Двойная цена: тенге + примерные рубли с тултипом ═════════════ */
.price-rub {
  color: var(--brand-gold-deep);
  font-size: 0.82em;
  cursor: help;
  position: relative;
  border-bottom: 1px dotted color-mix(in oklch, var(--brand-gold) 60%, transparent);
}
.price-rub:hover::after,
.price-rub:focus::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  background: var(--fg);
  color: var(--surface);
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  padding: 10px 12px;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  white-space: normal;
  text-align: left;
  pointer-events: none;
}
.price-rub:hover::before,
.price-rub:focus::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--fg);
  z-index: 50;
  pointer-events: none;
}
