/* ==========================================================================
   TeAdor — storefront design system
   Canon of the premium confectionery storefront, executed straight.
   Bar: Dandelion Chocolate. Palette: brand cream + chocolate + the real
   packaging colours (NucLeo aubergine, Surpriza albastră marine, TeAdor red).
   Type: Literata (display & reading, optical sizes) + Source Sans 3 (UI).
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --cream: #f6efe3;
  --cream-2: #fbf8f2;
  --cream-3: #ede3d1;
  --cream-4: #e3d6bf;

  --cocoa-950: #1f120c;
  --cocoa-900: #2a1a12;
  --cocoa-800: #3a2419;
  --cocoa-700: #4a2e20;
  --cocoa-500: #6b4632;
  --cocoa-300: #b39a82;
  --cocoa-200: #d9cbb8;
  --cocoa-100: #ece2d3;

  --gold: #b08d4a;
  --gold-text: #7a5c26;
  --gold-soft: #d8c7a3;

  --aubergine: #4f3359;
  --aubergine-deep: #382440;
  --marine: #2c4a8a;
  --carmine: #a8232b;

  --ok: #2f6b3a;
  --ok-soft: #e3eee4;
  --error: #9b2c2c;
  --error-soft: #f6e4e2;
  --warn-soft: #f7ecd6;

  --font-serif: "Literata", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  --text: var(--cocoa-900);
  --text-2: var(--cocoa-500);
  --line: rgb(74 46 32 / 0.18);
  --line-strong: rgb(74 46 32 / 0.38);

  --radius: 4px;
  --radius-lg: 8px;
  /* Ступень для полноширинных секций: 4 → 8 → 16, тот же шаг удвоения. */
  --radius-xl: 16px;
  --shadow-1: 0 1px 2px rgb(42 26 18 / 0.06), 0 10px 28px -14px rgb(42 26 18 / 0.28);
  --shadow-2: 0 2px 4px rgb(42 26 18 / 0.08), 0 24px 48px -20px rgb(42 26 18 / 0.35);

  --container: 1200px;
  --wide: 1400px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --section: clamp(3.5rem, 6vw, 6rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 220ms;
  --dur-reveal: 640ms;

  color-scheme: light;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--marine); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--gold-soft); color: var(--cocoa-950); }

/* --- Typography --------------------------------------------------------- */
html { font-size: 106.25%; }                        /* 17px: the audience is 45+ */
body {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .h1, .h2, .h3 {
  font-family: var(--font-serif);
  font-weight: 450;
  line-height: 1.12;
  letter-spacing: -0.012em;
  color: var(--cocoa-900);
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2.125rem, 1.35rem + 2.6vw, 3.375rem); }
h2, .h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); }
h3, .h3 { font-size: 1.375rem; line-height: 1.25; }
h4 { font-size: 1.125rem; line-height: 1.3; font-weight: 500; }
/* 1.14, а не 1.04: при более тесной строке циркумфлекс î и â сталкивается
   со строкой выше, а запятая под ș и ț подрезается снизу. Румынский —
   основной язык сайта, и заголовок первым это показывает. */
.display { font-size: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem); letter-spacing: -0.02em; line-height: 1.14; }

p { max-width: 68ch; }
.lede { font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.5; color: var(--cocoa-700); }
.muted { color: var(--text-2); }
.small { font-size: 0.9375rem; }
.ui { font-family: var(--font-sans); }
.italic, .product-name { font-style: italic; }
.product-name { font-weight: 450; letter-spacing: 0; }

/* Serif caps for section labels: the brand's own subheading convention. */
.kicker {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.kicker + h1, .kicker + h2, .kicker + h3 { margin-top: var(--s-3); }

a:not([class]) { color: var(--cocoa-900); text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 0.16em; transition: text-decoration-color var(--dur); }
a:not([class]):hover { text-decoration-color: var(--cocoa-900); }

.prose { max-width: 68ch; font-size: 1.0625rem; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: 1.625rem; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose strong { font-weight: 600; }

/* --- Layout ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--wide); }
.container--narrow { max-width: 780px; }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--flush-top { padding-top: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4) var(--s-6); margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.section__head > div { max-width: 60ch; }
.section__head .lede { margin-top: var(--s-3); }
.section__link { font-family: var(--font-sans); font-weight: 600; text-decoration: none; white-space: nowrap; padding-bottom: 2px; border-bottom: 1px solid var(--line-strong); transition: border-color var(--dur); }
.section__link:hover { border-color: var(--cocoa-900); }

.band { background: var(--cream-3); }
.band--cocoa { background: var(--cocoa-900); color: var(--cream); }
.band--cocoa h1, .band--cocoa h2, .band--cocoa h3, .band--cocoa .kicker { color: var(--cream); }
.band--cocoa .kicker { color: var(--gold-soft); }
.band--cocoa .muted, .band--cocoa .lede { color: rgb(246 239 227 / 0.78); }
.band--aubergine { background: var(--aubergine); color: var(--cream); }
.band--aubergine h2, .band--aubergine h3 { color: var(--cream); }
.band--aubergine .kicker { color: var(--gold-soft); }
.band--aubergine .lede { color: rgb(246 239 227 / 0.82); }
.band--marine { background: var(--marine); color: var(--cream); }

.stack > * + * { margin-top: var(--s-4); }
.stack--lg > * + * { margin-top: var(--s-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); align-items: center; }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split--media-right > .split__media { order: 2; } }

.grid { display: grid; gap: var(--s-6) var(--s-5); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
@media (min-width: 640px) { .grid--products { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
.grid--categories { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.skip-link { position: absolute; left: var(--s-4); top: -100%; z-index: 100; padding: var(--s-3) var(--s-4); background: var(--cocoa-900); color: var(--cream); font-family: var(--font-sans); font-weight: 600; border-radius: var(--radius); }
.skip-link:focus { top: var(--s-3); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* --- Ornament (brand filigree, used sparingly) --------------------------- */
.ornament { display: flex; align-items: center; justify-content: center; gap: var(--s-4); color: var(--gold); margin-block: var(--s-6); }
.ornament::before, .ornament::after { content: ""; flex: 0 1 120px; height: 1px; background: linear-gradient(to right, transparent, currentColor); }
.ornament::after { background: linear-gradient(to left, transparent, currentColor); }
.ornament svg { width: 88px; height: 18px; flex: none; }
.ornament--left { justify-content: flex-start; }
.ornament--left::before { display: none; }
.ornament--tight { margin-block: var(--s-4); }

/* --- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(246 239 227 / 0.92); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); transition: box-shadow var(--dur); }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgb(42 26 18 / 0.35); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 76px; }
/* Логотип — вектор из фирменного CDR: надпись берёт цвет ссылки, сердце золотое.
   Цвет надписи в шапке — тот же бордово-коричневый #813830, что на упаковке. */
.brand { display: inline-flex; align-items: flex-start; text-decoration: none; color: #813830; }
.brand__logo { display: block; width: auto; height: 54px; }
.brand__reg { font-family: var(--font-sans); font-size: 0.6875rem; line-height: 1; margin: 6px 0 0 1px; color: var(--cocoa-500); }
@media (max-width: 640px) { .brand__logo { height: 46px; } }

.nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 500; }
.nav a { position: relative; text-decoration: none; padding: var(--s-2) 0; border-bottom: 2px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out), background var(--dur); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--cocoa-900); }

