/* base.css — СЕВАС demo (019, build P6 → blue world P10, 28.09): tokens, grid, type, shared components. Only the window edits this file.
   Direction: the deep blue of the client's family is the ground of every page (sample B, the Operator's «вот синий берём»),
   cream type, warm yellow prices; every product stands on its own plate in the colour of its flavour or section
   (refs S03/S05 Darkside and Starline flavour cards, R06/R11 Vapohub tiles) — PLAN_P10.md, site/DESIGN.md. */

:root {
  /* the blue world — the Operator's choice 28.09 («вот синий берём», sample B, PLAN_P10.md): the ground is deep blue of the
     client's own family, products stand on plates in the colour of their flavour or section (refs S03/S05, R06/R11) */
  --paper: #16335a;      /* the ground of every page (white and cream are banned: «этот цвет сзади белый нельзя») */
  --panel: #1d3d66;      /* a lighter blue plate: filter, kit, info blocks */
  --card: #22446f;       /* raised blue surface: dropdowns, inputs, small plates */
  --tile: #dfe9f6;       /* light plate under product thumbnails (mini-cart, search hints) */
  --mist: rgba(244, 239, 232, .08);   /* soft info panels on the blue */
  --steel: #6d9bc9;
  --navy: #0f2440;       /* footer, dark buttons */
  --blue: #428bca;       /* client anchor blue */
  --blue-d: #2f72ad;
  --red: #e2001a;        /* client red: 18+, sale sticker */
  --price: #ffcf6e;      /* price on the blue — the client red has 2.9:1 there */
  --link: #8fc3f2;       /* links: the client blue lifted for the dark ground (6.6:1), prices keep the warm yellow */
  --ink: #f4efe8;        /* text on the blue */
  --ink-2: rgba(244, 239, 232, .8);
  --ink-3: rgba(244, 239, 232, .66);   /* .66: 4.9 : 1 even on the lighter panels (font_check F3) */
  --line: rgba(244, 239, 232, .16);
  --white: #ffffff;
  --ok: #86e3a8;         /* «В наличии» on the blue */
  --warn: #ffcf6e;       /* «Мало» */

  --f-display: 'Dela Gothic One', 'Arial Black', sans-serif;
  --f-text: 'Jost', 'Segoe UI', sans-serif;

  /* fluid frame: margins grow with the screen, content never stretches into empty lines (prompt: 1440 · 1920 · 2048 · 2560) */
  --margin: clamp(28px, 4.2vw, 150px);
  --gutter: clamp(16px, 1.25vw, 32px);
  --wrap: min(calc(100vw - 2 * var(--margin)), 2240px);
  --cols: 4;             /* product grid columns: 4 → 5 → 6 */

  --r-s: 6px; --r-m: 10px; --r-l: 14px; --r-xl: 18px; --r-pill: 999px;   /* smaller curves: big radii read as AI blobs (impeccable slop) */
  --ease: cubic-bezier(0.19, 1, 0.22, 1);          /* one appear curve for the whole site (refs/darkside/MOTION.md §2) */
  --ease-h: cubic-bezier(0.22, 1, 0.36, 1);        /* hover (refs/moze/PRIEMY.md §3) */
  --t-h: .2s;

  --fs-0: clamp(14px, .72vw + 3px, 15px);   /* small text on the blue: never under 14 px (Operator: «шрифты нормальные качественные», font_check F1) */
  --fs-1: clamp(14px, .78vw + 3px, 18px);
  --fs-2: clamp(16px, .9vw + 3px, 21px);
  --fs-3: clamp(19px, 1.2vw + 2px, 28px);
  --fs-4: clamp(24px, 1.8vw, 44px);
  --fs-5: clamp(30px, 2.6vw, 64px);
  --fs-6: clamp(40px, 3.6vw, 92px);
  --hdr: 124px;
}
@media (min-width: 1800px) { :root { --cols: 5; } }
@media (min-width: 2400px) { :root { --cols: 6; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 450 var(--fs-1)/1.5 var(--f-text); font-feature-settings: "lnum" 1;   /* 450: light text on the blue loses its thin strokes at 400 */
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
svg:where(:not([viewBox])) { width: 1.25em; height: 1.25em; flex: none; }
.promise { align-content: start; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3, .h1, .h2, .h3 { text-wrap: balance; }   /* no hanging preposition on a new line («…у нас в / магазине») */
ul, ol { padding: 0; list-style: none; }
::selection { background: rgba(143, 195, 242, .35); }
::placeholder { color: var(--ink-3); opacity: 1; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }

.wrap { width: var(--wrap); margin-inline: auto; }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums lining-nums; }

/* type */
.t-display { font-family: var(--f-display); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; }
.h1 { font: 600 var(--fs-5)/1.08 var(--f-text); letter-spacing: -.02em; }
.h2 { font-family: var(--f-display); font-size: var(--fs-5); line-height: 1.04; letter-spacing: -.012em; }
.h3 { font: 600 var(--fs-3)/1.2 var(--f-text); letter-spacing: -.01em; }
.lead { font-size: var(--fs-2); line-height: 1.45; color: var(--ink-2); max-width: 62ch; }
.small { font-size: var(--fs-0); color: var(--ink-2); }
.cap { font: 600 var(--fs-0)/1.2 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.price { font: 700 var(--fs-2)/1 var(--f-text); color: var(--price); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.price s, .price .old { color: var(--ink-3); font-weight: 500; font-size: max(.72em, 14px); margin-left: .5em; text-decoration: line-through; }
.link { position: relative; color: var(--link); }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-h) var(--ease-h); }
.link:hover::after { transform: scaleX(1); }

/* section frame */
.sec { padding-block: clamp(56px, 6vw, 150px); }
.sec__head { display: flex; align-items: end; justify-content: space-between; gap: var(--gutter); margin-bottom: clamp(24px, 2.4vw, 56px); }
.sec__head .h2 { max-width: 20ch; }
.sec__more { display: inline-flex; gap: .5em; align-items: center; font-weight: 600; color: var(--link); white-space: nowrap; }
.sec__more svg { width: 1.1em; transition: transform var(--t-h) var(--ease-h); }
.sec__more:hover svg { transform: translateX(4px); }
.panel { background: var(--panel); border-radius: var(--r-l); }

/* buttons */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .6em;   /* cream on the blue (sample B) */
  min-height: 52px; padding: 0 28px; border-radius: var(--r-pill); background: var(--b); color: var(--paper);
  font: 600 var(--fs-1)/1 var(--f-text); letter-spacing: .01em; white-space: nowrap;
  position: relative; isolation: isolate; overflow: hidden; transition: transform var(--t-h) var(--ease-h); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(10, 20, 30, .16); opacity: 0;
  transition: opacity var(--t-h) var(--ease-h); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn--lg { min-height: 60px; padding: 0 36px; font-size: var(--fs-2); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: var(--fs-0); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn--ghost:hover { color: var(--paper); }
.btn--ghost::before { background: var(--ink); }
.btn--white { background: rgba(244, 239, 232, .1); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(244, 239, 232, .4); }
.btn--white::before { background: rgba(244, 239, 232, .1); }
.btn--dark { background: var(--ink); }
.btn--dark::before { background: rgba(10, 20, 30, .16); }
.btn--tg { background: #2aabee; color: var(--navy); }   /* white on the Telegram blue is 2.6 : 1, navy is 6.1 : 1 */

.btn[disabled] { opacity: .45; pointer-events: none; }
.iconbtn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(244, 239, 232, .34); transition: transform var(--t-h) var(--ease-h); }
.iconbtn:hover { transform: scale(1.04); box-shadow: inset 0 0 0 1.5px var(--ink); }
.iconbtn svg { width: 22px; height: 22px; }

/* chips (S06 brand → line → weight with counts; S05 grey pills) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: .45em; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font: 500 var(--fs-0)/1 var(--f-text); white-space: nowrap; }
.chip b { font-weight: 500; color: var(--ink-3); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.chip.is-on { background: var(--ink); color: var(--paper); box-shadow: none; }
.chip.is-on b { color: rgba(22, 51, 90, .8); }

/* badges */
.badge { display: inline-flex; align-items: center; gap: .35em; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font: 600 12px/1 var(--f-text); letter-spacing: .06em; text-transform: uppercase; background: var(--navy); color: var(--ink); }
.badge--orig::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--ok) url("../vendor/icons/check-white.svg") center/9px no-repeat; }
.badge--sale { background: var(--red); color: #fff; }
.badge--new { background: var(--ink); color: var(--paper); }
.stock { font: 500 var(--fs-0)/1.2 var(--f-text); color: var(--ok); display: inline-flex; align-items: center; gap: .4em; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--few { color: var(--warn); }
.stock--no { color: var(--ink-3); }

/* product plate — every product stands on its own plate in the colour of its flavour or section, the text lives on the blue
   under it (Operator 28.09: «их надо отдельно в разные элементы выделить»; refs S03/S05 Darkside and Starline flavour cards,
   R04 MYA products on light plates). One plate language for tiles, the product page, the kit, the mini-cart and search. */
.pl { --pl: #e6eef9; --pl2: #a9c3e6; background: radial-gradient(125% 95% at 50% 16%, var(--pl) 0%, var(--pl2) 100%); }
.pl--berry { --pl: #ffdde7; --pl2: #ec8fb0; }
.pl--citrus { --pl: #fff5bf; --pl2: #efc64a; }
.pl--fruit { --pl: #ffe3cc; --pl2: #f2a36b; }
.pl--dessert { --pl: #f7e8d3; --pl2: #d6ad80; }
.pl--fresh { --pl: #dcf6ef; --pl2: #7dcfbd; }
.pl--drink { --pl: #e9e1fb; --pl2: #a793e8; }
.pl--kalyany { --pl: #ffe6dc; --pl2: #eea38b; }
.pl--ugol { --pl: #ffeed3; --pl2: #eeb46c; }
.pl--aksessuary { --pl: #e2ecf9; --pl2: #9cb9e2; }
.pl img { filter: drop-shadow(0 14px 16px rgba(16, 28, 48, .26)); }

/* product tile — S06 order, moze hover: the photo settles on its plate, the name underlines */
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile__ph { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: var(--r-l); overflow: hidden; }
.tile__ph img { position: absolute; inset: 7%; width: 86%; height: 86%; object-fit: contain; transform: scale(1);
  transition: transform var(--t-h) var(--ease-h); }
.tile:hover .tile__ph img { transform: scale(.972); }
.tile__ph .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; z-index: 2; }
.tile__fav { position: absolute; right: 10px; top: 10px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .86); color: var(--navy); opacity: 0; transition: opacity var(--t-h) var(--ease-h); }
.tile:hover .tile__fav { opacity: 1; }
.tile__fav svg { width: 18px; }
.tile__brand { font: 600 13px/1.2 var(--f-text); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 4px; }
.tile__name { font: 500 var(--fs-1)/1.3 var(--f-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; }
.tile:hover .tile__name span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tile__props { font-size: 14px; color: var(--ink-2); line-height: 1.35; min-height: 1.35em; }
.tile__buy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.tile__buy .btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.tile__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile__noimg { position: absolute; inset: 0; display: grid; place-items: center; }
.tile__noimg svg { width: 42%; opacity: .35; color: var(--navy); }

.grid-products { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: clamp(22px, 2vw, 44px) var(--gutter); }

/* ribbon (S03 lane: arrows + drag) */
.ribbon { position: relative; }
.ribbon__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * var(--gutter)) / var(--cols));
  gap: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; padding-bottom: 6px; }
.ribbon__track::-webkit-scrollbar { display: none; }
.ribbon__track > * { scroll-snap-align: start; }
.ribbon__track.is-drag { cursor: grabbing; scroll-snap-type: none; }
.ribbon__nav { display: flex; gap: 10px; }

/* tabs — words with a line that grows under the chosen one (sample B: no pill box on the blue) */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px clamp(18px, 1.8vw, 36px); }
.tabs button { position: relative; min-height: 44px; padding: 0; font: 600 var(--fs-2)/1 var(--f-text); color: var(--ink-3); }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.tabs button:hover { color: var(--ink-2); }
.tabs button.is-on { color: var(--ink); }
.tabs button.is-on::after { transform: scaleX(1); }

/* qty stepper */
.qty { display: inline-flex; align-items: center; height: 44px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); background: var(--card); }
.qty button { width: 40px; height: 44px; display: grid; place-items: center; }
.qty button svg { width: 16px; }
.qty input { width: 34px; border: 0; text-align: center; background: none; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* forms */
.field { display: grid; gap: 6px; }
.field label { font: 500 var(--fs-0)/1.2 var(--f-text); color: var(--ink-2); }
.field input, .field textarea, .field select { width: 100%; min-height: 54px; padding: 14px 18px; border-radius: var(--r-m);
  border: 1.5px solid var(--line); background: var(--card); outline: none; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--link); }
.field.is-err input { border-color: #ff7a7a; }
.field__err { font-size: 14px; color: #ff9b9b; display: none; }
.field.is-err .field__err { display: block; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 500; cursor: pointer; }
.seg input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); background: rgba(244, 239, 232, .12); color: var(--ink); }

/* crumbs + page head */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-0); color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.phead { padding-top: clamp(24px, 2.2vw, 44px); padding-bottom: clamp(20px, 2vw, 40px); }
.phead .h1 { margin-top: 14px; }

/* reveal (one curve, 1 s) — JS sets the start state; ?shot=1 and reduced motion show final states */
[data-rv], [data-rv-group] > * { will-change: transform, opacity; }

/* 18+ gate (S06: two steps) */
.gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(8, 18, 34, .6);
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease-h); }
.gate.is-open { opacity: 1; pointer-events: auto; }
.gate__box { position: relative; width: min(560px, 100%); padding: clamp(32px, 3vw, 52px); border-radius: var(--r-xl); background: var(--paper);
  text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.25); transform: translateY(16px) scale(.98); transition: transform .5s var(--ease); overflow: hidden; }
.gate.is-open .gate__box { transform: none; }
.gate__mark { display: grid; place-items: center; width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; background: var(--red); color: #fff;
  font: 400 26px/1 var(--f-display); }
.gate__q { font: 400 clamp(26px, 2vw, 36px)/1.1 var(--f-display); margin-bottom: 10px; }
.gate__txt { color: var(--ink-2); margin-bottom: 26px; }
.gate__row { display: flex; justify-content: center; gap: 12px; }
.gate__row .btn { min-width: 150px; }
.gate__step[hidden] { display: none; }
.gate__no { margin-top: 18px; font-weight: 600; color: #ff9b9b; }
.gate__logo { width: 150px; margin: 0 auto 22px; }

/* mini-cart — slides in from the right, the page stays (NEW_MAP_3 6.B1) */
.mc { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.mc__veil { position: absolute; inset: 0; background: rgba(8, 18, 34, .5); opacity: 0; transition: opacity .35s var(--ease-h); }
.mc__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform .6s var(--ease); box-shadow: -20px 0 60px rgba(0, 0, 0, .3); }
.mc.is-open { pointer-events: auto; }
.mc.is-open .mc__veil { opacity: 1; }
.mc.is-open .mc__panel { transform: none; }
.mc__head { display: flex; align-items: center; justify-content: space-between; padding: 26px 28px 18px; }
.mc__title { font: 400 26px/1.1 var(--f-display); }
.mc__added { margin: 0 28px 14px; padding: 12px 16px; border-radius: var(--r-m); background: var(--mist); font-weight: 500; display: flex; gap: 10px; align-items: center; }
.mc__added svg { width: 20px; flex: none; }
.mc__list { flex: 1; overflow: auto; padding: 0 28px; }
.mc__item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.mc__item .pl { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; }
.mc__item .pl img { width: 84%; height: 84%; object-fit: contain; }
.mc__item .nm { font-weight: 500; line-height: 1.3; font-size: 15px; }
.mc__item .pr { font-weight: 700; color: var(--price); white-space: nowrap; }
.mc__foot { padding: 20px 28px 28px; border-top: 1px solid var(--line); display: grid; gap: 12px; background: var(--paper); }
.mc__sum { display: flex; justify-content: space-between; font: 600 var(--fs-2)/1 var(--f-text); }
.mc__note { font-size: 15px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.mc__note svg { width: 18px; flex: none; margin-top: 2px; }
.mc__empty { padding: 30px 28px; color: var(--ink-2); }

/* reservation promise — next to every «Забронировать» (NEW_MAP_REVIEW q3, q4) */
.promise { display: grid; gap: 6px; }
.promise__big { font: 600 var(--fs-2)/1.25 var(--f-text); }
.promise__small { font-size: var(--fs-0); color: var(--ink-2); display: flex; gap: 8px; align-items: center; }
.promise__small svg { width: 17px; flex: none; }

/* page transition curtain + toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 180; transform: translate(-50%, 20px); opacity: 0; padding: 14px 22px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); font-weight: 600; transition: opacity .3s var(--ease-h), transform .5s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* sections open smoothly — Operator 28.09: «разделы, чтобы всё плавно открывалось». Height of <details> by ::details-content
   + interpolate-size: the one sanctioned exception to «transform/opacity only» (tools/site_check.py P5b, accordion rule) */
:root { interpolate-size: allow-keywords; }
details::details-content { block-size: 0; opacity: 0; overflow-y: clip;
  transition: block-size .45s var(--ease), opacity .35s var(--ease-h), content-visibility .45s allow-discrete; }
details[open]::details-content { block-size: auto; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
