/* A.E. — студия десертов.
 * Реализация гайда 06_creative/2026-09-24_visual-guidelines.md (v1.0, Brand Director).
 * Концепция «сайт как коробка A.E.»: тауп-поле снаружи, кремовый вкладыш внутри.
 * Скруглений, теней, пилюль и жирного начертания нет намеренно (гайд §5, §8). */

:root {
  --taupe: #76665F;
  --taupe-soft: #8C7A72;
  --paper: #F8F4EF;
  --linen: #EFE8DF;
  --cream: #F4EEE6;
  --champagne: #CDB99C;
  --ink: #3A302C;
  --muted: #76695F;
  --line: rgba(58, 48, 44, .14);
  --bordeaux: #5E2230;
  --field: #FFFDFA;
  --error: #8A3B2E;

  --accent: var(--taupe);          /* кнопки и акценты; в детской линии — синий */
  --frame: rgba(255, 255, 255, .55);
  --ph-bg: var(--linen);

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --serif-sc: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", "Futura", "Avenir Next", -apple-system, "Segoe UI", Arial, sans-serif;

  --gutter: 20px;
  --gap: 12px;
  --section: 72px;
  --head-h: 56px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}
@media (min-width: 768px) { :root { --gutter: 32px; --gap: 20px; --section: 96px; } }
@media (min-width: 1024px) { :root { --gutter: 48px; --gap: 24px; --section: 128px; --head-h: 72px; } }