.header-tools { display: flex; align-items: center; gap: var(--s-3); font-family: var(--font-sans); }
.lang { display: inline-flex; align-items: center; gap: 2px; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.02em; }
.lang a { text-decoration: none; padding: var(--s-2) var(--s-2); color: var(--cocoa-500); border-radius: var(--radius); min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.lang a:hover { color: var(--cocoa-900); background: var(--cream-3); }
.lang a[aria-current] { color: var(--cocoa-900); background: var(--cream-3); }

.cart-link { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-weight: 600; min-height: 44px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: 999px; transition: background var(--dur), border-color var(--dur); }
.cart-link:hover { background: var(--cream-3); border-color: var(--cocoa-900); }
.cart-link svg { width: 20px; height: 20px; }
.cart-link__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--cocoa-900); color: var(--cream); font-size: 0.8125rem; display: inline-flex; align-items: center; justify-content: center; }
.cart-link__count:empty { display: none; }
.cart-link:has(.is-bumped) { border-color: var(--gold); }
.cart-link__count.is-bumped { animation: bump 520ms var(--ease-out); }

.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: transparent; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; overflow: visible; }
/* Три линии складываются в крестик — поворот каждой вокруг своего центра,
   затем сдвиг к средней линии (5 единиц в координатах viewBox). */
.nav-toggle__icon path { transform-box: fill-box; transform-origin: center; transition: transform 250ms cubic-bezier(.2, .7, .2, 1), opacity 250ms cubic-bezier(.2, .7, .2, 1); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon path:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon path:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon path:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 899px) {
  .site-header__bar { flex-wrap: wrap; min-height: 68px; }
  .nav-toggle { display: inline-flex; order: 3; }
  .header-tools { order: 2; }
  .nav { order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-block: var(--s-3) var(--s-4); border-top: 1px solid var(--line); }
  .nav a { border-bottom: 1px solid var(--line); padding: var(--s-3) var(--s-2); font-size: 1.125rem; }
  .nav a::after { display: none; }
  .nav a[aria-current="page"] { border-color: var(--line); color: var(--gold-text); }
  /* Раскрытие меню — по образцу dianatatar.com: панель под шапкой открывается
     кругом, растущим из кнопки (clip-path, 0.8 с), а пункты выезжают слева
     по очереди, когда круг уже накрыл их. Центр круга — середина кнопки;
     его координаты относительно панели ставит скрипт (--nav-origin-x/y).
     Закрытая панель прячется visibility после того, как круг схлопнулся,
     чтобы ссылки не ловили фокус с клавиатуры. */
  .js .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100dvh - 100% - 1px); overflow-y: auto; overscroll-behavior: contain;
    padding: var(--s-4) var(--gutter) var(--s-7); border-top: 1px solid var(--line);
    background: var(--cream);
    clip-path: circle(0% at var(--nav-origin-x, calc(100% - 44px)) var(--nav-origin-y, -34px));
    visibility: hidden; pointer-events: none;
    transition: clip-path 800ms cubic-bezier(.76, 0, .24, 1), visibility 0s linear 800ms;
  }
  .js .nav.is-open {
    clip-path: circle(160% at var(--nav-origin-x, calc(100% - 44px)) var(--nav-origin-y, -34px));
    visibility: visible; pointer-events: auto;
    transition: clip-path 800ms cubic-bezier(.76, 0, .24, 1), visibility 0s;
  }
  .js .nav > * { opacity: 0; transform: translateX(-32px); transition: opacity 550ms cubic-bezier(.2, .7, .2, 1), transform 550ms cubic-bezier(.2, .7, .2, 1); }
  .js .nav.is-open > * { opacity: 1; transform: none; }
  .js .nav.is-open > :nth-child(1) { transition-delay: 350ms; }
  .js .nav.is-open > :nth-child(2) { transition-delay: 420ms; }
  .js .nav.is-open > :nth-child(3) { transition-delay: 490ms; }
  .js .nav.is-open > :nth-child(4) { transition-delay: 560ms; }
  .js .nav.is-open > :nth-child(5) { transition-delay: 630ms; }
  .js .nav.is-open > :nth-child(6) { transition-delay: 700ms; }
  .js .nav.is-open > :nth-child(7) { transition-delay: 770ms; }
  html.is-nav-open { overflow: hidden; }
  .lang { display: none; }
  .nav .lang { display: flex; margin-top: var(--s-3); justify-content: flex-start; }
}
@media (min-width: 900px) { .nav .lang { display: none; } }

