/* STARGINSKY — лабораторное досье
   Палитра: холодный светлый грунт, кобальтовый акцент (band ~228),
   моноширинный протокол, инверсия стереотипа (sans-заголовки + serif-текст). */

:root {
  --bg: #f1f3f0;
  --surface: #e5e8e3;
  --fg: #14171a;
  --muted: #565d59;
  --border: #cfd4cd;
  --accent: #2438c7;
  --accent-on: #ffffff;
  --font-display: 'Commissioner', 'Helvetica Neue', sans-serif;
  --font-body: 'Literata', Georgia, serif;
  --radius: 0px;
  --space-section: 104px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  overflow-x: hidden;
}

/* мелкая бумажная крупа, чтобы фон не был плоской заливкой */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(36,56,199,.05), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(20,23,26,.045), transparent 46%);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.04;
  margin: 0;
}

p { margin: 0 0 1em; }

a { color: var(--accent); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
  z-index: 1;
}

section { padding-block: var(--space-section); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

/* ---------- шапка ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241,243,240,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.brand-name {
  font-size: 19px;
  letter-spacing: .24em;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(20,22,24,.55);
}

.brand:hover .brand-name { color: var(--accent); }

.nav {
  margin-left: auto;
  display: flex;
  gap: 26px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .06em;
}

.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--fg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  padding: 12px 20px;
  min-height: 44px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ---------- герой ---------- */

.hero {
  padding-block: 0 clamp(56px, 9vw, 96px);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(44px, 8.4vw, 96px);
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.hero h1 em {
  display: block;
  font-style: normal;
  color: var(--accent);
}

.hero .lede {
  font-size: clamp(17px, 1.6vw, 20px);
  max-width: 46ch;
  margin-top: 26px;
  color: var(--fg);
}

.hero .meta {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero .meta b { display: block; font-size: 24px; letter-spacing: -.01em; text-transform: none; margin-bottom: 4px; }
.hero .meta span { color: var(--muted); }

.hero-figure { position: relative; }

.hero-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--surface);
}

/* ---------- коллекция ---------- */

.collection { border-bottom: 1px solid var(--border); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.chips a {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 0 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.chips a:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.group {
  padding: 30px clamp(16px, 2vw, 30px) 0;
  border-left: 1px solid var(--border);
}
.group:first-child { border-left: 0; padding-left: 0; }
.group:last-child { padding-right: 0; }

.group-head { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.group-cap {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.swatch {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(20, 23, 26, .25);
  flex: 0 0 auto;
}
.swatch-black { background: #1b1b1e; }
.swatch-silver { background: linear-gradient(135deg, #f4f6f7, #98a1a6); }
.swatch-gold { background: linear-gradient(135deg, #f3d78c, #b8862f); }

.group-title { font-size: clamp(24px, 2.6vw, 34px); text-transform: uppercase; }
.group-count {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 0;
}

.scent {
  padding-block: clamp(26px, 3vw, 36px);
  border-bottom: 1px solid var(--border);
}
.scent .shot { display: block; margin: 0 0 20px; }
.scent .shot img.bottle {
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--surface);
}
.scent .family {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.scent-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -.01em;
  font-size: clamp(20px, 2.2vw, 27px);
  text-transform: uppercase;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.scent .notes { margin: 0; color: var(--muted); font-size: 15px; }

.scent-ru {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  vertical-align: baseline;
}
.scent-name .scent-ru { margin-left: 0; }

.legend {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 760px;
}
.legend b { color: var(--fg); font-weight: 600; }

/* ---------- протокол ---------- */

.protocol { background: var(--fg); color: var(--bg); }

.protocol h2, .protocol .eyebrow { color: var(--bg); }
.protocol .eyebrow { color: rgba(241,243,240,.6); }

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(241,243,240,.25);
}

.protocol-grid article {
  padding: 26px 24px 0 0;
  border-right: 1px solid rgba(241,243,240,.18);
}
.protocol-grid article:last-child { border-right: 0; }

.protocol-grid .step {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .18em;
  color: #93a7ff;
  margin-bottom: 14px;
}
.protocol-grid h3 { font-size: 22px; margin-bottom: 10px; }
.protocol-grid p { color: rgba(241,243,240,.72); font-size: 16px; margin: 0; }

/* ---------- прайс ---------- */

.price-section { background: var(--surface); border-top: 1px solid var(--border); }

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.price-card {
  background: var(--bg);
  padding: 26px 22px 28px;
  display: flex;
  flex-direction: column;
}

.price-vol {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}

.price-size {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0 0 14px;
}

.price-sum { margin: 0 0 12px; }
.price-sum b {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.price-note {
  margin: auto 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.price-card.is-accent { background: var(--fg); }
.price-card.is-accent .price-vol { color: rgba(241,243,240,.55); }
.price-card.is-accent .price-size { color: var(--bg); }
.price-card.is-accent .price-sum b { color: #93a7ff; }
.price-card.is-accent .price-note { color: rgba(241,243,240,.7); }

.dim { color: var(--muted); }

/* ---------- лабораторная таблица ---------- */

.lab { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

.lab h2 { font-size: clamp(30px, 4.4vw, 52px); text-transform: uppercase; margin-bottom: 20px; }
.lab p { color: var(--muted); max-width: 44ch; }

table.spec { width: 100%; border-collapse: collapse; font-family: var(--font-display); font-size: 14px; }
table.spec th, table.spec td { text-align: left; padding: 13px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
table.spec th { font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; color: var(--muted); width: 44%; }
table.spec td { font-variant-numeric: tabular-nums; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: 0; }
table.spec td b { color: var(--accent); }

/* ---------- продавец ---------- */

.seller { border-top: 1px solid var(--border); }

.seller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(24px, 3vw, 48px);
}
.seller-grid h3 { font-size: 19px; margin-bottom: 10px; }
.seller-grid p { font-size: 16px; color: var(--muted); margin: 0; }
.slot {
  font-family: var(--font-display);
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
  display: inline-block;
}

/* ---------- заявка ---------- */

.order { background: var(--surface); }

.order-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.order h2 { font-size: clamp(30px, 4.4vw, 52px); text-transform: uppercase; margin-bottom: 18px; }
.order p { color: var(--muted); }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 12px 14px;
  min-height: 46px;
  border-radius: var(--radius);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.consent { font-size: 13px; color: var(--muted); margin-top: 14px; }
.consent a { color: var(--muted); }

.form-status { font-family: var(--font-display); font-size: 14px; margin-top: 14px; display: none; }
.form-status.ok { display: block; color: var(--accent); }
.form-status.err { display: block; color: #a3271f; }

/* ---------- подвал ---------- */

.foot { background: var(--fg); color: var(--bg); padding-block: 54px; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 28px 60px; align-items: baseline; }
.foot .brand { color: var(--bg); }
.foot .meta { margin-left: auto; font-family: var(--font-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(241,243,240,.55); }
.foot a { color: #93a7ff; }

/* ---------- адаптив ---------- */

@media (max-width: 900px) {
  :root { --space-section: 76px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 460px; }
  .groups { grid-template-columns: 1fr; }
  .group { border-left: 0; padding-inline: 0; border-top: 1px solid var(--border); }
  .group:first-child { border-top: 0; }
  .scent .shot img.bottle { max-width: 220px; }
  .protocol-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .protocol-grid article:nth-child(2n) { border-right: 0; }
  .lab, .order-grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .nav { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .top .wrap { gap: 12px; min-height: 58px; }
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 13px; letter-spacing: .18em; }
  .brand-sub { font-size: 8px; letter-spacing: .1em; }
  .top .btn { font-size: 11px; padding: 9px 10px; margin-left: auto; }
  .top .wrap { gap: 8px; }
  .brand-text { flex: 0 1 auto; overflow: hidden; }
  .hero .meta { grid-template-columns: 1fr; gap: 14px; }
  .protocol-grid { grid-template-columns: 1fr; }
  .protocol-grid article { border-right: 0; border-bottom: 1px solid rgba(241,243,240,.18); padding-bottom: 22px; }
  .scent .shot img.bottle { max-width: 190px; }
  .price-grid { grid-template-columns: 1fr; }
  .price-card { padding: 20px 18px 22px; }
  .price-note { margin-top: 0; }
  .foot .meta { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================================
   Витрина на главной (5 позиций) и каталог
   ============================================================ */

.showcase-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 0;
  gap: clamp(18px, 2.4vw, 30px);
}
.showcase-grid .group { padding: 0; border-left: 0; }
.showcase-grid .scent {
  border: 1px solid var(--border);
  padding: 18px 18px 22px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.showcase-grid .scent .shot img.bottle { max-width: 100%; }

/* остаток в мл */
.stock {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dotted var(--border);
}
.stock.is-low { color: #a3271f; }
.stock.is-out { color: #a3271f; font-weight: 600; }

/* бейджи */
.badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 9px;
  margin: 0 6px 8px 0;
  color: var(--bg);
  background: var(--fg);
}
.badge-hit { background: var(--accent); color: var(--accent-on); }

/* ---------- каталог ---------- */

.cat-hero { padding-block: clamp(40px, 6vw, 76px) clamp(24px, 3vw, 36px); }
.cat-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 60px);
  text-transform: uppercase;
  letter-spacing: -.01em;
  margin: 0 0 16px;
}
.cat-hero .lede { max-width: 720px; color: var(--muted); margin: 0; }

.cat-tools {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-block: 16px;
}
.cat-search input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 14px;
  min-height: 46px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.cat-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cat-tools .chips { margin-bottom: 12px; }
.chip-link.is-active { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.cat-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cat-sort label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cat-sort select {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  min-height: 44px;
  border-radius: var(--radius);
}
.cat-count {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
}

.cat-collection { padding-top: clamp(24px, 3vw, 40px); }
.cat-groups { grid-template-columns: 1fr; border-top: 0; }
.cat-group { padding: 26px 0 0; border-left: 0; border-top: 1px solid var(--border); }
.cat-group:first-child { border-top: 0; }
.cat-group .group-head { padding-bottom: 16px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
  padding-bottom: 26px;
}
.cat-grid .scent {
  border: 1px solid var(--border);
  padding: 16px 16px 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.cat-grid .scent .shot img.bottle { max-width: 100%; }
.cat-grid .scent .notes { font-size: 14px; }
.cat-empty { padding: 40px 0 60px; color: var(--muted); }

.field-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.field-hint a { color: var(--accent); }

@media (max-width: 900px) {
  .cat-tools { position: static; }
  .cat-count { margin-left: 0; }
}

[hidden] { display: none !important; }

/* кнопка каталога в шапке (важна на мобильных, где меню скрыто) */
.btn-cat { display: none; }
@media (max-width: 900px) {
  .btn-cat { display: inline-flex; }
}

.lbl-short { display: none; }
@media (max-width: 560px) {
  .lbl-full { display: none; }
  .lbl-short { display: inline; }
  .top .btn { white-space: nowrap; }
}

.stock-out { color: #a33; }

/* Плашка «Сделано в Спру»: уменьшена вдвое и уведена в левый нижний угол,
   чтобы не перекрывать нижнюю навигацию справа. */
#spru-pages-badge-host {
  right: auto !important;
  left: calc(10px + env(safe-area-inset-left, 0px)) !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  transform: scale(0.5) !important;
  transform-origin: left bottom !important;
  z-index: 900 !important;
}

/* Поиск на главной: форма ведёт в каталог с запросом */
.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 26px 0 6px;
}
.hero-search input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 14px;
  min-height: 48px;
  border-radius: var(--radius);
}
.hero-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hero-search button {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  padding: 12px 20px;
  cursor: pointer;
}
.hero-search button:hover { opacity: .86; }
@media (max-width: 900px) {
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
}

/* Живой поиск: выпадающий список совпадений */
.search-box { position: relative; }
.search-drop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(560px, 88vw);
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  max-height: 60vh;
  overflow: auto;
}
.search-item {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
}
.search-item:hover { background: var(--surface-2, rgba(0,0,0,.05)); }
.search-item b { font-family: var(--font-display); letter-spacing: .02em; }
.search-item span { color: var(--muted); font-size: 13px; margin-left: 6px; }
.search-item i {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-empty {
  padding: 10px;
  font-size: 13px;
  color: var(--muted);
}