.theme-kids {
  --paper: #FFFDF9;
  --accent: #4F6B8A;
  --frame: #C9DDF0;
  --ph-bg: #F6F3EC;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
@media (min-width: 1024px) { body { font-size: 16px; } }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Типографика ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; font-variant-numeric: lining-nums; }
h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; }
h2 { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -.005em; }
h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; }
.eyebrow { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin: 0 0 16px; }
.lead { font: italic 400 clamp(20px, 1.8vw, 24px)/1.35 var(--serif); margin: 0 0 20px; max-width: 30em; }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.brand-caps { font: 500 clamp(14px, 1.1vw, 16px)/1.2 var(--serif-sc); letter-spacing: .2em; }
.ui-caps { font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.price { font: 500 clamp(18px, 1.4vw, 20px)/1 var(--serif); font-variant-numeric: lining-nums; }
.price__from { font: 400 12px var(--sans); color: var(--muted); margin-right: 4px; }
.nb { white-space: nowrap; }

/* ---------- Фирменные элементы (гайд §4) ---------- */
/* 1. Лого-блок */
.logo-block { display: flex; flex-direction: column; align-items: center; text-align: center; }
.logo-block__mark { font: 300 clamp(96px, 30vw, 200px)/.9 var(--serif); letter-spacing: .02em; }
.logo-block__caps { margin-top: 12px; }
.logo-block__sub { margin-top: 10px; font: italic 400 15px/1 var(--serif); letter-spacing: .12em; }
.logo-block--sm .logo-block__mark { font-size: 64px; }
.logo-block--xs .logo-block__mark { font-size: 48px; }
/* 2. Волосяная линия */
.rule { display: block; width: 40px; height: 1px; margin: 20px auto; background: var(--line); border: 0; }
.on-taupe .rule { background: var(--champagne); }
/* Радужная лента детской линии */
.ribbon { display: block; width: 64px; height: 10px; margin: 20px auto; background: linear-gradient(#F2C9D1 0 20%, #F6E3A6 20% 40%, #CFE6C8 40% 60%, #C9DDF0 60% 80%, #DCCFEA 80%); }
.ribbon--left { margin-left: 0; }
/* 3. Рамка-вкладыш */
.frame { position: relative; overflow: hidden; background: var(--ph-bg); }
.frame::after { content: ""; position: absolute; inset: 8px; border: 1px solid var(--frame); pointer-events: none; z-index: 1; }
@media (min-width: 768px) { .frame::after { inset: 10px; } }
.frame img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.08) saturate(.92); }
/* 4. Бирка */
.tag { display: inline-block; padding: 6px 10px 6px 16px; background: var(--paper); color: var(--taupe);
  font: 500 10px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
  background-image: radial-gradient(circle at 9px 50%, var(--linen) 1.5px, transparent 2px); }
.tag--wine { background-color: var(--bordeaux); color: var(--cream); background-image: radial-gradient(circle at 9px 50%, var(--cream) 1.5px, transparent 2px); }
/* 5. Нумерация секций — .eyebrow с текстом «01 — …» */

/* ---------- Кнопки и ссылки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 32px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--cream); border-radius: 0; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s; }
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn--light { background: var(--cream); border-color: var(--cream); color: var(--taupe); }
.btn--light:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--cream); }
.btn--block { width: 100%; }
.tlink { display: inline; gap: 8px; line-height: 1.9 !important; background: none; border: 0; padding: 0; cursor: pointer; color: inherit;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.tlink:hover { text-decoration-color: transparent; }

/* ---------- Раскладка ---------- */
.wrap { width: 100%; max-width: calc(1280px + 2 * var(--gutter)); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--linen { background: var(--linen); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
@media (min-width: 768px) { .section__head { margin-bottom: 40px; } }
@media (min-width: 1024px) { .section__head { margin-bottom: 56px; } }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 30; height: calc(var(--head-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  background: rgba(248, 244, 239, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); color: var(--ink); transition: background .3s, color .3s, border-color .3s; }
.theme-kids .header { background: rgba(255, 253, 249, .96); }
.header.is-top { background: var(--taupe); color: var(--cream); border-bottom-color: transparent; backdrop-filter: none; }
.header__row { height: var(--head-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.header__menu { justify-self: start; background: none; border: 0; padding: 8px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; }
.header__menu svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; fill: none; }
.header__logo { justify-self: center; text-decoration: none; display: flex; align-items: baseline; gap: 14px; }
.header__mark { font: 400 26px/1 var(--serif); letter-spacing: .04em; }
.header__caps { display: none; font: 500 12px/1 var(--serif-sc); letter-spacing: .2em; }
.header__cart { justify-self: end; position: relative; background: none; border: 0; padding: 8px 0 8px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.header__cart svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.25; fill: none; stroke-linejoin: round; }
.header__count { position: absolute; top: 2px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--cream); font: 500 10px/16px var(--sans); text-align: center; }
.header.is-top .header__count { background: var(--cream); color: var(--taupe); }
.header__cart-text { display: none; }
.nav { display: none; }
@media (min-width: 1024px) {
  .header__row { grid-template-columns: auto 1fr; }
  .header__menu { display: none; }
  .header__logo { justify-self: start; }
  .header__caps { display: inline; }
  .nav { display: flex; justify-content: flex-end; align-items: center; gap: 32px; }
  .nav a, .nav button { font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; opacity: .85; }
  .nav a:hover, .nav button:hover { opacity: 1; }
  .header__cart { display: none; }
}

/* Мобильное меню */
.menu { position: fixed; inset: 0; z-index: 50; background: var(--taupe); color: var(--cream); display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px)) var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.menu__top { height: var(--head-h); display: flex; align-items: center; justify-content: space-between; flex: none; }
.menu__list { list-style: none; margin: 24px 0 auto; padding: 0; }
.menu__list li { border-bottom: 1px solid rgba(205, 185, 156, .45); }
.menu__list a { display: block; padding: 16px 0; font: 400 32px/1.1 var(--serif); text-decoration: none; }
.menu__foot { margin-top: 40px; font-size: 13px; line-height: 1.6; opacity: .85; }
.menu__foot a { text-decoration: none; }
.close-btn { background: none; border: 0; padding: 8px 0; cursor: pointer; color: inherit; font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }

/* ---------- Hero (главная) ----------
 * Фото упаковки — фоном под тауп-полем с прозрачностью (правка Анны, v2.1):
 * знак и текст остаются главными, фото даёт фактуру. */
.hero { position: relative; overflow: hidden; background: var(--taupe); color: var(--cream);
  min-height: calc(100svh - var(--head-h) - env(safe-area-inset-top, 0px)); display: flex; align-items: center; justify-content: center; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; opacity: .32; filter: saturate(.7) sepia(.1); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 55% at 50% 48%, rgba(118, 102, 95, .55), rgba(118, 102, 95, 0) 100%); }
.hero__field { position: relative; z-index: 1; padding: 48px var(--gutter) 88px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__field .eyebrow { color: var(--champagne); margin-bottom: 24px; }
.hero__field .logo-block__mark { font-size: clamp(104px, 32vw, 132px); }
.hero__field .logo-block__caps { margin-top: 8px; }
.hero__field h1 { max-width: 12em; }
.hero__actions { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero__actions .tlink { color: var(--cream); padding: 8px 0; }
.hero__scroll { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: var(--champagne); text-decoration: none; margin: 0; white-space: nowrap; }
@media (min-width: 1024px) {
  .hero { min-height: clamp(640px, calc(100svh - var(--head-h)), 860px); }
  .hero__bg { object-position: 50% 55%; }
  .hero__field { padding: 64px 48px 104px; }
  .hero__field .logo-block__mark { font-size: clamp(140px, 13vw, 200px); }
  .hero__field h1 { font-size: 44px; }
}

/* Полоса фактов */
.facts { padding: 48px var(--gutter) 0; }
.facts ul { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 0; max-width: 1280px; }
.facts li { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); text-align: center; }
.facts li + li::before { content: ""; display: block; width: 24px; height: 1px; background: var(--line); margin: 14px auto; }
@media (min-width: 1024px) {
  .facts { padding-top: 56px; }
  .facts ul { flex-direction: row; justify-content: center; }
  .facts li + li::before { display: inline-block; width: 1px; height: 16px; margin: 0 28px; vertical-align: middle; }
}

/* ---------- Карточки товара ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 36px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 56px; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 768px) { .rail { grid-auto-columns: 40%; } }
@media (min-width: 1024px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; } }

.card { display: flex; flex-direction: column; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.card__media { display: block; aspect-ratio: 4 / 5; }
.card__media img { transition: transform .6s var(--ease); }
.card__tag { position: absolute; top: 18px; left: 18px; z-index: 2; }
.card__meta { margin-top: 14px; font: 500 10.5px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card__title { margin-top: 6px; font: 500 clamp(19px, 1.6vw, 22px)/1.15 var(--serif); }
.card__price { margin-top: 8px; }
.card__more { display: none; }
@media (hover: hover) and (min-width: 1024px) {
  .card:hover .card__media img { transform: scale(1.03); }
  .card__more { display: block; margin-top: 12px; opacity: 0; transition: opacity .3s; font: 500 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
  .card:hover .card__more { opacity: 1; }
}

/* Заглушка — «пустой фирменный вкладыш» */
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.ph__mark { font: 300 40px/1 var(--serif); color: var(--taupe); opacity: .35; letter-spacing: .04em; }
.ph__x { font: italic 400 16px/1 var(--serif); color: var(--accent); opacity: .45; margin-top: 6px; }
.ph .rule { width: 24px; margin: 12px auto 0; background: var(--taupe); opacity: .25; }
.ph .ribbon { width: 40px; height: 5px; margin: 12px auto 0; opacity: .8; }
.ph__hint { position: absolute; left: 16px; right: 16px; bottom: 16px; font-size: 11px; line-height: 1.35; color: var(--muted); }

/* ---------- Табы ---------- */
.tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 16px;
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
@media (min-width: 768px) { .tabs { -webkit-mask-image: none; mask-image: none; } }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; background: none; border: 0; padding: 14px 0 12px; margin-bottom: -1px; cursor: pointer; color: var(--muted); border-bottom: 1px solid transparent;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs__sub { margin: 0 0 32px; }
.catalog__more { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------- Вход в детскую коллекцию ---------- */
.kids-entry { display: grid; gap: 40px; align-items: center; }
.kids-entry__media { aspect-ratio: 4 / 5; }
.kids-entry__text { text-align: center; }
.kids-entry__text .eyebrow { color: var(--taupe); }
.kids-entry__text h2 { margin-bottom: 16px; }
.kids-entry__text p { color: var(--muted); max-width: 26em; margin-inline: auto; }
@media (min-width: 1024px) {
  .kids-entry { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .kids-entry__media { grid-column: 2 / span 5; }
  .kids-entry__text { grid-column: 8 / span 4; text-align: left; }
  .kids-entry__text .ribbon { margin-left: 0; }
  .kids-entry__text p { margin-inline: 0; }
}

/* ---------- О студии ---------- */
.about { display: grid; gap: 40px; }
.about__text p:not(.lead):not(.eyebrow) { max-width: 34em; }
.about__photos { display: grid; gap: var(--gap); }
.about__photo { aspect-ratio: 3 / 4; }
.about__photo--2 { display: none; }
@media (min-width: 1024px) {
  .about { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
  .about__text { grid-column: 1 / span 5; padding-top: 40px; }
  .about__photos { grid-column: 7 / span 6; grid-template-columns: 6fr 4fr; align-items: start; }
  .about__photo--2 { display: block; margin-top: 80px; }
}

/* ---------- Как заказать ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps__num { font: 300 48px/1 var(--serif); color: var(--taupe-soft); font-variant-numeric: lining-nums; }
.steps h3 { font: 500 clamp(19px, 1.6vw, 22px)/1.15 var(--serif); margin: 4px 0 8px; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 1024px) {
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .steps li, .steps li:last-child { display: block; border: 0; padding: 32px 28px 40px; }
  .steps li + li { border-left: 1px solid var(--line); }
  .steps li:first-child { padding-left: 0; }
  .steps h3 { margin-top: 24px; }
}

/* ---------- Получение ---------- */
.dl { margin: 0; border-top: 1px solid var(--line); }
.dl__row { display: grid; gap: 8px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.dl dt { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.dl dd { margin: 0; }
.dl dd p { margin: 0; }
.dl dd .small { margin-top: 4px; }
.dl__big { font: 400 clamp(22px, 2vw, 28px)/1.2 var(--serif); }
@media (min-width: 1024px) {
  .dl__row { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); padding: 32px 0; }
  .dl dt { grid-column: 1 / span 3; padding-top: 8px; }
  .dl dd { grid-column: 4 / span 6; }
}

/* ---------- Подвал ---------- */
.footer { background: var(--taupe); color: var(--cream); padding: 72px var(--gutter) calc(40px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.footer a { color: var(--cream); text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer .logo-block__caps { color: var(--cream); }
.footer__cols { display: grid; gap: 28px; margin: 48px auto 0; max-width: 1080px; font-size: 13px; line-height: 1.7; }
.footer__label { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--champagne); margin: 0 0 8px; }
.footer__cols p { margin: 0; }
.footer__legal { line-height: 1.7; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(205, 185, 156, .35); font-size: 12px; opacity: .75; }
@media (min-width: 1024px) { .footer { padding-top: 96px; } .footer__cols { max-width: 1240px; grid-template-columns: repeat(5, 1fr); } }

/* ---------- Модалка товара ---------- */
.modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); overflow: hidden; }
.modal[open] { display: flex; flex-direction: column; animation: rise .3s var(--ease); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.modal::backdrop { background: rgba(58, 48, 44, .5); }
.modal__close:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.modal__close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: var(--gutter); z-index: 3; background: var(--paper); border: 0; padding: 10px 12px; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.pm { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pm__scroll { flex: 1; min-height: 0; overflow-y: auto; }
.pm__media { aspect-ratio: 1; max-height: 50svh; width: 100%; }
.pm__info { padding: 28px var(--gutter) 32px; }
.pm__info .tag { margin-bottom: 14px; }
.pm__info h3 { margin-bottom: 12px; }
.pm__desc { color: var(--muted); margin: 0; }
.pm__info .rule { margin: 24px 0; width: 40px; }
.pm__group + .pm__group { margin-top: 28px; }
.pm__label { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.pm__assort { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.pm__buy { flex: none; display: flex; align-items: center; gap: 16px; padding: 14px var(--gutter) calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--paper); }
.pm__total { flex: 1; min-width: 0; }
@media (max-width: 899px) {
  .pm__buy { gap: 12px; }
  .pm__buy .stepper { grid-template-columns: 36px 36px 36px; }
  .pm__buy .btn { padding: 0 18px; letter-spacing: .14em; flex: none; }
  .pm__total .price { font-size: 20px; }
}
.pm__total .price { font-size: 22px; white-space: nowrap; }
.pm__total .small { display: block; margin-top: 4px; font-size: 12px; }
@media (min-width: 900px) {
  .modal { width: min(1040px, calc(100% - 48px)); height: auto; max-height: calc(100svh - 48px); margin: auto; }
  .modal__close { top: 16px; right: 16px; }
  .pm { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; max-height: calc(100svh - 48px); }
  .pm__scroll { display: contents; }
  .pm__media { grid-row: 1 / span 2; aspect-ratio: 4 / 5; max-height: none; height: 100%; }
  .pm__info { overflow-y: auto; padding: 56px 48px 32px; }
  .pm__buy { padding: 20px 48px 28px; }
}

/* Строки-радио (размеры, вкусы) */
.opts { border-top: 1px solid var(--line); }
.opt { display: grid; grid-template-columns: 18px auto 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px 10px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.opt::before { content: ""; width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 50%; box-sizing: border-box; }
.opt[aria-checked="true"] { background: var(--linen); }
.opt[aria-checked="true"]::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 3.5px, transparent 4px); }
.opt__name { font: 400 20px/1.1 var(--serif); }
.opt__hint { font-size: 13px; color: var(--muted); }
.opt__price { font: 500 18px/1 var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; }
.opt--flavor { grid-template-columns: 18px 1fr; }
.opt--flavor .opt__name { font-size: 18px; }

/* Сегмент (ассорти/моновкус, самовывоз/доставка) */
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); }
.seg button, .seg label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 10px; background: none; border: 0; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.seg button + button, .seg label + label { border-left: 1px solid var(--ink); }
.seg [aria-pressed="true"], .seg label:has(input:checked) { background: var(--ink); color: var(--cream); }
.seg button:disabled { color: var(--muted); cursor: not-allowed; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Степпер */
.stepper { display: inline-grid; grid-template-columns: 44px 44px 44px; border: 1px solid var(--line); flex: none; }
.stepper button { height: 44px; background: none; border: 0; cursor: pointer; font-size: 18px; }
.stepper span { display: flex; align-items: center; justify-content: center; border-inline: 1px solid var(--line); font: 500 18px var(--serif); font-variant-numeric: lining-nums; }
.stepper--sm { grid-template-columns: 34px 34px 34px; }
.stepper--sm button { height: 34px; }

/* ---------- Формы ---------- */
.field { display: block; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field__label { display: block; font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; padding: 0; }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 13px 14px; background: var(--field); border: 1px solid var(--line); border-radius: 0; font: 400 16px/1.4 var(--sans); color: var(--ink); -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .small { margin: 8px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 4px 0 20px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--error); font-size: 13px; margin: 0 0 16px; }

/* ---------- Корзина (панель) ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(58, 48, 44, .5); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: 100%; background: var(--paper); display: flex; flex-direction: column; animation: slide .3s var(--ease); }
@media (min-width: 768px) { .drawer__panel { width: 440px; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top, 0px)) var(--gutter) 16px; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .drawer__head, .drawer__view { padding-inline: 32px; } }
.drawer__view { flex: 1; min-height: 0; overflow-y: auto; padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.drawer__foot { margin-top: auto; padding-top: 20px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 12px; border-top: 1px solid var(--line); }
.total span { font: 500 11px/1.4 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.total strong { font: 500 26px/1 var(--serif); font-variant-numeric: lining-nums; }
.drawer .small { margin: 0 0 16px; }
.checkout .btn + .tlink { margin: 20px auto 0; }

.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line__img { width: 72px; aspect-ratio: 4 / 5; }
.line__img .ph__mark { font-size: 20px; }
.line__img .ph .rule, .line__img .ph__x, .line__img .ph .ribbon, .line__img .ph__hint { display: none; }
.line__img.frame::after { inset: 4px; }
.line__title { font: 500 18px/1.15 var(--serif); }
.line__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.line__actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.line__remove { background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.empty { text-align: center; padding: 64px 0 24px; }
.empty h3 { margin-bottom: 12px; }
.empty p { color: var(--muted); margin-bottom: 28px; }
.done { text-align: center; justify-content: center; }
.done .logo-block { margin-bottom: 8px; }
.done h3 { margin-bottom: 12px; }
.done p { color: var(--muted); margin-bottom: 32px; }

/* ---------- Уведомление ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: var(--cream);
  padding: 14px 20px; font: 500 12px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; max-width: calc(100% - 32px); text-align: center; }

/* ---------- Детская страница ----------
 * Первый экран: фото детской упаковки фоном за текстом, с прозрачностью (v2.1). */
.kids-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: min(calc(100svh - var(--head-h)), 760px); padding: 48px var(--gutter) 64px; }
.kids-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 55%; opacity: .3; }
.kids-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(55% 50% at 50% 50%, rgba(255, 253, 249, .85), rgba(255, 253, 249, .35) 70%, rgba(255, 253, 249, 0) 100%),
              linear-gradient(to bottom, rgba(255, 253, 249, 0) 70%, var(--paper)); }
.kids-hero__text { position: relative; z-index: 1; }
.kids-hero .crumbs { margin-bottom: 32px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.kids-hero .logo-block__mark { font-size: clamp(96px, 26vw, 160px); color: var(--ink); }
.kids-hero__x { font: italic 400 28px/1 var(--serif); color: var(--accent); margin-top: 4px; }
.kids-hero h1 { font-size: clamp(34px, 4.2vw, 56px); }
.kids-hero .lead { margin: 12px auto 0; color: var(--muted); }
@media (min-width: 1024px) { .kids-hero { min-height: clamp(600px, calc(100svh - var(--head-h)), 800px); } }
.flavors { display: grid; gap: var(--gap); }
.flavor { display: flex; align-items: flex-end; min-height: 120px; padding: 20px; font: 400 20px/1.15 var(--serif); }
.flavor:nth-child(1) { background: #F7DCE1; }
.flavor:nth-child(2) { background: #FBF0C9; }
.flavor:nth-child(3) { background: #DDEFD9; }
.macaron-block { display: grid; gap: 32px; }
.macaron-block .card { max-width: 420px; }
@media (min-width: 768px) { .flavors { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) {
  .macaron-block { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
  .macaron-block .card { grid-column: 1 / span 4; }
  .macaron-block__side { grid-column: 6 / span 7; }
  .flavor { min-height: 200px; }
}
.macaron-block__side .small { margin: 20px 0 28px; }
.back-link { text-align: center; padding-bottom: var(--section); }

/* ---------- Появление ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