/* --- Footer ------------------------------------------------------------- */
.site-footer { margin-top: auto; background: var(--cocoa-900); color: var(--cream); font-family: var(--font-sans); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 0.16em; }
.site-footer__main { display: grid; gap: var(--s-7) var(--s-6); padding-block: var(--s-8) var(--s-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.site-footer__brand .brand { color: var(--cream); }
.site-footer__brand .brand__logo { height: 72px; }
.site-footer__brand .brand__reg { color: var(--gold-soft); }
.site-footer__slogan { font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; color: var(--gold-soft); margin-top: var(--s-3); }
.site-footer h2, .site-footer h3 { font-family: var(--font-serif); font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: var(--gold-soft); margin-bottom: var(--s-4); }
.site-footer ul { display: grid; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.site-footer ul a { display: inline-block; padding-block: 3px; }
.site-footer address { font-style: normal; line-height: 1.55; }
.site-footer__social { display: flex; gap: var(--s-3); margin-top: var(--s-4); }
.site-footer__social a { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid rgb(246 239 227 / 0.28); border-radius: 50%; color: inherit; transition: background-color 220ms var(--ease-out), border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out), transform 220ms var(--ease-out); }
.site-footer__social a:hover, .site-footer__social a:focus-visible { color: #fff; border-color: transparent; text-decoration: none; transform: translateY(-2px); }
.site-footer__social svg { width: 20px; height: 20px; }
/* Цвет сети при наведении: Facebook — синий, Instagram — фирменный градиент,
   TikTok — чёрный с бирюзово-розовой окантовкой. */
.social--facebook:hover, .social--facebook:focus-visible { background: #1877f2; }
.social--instagram:hover, .social--instagram:focus-visible { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social--tiktok:hover, .social--tiktok:focus-visible { background: #010101; box-shadow: -2px 0 0 1px #69c9d0, 2px 0 0 1px #ee1d52; }
.site-footer__legal { border-top: 1px solid rgb(246 239 227 / 0.16); padding-block: var(--s-5); display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: center; justify-content: space-between; font-size: 0.9375rem; color: rgb(246 239 227 / 0.78); }
.site-footer__legal p { max-width: none; }
.paymarks { display: flex; align-items: center; gap: var(--s-3); }
.paymark { display: inline-flex; align-items: center; justify-content: center; height: 30px; min-width: 52px; padding: 0 10px; border-radius: 3px; background: #fff; }
/* Логотипы — SVG с заданным viewBox: высота фиксирована, ширина по пропорции. */
.paymark img { display: block; height: 16px; width: auto; }
.paymarks--checkout { margin-top: var(--s-3); }

/* --- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0.7rem 1.35rem; border-radius: var(--radius); border: 1px solid transparent; font-family: var(--font-sans); font-size: 1.0625rem; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background var(--dur), color var(--dur), border-color var(--dur), transform var(--dur), box-shadow var(--dur); }
.btn:active { transform: translateY(1px); }
.btn--primary:hover:not(:active), .btn--light:hover:not(:active) { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgb(42 26 18 / 0.55); }
.btn--primary { background: var(--cocoa-900); color: var(--cream); border-color: var(--cocoa-900); }
.btn--primary:hover { background: var(--cocoa-700); border-color: var(--cocoa-700); }
.btn--secondary { background: transparent; color: var(--cocoa-900); border-color: var(--cocoa-900); }
.btn--secondary:hover { background: var(--cocoa-900); color: var(--cream); }
.btn--ghost { background: transparent; color: var(--cocoa-900); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--cocoa-900); }
.btn--light { background: var(--cream); color: var(--cocoa-900); border-color: var(--cream); }
.btn--light:hover { background: var(--cream-3); border-color: var(--cream-3); }
.btn--outline-light { background: transparent; color: var(--cream); border-color: rgb(246 239 227 / 0.6); }
.btn--outline-light:hover { border-color: var(--cream); background: rgb(246 239 227 / 0.08); }
.btn--lg { min-height: 56px; padding: 0.9rem 1.75rem; font-size: 1.125rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 20px; height: 20px; }

/* --- Product cards ------------------------------------------------------ */
.card-product { position: relative; display: flex; flex-direction: column; gap: var(--s-3); }
.card-product__media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); background: var(--cream-2); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; padding: 7%; transition: border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
.card-product:hover .card-product__media { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.card-product__media img { width: 100%; height: 100%; object-fit: contain; transition: transform 600ms var(--ease-out); }
.card-product:hover .card-product__media img { transform: scale(1.04); }
.card-product__media--photo { padding: 0; }
.card-product__media--photo img { object-fit: cover; }
.card-product__body { display: flex; flex-direction: column; gap: var(--s-1); }
.card-product__title { font-size: 1.1875rem; font-weight: 450; font-style: italic; line-height: 1.3; }
.card-product__title a { text-decoration: none; }
.card-product__title a::after { content: ""; position: absolute; inset: 0; }
.card-product:hover .card-product__title a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 0.14em; }
.card-product__meta { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); font-family: var(--font-sans); color: var(--text-2); font-size: 0.9375rem; }
.card-product__cat { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-2); }
.card-product .price { font-size: 1.0625rem; color: var(--cocoa-900); }
.card-product__badge { position: absolute; top: var(--s-3); left: var(--s-3); z-index: 1; }

.price { font-family: var(--font-sans); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price__cur { font-weight: 500; font-size: 0.85em; margin-left: 0.15em; color: var(--text-2); }
.price__from { font-weight: 500; font-size: 0.85em; color: var(--text-2); }
.price--big { font-size: 1.75rem; }
.price--big .price__cur { font-size: 0.6em; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; background: var(--cream-2); color: var(--cocoa-700); }
.tag--ok { color: var(--ok); border-color: rgb(47 107 58 / 0.4); }
.tag--out { color: var(--carmine); border-color: rgb(168 35 43 / 0.45); }
.tag--fill { background: var(--cocoa-900); color: var(--cream); border-color: var(--cocoa-900); }
.tag--aubergine { background: var(--aubergine); color: var(--cream); border-color: var(--aubergine); }

/* --- Search --------------------------------------------------------------- */
.search { position: relative; display: flex; align-items: center; font-family: var(--font-sans); }
.search__input { width: 100%; min-height: 44px; padding: 0 44px 0 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--cream-2); font-size: 1rem; color: var(--cocoa-900); transition: border-color var(--dur), background var(--dur); -webkit-appearance: none; appearance: none; }
.search__input::placeholder { color: var(--text-2); }
.search__input:hover { border-color: var(--cocoa-700); }
.search__input:focus-visible { border-color: var(--cocoa-900); outline-offset: 2px; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__button { position: absolute; right: 2px; top: 50%; width: 40px; height: 40px; margin-top: -20px; border: 0; border-radius: 50%; background: transparent; color: var(--cocoa-700); display: inline-flex; align-items: center; justify-content: center; transition: color var(--dur), background var(--dur); }
.search__button:hover { color: var(--cocoa-900); background: var(--cream-3); }
.search__button svg { width: 20px; height: 20px; }
.header-tools .search { width: clamp(160px, 14vw, 220px); }
.search--stacked { margin-top: var(--s-3); }
.search--page { max-width: 520px; }
.search--page .search__input { min-height: 52px; font-size: 1.0625rem; }
@media (max-width: 899px) { .header-tools .search { display: none; } }
@media (min-width: 900px) { .nav .search { display: none; } }

/* --- Category chips ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--font-sans); font-weight: 600; font-size: 1rem; text-decoration: none; transition: background var(--dur), color var(--dur), border-color var(--dur); }
.chips a:hover { border-color: var(--cocoa-900); }
.chips a[aria-current="page"] { background: var(--cocoa-900); color: var(--cream); border-color: var(--cocoa-900); }

/* --- Category tiles ----------------------------------------------------- */
.tile { position: relative; display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--cream-2); text-decoration: none; transition: border-color var(--dur), box-shadow var(--dur); }
.tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.tile__media { aspect-ratio: 3 / 2; background: var(--cream-3); overflow: hidden; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-out); }
.tile:hover .tile__media img { transform: scale(1.05); }
.tile__body { padding: var(--s-4) var(--s-5) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); }
.tile__title { font-size: 1.375rem; font-weight: 450; }
.tile__text { color: var(--text-2); font-size: 0.9375rem; }
.tile__more { margin-top: auto; font-family: var(--font-sans); font-weight: 600; color: var(--cocoa-900); transition: transform 260ms var(--ease-out); }
.tile:hover .tile__more { transform: translateX(4px); }

/* --- Hero --------------------------------------------------------------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.hero__copy { display: flex; flex-direction: column; gap: var(--s-5); }
.hero__copy .display { max-width: 16ch; }
.hero__copy .lede { max-width: 42ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.hero__note { font-family: var(--font-sans); color: var(--text-2); font-size: 0.9375rem; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.hero__media { position: relative; aspect-ratio: 1 / 1; max-width: 600px; margin-inline: auto; width: 100%; }
/* Неподвижный снимок: своя пропорция и размер, при котором фотография
   не увеличивается больше чем вдвое от исходника и остаётся резкой. */
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero__media canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 500ms var(--ease-out); touch-action: pan-y; }
.hero__media.is-3d { cursor: grab; }
.hero__media.is-3d:active { cursor: grabbing; }
.hero__media.is-3d canvas { opacity: 1; }
.hero__media.is-3d img { opacity: 0; transition: none; }
.hero__caption { position: absolute; left: 0; right: 0; bottom: -0.5rem; text-align: center; font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-2); }

