/* Etiko — 2026 modern redesign */
:root {
  /* Brand colors (from brandbook) */
  --ink: #0D1117;          /* Тёмный графит */
  --ink-deep: #2A2F3A;     /* Графит глубокий */
  --accent: #6D40FF;       /* Фиолетовый Etiko */
  --accent-2: #8a66ff;
  --accent-soft: #EDE9FF;  /* Лавандовый светлый */
  --gray: #B8BDC7;         /* Серый холодный */
  --gray-50: #F6F7F9;
  --gray-100: #EEF0F4;
  --gray-200: #E3E6EC;
  --gray-300: #D2D6DE;
  --gray-500: #8B91A1;
  --gray-700: #4D5260;

  --paper: #ffffff;
  --bg: #ffffff;
  --text: var(--ink);
  --text-muted: #6B7280;
  --line: #ECEDF1;

  --sans:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(13,17,23,0.04), 0 0 0 1px rgba(13,17,23,0.04);
  --shadow-md: 0 4px 16px -6px rgba(13,17,23,0.08), 0 0 0 1px rgba(13,17,23,0.04);
  --shadow-lg: 0 24px 60px -30px rgba(13,17,23,0.18), 0 0 0 1px rgba(13,17,23,0.04);
  --shadow-violet: 0 18px 48px -16px rgba(109,64,255,0.45);

  --maxw: 1200px;
  --gutter: 28px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: 0; color: inherit; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* .app is admin only */
/* page is a simple wrapper */
/* Constrain page content to a centered column (bars stay full-width) */
main { max-width: 1600px; width: 100%; margin-inline: auto; }

/* ============ TYPOGRAPHY UTILITIES ============ */
.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.95;
}
.h-2 { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1.05; letter-spacing: -0.02em; }
.h-3 { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.2; letter-spacing: -0.015em; }
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============ TOP NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(28px, calc((100% - 1600px) / 2 + 28px));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.nav-left { display: flex; align-items: center; gap: 36px; }
.nav-links {
  display: flex;
  gap: 4px;
  font-size: 14px;
  background: var(--gray-50);
  border-radius: 999px;
  padding: 4px;
}
.nav-links button, .nav-links a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color .15s, background .15s;
}
.nav-links button:hover, .nav-links a:hover { color: var(--ink); background: rgba(13,17,23,0.06); }
.nav-links button.active, .nav-links a.active {
  background: var(--ink);
  color: white;
}

.nav-right { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.nav-cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-violet);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 22px 56px -18px rgba(109,64,255,0.6); }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 999px;
  background: var(--gray-50);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.icon-btn:hover { background: var(--gray-100); }