/* --- Hero with factory footage ------------------------------------------
   Съёмка с фабрики вертикальная: для широких экранов из кадра 1080×1920
   вырезана полоса и растянута до 1920 — планы макро с малой глубиной
   резкости это переносят, фон в них и так в боке. На узком экране
   отдаётся нативная вертикаль, без апскейла.

   Постер лежит в разметке картинкой и остаётся LCP: <video> получает src
   из JS после load, а при prefers-reduced-motion, saveData и без JS
   не получает вовсе. */
.hero--video {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  align-items: end;
  min-height: min(86svh, 820px);
  padding-block: clamp(3rem, 10vh, 5.5rem) clamp(2.5rem, 7vh, 4.5rem);
  background: var(--cocoa-950);
  color: var(--cream);
  border-end-start-radius: var(--radius-xl);
  border-end-end-radius: var(--radius-xl);
}
.hero--video .hero__stage { position: absolute; inset: 0; z-index: -1; }
.hero--video .hero__stage > img,
.hero--video .hero__stage > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero--video .hero__stage > video { opacity: 0; transition: opacity 900ms var(--ease-out); }
.hero--video.is-playing .hero__stage > video { opacity: 1; }
/* Плёнка поверх кадра: слева гуще, чтобы заголовок держал контраст на
   любом кадре монтажа, снизу — подложка под кнопки. */
.hero--video .hero__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgb(31 18 12 / 0.88) 0%, rgb(31 18 12 / 0.66) 38%, rgb(31 18 12 / 0.24) 100%),
    linear-gradient(to top, rgb(31 18 12 / 0.72) 0%, rgb(31 18 12 / 0) 58%);
}
.hero--video .hero__copy { max-width: 44ch; gap: var(--s-4); }
/* Здесь заголовок идёт ступенью h1, а не .display: на .display он вставал в
   четыре строки и закрывал кадр, ради которого секция и сделана. */
.hero--video h1 { color: var(--cream); max-width: 17ch; }
.hero--video .kicker { color: var(--gold-soft); }
.hero--video .lede { color: rgb(246 239 227 / 0.86); }
.hero--video .hero__note { color: rgb(246 239 227 / 0.72); }
@media (max-width: 719px) {
  .hero--video { min-height: min(90svh, 720px); }
  .hero--video .hero__stage::after {
    background:
      linear-gradient(to top, rgb(31 18 12 / 0.9) 0%, rgb(31 18 12 / 0.5) 46%, rgb(31 18 12 / 0.32) 100%);
  }
}

/* One orchestrated entrance, hero only. The picture keeps opacity 1 from the
   first frame: an LCP candidate hidden by opacity 0 is not counted until it
   becomes visible, so a fade-in shifts the whole page's LCP by its delay. */
.js .hero__copy > * { opacity: 0; transform: translateY(14px); animation: rise 720ms var(--ease-out) forwards; }
.js .hero__copy > :nth-child(2) { animation-delay: 80ms; }
.js .hero__copy > :nth-child(3) { animation-delay: 160ms; }
.js .hero__copy > :nth-child(4) { animation-delay: 240ms; }
.js .hero__copy > :nth-child(5) { animation-delay: 320ms; }
.js .hero__media { transform: translateY(14px); animation: rise 900ms var(--ease-out) 180ms forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .js .hero__copy > *, .js .hero__media { opacity: 1; transform: none; animation: none; }
  .card-product__media img, .btn, .tile, .tile__media img, .tile__more, .nav a::after, .gallery__main img, .site-footer__social a { transition: none; }
  .site-footer__social a:hover { transform: none; }
  /* Меню открывается и закрывается сразу, без круга и выезда пунктов. */
  .js .nav, .js .nav.is-open, .js .nav > *, .js .nav.is-open > *, .nav-toggle__icon path { transition: none !important; }
  .js .nav > * { transform: none; }
  .card-product:hover .card-product__media img, .tile:hover .tile__media img, .tile:hover .tile__more, .btn--primary:hover:not(:active), .btn--light:hover:not(:active) { transform: none; }
  .cart-link__count.is-bumped, .qty input.is-pulse { animation: none; }
}

/* --- Media + text sections --------------------------------------------- */
/* Видеополоса внутренних страниц. Постер лежит картинкой и остаётся на месте
   без JS, при уменьшенной анимации и при экономии трафика; <video> получает
   src, только когда полоса подходит к области видимости. */
.videoband { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: clip; background: var(--cocoa-950); }
.videoband > img, .videoband > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.videoband > video { opacity: 0; transition: opacity 900ms var(--ease-out); }
.videoband.is-playing > video { opacity: 1; }
.videoband--tall { aspect-ratio: 4 / 5; }
.videoband + figcaption { margin-top: var(--s-3); }

.photo { border-radius: var(--radius-lg); overflow: hidden; background: var(--cream-3); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--3x2 { aspect-ratio: 3 / 2; }
.photo--4x5 { aspect-ratio: 4 / 5; }
.photo--square { aspect-ratio: 1; }
/* Модификатор .photo--packshot убран вместе с белым фоном у пэкшотов: он был
   обходным путём — рамка на белом, чтобы кадр не читался белой карточкой на
   кремовом. Теперь фон вырезан на самих файлах, и товар лежит прямо на фоне
   страницы. См. scripts/media/catalog.tsv. */
/* Ряд снимков в конце секции: три кадра одной высоты, на узком экране два. */
.strip { display: grid; gap: var(--s-5) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); list-style: none; padding: 0; margin-top: clamp(2rem, 4vw, 3.5rem); }
.strip figcaption { margin-top: var(--s-3); }
.strip--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }

.photo-pair { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-4); align-items: end; }
.photo-pair .photo:last-child { transform: translateY(2rem); }
@media (max-width: 899px) { .photo-pair .photo:last-child { transform: none; } }
figcaption { font-family: var(--font-sans); font-size: 0.875rem; color: var(--text-2); margin-top: var(--s-2); }

.facts { display: grid; gap: var(--s-4); border-top: 1px solid var(--line-strong); }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-4); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--font-sans); font-weight: 600; color: var(--cocoa-700); }
.facts dd { margin: 0; color: var(--text-2); }
@media (max-width: 480px) { .facts > div { grid-template-columns: 1fr; gap: var(--s-1); } }

/* --- Points of sale ------------------------------------------------------ */
.points { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.point { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--cream-2); }
.point--factory { background: var(--cocoa-900); color: var(--cream); border-color: var(--cocoa-900); }
.point--factory .point__meta, .point--factory .point__address { color: rgb(246 239 227 / 0.8); }
.point--factory a { color: var(--cream); }
.point__name { font-size: 1.1875rem; font-weight: 500; }
.point__address { color: var(--cocoa-700); }
.point__meta { font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-2); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
.point__links { margin-top: auto; padding-top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-3); font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; }
.point__links a { text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.point__links a:hover { border-color: currentColor; }

/* Карта точки: до клика — кнопка, после — iframe того же размера, чтобы
   лэйаут не прыгал. Блок скрыт, пока скрипт не включил его: без JS iframe
   не появится, а пустая рамка выглядела бы поломкой. */
.map { margin-top: var(--s-3); }
.map__load { width: 100%; min-height: 44px; padding: var(--s-3); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: transparent; color: inherit; font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; cursor: pointer; transition: background var(--dur), border-color var(--dur); }
.map__load:hover { background: var(--cream-3); border-style: solid; }
.point--factory .map__load:hover { background: rgb(246 239 227 / 0.12); }
.map__note { display: block; margin-top: 4px; font-weight: 400; font-size: 0.8125rem; color: var(--text-2); }
.point--factory .map__note { color: rgb(246 239 227 / 0.7); }
.map iframe { display: block; width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius); }