.icon-btn.has-dot { position: relative; }
.icon-btn.has-dot::after {
  content: ""; position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* ============ BRAND MARK ============ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.brand-svg { display: block; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px; font-weight: 600;
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: var(--sans);
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { transform: translateY(-1px); background: #1d2331; }
.btn-violet { background: var(--accent); color: white; box-shadow: var(--shadow-violet); }
.btn-violet:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--gray-50); color: var(--ink); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-outline { border: 1px solid var(--gray-200); background: var(--paper); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-lg { padding: 16px 22px; font-size: 15px; border-radius: 16px; }

/* ============ HERO ============ */
.hero {
  padding: 56px 28px 28px;
  position: relative;
}
.hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: 1.25fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--bg));
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}
.hero-eyebrow .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  position: relative;
}
.hero-eyebrow .live-dot::after {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: pulse 1.8s infinite ease-out;
}
@keyframes pulse {
  0%   { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(2.4); opacity: 0; }
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .marker {
  display: inline-block;
  padding: 0 10px;
  background: var(--accent-soft);
  border-radius: 12px;
  white-space: nowrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 460px;
  line-height: 1.55;
  margin: 24px 0 0;
}

/* hero right — animated card */
.hero-card {
  background: var(--ink);
  color: white;
  border-radius: var(--r-xl);
  padding: 24px 24px 20px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}
.hero-card::before {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.hero-card-top {
  display: flex; justify-content: space-between; align-items: center;
  position: relative;
}
.hero-card-top .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.hero-card-top .pill .dot { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative;
}
.hero-stat {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-md);
  padding: 14px 14px;
}
.hero-stat .v {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.025em;
}
.hero-stat .v .unit { color: var(--accent-2); font-weight: 600; font-size: 16px; }
.hero-stat .k {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero-card-foot {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  display: flex; justify-content: space-between; align-items: center;
  position: relative;
  margin-top: 4px;
}
.hero-card-foot b { color: white; font-weight: 500; }

/* ============ LIVE PRICE BOARD (hero) ============ */
.board {
  background: var(--ink);
  color: #F2F4F8;
  border-radius: var(--r-xl);
  padding: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.board::after {
  content: "";
  position: absolute; right: -90px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 60%, transparent), transparent 70%);
  filter: blur(8px); opacity: .55; pointer-events: none;
}
.board-top {
  display: flex; align-items: center; justify-content: space-between;
  position: relative; margin-bottom: 16px;
}
.board-top .ttl {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(242,244,248,.6);
}
.board-top .ttl .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent); }
.board-top .badge {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(242,244,248,.08); border: 1px solid rgba(242,244,248,.14);
  color: rgba(242,244,248,.8);
}
.board-rows { display: flex; flex-direction: column; gap: 3px; position: relative; }
.board-row {
  display: grid; grid-template-columns: 36px 1fr auto auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-sm); cursor: pointer;
  transition: background .25s;
}
.board-row:hover { background: rgba(242,244,248,.05); }
.board-row .pic {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(242,244,248,.08);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.board-row .pic .bottle-svg { height: 30px; }
.board-row .nm { min-width: 0; }
.board-row .nm .n { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-row .nm .s { font-family: var(--mono); font-size: 10.5px; color: rgba(242,244,248,.45); letter-spacing: .04em; }
.board-row .pr {
  font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  white-space: nowrap; transition: color .3s;
}
.board-row .pr .c { font-size: 11px; color: rgba(242,244,248,.5); margin-left: 2px; font-family: var(--sans); }
.board-row .pr.flash-down { color: #57D98A; }
.board-row .pr.flash-up { color: #FF8A7A; }
.board-row .dl {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 7px; min-width: 52px; text-align: center;
}
.board-row .dl.down { background: rgba(87,217,138,.16); color: #57D98A; }
.board-row .dl.up { background: rgba(255,138,122,.16); color: #FF8A7A; }
.board-foot {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(242,244,248,.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: rgba(242,244,248,.6);
}
.board-foot b { color: var(--accent-2); font-weight: 600; }

/* ============ SEARCH BAR ============ */
.search-wrap {
  padding: 0 28px;
}
.search {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--gray-200);
  border-radius: 24px;
  padding: 10px 10px 10px 22px;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.search-icon { color: var(--gray-500); display: inline-flex; }
.search-input {
  background: none; border: 0; outline: 0;
  font-size: 17px;
  width: 100%;
  padding: 16px 8px;
  font-weight: 500;
}
.search-input::placeholder { color: var(--gray); font-weight: 400; }

/* category chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0 0;
}
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--paper);
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: white; border-color: var(--ink); }
.chip .count {
  color: var(--gray-500);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--gray-50);
  border-radius: 999px;
}
.chip.active .count { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }

/* ============ BENTO HOME GRID ============ */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 28px;
  margin: 24px 0 18px;
  gap: 24px;
}
.section-head .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
.section-head .title .accent { color: var(--accent); }
.section-head .meta {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 16px;
}
.section-head .meta .link {
  color: var(--ink); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  transition: background .15s;
}
.section-head .meta .link:hover { background: var(--gray-50); }
.section-head .meta .live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--gray-50);
  border-radius: 999px;
  font-size: 12px;
}
.section-head .meta .live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* ============ PRODUCT GRID ============ */
.product-grid {
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.card {
  background: var(--paper);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  padding: 14px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s, border-color .25s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gray-200);
  box-shadow: var(--shadow-lg);
}
.card-media {
  background: var(--gray-50);
  border-radius: var(--r-md);
  aspect-ratio: 1 / 1.05;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-media::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to bottom, transparent 0%, transparent 80%, color-mix(in srgb, var(--ink) 5%, transparent) 100%);
}
.card-media::after {
  /* subtle vertical line pattern echoing barcode motif */
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 0, transparent 22px, color-mix(in srgb, var(--ink) 3%, transparent) 22px, color-mix(in srgb, var(--ink) 3%, transparent) 23px, transparent 23px);
  background-size: 23px 100%;
  opacity: 0.6;
  pointer-events: none;
}
.card-tag {
  position: absolute;
  top: 10px; left: 10px;
  padding: 5px 10px;
  font-size: 11px;
  letter-spacing: 0.04em;
  font-weight: 600;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
  z-index: 2;
}
.card-tag.violet { background: var(--accent); }
.card-tag.green { background: #16a34a; }
.card-tag.orange { background: #ea580c; }
.card-fav {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--gray-200);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gray-500);
  transition: color .15s, transform .15s;
  z-index: 2;
}
.card-fav:hover { color: var(--accent); transform: scale(1.08); }

.card-body { padding: 14px 4px 4px; display: flex; flex-direction: column; gap: 8px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}
.card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
.card-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.card-foot {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-price { display: flex; flex-direction: column; }
.card-price .from { font-size: 10px; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.card-price .val {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.card-price .val .ccy { color: var(--text-muted); font-size: 13px; font-weight: 500; margin-left: 2px; }
.card-price .val.empty { color: var(--text-muted); font-size: 13px; font-weight: 500; font-family: var(--sans); letter-spacing: 0; }
.card-stores {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted);
  font-weight: 500;
}
.store-dots { display: flex; }
.store-dots span {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  background: var(--gray-100);
  margin-left: -6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: var(--ink);
}
.store-dots span:first-child { margin-left: 0; }
.store-dots .more { background: var(--accent-soft); color: var(--accent); }

/* featured card spans wider — left media, right body */
.card.featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
  padding: 16px;
  background: var(--ink);
  border-color: var(--ink);
}
.card.featured .card-media {
  flex: 0 0 44%;
  aspect-ratio: auto;
  background: var(--accent-soft);
}
.card.featured .card-body {
  padding: 14px 18px 6px;
  flex: 1;
  justify-content: space-between;
  color: #F2F4F8;
}
.card.featured .feat-eyebrow { color: var(--accent-2); }
.card.featured .card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  -webkit-line-clamp: 3;
  min-height: 0;
  color: #F2F4F8;
  margin-top: 12px;
}
.card.featured .card-meta { color: rgba(242,244,248,0.55); }
.card.featured .feat-sub {
  font-size: 14px; margin: 10px 0 0; line-height: 1.5;
  color: rgba(242,244,248,0.62);
}
.card.featured .card-foot { padding-top: 16px; border-top-color: rgba(242,244,248,0.14); }
.card.featured .card-price .from { color: rgba(242,244,248,0.55); }
.card.featured .card-price .val { font-size: 32px; color: #fff; }
.card.featured .card-price .val.empty {
  font-size: 14px; font-weight: 600; line-height: 1;
  color: rgba(242,244,248,0.82); font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid rgba(242,244,248,0.22);
  background: rgba(242,244,248,0.06);
}
.card.featured .card-price .val.empty::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: 0 0 auto;
}
.card.featured .card-price .val .ccy { color: rgba(242,244,248,0.6); }
.card.featured .store-dots span {
  border-color: var(--ink);
  background: rgba(242,244,248,0.12);
  color: #F2F4F8;
}
.card.featured .store-dots .more { background: var(--accent); color: #fff; }

/* ============ BENTO promo cells ============ */
.bento {
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.bento-cell {
  border-radius: var(--r-xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  min-height: 240px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.bento-violet {
  grid-column: span 7;
  background: var(--accent);
  color: white;
}
.bento-violet::before {
  content: "";
  position: absolute; right: -80px; bottom: -100px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 60%);
}
.bento-light {
  grid-column: span 5;
  background: var(--gray-50);
  border: 1px solid var(--line);
}
.bento-dark {
  grid-column: span 3;
  background: var(--ink);
  color: white;
}
.bento-cell h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.bento-cell .lead {
  font-size: 14px;
  opacity: 0.75;
  margin: 12px 0 0;
  line-height: 1.5;
  max-width: 32ch;
}
.bento-cell .eyebrow { color: inherit; opacity: 0.6; }
.bento-foot {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500;
}
.bento-violet .btn-ghost,
.bento-dark .btn-ghost {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.bento-violet .btn-ghost:hover,
.bento-dark .btn-ghost:hover { background: rgba(255,255,255,0.2); }
.scanner-preview {
  position: absolute;
  right: 24px; top: 28px;
  width: 132px; height: 132px;
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
}
.scanner-preview::before, .scanner-preview::after {
  content: ""; position: absolute;
  width: 24px; height: 24px;
  border: 2px solid white;
}
.scanner-preview::before { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 16px 0 0 0; }
.scanner-preview::after  { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 16px 0; }
.scanner-preview .scan-line {
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, white, transparent);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 12px; }
  50% { top: calc(100% - 14px); }
}
.scanner-preview .barcode-mini {
  display: flex; align-items: end; gap: 2px; height: 60%;
}
.scanner-preview .barcode-mini span {
  width: 3px; background: white; border-radius: 1px;
}

/* dark bento price ticker */
.ticker-list {
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.ticker-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
}
.ticker-row .sym { color: rgba(255,255,255,0.6); }
.ticker-row .price { font-weight: 600; }
.ticker-row .delta { font-size: 11px; padding: 1px 6px; border-radius: 4px; }
.ticker-row .delta.up { background: rgba(34,197,94,0.18); color: #4ade80; }
.ticker-row .delta.down { background: rgba(239,68,68,0.18); color: #f87171; }

/* ============ HOW IT WORKS ============ */
.how {
  margin: 40px 28px 0;
  padding: 56px 48px;
  background: var(--gray-50);
  border-radius: var(--r-xl);
  position: relative;
  overflow: hidden;
}
.how::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 0, transparent 35px, color-mix(in srgb, var(--ink) 3%, transparent) 35px, color-mix(in srgb, var(--ink) 3%, transparent) 36px, transparent 36px);
  background-size: 36px 100%;
  pointer-events: none;
  opacity: 0.6;
}
.how-head { position: relative; max-width: 760px; }
.how-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.how-head h2 .accent { color: var(--accent); }
.how-head p { color: var(--text-muted); max-width: 480px; margin: 18px 0 0; font-size: 16px; line-height: 1.55; }
.how-steps {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
}
.how-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 24px 28px;
  position: relative;
  overflow: hidden;
}
.how-step .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--accent-soft);
  letter-spacing: -0.04em;
}
.how-step .step-icon {
  position: absolute; top: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
}
.how-step .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  margin: 14px 0 8px;
  letter-spacing: -0.02em;
}
.how-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ============ BLOG ============ */
/* =========================================================
   BLOG — post cards, grid, hero, feature, newsletter
   ========================================================= */
.blog-grid {
  padding: 0 var(--gutter, 28px);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}
.blog-grid.plain { grid-template-columns: repeat(3, 1fr); }

.post {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  cursor: pointer;
  /* translateZ(0) creates a compositing layer which fixes overflow:hidden
     clipping of absolute children during CSS transform on hover */
  transform: translateZ(0);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.post:hover { transform: translateY(-3px) translateZ(0); border-color: var(--gray-200); box-shadow: var(--shadow-md); }
.post .pic {
  aspect-ratio: 16 / 10;
  position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.post.featured .pic { aspect-ratio: 16 / 9; }
.post-readbig {
  position: absolute; left: 20px; bottom: 18px; z-index: 2;
  color: rgba(255,255,255,0.96); font-family: var(--display); font-weight: 700;
  line-height: 0.9; letter-spacing: -0.04em;
  pointer-events: none;
}
.post-readbig .u { font-size: 0.36em; font-weight: 500; opacity: 0.8; letter-spacing: 0; }
.post .pic::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.35));
}
.post .pill {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 10px; background: rgba(255,255,255,0.95);
  border-radius: 999px; font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink); font-weight: 600; z-index: 1;
}
.post .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post .ttl {
  font-family: var(--display); font-weight: 700;
  font-size: 19px; line-height: 1.25; letter-spacing: -0.02em; margin: 0; color: var(--ink);
}
.post.featured .ttl { font-size: 26px; }
.post .ex {
  font-size: 13px; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post .meta-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-muted); margin-top: 6px;
}
.post .meta-row .post-author { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: var(--ink); }
.post .meta-row .post-author .ava {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft, #ede9fe); color: var(--accent);
  font-size: 9px; font-weight: 700; font-family: var(--display);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.post .meta-row .sep { opacity: 0.5; }

/* barcode pattern on gradient covers */
.post-bars {
  position: absolute; right: 0; bottom: 0;
  width: 62%; height: 70%;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 2px, transparent 2px, transparent 9px);
  background-size: 9px 100%;
  -webkit-mask-image: linear-gradient(135deg, transparent 42%, #000);
          mask-image: linear-gradient(135deg, transparent 42%, #000);
  pointer-events: none;
}
.post-readbig {
  position: absolute; left: 20px; bottom: 18px; z-index: 1;
  color: rgba(255,255,255,0.96); font-family: var(--display); font-weight: 700;
  line-height: 0.9; letter-spacing: -0.04em;
}
.post-readbig .u { font-size: 0.36em; font-weight: 500; opacity: 0.8; letter-spacing: 0; }

/* ---- blog hero ---- */
.blog-hero { padding: 56px var(--gutter, 28px) 0; }
.blog-hero-eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.blog-hero-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: end;
}
.blog-hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 5vw, 68px); line-height: 1.0; letter-spacing: -0.035em; margin: 0; color: var(--ink);
}
.blog-hero h1 .accent { color: var(--accent); }
.blog-hero-grid p { font-size: 17px; color: var(--text-muted); line-height: 1.55; margin: 0; max-width: 420px; }
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.blog-filter .chip { text-decoration: none; }