.retailers { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.retailers li { display: inline-flex; align-items: center; min-height: 66px; padding: 0 var(--s-5); border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream-2); font-family: var(--font-sans); font-weight: 600; font-size: 1.0625rem; }
.retailers a { text-decoration: none; }
/* 36px: на 28 подпись «Alături zi de zi» в знаке Linella переставала читаться. */
.retailers img { max-height: 36px; width: auto; }

/* --- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs { font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-2); }
/* Выравнивание держится на центрах боксов, а не на паддинге ссылки:
   последний пункт — голый текст без <a>, и при stretch он вставал выше
   остальных вместе со своим разделителем. */
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; row-gap: 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; min-width: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline: var(--s-3); font-size: 0.875em; color: var(--cocoa-300); }
.breadcrumbs a { color: var(--cocoa-900); text-decoration: none; padding-block: var(--s-2); border-bottom: 1px solid transparent; transition: border-color var(--dur); }
.breadcrumbs a:hover { border-bottom-color: var(--line-strong); }
.breadcrumbs a:focus-visible { border-bottom-color: transparent; }
/* Текущая страница дублирует <h1> строкой ниже — она не должна быть
   темнее ссылок, иначе спорит с заголовком за внимание. */
.breadcrumbs [aria-current] { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 599px) {
  /* На узком экране цепочка из четырёх длинных румынских названий
     ломается на три строки. Ведут только ближайшие два звена. */
  .breadcrumbs li:not(:nth-last-child(-n+2)) { display: none; }
  .breadcrumbs li + li:nth-last-child(2)::before { content: "\2039"; margin-inline: 0 var(--s-2); }
}

.page-head { padding-block: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; gap: var(--s-4); }
.page-head .lede { margin-top: var(--s-1); }

/* --- Product detail ------------------------------------------------------ */
.product { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 900px) { .product { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.gallery { display: grid; gap: var(--s-3); position: sticky; top: 92px; }
.gallery__main { aspect-ratio: 1; border-radius: var(--radius-lg); background: var(--cream-2); border: 1px solid var(--line); display: grid; place-items: center; padding: 6%; overflow: hidden; view-transition-name: product-media; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; transition: opacity 260ms var(--ease-out), transform 420ms var(--ease-out); }
.gallery.is-switching .gallery__main img { opacity: 0; transform: scale(0.985); }
.gallery__thumbs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.gallery__thumbs button { width: 72px; height: 72px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream-2); }
.gallery__thumbs button[aria-pressed="true"] { border-color: var(--cocoa-900); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 899px) { .gallery { position: static; } }

.product__info { display: flex; flex-direction: column; gap: var(--s-5); }
.product__title { font-style: italic; font-weight: 450; }
.product__buy { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--cream-2); }
.product__price-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.product__package { font-family: var(--font-sans); color: var(--text-2); font-size: 1rem; }

/* Выбор фасовки: сегменты во всю ширину блока покупки. Выбранный — тёмный,
   как кнопка «в корзину» под ним; распроданный остаётся ссылкой, но приглушён. */
.weights { display: grid; gap: var(--s-2); }
.weights__legend { font-family: var(--font-sans); font-weight: 600; font-size: 0.9375rem; color: var(--cocoa-700); }
.weights__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.weights__option { display: grid; gap: 2px; min-height: 56px; padding: var(--s-2) var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--cream); color: var(--cocoa-900); font-family: var(--font-sans); text-decoration: none; transition: border-color var(--dur), background-color var(--dur), color var(--dur); }
.weights__option:hover { border-color: var(--cocoa-900); text-decoration: none; }
.weights__option[aria-current] { background: var(--cocoa-900); border-color: var(--cocoa-900); color: var(--cream); }
.weights__label { font-weight: 600; font-size: 1.0625rem; line-height: 1.2; }
.weights__price { font-size: 0.875rem; font-variant-numeric: tabular-nums; color: var(--text-2); }
.weights__option[aria-current] .weights__price { color: var(--gold-soft); }
.weights__option--out .weights__label { color: var(--text-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.product.is-switching { opacity: 0.55; transition: opacity 160ms var(--ease-out); pointer-events: none; }
.product__form { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: stretch; }
.product__form .btn { flex: 1 1 220px; }
.product__pickup { font-family: var(--font-sans); font-size: 0.9375rem; color: var(--text-2); }
.product__pickup a { color: var(--cocoa-900); }

.spec { border-top: 1px solid var(--line-strong); }
.spec > div { padding-block: var(--s-4); border-bottom: 1px solid var(--line); display: grid; gap: var(--s-2); }
.spec dt { font-family: var(--font-sans); font-weight: 600; color: var(--cocoa-700); font-size: 0.9375rem; letter-spacing: 0.01em; }
.spec dd { margin: 0; }
.allergens { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.sweets { display: grid; gap: var(--s-4); }
.sweet { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-4); align-items: start; padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.sweet--text { grid-template-columns: 1fr; }
.sweet__media { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--cream-3); }
.sweet__media img { width: 100%; height: 100%; object-fit: cover; }
.sweet__name { font-style: italic; font-size: 1.125rem; }
.sweet__text { color: var(--text-2); font-size: 0.9375rem; }

/* --- Quantity stepper ---------------------------------------------------- */
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--cream-2); font-family: var(--font-sans); }
.qty button { width: 46px; border: 0; background: transparent; font-size: 1.25rem; font-weight: 600; color: var(--cocoa-900); }
.qty button:hover { background: var(--cream-3); }
.qty input { width: 56px; border: 0; border-inline: 1px solid var(--line); background: transparent; text-align: center; font-weight: 600; font-size: 1.0625rem; -moz-appearance: textfield; appearance: textfield; min-height: 46px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input.is-pulse { animation: pulse 220ms var(--ease-out); }

/* --- Forms --------------------------------------------------------------- */
.form { display: grid; gap: var(--s-5); }
.form__row { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: var(--s-2); font-family: var(--font-sans); }
.field label, .field__label { font-weight: 600; font-size: 1rem; }
.field__hint { color: var(--text-2); font-size: 0.9375rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { width: 100%; min-height: 50px; padding: 0.7rem 0.9rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--cream-2); font-size: 1.0625rem; transition: border-color var(--dur); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--cocoa-700); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--cocoa-900); outline-offset: 2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field__error { color: var(--error); font-size: 0.9375rem; font-weight: 600; }
.field ul.errorlist { color: var(--error); font-size: 0.9375rem; font-weight: 600; margin: 0; padding: 0; list-style: none; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; font-family: var(--font-sans); font-size: 1rem; line-height: 1.5; }
.check input { width: 24px; height: 24px; margin: 0.15rem 0 0; accent-color: var(--cocoa-900); }
.radio-cards { display: grid; gap: var(--s-3); }
.radio-card { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--cream-2); cursor: pointer; transition: border-color var(--dur), background var(--dur); }
.radio-card:hover { border-color: var(--cocoa-900); }
.radio-card:has(input:checked) { border-color: var(--cocoa-900); background: var(--cream); box-shadow: inset 0 0 0 1px var(--cocoa-900); }
.radio-card input { width: 24px; height: 24px; margin: 0.15rem 0 0; accent-color: var(--cocoa-900); }
.radio-card__title { font-weight: 600; font-family: var(--font-sans); }
.radio-card__text { color: var(--text-2); font-size: 0.9375rem; font-family: var(--font-sans); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }

/* --- Notices ------------------------------------------------------------- */
.notice { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); padding: var(--s-4) var(--s-5); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--cream-2); font-family: var(--font-sans); }
.notice svg { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.notice p { max-width: none; }
.notice--ok { background: var(--ok-soft); border-color: rgb(47 107 58 / 0.4); color: #1f4a29; }
.notice--error { background: var(--error-soft); border-color: rgb(155 44 44 / 0.4); color: #6e1f1f; }
.notice--warn { background: var(--warn-soft); border-color: rgb(122 92 38 / 0.4); color: #5a4218; }
.notice__title { font-weight: 700; }

/* --- Tables, cart, summary ---------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); }
.table th, .table td { padding: var(--s-4) var(--s-3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); font-weight: 600; border-bottom-color: var(--line-strong); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { border-bottom: 0; font-weight: 700; font-size: 1.125rem; padding-top: var(--s-5); }

.cart-layout { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 1000px) { .cart-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
.cart-line { display: grid; grid-template-columns: 96px 1fr auto; gap: var(--s-4); align-items: center; padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.cart-line__media { width: 96px; height: 96px; border-radius: var(--radius); background: var(--cream-2); border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; }
.cart-line__media img { width: 100%; height: 100%; object-fit: contain; }
.cart-line__title { font-style: italic; font-size: 1.125rem; }
.cart-line__title a { text-decoration: none; }
.cart-line__meta { font-family: var(--font-sans); color: var(--text-2); font-size: 0.9375rem; }
.cart-line__controls { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-2); }
.cart-line__total { text-align: right; }
.cart-line--unavailable .cart-line__media, .cart-line--unavailable .cart-line__title { opacity: 0.55; }
.link-button { background: none; border: 0; padding: var(--s-2) 0; font-family: var(--font-sans); font-weight: 600; color: var(--cocoa-700); text-decoration: underline; text-underline-offset: 0.16em; min-height: 44px; }
.link-button:hover { color: var(--cocoa-900); }
@media (max-width: 560px) { .cart-line { grid-template-columns: 72px 1fr; } .cart-line__media { width: 72px; height: 72px; } .cart-line__total { grid-column: 2; text-align: left; } }

.summary { position: sticky; top: 92px; display: grid; gap: var(--s-4); padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--cream-2); font-family: var(--font-sans); }
.summary h2 { font-size: 1.25rem; }
.summary__row { display: flex; justify-content: space-between; gap: var(--s-3); }
.summary__row--total { border-top: 1px solid var(--line-strong); padding-top: var(--s-4); font-weight: 700; font-size: 1.25rem; }
.summary__note { font-size: 0.9375rem; color: var(--text-2); }
.summary__note p { max-width: none; }
@media (max-width: 999px) { .summary { position: static; } }

/* --- Order status steps -------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); font-family: var(--font-sans); counter-reset: step; }
.steps li { position: relative; padding-top: var(--s-4); font-size: 0.9375rem; color: var(--text-2); }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 2px; background: var(--cocoa-200); }
.steps li.is-done::before, .steps li.is-current::before { background: var(--cocoa-900); }
.steps li.is-current { color: var(--cocoa-900); font-weight: 700; }
.steps li.is-done { color: var(--cocoa-700); }
@media (max-width: 560px) { .steps { grid-template-columns: repeat(2, 1fr); } }

.order-head { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); align-items: baseline; justify-content: space-between; }
.order-number { font-family: var(--font-sans); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }

/* --- Definition list (requisites) --------------------------------------- */
.dl { display: grid; gap: var(--s-3); font-family: var(--font-sans); }
.dl > div { display: grid; grid-template-columns: minmax(120px, 0.6fr) 1fr; gap: var(--s-3); padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.dl dt { color: var(--text-2); font-weight: 500; }
.dl dd { margin: 0; font-weight: 500; }
@media (max-width: 480px) { .dl > div { grid-template-columns: 1fr; gap: 2px; } }

/* --- Collection banner -------------------------------------------------- */
.collection-banner { position: relative; overflow: hidden; display: grid; gap: var(--s-5); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-lg); background: var(--aubergine); color: var(--cream); align-items: center; }
.collection-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgb(255 255 255 / 0.08) 50%, transparent 58%); transform: translateX(-100%); }
@media (min-width: 800px) { .collection-banner { grid-template-columns: 1fr auto; } }
.collection-banner h2, .collection-banner .kicker { color: var(--cream); }
.collection-banner .kicker { color: var(--gold-soft); }
.collection-banner p { color: rgb(246 239 227 / 0.85); }

/* --- Excursion / program lists ----------------------------------------- */
.program { display: grid; gap: var(--s-3); counter-reset: item; }
.program li { display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--s-3); align-items: baseline; padding-block: var(--s-3); border-bottom: 1px solid var(--line); }
.program li::before { counter-increment: item; content: counter(item); font-family: var(--font-sans); font-weight: 600; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.slots { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); font-family: var(--font-sans); }
.slot { display: grid; gap: var(--s-1); padding: var(--s-4); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--cream-2); text-decoration: none; }
.slot:hover { border-color: var(--cocoa-900); }
.slot__date { font-weight: 700; font-size: 1.125rem; }
.slot__meta { color: var(--text-2); font-size: 0.9375rem; }
.slot--full { opacity: 0.6; }