/* ---- featured post ---- */
.blog-feature { padding: 18px var(--gutter, 28px) 0; }
.feature-post {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--ink); border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--ink); text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s;
}
.feature-post:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-post .pic { aspect-ratio: auto; min-height: 360px; height: 100%; background-size: cover; background-position: center; }
.feature-body { padding: 40px 40px 36px; display: flex; flex-direction: column; gap: 16px; color: #F2F4F8; justify-content: center; }
.feature-pill {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2, #a78bfa); font-weight: 600;
}
.feature-body h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 2.6vw, 38px); line-height: 1.08; letter-spacing: -0.03em;
  margin: 0; color: #fff; text-wrap: balance;
}
.feature-body p { font-size: 15px; line-height: 1.6; color: rgba(242,244,248,0.66); margin: 0; max-width: 44ch; }
.feature-body .btn { align-self: start; margin-top: 6px; }
.feature-byline { display: flex; align-items: center; gap: 12px; }
.feature-byline .ava {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(242,244,248,0.1); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.feature-byline .bl .nm { font-weight: 600; font-size: 14px; color: #fff; }
.feature-byline .bl .mt { font-size: 12px; color: rgba(242,244,248,0.55); margin-top: 2px; }

.blog-empty { padding: 0 var(--gutter, 28px); color: var(--text-muted); font-size: 15px; }

/* ---- newsletter strip ---- */
.blog-news { padding: 56px var(--gutter, 28px) 0; }
.blog-news-cell {
  position: relative; overflow: hidden;
  background: var(--accent); color: #fff;
  border-radius: var(--r-xl); padding: 44px 40px;
}
.blog-news-cell::before {
  content: ""; position: absolute; right: -60px; bottom: -120px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 60%);
}
.blog-news-cell::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(90deg, transparent 0, transparent 33px, rgba(255,255,255,0.07) 33px, rgba(255,255,255,0.07) 34px, transparent 34px);
  background-size: 34px 100%; pointer-events: none;
}
.blog-news-cell .eyebrow { color: rgba(255,255,255,0.7); position: relative; }
.blog-news-cell h3 {
  font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.05;
  letter-spacing: -0.03em; margin: 12px 0 0; position: relative; text-wrap: balance;
}
.blog-news-cell .lead { font-size: 15px; opacity: 0.82; margin: 12px 0 0; max-width: 40ch; position: relative; }
.blog-news-form { display: flex; gap: 10px; margin-top: 24px; position: relative; max-width: 460px; flex-wrap: wrap; }
.blog-news-form input {
  flex: 1 1 220px; min-width: 0; height: 50px; padding: 0 18px; border-radius: 14px;
  border: 1.5px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
  color: #fff; font-size: 15px; font-weight: 500; outline: 0;
}
.blog-news-form input::placeholder { color: rgba(255,255,255,0.6); }
.blog-news-form input:focus { border-color: #fff; background: rgba(255,255,255,0.16); }
.blog-news-form .btn { height: 50px; padding: 0 22px; background: #fff; color: var(--accent); flex: 0 0 auto; }
.blog-news-form .btn:hover { transform: translateY(-1px); }

/* =========================================================
   ARTICLE READER
   ========================================================= */
.article-wrap { padding: 28px var(--gutter, 28px) 0; }
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .arrow { opacity: 0.4; }
.crumbs .current { color: var(--ink); font-weight: 500; }

/* article-head: full-width like the rest, max-width matches content column */
.article-head { margin: 18px 0 0; }
.article-pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600; color: var(--accent);
  background: var(--accent-soft, #ede9fe); padding: 6px 12px; border-radius: 999px;
}
.article-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 4.4vw, 56px); line-height: 1.04; letter-spacing: -0.035em;
  margin: 18px 0 0; color: var(--ink); text-wrap: balance;
}
.article-lead { font-size: 19px; line-height: 1.55; color: var(--text-muted); margin: 20px 0 0; }
.article-byline {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.article-byline .ava {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent-soft, #ede9fe); color: var(--accent);
  font-family: var(--display); font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.article-byline .bl .nm { font-weight: 600; font-size: 15px; color: var(--ink); }
.article-byline .bl .role { font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.article-byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gray-300); }
.article-byline .meta { font-size: 13px; color: var(--text-muted); display: inline-flex; gap: 8px; align-items: center; }
.article-byline .meta .sep { opacity: 0.5; }

/* cover — full width of the page column */
.article-cover { margin: 30px 0 0; }
.article-cover .pic {
  aspect-ratio: auto; height: clamp(260px, 34vw, 480px);
  border-radius: var(--r-xl); overflow: hidden; background-size: cover; background-position: center;
  position: relative;
}
.article-cover .post-readbig { left: 32px; bottom: 28px; }

/* layout: share column left + content full width */
.article-layout {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 24px; align-items: start;
  margin: 44px 0 0;
}
.article-share { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* images in article prose — never wider than content */
.article-main .prose img {
  max-width: 100%; height: auto; border-radius: var(--r-lg);
  display: block; margin: 28px 0;
}
.article-main .prose figure { margin: 28px 0; }
.article-main .prose figure img { margin: 0; }

/* product embeds inside article — 3 per row card-style */
.article-products-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0;
  max-width: 100%;
}
.article-product-embed {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.article-product-embed:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gray-200); }
.article-product-image {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-50); overflow: hidden; text-decoration: none;
  color: var(--text-muted); font-size: 13px; padding: 16px;
}
.article-product-image img { width: 100%; height: 100%; object-fit: contain; }
.article-product-body {
  padding: 14px 16px 18px;
  display: flex; flex-direction: column; gap: 6px; flex: 1;
}
.article-product-title {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  line-height: 1.3; color: var(--ink); text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-product-title:hover { color: var(--accent); }
.article-product-meta, .article-product-code {
  font-size: 12px; color: var(--text-muted); line-height: 1.4;
}
.article-product-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: auto; padding-top: 10px; flex-wrap: wrap;
}
.article-product-actions b { font-size: 16px; font-weight: 700; color: var(--ink); font-family: var(--display); }
.article-product-missing {
  margin: 20px 0; padding: 14px 16px; border: 1px solid #fde68a;
  border-radius: var(--r-md); background: #fffbeb; color: #92400e; font-size: 14px;
}
@media (max-width: 700px) {
  .article-products-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .article-products-row { grid-template-columns: 1fr; }
}
.article-share { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.article-share .lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); writing-mode: vertical-rl; margin-bottom: 6px;
}
.article-share button, .article-share a {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gray-50); color: var(--ink);
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s; text-decoration: none;
}
.article-share button:hover, .article-share a:hover { background: var(--accent); color: #fff; border-color: transparent; transform: translateY(-2px); }

/* ---- prose ---- */
.article-main .prose { font-size: 17.5px; line-height: 1.72; color: var(--gray-700, #374151); }
.article-main .prose > * { margin: 0; }
.article-main .prose > * + * { margin-top: 22px; }
.article-main .prose .lead { font-size: 20px; line-height: 1.6; color: var(--ink); font-weight: 500; }
/* no max-width on p — text fills the full content column */
.article-main .prose strong { color: var(--ink); font-weight: 700; }
.article-main .prose h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 27px; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink);
  margin-top: 44px; padding-top: 4px; text-wrap: balance;
}
.article-main .prose h2 + p { margin-top: 14px; }
.article-main .prose ul { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.article-main .prose ul li { position: relative; padding-left: 30px; max-width: 66ch; }
.article-main .prose ul li::before {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
.article-main .prose blockquote {
  margin: 36px 0; padding: 4px 0 4px 28px; border-left: 3px solid var(--accent);
}
.article-main .prose blockquote p {
  font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 1.35;
  letter-spacing: -0.02em; color: var(--ink); max-width: 56ch; margin: 0;
}
.article-main .prose blockquote cite { display: block; margin-top: 14px; font-style: normal; font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* author card */
.article-author {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line);
}
.article-author .ava {
  width: 56px; height: 56px; border-radius: 50%; flex: 0 0 auto;
  background: var(--ink); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.article-author .role { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.article-author .nm { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); margin-top: 3px; }
.article-author .bio { font-size: 14px; color: var(--text-muted); margin-top: 4px; max-width: 46ch; }
.article-author .btn { margin-left: auto; }

/* aside */
.article-aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 14px; }
.aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.aside-cta { background: var(--ink); border-color: var(--ink); color: #F2F4F8; }
.aside-cta .h { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; margin-top: 10px; }
.aside-cta p { font-size: 13px; color: rgba(242,244,248,0.65); line-height: 1.5; margin: 8px 0 16px; }
.aside-cta .btn { width: 100%; justify-content: center; }

/* dark theme */
body.theme-dark .feature-post,
body.theme-dark .aside-cta { background: #06080c; border-color: #06080c; }

/* =========================================================
   BLOG RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-share {
    position: static; flex-direction: row; gap: 8px; align-items: center;
    justify-content: flex-start; margin-bottom: 4px;
  }
  .article-share .lbl { writing-mode: horizontal-tb; margin: 0 6px 0 0; }
  .blog-grid.plain { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .blog-hero-grid { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .feature-post { grid-template-columns: 1fr; }
  .feature-post .pic { min-height: 220px; }
  .feature-body { padding: 28px 26px 30px; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .article-aside .aside-card { flex: 1 1 280px; }
}
@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-grid.plain { grid-template-columns: 1fr; }
  .article-byline { gap: 10px; }
  .article-author .btn { margin-left: 0; width: 100%; justify-content: center; }
  .article-aside { flex-direction: column; }
  .article-main .prose { font-size: 16.5px; }
  .article-main .prose blockquote p { font-size: 21px; }
}

/* ---- pagination ---- */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
  padding: 40px var(--gutter, 28px) 56px;
}
.pagination a, .pagination strong, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 6px;
  border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1.5px solid transparent; transition: all .15s;
}
.pagination a {
  border-color: var(--line); background: var(--paper); color: var(--ink);
  text-decoration: none;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft, #ede9fe); }
.pagination strong {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.pagination span { color: var(--text-muted); border: none; }
/* Prev/Next wider */
.pagination a:first-child,
.pagination a:last-child { padding: 0 14px; gap: 6px; }




/* ============ FOOTER ============ */
footer {
  margin-top: 40px;
  padding: 40px max(28px, calc((100% - 1600px) / 2 + 28px)) 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
footer h4 {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-weight: 600;
}
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink); }
footer ul a { transition: color .15s; }
footer ul a:hover { color: var(--accent); }
.foot-brand .tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  margin: 18px 0 8px;
  letter-spacing: -0.02em;
  max-width: 360px;
}
.foot-brand .tagline .accent { color: var(--accent); }
.foot-brand p { color: var(--text-muted); font-size: 14px; max-width: 360px; line-height: 1.55; margin: 0; }
.foot-bottom {
  padding: 22px max(28px, calc((100% - 1600px) / 2 + 28px));
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}
.foot-bottom .left { display: flex; gap: 16px; }

/* ── Footer alcohol disclaimer ── */
.foot-disclaimer {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 20px max(28px, calc((100% - 1600px) / 2 + 28px));
  border-top: 1px solid var(--line);
  background: var(--gray-50);
}
.foot-disclaimer-badges { flex: 0 0 auto; padding-top: 2px; }
.disc-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 13px; font-weight: 800; letter-spacing: -0.02em;
  border: 2px solid currentColor;
}
.disc-18 { color: var(--text-muted); }
.foot-disclaimer-text { flex: 1 1 0; }
.foot-disclaimer-text p {
  margin: 0 0 6px; font-size: 12px; color: var(--text-muted); line-height: 1.55;
}
.foot-disclaimer-text p:last-child { margin: 0; }
.foot-disclaimer-text strong { color: var(--ink); }
@media (max-width: 600px) {
  .foot-disclaimer { flex-direction: column; gap: 12px; }
}

/* ============ PRODUCT DETAIL ============ */
.detail-wrap {
  padding: 28px 28px 0;
}
.crumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 24px;
}
.crumbs a { transition: color .15s; cursor: pointer; }
.crumbs a:hover { color: var(--ink); }
.crumbs .arrow { opacity: 0.5; }
.crumbs .current { color: var(--ink); font-weight: 500; }

.detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 32px;
  align-items: start;
}
.detail-media {
  position: sticky;
  top: 88px;
  background: var(--gray-50);
  border-radius: var(--r-xl);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
}
.detail-img {
  background: var(--paper);
  border-radius: var(--r-lg);
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}
.detail-img::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, transparent 0, transparent 27px, color-mix(in srgb, var(--ink) 3%, transparent) 27px, color-mix(in srgb, var(--ink) 3%, transparent) 28px, transparent 28px);
  background-size: 28px 100%;
  opacity: 0.7;
  pointer-events: none;
}
.detail-img-meta {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  background: var(--paper);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  z-index: 2;
}
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.detail-thumb {
  aspect-ratio: 1;
  background: var(--paper);
  border-radius: 14px;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s;
}
.detail-thumb:hover { border-color: var(--gray); }
.detail-thumb.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.detail-info { display: flex; flex-direction: column; gap: 24px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tag {
  padding: 5px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 500;
}
.detail-tag.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.detail-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
.detail-title .accent { color: var(--accent); }

.detail-sub {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.detail-sub span { display: inline-flex; align-items: center; gap: 6px; }
.detail-sub b { color: var(--ink); font-weight: 600; }
.detail-sub .in-stock { color: #16a34a; font-weight: 500; }

.attrs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--r-md);
  background: var(--gray-50);
  padding: 8px 14px;
}
.attr {
  padding: 12px 4px;
  display: flex; justify-content: space-between;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.attr:nth-last-child(-n+2) { border-bottom: 0; }
.attr:nth-child(odd) { padding-right: 18px; border-right: 1px solid var(--line); }
.attr:nth-child(even) { padding-left: 18px; }
.attr .k { color: var(--text-muted); }
.attr .v { color: var(--ink); font-weight: 600; }

.volumes { display: flex; gap: 8px; flex-wrap: wrap; }
.volume {
  padding: 12px 18px;
  border: 1.5px solid var(--gray-200);
  background: var(--paper);
  border-radius: 14px;
  font-size: 14px;
  display: flex; flex-direction: column; align-items: center;
  min-width: 78px;
  transition: all .15s;
}
.volume:hover { border-color: var(--ink); }
.volume.active { background: var(--ink); color: white; border-color: var(--ink); }
.volume .v { font-weight: 700; font-family: var(--display); }
.volume .k { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.volume.active .k { color: rgba(255,255,255,0.6); }

.prices-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-top: 8px;
}
.prices-head .title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.025em;
}
.prices-head .title .accent { color: var(--accent); }
.prices-head .sort {
  font-size: 12px; color: var(--text-muted);
  display: inline-flex; gap: 6px; align-items: center;
  padding: 8px 12px;
  background: var(--gray-50);
  border-radius: 10px;
  cursor: pointer;
}
.prices-head .sort b { color: var(--ink); font-weight: 600; }

.offers { display: flex; flex-direction: column; gap: 8px; }
.offer {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.offer:hover { border-color: var(--gray-200); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.offer.best {
  border-color: var(--accent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent-soft) 50%, var(--paper)), var(--paper) 70%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}
.offer-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gray-50);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  flex: 0 0 44px;
}
.offer.best .offer-logo { background: var(--accent); color: white; border-color: transparent; }
.offer-store { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.offer-store .name {
  font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
}
.offer-store .info {
  font-size: 12px; color: var(--text-muted);
  display: flex; gap: 8px; align-items: center;
}
.offer-store .badge {
  background: var(--accent);
  color: white;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
.offer-price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.offer-price .ccy { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-left: 2px; }
.offer-cta {
  padding: 10px 16px;
  background: var(--ink); color: white;
  border-radius: 12px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform .15s;
}
.offer-cta:hover { transform: translateY(-1px); }
.offer.best .offer-cta { background: var(--accent); }

/* description block */
.about {
  padding-top: 8px;
}
.about h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
}
.about h3 .accent { color: var(--accent); }
.about p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-700);
  margin: 0;
  max-width: 60ch;
}
.about .notes {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.note-chip {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--r-md);
}
.note-chip .k { font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.note-chip .v { margin-top: 6px; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.015em; }

/* price history */
.history {
  background: var(--gray-50);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}
.history-head {
  display: flex; align-items: start; justify-content: space-between;
  margin-bottom: 14px;
}
.history-head .k { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.history-head .v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 8px;
}
.history-head .v .delta-pill {
  font-family: var(--sans);
  font-size: 12px; font-weight: 600;
  padding: 3px 8px;
  background: color-mix(in srgb, #16a34a 18%, transparent);
  color: #15803d;
  border-radius: 999px;
}
.history-tabs { display: flex; gap: 4px; background: var(--paper); border-radius: 10px; padding: 3px; }
.history-tabs button {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.history-tabs button.active { background: var(--ink); color: white; }



/* ============ LEAD MODAL (форма заявки) ============ */
.lead-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 18px;
}
.lead-modal.active { display: flex; }
.lead-modal-bg {
  position: absolute; inset: 0;
  background: rgba(13,17,23,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lead-modal-card {
  position: relative; z-index: 1;
  width: min(520px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}
.lead-modal-card h2 {
  font-family: var(--display);
  font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.lead-modal-close {
  position: absolute; right: 14px; top: 14px;
  width: 36px; height: 36px;
  border-radius: 999px;
  background: var(--gray-100); color: var(--ink);
  font-size: 18px; line-height: 36px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background .15s;
}
.lead-modal-close:hover { background: var(--gray-200); }
.lead-modal-open { overflow: hidden; }

.lead-form-product {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--gray-50); padding: 12px; margin-bottom: 16px;
}
.lead-form-product b { font-weight: 600; line-height: 1.35; font-size: 14px; }
.lead-form-product span { font-size: 13px; color: var(--text-muted); }
/* Поля — одна колонка */
.lead-form-fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.lead-form-fields .field input,
.lead-form-fields .field textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-md);
  padding: 11px 13px;
  font: inherit; font-size: 15px;
  background: var(--paper);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.lead-form-fields .field input:focus,
.lead-form-fields .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}
.lead-form-fields .field label {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: block; margin-bottom: 5px;
}
.lead-consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px; cursor: pointer; line-height: 1.4;
}
.lead-consent input { margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.lead-form-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.lead-form-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.lead-page-card { width: min(620px,100%); margin: 30px auto; }

@media (max-width: 580px) {
  .lead-form-grid { grid-template-columns: 1fr; }
  .lead-modal-card { padding: 20px; border-radius: var(--r-lg); }
  .lead-modal-card h2 { font-size: 20px; }
}
/* ============ LOAD MORE ============ */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 32px 16px 0;
}
.load-more-wrap .btn-outline {
  min-width: 220px;
  justify-content: center;
}
/* ============ SEARCH RESULTS ============ */
.results-head {
  padding: 16px 28px 0;
  display: flex; align-items: end; justify-content: space-between;
}
.results-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 36px; margin: 0;
  letter-spacing: -0.03em;
}
.results-head h2 .accent { color: var(--accent); }
.results-head .count { font-size: 13px; color: var(--text-muted); }
.results-toolbar {
  padding: 18px 28px 0;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.results-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-pill {
  padding: 7px 12px;
  border: 1px solid var(--gray-200);
  background: var(--paper);
  border-radius: 999px;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  font-weight: 500;
}
.filter-pill .x {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gray-100);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.filter-pill .x:hover { background: var(--ink); color: white; }
.results-view {
  display: inline-flex;
  background: var(--gray-50);
  border-radius: 12px;
  padding: 3px;
}
.results-view button {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
}
.results-view button.active { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.sort-select {
  background: var(--paper);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
}

/* ============ TWEAKS / DARK MODE ============ */
body.theme-dark {
  --bg: #0D1117;
  --paper: #161B22;
  --ink: #F2F4F8;
  --text: #F2F4F8;
  --text-muted: #8B91A1;
  --line: #232A35;
  --gray-50: #1A2029;
  --gray-100: #1f2630;
  --gray-200: #2A3340;
  --gray-300: #3a4452;
  --gray-500: #6B7385;
  --gray-700: #B8BDC7;
  --accent-soft: rgba(109,64,255,0.18);
}
body.theme-dark .card,
body.theme-dark .post,
body.theme-dark .offer,
body.theme-dark .note-chip,
body.theme-dark .detail-img {
  background: var(--paper);
  border-color: var(--line);
}
body.theme-dark .card-media,
body.theme-dark .detail-media,
body.theme-dark .history,
body.theme-dark .attrs,
body.theme-dark .how {
  background: var(--gray-50);
}
body.theme-dark .nav { background: color-mix(in srgb, var(--bg) 80%, transparent); }
body.theme-dark .nav-links { background: var(--gray-50); }
body.theme-dark .nav-links button.active { background: var(--accent); color: white; }
body.theme-dark .chip { background: var(--paper); border-color: var(--line); color: var(--ink); }
body.theme-dark .chip.active { background: var(--accent); color: white; border-color: var(--accent); }
body.theme-dark .filter-pill { background: var(--paper); border-color: var(--line); color: var(--ink); }
body.theme-dark .search { background: var(--paper); border-color: var(--line); }
body.theme-dark .btn-ghost { background: var(--gray-50); color: var(--ink); }
body.theme-dark .btn-outline { background: var(--paper); border-color: var(--line); color: var(--ink); }
body.theme-dark .btn-primary { background: white; color: var(--ink); }
body.theme-dark .icon-btn { background: var(--gray-50); color: var(--ink); }
body.theme-dark .offer.best { background: linear-gradient(90deg, rgba(109,64,255,0.16), var(--paper) 70%); }
body.theme-dark .post .pill { background: var(--paper); color: var(--ink); }
body.theme-dark .bento-light { background: var(--gray-50); border-color: var(--line); color: var(--ink); }

/* density */
body.density-compact .product-grid { gap: 10px; }
body.density-compact .card { padding: 10px; }
body.density-compact .section-head { margin-top: 36px; }

/* ---- age-gate popup ---- */
.age-gate { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; padding: 18px; }
.age-gate.active { display: flex; }
.age-gate-open { overflow: hidden; }
.age-gate-backdrop { position: absolute; inset: 0; background: rgba(13,17,23,.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.age-gate-card {
  position: relative; z-index: 1;
  background: var(--paper); border-radius: 24px;
  max-width: 420px; width: 100%;
  padding: 44px 36px 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,.25);
  text-align: center;
  overflow: hidden;
}
/* accent bar at top */
.age-gate-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--accent);
}
.age-gate-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gray-100); border: 0;
  font-size: 16px; color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s; z-index: 2;
  line-height: 1;
}
.age-gate-close:hover { background: var(--gray-200); color: var(--ink); }
/* 18+ badge */
.age-gate-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2.5px solid var(--accent);
  color: var(--accent); font-size: 15px; font-weight: 800;
  letter-spacing: -0.02em; margin: 0 auto 20px;
}
.age-gate-card h2 {
  font-family: var(--display); font-weight: 800;
  font-size: 24px; letter-spacing: -0.03em;
  margin: 0 0 10px; color: var(--ink);
}
.age-gate-card p {
  color: var(--text-muted); font-size: 14px; line-height: 1.6;
  margin: 0 0 28px; max-width: 32ch; margin-left: auto; margin-right: auto;
}
.age-gate-actions {
  display: flex; flex-direction: column; gap: 10px;
}
.age-gate-actions .btn-age-yes {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 50px; border-radius: 14px;
  background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px; border: 0; cursor: pointer;
  transition: background .15s, transform .15s;
}
.age-gate-actions .btn-age-yes:hover { background: #6d28d9; transform: translateY(-1px); }
.age-gate-actions .btn-age-no {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 44px; border-radius: 12px;
  background: transparent; color: var(--text-muted);
  font-weight: 600; font-size: 14px; border: 1.5px solid var(--line);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.age-gate-actions .btn-age-no:hover { border-color: var(--gray-400); color: var(--ink); }
.age-gate-brand { display: none; }
.age-gate-note {
  margin-top: 18px; font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
.lightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(13,17,23,.72); z-index: 1000; padding: 28px; }
.lightbox.active { display: flex; }
.lightbox img { max-width: min(92vw, 900px); max-height: 88vh; object-fit: contain; background: #fff; border-radius: var(--r-lg); }
.lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; }


.scanner-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.scanner-hint { font-size: 14px; color: var(--text-muted); margin: 8px 4px 12px; text-align: center; }
.scanner-hint[data-type="error"] { color: #b4231b; }
#reader, .scanner-video-wrap { width: 100%; overflow: hidden; border-radius: var(--r-lg); background: #0f172a; }
#reader video, .scanner-video { width: 100% !important; height: clamp(280px,56vh,520px) !important; object-fit: cover; border-radius: var(--r-lg); display: block; background: #0f172a; }

/* ============ PHP GLUE (real data on live site) ============ */
/* category bar + dropdown (matches prototype) */
.cat-bar { position: relative; }
.chip-all { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; padding-right: 12px; cursor: pointer; }
.chip-all:hover { border-color: var(--ink); }
.chip-all .chip-chev { display: inline-flex; transition: transform .2s ease; }
.chip-all .chip-chev.up { transform: rotate(180deg); }
.cat-panel {
  display: none;
  position: absolute; left: 0; right: 0; top: calc(100% + 12px); z-index: 40;
  background: var(--paper); border: 1px solid var(--gray-200);
  border-radius: var(--r-xl, 24px); box-shadow: 0 30px 70px -34px rgba(13,17,23,0.45); padding: 16px;
}
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border: 1px solid var(--gray-100, #eef0f4); border-radius: 14px;
  background: var(--paper); cursor: pointer; text-align: left; text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.cat-item:hover { border-color: var(--ink); background: var(--gray-50); transform: translateY(-1px); }
.cat-item .cn { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-item .cc { font-family: var(--mono, monospace); font-size: 11px; font-weight: 600; color: var(--gray-500); background: var(--gray-50); padding: 3px 9px; border-radius: 999px; flex: 0 0 auto; }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .cat-panel { left: 0; right: 0; } .cat-grid { grid-template-columns: repeat(2, 1fr); } }

.card { text-decoration: none; color: inherit; }
.board-row { text-decoration: none; color: inherit; }
.hero-search { margin-top: 4px; }
.hero-actions { display: flex; gap: 10px; margin-top: 32px; flex-wrap: wrap; }
.hero-actions .btn-lg { flex: 1 1 0; min-width: 0; justify-content: center; }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
/* real product images inside media / board / thumbs */
.card-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 14px; mix-blend-mode: multiply; }
.card.featured .card-media img { padding: 18px; }
.card-media .thumb-ph { position: relative; z-index: 1; color: var(--gray-500); display: inline-flex; }
.board-row .pic img { width: 100%; height: 100%; object-fit: cover; }
.board-row .pic .thumb-ph { color: rgba(242,244,248,.5); transform: scale(.8); }
.board-row .dl.pop { background: rgba(109,64,255,.18); color: var(--accent-2); }
.board-row .pr .c { color: rgba(242,244,248,.5); }
/* blog post real image / gradient */
.post .pic { background-size: cover; background-position: center; background-repeat: no-repeat; }
.post .pic.pic-grad { background: linear-gradient(135deg, var(--accent) 0%, #0D1117 100%); }
/* results empty state */
.empty-state { margin: 0 28px; padding: 64px 28px; text-align: center; color: var(--text-muted); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 16px; }
/* keep old container readable if it appears on a skinned page */
.etiko-home + .lightbox, .etiko-home + .age-gate { font-family: var(--sans); }

/* accent override */
body[data-accent="indigo"]    { --accent: #5b6dff; }
body[data-accent="emerald"]   { --accent: #10b981; --accent-soft: #d1fae5; }
body[data-accent="rose"]      { --accent: #f43f5e; --accent-soft: #ffe4e6; }

/* responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .card.featured { grid-column: span 2; flex-direction: column; }
  .card.featured .card-media { flex: 0 0 auto; aspect-ratio: 1/1.05; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail-media { position: static; }
  footer { grid-template-columns: 1fr 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento-violet, .bento-light, .bento-dark { grid-column: span 1; }
}

/* === BASE LAYOUT (product pages, forms) === */
.container { width: min(1600px,100%); max-width:1600px; margin:0 auto; padding:28px 18px 70px; }
.card { background:#fff; border:1px solid #e5e7eb; border-radius:24px; box-shadow:0 16px 50px rgba(15,23,42,.06); padding:24px; }
.grid { display:grid; gap:20px; }
.empty { padding:22px; border-radius:18px; background:#f9fafb; color:#6b7280; }
.flash { padding:12px 14px; border-radius:14px; margin:0 0 14px; }
.flash-ok { background:#ecfdf5; color:#065f46; }
.flash-error { background:#fef2f2; color:#991b1b; }
.muted { color:#6b7280; }
.inline-link { color:var(--accent); text-decoration:none; }

/* === blog-grid remove left padding === */
.blog-grid { padding: 0; }


/* === PRODUCT DETAIL PAGE === */
.detail-page-main { padding-top: 0 !important; padding-bottom: 24px !important; }
.detail-info .history { background: var(--gray-50) !important; border-radius: var(--r-lg) !important; padding: 20px 22px !important; }
.detail-info .price-dynamics-card { background: none; border: none; padding: 0; box-shadow: none; }
.detail-info .price-dynamics-card h2 { display: none; }
.detail-info .price-dynamics-card .price-tabs { display: none; }

/* === PRODUCT DETAIL LAYOUT === */
.product-layout { display:grid; grid-template-columns:340px 1fr; gap:24px; align-items:start; }
.product-photo-card,.product-info-card { height:auto !important; align-self:start !important; }
.product-info-card h1 { margin-bottom:18px !important; font-size:clamp(24px,2.8vw,40px); font-family:var(--display); font-weight:800; letter-spacing:-0.03em; }
.image-box { background:#fff; border-radius:20px; aspect-ratio:1/1; display:grid; place-items:center; overflow:hidden; color:#9ca3af; text-align:center; padding:18px; }
.image-box img { width:100%; height:100%; object-fit:contain; }
.kvs { display:grid; grid-template-columns:150px 1fr; gap:8px 16px; margin-top:18px; padding:14px 0; border-top:1px solid #e5e7eb; border-bottom:1px solid #e5e7eb; }
.kvs b { color:#6b7280; font-weight:500; font-size:14px; }
.variant-chip { display:inline-flex; align-items:center; min-height:34px; padding:7px 14px; border-radius:999px; border:1.5px solid #e5e7eb; background:#fff; color:#374151; font-size:13px; font-weight:600; cursor:pointer; transition:border-color .15s,background .15s,color .15s; }
.variant-chip.active { background:var(--ink); border-color:var(--ink); color:#fff; }
.seller-offer-row { display:grid; grid-template-columns:1fr auto auto; gap:16px; align-items:center; border:1px solid #e8ebf2; border-radius:16px; padding:14px 16px; background:#fff; transition:border-color .15s,box-shadow .15s; margin-bottom:10px; }
.seller-offer-row:hover { border-color:var(--ink); box-shadow:0 8px 24px rgba(0,0,0,.07); }
.seller-offer-price { font-size:22px; font-weight:800; color:var(--ink); font-family:var(--mono); }
.field { display:grid; gap:7px; }
.field label { font-size:13px; color:#4b5563; font-weight:600; }
.field input,.field textarea,.field select { width:100%; border:1px solid #d1d5db; border-radius:14px; padding:12px 13px; font:inherit; background:#fff; }

/* === MOBILE === */
@media (max-width: 1100px) {
  /* Nav: тільки горизонтальний padding через nav-inner (v17 nav) */
  .nav-inner { padding-left: 18px !important; padding-right: 18px !important; }
  .hero { padding: 36px 18px 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-card { display: none; }
  .product-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .detail { grid-template-columns: 1fr 1.1fr; gap: 20px; }
}
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  html, body { overflow-x: hidden; }

  /* Nav v17: padding на nav-inner, не на nav */
  .nav { padding: 0 !important; }
  .nav-inner { padding: 10px 16px !important; }
  .nav-left { gap: 12px; }
  .nav-links { display: none; }

  /* Container: 16px з боків */
  .container { padding-left: 16px !important; padding-right: 16px !important; }

  /* Секції — прямі діти main, не в container → замінюємо 28px на 16px */
  .product-grid { padding-left: 16px !important; padding-right: 16px !important; }
  /* product-grid в container (detail "Можливо сподобається") — container вже дає 16px */
  .container .product-grid { padding-left: 0 !important; padding-right: 0 !important; }
  .section-head {
    padding-left: 16px !important;
    padding-right: 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-top: 16px !important;
    margin-bottom: 16px !important;
  }
  /* На сторінці товару section-head вже в container — без додаткових padding */
  .container .section-head,
  .detail-page-main .section-head {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .section-head .title { font-size: clamp(22px, 7vw, 32px) !important; white-space: normal; line-height: 1.1; }
  .section-head .meta { gap: 10px !important; }
  .search-wrap { padding-left: 16px !important; padding-right: 16px !important; }
  .bento { padding-left: 16px !important; padding-right: 16px !important; }
  .blog-grid { padding-left: 16px !important; padding-right: 16px !important; }
  .results-head { padding-left: 16px !important; padding-right: 16px !important; }
  .results-toolbar { padding-left: 16px !important; padding-right: 16px !important; }
  .empty-state { margin-left: 0 !important; margin-right: 0 !important; }
  /* how: margin: 80px 28px 0 → margin-left/right 16px, внутрішній padding менший */
  .how { margin-left: 16px !important; margin-right: 16px !important; padding-left: 20px !important; padding-right: 20px !important; }

  /* detail-wrap: має свій padding 28px — обнуляємо бокові (container дає 16px) */
  .detail-wrap { padding-left: 0 !important; padding-right: 0 !important; padding-top: 16px !important; }

  /* Хлібні крошки: горизонтальний скрол */
  .crumbs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    gap: 6px !important;
    font-size: 12px !important;
  }
  .crumbs::-webkit-scrollbar { display: none; }
  .crumbs a, .crumbs .current { white-space: nowrap; }

  /* Hero */
  .hero { padding: 20px 16px 14px; }
  .hero h1 { font-size: clamp(26px, 7vw, 38px); }

  /* Гріди */
  .product-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .card.featured { grid-column: auto !important; flex-direction: column !important; }
  .card.featured .card-media { flex: 0 0 auto !important; aspect-ratio: 1 / 1.2 !important; }
  .product-grid .card { min-width: 0; padding: 16px !important; border-radius: var(--r-lg) !important; }
  .detail { grid-template-columns: 1fr !important; gap: 12px !important; }
  .detail-media { position: static !important; border-radius: 16px !important; padding: 16px !important; }
  .detail-title { font-size: clamp(22px, 6vw, 32px) !important; }
  /* attrs: 1 колонка на мобільному */
  .attrs {
    grid-template-columns: 1fr !important;
    padding: 4px 16px !important;
  }
  .attr:nth-child(odd) { padding-right: 0 !important; border-right: 0 !important; }
  .attr:nth-child(even) { padding-left: 0 !important; }
  .attr:nth-last-child(-n+2) { border-bottom: 1px solid var(--line) !important; }
  .attr:last-child { border-bottom: 0 !important; }
  .blog-grid { grid-template-columns: 1fr !important; }
  footer { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  footer { padding-left: 16px !important; padding-right: 16px !important; }
  .foot-bottom { padding-left: 16px !important; padding-right: 16px !important; }

  /* Offer rows */
  .offer {
    grid-template-columns: auto 1fr !important;
    grid-template-rows: auto auto !important;
    grid-template-areas: "logo store" "price cta" !important;
    row-gap: 10px !important;
    column-gap: 14px !important;
    padding: 14px 16px !important;
  }
  .offer-logo { grid-area: logo; }
  .offer-store { grid-area: store; align-self: center; }
  .offer-price { grid-area: price; align-self: center; font-size: 22px !important; }
  .offer-cta { grid-area: cta; justify-self: end; align-self: center; }
  /* offer-price і offer-cta handled by grid-areas above */

  /* Font-size 16px — iOS не зумує input */
  body { font-size: 16px; }
  .nav-search-input { font-size: 16px; }

  /* History: по макету: [eyebrow | tabs] / [ціна+badge] */
  .history-head {
    flex-wrap: wrap !important;
    gap: 6px 0 !important;
  }
  .history-head > div:first-child {
    display: contents;
  }
  .history-head .k {
    order: 1;
    flex: 1 1 auto;
    align-self: center;
  }
  .history-tabs {
    order: 2;
    flex: 0 0 auto;
    align-self: center;
  }
  .history-head .v {
    order: 3;
    flex: 0 0 100%;
    font-size: 28px !important;
    margin-top: 4px;
  }
}
@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr !important; }
  .nav-cta { display: none; }
}

/* === PRICE DYNAMICS (detail page) === */
.price-dynamics-card {
  background: var(--gray-50);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin: 20px 0;
}
.price-dynamics-head {
  display: flex; justify-content: space-between; align-items: start;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 14px;
}
.price-dynamics-head h2 {
  font-family: var(--display);
  font-size: 16px !important;
  font-weight: 700 !important;
  margin: 0 0 4px !important;
  color: var(--ink);
}
.price-dynamics-head p { font-size: 12px; color: var(--text-muted); margin: 0; }
.price-dynamics-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 13px; color: var(--text-muted);
}
.price-dynamics-badges span b { color: var(--ink); font-weight: 700; }
.price-tabs {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px; margin-bottom: 12px;
}
.price-tabs .active { color: var(--ink); font-weight: 600; }
.price-chart-wrap { overflow-x: auto; }
.price-chart { display: block; width: 100%; max-width: 760px; height: auto; }
.price-grid-line { stroke: var(--line); stroke-width: 1; }
.price-line { stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.price-point { fill: var(--accent); }
.price-axis-label { font-size: 11px; fill: var(--text-muted); font-family: var(--mono); }
.price-date-label { font-size: 11px; fill: var(--text-muted); }
.price-dynamics-summary {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.price-dynamics-summary div { display: flex; flex-direction: column; gap: 2px; }
.price-dynamics-summary span { color: var(--text-muted); }
.price-dynamics-summary b { font-weight: 700; color: var(--ink); }
.price-dynamics-empty {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}
.price-dynamics-empty b { color: var(--ink); font-size: 14px; }

[hidden] { display: none; }


.blog-grid { padding-left: 28px; padding-right: 28px; }
@media (max-width:768px) { .blog-grid { padding-left: 14px; padding-right: 14px; } }



.scanner-hint { padding: 12px 16px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.scanner-notice { padding: 12px 16px; font-size: 13px; border-radius: var(--r-md); }
.scanner-notice[data-kind="error"] { background: #fef2f2; color: #991b1b; }
#reader { width: 100%; }
#reader video { width: 100% !important; border-radius: 0 0 var(--r-md) var(--r-md); }
/* scanner-frame (corner brackets) */
.scanner-frame {
  position: absolute; inset: 0; pointer-events: none;
}
.scanner-frame span {
  position: absolute; width: 24px; height: 24px;
  border-color: white; border-style: solid; border-width: 0;
}
.scanner-frame span:nth-child(1) { top: 12px; left: 12px; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.scanner-frame span:nth-child(2) { top: 12px; right: 12px; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.scanner-frame span:nth-child(3) { bottom: 12px; left: 12px; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.scanner-frame span:nth-child(4) { bottom: 12px; right: 12px; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }

/* scanner as full block outside hero */
.etiko-home > .scanner {
  display: none;
}
.scanner.active {
  display: grid !important;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(13,17,23,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.scanner-box {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(13,17,23,.5);
}
.scanner-close-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 10;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(13,17,23,.5);
  color: #fff;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 32px;
  font-size: 15px; cursor: pointer;
  transition: background .15s;
}
.scanner-close-btn:hover { background: rgba(13,17,23,.85); }
.scanner-hint {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.scanner-video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.scanner-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
.scanner-frame {
  position: absolute; inset: 0;
  pointer-events: none;
}
.scanner-frame span {
  position: absolute;
  width: 28px; height: 28px;
  border-color: rgba(255,255,255,.9);
  border-style: solid; border-width: 0;
}
.scanner-frame span:nth-child(1) { top:16px; left:16px; border-top-width:3px; border-left-width:3px; border-radius:4px 0 0 0; }
.scanner-frame span:nth-child(2) { top:16px; right:16px; border-top-width:3px; border-right-width:3px; border-radius:0 4px 0 0; }
.scanner-frame span:nth-child(3) { bottom:16px; left:16px; border-bottom-width:3px; border-left-width:3px; border-radius:0 0 0 4px; }
.scanner-frame span:nth-child(4) { bottom:16px; right:16px; border-bottom-width:3px; border-right-width:3px; border-radius:0 0 4px 0; }
#reader { position: relative; }
#reader > div:not(.scanner-video-wrap) { display: none !important; }
.scanner-notice { padding: 10px 14px; font-size: 13px; text-align: center; }
.scanner-notice[data-kind="error"] { background: #fef2f2; color: #991b1b; }
/* ── New nav (v17) ──────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 16px; max-width: 1600px; width: 100%; margin: 0 auto; }
/* ── New nav structure ───────────────────────────────────── */
.nav-burger {
  display: none;
  width: 42px; height: 42px; flex: 0 0 auto;
  border-radius: 12px; background: var(--gray-50);
  color: var(--ink); align-items: center; justify-content: center;
}
.nav-burger:hover { background: var(--gray-100); }
.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 20px;
  background: var(--bg);
  max-height: calc(100dvh - 71px);
  overflow-y: auto;
}
.nav-mobile.open { display: block !important; }
.nav-mobile-catalog {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 15px;
}
.nav-mobile-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.nav-mobile-cat {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--gray-100); background: var(--paper);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.nav-mobile-links { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.nav-mobile-scan { display: none !important; }
.nav-mobile-links button, .nav-mobile-links a {
  display: flex; padding: 13px 16px; border-radius: 12px;
  background: var(--gray-50); font-weight: 600; width: 100%;
}
.nav-mobile-scan {
  align-items: center; justify-content: center; gap: 8px;
  background: var(--accent) !important; color: #fff !important;
}
.nav-mobile-links .nav-cta {
  justify-content: center; background: var(--ink) !important; color: #fff !important;
}

.nav-cat { position: relative; flex: 0 0 auto; }
.nav-catalog { display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 16px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; white-space: nowrap; }
.nav-catalog:hover { background: var(--ink-deep); }
.nav-catalog.open { background: var(--accent); }
.nav-catalog .chev { display: inline-flex; transition: transform .2s; opacity: .8; }
.nav-catalog .chev.up { transform: rotate(180deg); }
.nav-cat-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; width: min(960px, calc(100vw - 40px)); z-index: 100; background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--r-xl); box-shadow: 0 30px 70px -34px rgba(13,17,23,.45); padding: 20px; }
.nav-cat-panel.open { display: block !important; }
.cat-panel-head { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); padding: 0 4px 12px; }
.nav-cat-panel .cat-grid { grid-template-columns: repeat(4, minmax(0,1fr)) !important; }
.nav-search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 18px; background: var(--paper); border: 1.5px solid var(--gray-200); border-radius: 14px; transition: border-color .2s, box-shadow .2s; }
.nav-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb,var(--accent) 12%,transparent); }
.nav-search-icon { color: var(--gray-500); display: inline-flex; flex: 0 0 auto; }
.nav-search-input { flex: 1 1 auto; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; font-weight: 500; }
.nav-search-input::placeholder { color: var(--gray); font-weight: 400; }
.nav-scan { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; color: var(--accent); font-weight: 600; font-size: 14px; border: 1.5px solid var(--accent-soft); background: color-mix(in srgb,var(--accent-soft) 45%,var(--paper)); }
.nav-scan:hover { background: var(--accent-soft); border-color: var(--accent); }
.nav-search-go { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 20px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.nav-search-go .ico { display: none; }
.nav-search-go:hover { transform: translateY(-1px); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
/* mobile: compact search — handled in Responsive nav block below */

/* ── Search suggest dropdown ──────────────────────────────────── */
.nav-search-wrap { flex: 1 1 auto; min-width: 0; position: relative; }
.search-suggest {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--paper);
  border: 1.5px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  z-index: 9999;
  overflow: hidden;
}
.search-suggest[hidden] { display: none; }
.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--ink);
  transition: background .12s;
  cursor: pointer;
}
.search-suggest-item:hover,
.search-suggest-item.active { background: var(--gray-50); }
.search-suggest-thumb {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--gray-100);
  flex: 0 0 40px;
  object-fit: contain;
}
.search-suggest-thumb-empty {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--gray-100);
  flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300);
}
.search-suggest-info { flex: 1 1 auto; min-width: 0; }
.search-suggest-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest-producer { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.search-suggest-more {
  display: block;
  text-align: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  border-top: 1px solid var(--gray-100);
  cursor: pointer;
}
.search-suggest-more:hover { background: var(--gray-50); }
.search-suggest-loader {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.search-suggest-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Scanner modal ────────────────────────────────────────────── */
.scanner {
  display: none;
}
.scanner.active {
  display: grid !important;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(13,17,23,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.scanner-box {
  position: relative;
  width: min(400px, calc(100vw - 32px));
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(13,17,23,.5);
}
.scanner-close-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 10;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: rgba(13,17,23,.5);
  color: #fff;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  line-height: 32px;
  font-size: 15px; cursor: pointer;
  transition: background .15s;
}
.scanner-close-btn:hover { background: rgba(13,17,23,.85); }
.scanner-hint {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.scanner-video-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.scanner-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}
.scanner-frame {
  position: absolute; inset: 0;
  pointer-events: none;
}
.scanner-frame span {
  position: absolute;
  width: 28px; height: 28px;
  border-color: rgba(255,255,255,.9);
  border-style: solid; border-width: 0;
}
.scanner-frame span:nth-child(1) { top:16px; left:16px; border-top-width:3px; border-left-width:3px; border-radius:4px 0 0 0; }
.scanner-frame span:nth-child(2) { top:16px; right:16px; border-top-width:3px; border-right-width:3px; border-radius:0 4px 0 0; }
.scanner-frame span:nth-child(3) { bottom:16px; left:16px; border-bottom-width:3px; border-left-width:3px; border-radius:0 0 0 4px; }
.scanner-frame span:nth-child(4) { bottom:16px; right:16px; border-bottom-width:3px; border-right-width:3px; border-radius:0 0 4px 0; }
#reader { position: relative; }
#reader > div:not(.scanner-video-wrap) { display: none !important; }
.scanner-notice { padding: 10px 14px; font-size: 13px; text-align: center; }
.scanner-notice[data-kind="error"] { background: #fef2f2; color: #991b1b; }

#detail-main-img { width:100%!important; height:100%!important; object-fit:contain!important; padding:16px!important; box-sizing:border-box!important; }

/* ── Scanner modal ─────────────────────────────────────────── */
.scanner { display: none; }
.scanner.active {
  display: grid !important;
  place-items: center;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(13,17,23,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.scanner.active > .scanner-hint {
  display: none;
}
.scanner.active > #reader {
  width: min(420px, calc(100vw - 32px));
  background: var(--paper);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(13,17,23,.45);
}
.scanner-video-wrap {
  position: relative; background: #000;
  aspect-ratio: 1 / 1; overflow: hidden;
}
.scanner-video { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.scanner-frame { position: absolute; inset: 0; pointer-events: none; }
.scanner-frame span { position: absolute; width: 28px; height: 28px; border-color: rgba(255,255,255,.9); border-style: solid; border-width: 0; }
.scanner-frame span:nth-child(1) { top:16px; left:16px; border-top-width:3px; border-left-width:3px; border-radius:4px 0 0 0; }
.scanner-frame span:nth-child(2) { top:16px; right:16px; border-top-width:3px; border-right-width:3px; border-radius:0 4px 0 0; }
.scanner-frame span:nth-child(3) { bottom:16px; left:16px; border-bottom-width:3px; border-left-width:3px; border-radius:0 0 0 4px; }
.scanner-frame span:nth-child(4) { bottom:16px; right:16px; border-bottom-width:3px; border-right-width:3px; border-radius:0 0 4px 0; }
#reader > div:not(.scanner-video-wrap) { display: none !important; }
/* Close btn in body */
.scanner-close-btn {
  position: fixed; top: 16px; right: 16px; z-index: 310;
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(13,17,23,.75); color: #fff; border: 0;
  display: none; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
  transition: background .15s;
}
.scanner-close-btn:hover { background: rgba(13,17,23,1); }

/* ── Responsive nav ────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-burger { display: inline-flex; }
  .nav-actions { display: none; }
}
@media (max-width: 720px) {
  .nav .brand { display: none; }
  .nav .brand { display: none; }
  .nav-cat { display: none; }
  .nav-inner { gap: 10px; padding: 10px 16px; }
  .nav-search { height: 46px; padding-left: 14px; }
  .nav-scan .lbl { display: none; }
  .nav-scan { padding: 0; width: 38px; height: 38px; justify-content: center; }
  .nav-search-go .lbl { display: none; }
  .nav-search-go .ico { display: inline-flex; }
  .nav-search-go { padding: 0; width: 38px; height: 38px; justify-content: center; }

  /* Dropdown на всю ширину экрана */
  .search-suggest {
    position: fixed;
    left: 16px;
    right: 16px;
    width: auto;
    top: auto; /* переопределяется JS */
  }
}

/* ── Article product embed cards — fixed 320px width ── */
.article-products-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 14px !important; margin: 28px 0 !important;
  align-items: stretch !important;
}
.article-products-row .article-product-embed {
  display: flex !important; flex-direction: column !important;
  flex: 0 0 320px !important;
  width: 320px !important; max-width: 320px !important; min-width: 0 !important;
  margin: 0 !important;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-xl); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.article-products-row .article-product-embed:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gray-200); }
.article-products-row .article-product-image {
  aspect-ratio: 1/1 !important;
  width: 100% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 12px !important; background: var(--gray-50) !important;
  border-radius: 0 !important;
  border: none !important; border-bottom: 1px solid var(--line) !important;
  margin: 0 !important; box-sizing: border-box !important;
}
.article-products-row .article-product-image img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important; display: block !important;
}
.article-products-row .article-product-body { padding: 14px 16px 18px !important; }
.article-products-row .article-product-title {
  font-family: var(--display) !important; font-weight: 700 !important;
  font-size: 14px !important; color: var(--ink) !important; line-height: 1.3 !important;
}
@media (max-width: 920px) {
  .article-products-row .article-product-embed {
    flex: 0 0 calc(50% - 7px) !important;
    width: calc(50% - 7px) !important; max-width: none !important;
  }
}
@media (max-width: 580px) {
  .article-products-row .article-product-embed {
    flex: 1 1 100% !important;
    width: 100% !important; max-width: none !important;
  }
}
.article-products-row .article-product-actions b { font-size: 16px !important; font-family: var(--display) !important; }
@media (max-width: 700px) {
  .article-products-row { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 480px) {
  .article-products-row { grid-template-columns: 1fr !important; }
}