/* --- Empty state -------------------------------------------------------- */
.empty { padding: var(--s-8) var(--s-5); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); display: grid; gap: var(--s-4); justify-items: center; }
.empty p { max-width: 44ch; }

/* --- Messages (django.contrib.messages) -------------------------------- */
.messages { display: grid; gap: var(--s-3); padding-top: var(--s-5); }

/* --- Motion --------------------------------------------------------------
   Один авторский момент — коробка в герое (hero-box.js); остальное объясняет
   состояние, связь и переход. Раскрытия различаются по содержимому: текст
   поднимается, списки появляются по очереди, фотографии «проявляются»,
   филигрань рисует себя. Скрытое состояние живёт только под .js и без
   prefers-reduced-motion: без скрипта и для тех, кто просил меньше движения,
   страница просто видна. Разметка: data-reveal (текст), data-reveal="list"
   (дети по очереди), data-reveal="photo", data-reveal="draw" (орнамент). */
@media screen and (prefers-reduced-motion: no-preference) {
  .js [data-reveal=""]:not(.is-in), .js [data-reveal="photo"]:not(.is-in), .js [data-reveal="list"]:not(.is-list), .js [data-reveal-item]:not(.is-in) { opacity: 0; }
  .js [data-reveal=""].is-in:not(.is-done), .js [data-reveal-item].is-in:not(.is-done) { animation: reveal-up var(--dur-reveal) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }

  .js [data-reveal="photo"]:not(.is-in) img { transform: scale(1.06); }
  .js [data-reveal="photo"].is-in:not(.is-done) { animation: reveal-photo 1000ms var(--ease-out) both; }
  .js [data-reveal="photo"].is-in:not(.is-done) img { animation: reveal-photo-img 1000ms var(--ease-out) both; }

  /* Филигрань: дуги по длине штриха (pathLength="1"), сердце и точки из
     центра, линейки от центра к краям. */
  .ornament path[pathLength] { stroke-dasharray: 1; }
  .ornament path[fill], .ornament circle { transform-box: fill-box; transform-origin: center; }
  .ornament::before { transform-origin: right center; }
  .ornament::after { transform-origin: left center; }
  .js [data-reveal="draw"]:not(.is-in) path[pathLength] { stroke-dashoffset: 1; }
  .js [data-reveal="draw"]:not(.is-in) path[fill], .js [data-reveal="draw"]:not(.is-in) circle { opacity: 0; }
  .js [data-reveal="draw"]:not(.is-in)::before, .js [data-reveal="draw"]:not(.is-in)::after { transform: scaleX(0); }
  .js [data-reveal="draw"].is-in path[pathLength] { animation: draw 900ms var(--ease-out) both; }
  .js [data-reveal="draw"].is-in path[fill], .js [data-reveal="draw"].is-in circle { animation: bloom 520ms var(--ease-out) 520ms both; }
  .js [data-reveal="draw"].is-in::before, .js [data-reveal="draw"].is-in::after { animation: extend 900ms var(--ease-out) 200ms both; }

  /* Баннер коллекции: один проход света по картону, как блик на фольге. */
  .js .collection-banner.is-in::after { animation: sheen 1500ms ease-out 400ms both; }
  .js .messages .notice { animation: reveal-up 480ms var(--ease-out) both; }
}

@keyframes reveal-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes reveal-photo { from { opacity: 0; clip-path: inset(6% 0 6% 0 round var(--radius-lg)); } to { opacity: 1; clip-path: inset(0 round var(--radius-lg)); } }
@keyframes reveal-photo-img { from { transform: scale(1.06); } to { transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes bloom { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes extend { from { transform: scaleX(0); } to { transform: none; } }
@keyframes sheen { to { transform: translateX(100%); } }
@keyframes bump { 0% { transform: scale(0.6); } 45% { transform: scale(1.3); } 100% { transform: none; } }
@keyframes pulse { 50% { transform: scale(1.18); } }

/* Переходы между страницами (cross-document View Transitions, прогрессивно):
   старая страница гаснет быстрее, чем появляется новая; шапка стоит на
   месте; панель товара морфится из карточки в галерею (имя ставит скрипт
   в base.html) и обратно. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: 180ms var(--ease-out) both vt-out; }
::view-transition-new(root) { animation: 360ms var(--ease-out) both vt-in; }
::view-transition-group(product-media) { animation-duration: 460ms; animation-timing-function: var(--ease-out); }
::view-transition-old(product-media), ::view-transition-new(product-media) { width: 100%; height: 100%; object-fit: cover; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* --- Print ------------------------------------------------------------- */
@media print {
  .site-header, .site-footer__main, .paymarks, .btn, .nav-toggle, .skip-link { display: none !important; }
  [data-reveal], [data-reveal-item] { opacity: 1 !important; animation: none !important; }
  body { background: #fff; color: #000; }
  a { text-decoration: none; }
}
