/* ==========================================================================
   Prietena Mea · Cărți
   Mobile-first. Ordine: tokens → bază → header → intro → carte → coș → footer
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --ink: #14151A;
  --muted: #5E6068;
  --paper: #FFFFFF;
  --paper-2: #F4F3F0;
  --line: #E4E2DC;
  --sun: #E3B33A;
  --danger: #B3261E;
  --ok: #2F7D5B;

  /* implicit (coș, formulare): monocrom */
  --accent: var(--ink);
  --on-accent: #fff;
  --accent-soft: var(--paper-2);

  --f-display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --f-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --bar-h: 60px;          /* înălțimea barei de sus */
  --nav-h: 48px;          /* rândul cu chip-uri (doar mobil) */
  --head-full: calc(var(--bar-h) + var(--nav-h));
  --pad: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 900px) {
  :root { --bar-h: 72px; --nav-h: 0px; }
}

/* ---------- Teme per carte ----------
   Culoare accent + culoarea textului de pe accent + variantă deschisă.
   Pentru o carte nouă: copiază un rând și schimbă numele. */
[data-theme="betty"]      { --accent: #0B7F9E; --on-accent: #fff;    --accent-soft: #E1F1F6; }
[data-theme="calendar"]   { --accent: #BF4F34; --on-accent: #fff;    --accent-soft: #F7E3DC; }
[data-theme="abc"]        { --accent: #F2B33D; --on-accent: #14151A; --accent-soft: #FBEFCF; }
[data-theme="felicitare"] { --accent: #B84A6E; --on-accent: #fff;    --accent-soft: #F6DFE7; }
[data-theme="ciorapei"]   { --accent: #3A58A0; --on-accent: #fff;    --accent-soft: #E2E7F4; }

/* ---------- Bază ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ring, var(--ink)); outline-offset: 3px; border-radius: 6px; }

.ico { width: 22px; height: 22px; flex: none; }
.wrap { width: min(100%, 1240px); margin-inline: auto; padding-inline: var(--pad); }

.skip { position: fixed; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; transition: top .2s; }
.skip:focus { top: 12px; }

.eyebrow {
  display: flex; align-items: center; gap: .75em;
  font: 600 .75rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow__n { color: var(--accent); font-variant-numeric: tabular-nums; }
.book .eyebrow__n { color: var(--ink); }
.book .eyebrow__n::after { content: ""; display: inline-block; width: 28px; height: 2px; margin-left: .75em; vertical-align: middle; background: var(--accent); }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 56px; padding: 0 1.75rem; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1 var(--f-body); letter-spacing: .005em; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.is-added { background: var(--ink); color: #fff; }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; cursor: pointer; transition: background-color .2s; }
.icon-btn:hover { background: var(--paper-2); }

.link { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .28em; text-decoration-color: var(--line); transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: var(--ink); }
.link .ico { width: 18px; height: 18px; }

/* ==========================================================================
   Header
   ========================================================================== */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand cart" "nav nav";
  grid-template-rows: var(--bar-h) 0px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid transparent;
  transition: grid-template-rows .45s var(--ease), border-color .3s;
}
.top.has-nav { grid-template-rows: var(--bar-h) var(--nav-h); }
.top.is-scrolled { border-bottom-color: var(--line); }

.brand { grid-area: brand; align-self: center; display: inline-flex; align-items: center; gap: 10px; margin-left: var(--pad); text-decoration: none; justify-self: start; }
.brand__sun { width: 34px; height: 20px; color: var(--sun); }
.brand__name { font: 700 1.125rem/1 var(--f-display); letter-spacing: -.01em; }

.cartbtn {
  grid-area: cart; align-self: center; justify-self: end; margin-right: var(--pad);
  position: relative; width: 48px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper); cursor: pointer;
  transition: border-color .2s, transform .25s var(--ease);
}
.cartbtn:hover { border-color: var(--ink); transform: translateY(-1px); }
.cartbtn__count {
  position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px; background: var(--ink); color: #fff; border: 2px solid var(--paper);
  font: 700 .72rem/18px var(--f-body); text-align: center; font-variant-numeric: tabular-nums;
}
.cartbtn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 35% { transform: scale(1.14); } 70% { transform: scale(.96); } }

.booknav {
  grid-area: nav; position: relative; min-height: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 var(--pad); overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.booknav::-webkit-scrollbar { display: none; }
.booknav a {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 8px 14px; border-radius: 999px;
  font: 600 .875rem/1 var(--f-body); color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.booknav a i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: background-color .3s; }
.booknav a:hover { color: var(--ink); background: var(--accent-soft); }
.booknav a.is-active { background: var(--accent); color: var(--on-accent); }
.booknav a.is-active i { background: var(--on-accent); }

@media (min-width: 900px) {
  .top { grid-template-columns: 1fr auto 1fr; grid-template-areas: "brand nav cart"; }
  .booknav { padding: 0; overflow: visible; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .4s var(--ease), transform .4s var(--ease), visibility 0s .4s; }
  .top.has-nav .booknav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
}

/* ==========================================================================
   Intro
   ========================================================================== */
.intro { padding: calc(var(--bar-h) + clamp(28px, 7vw, 88px)) 0 clamp(56px, 9vw, 120px); position: relative; overflow: clip; }
.intro__grid { display: grid; gap: clamp(32px, 5vw, 72px); position: relative; }

.intro__sun { width: clamp(84px, 18vw, 132px); color: var(--sun); }
.intro__sun path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) forwards; }
.intro__sun path:nth-child(2) { animation-delay: .25s; }
.intro__sun path:nth-child(3) { animation-delay: .35s; }
.intro__sun path:nth-child(4) { animation-delay: .45s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.intro__title { font: 700 clamp(2.4rem, 8.6vw, 6.25rem)/.95 var(--f-display); letter-spacing: -.04em; text-wrap: balance; }
.intro__title span { display: block; }
.intro__title em {
  font-style: normal;
  background: linear-gradient(var(--hl), var(--hl)) 0 92% / 0% .2em no-repeat;
  transition: background-size 1s var(--ease) .5s;
}
.intro__title.is-in em, html:not(.js) .intro__title em { background-size: 100% .2em; }
.intro__title span:nth-child(2) em { transition-delay: .75s; }
.intro__title span:nth-child(3) em { transition-delay: 1s; }

.intro__cols { display: grid; gap: clamp(32px, 5vw, 56px); }
.intro__about { display: grid; gap: 18px; align-content: start; padding-left: clamp(18px, 3vw, 28px); border-left: 3px solid var(--sun); }
.intro__text { color: var(--muted); max-width: 36rem; text-wrap: pretty; }

.why { display: grid; gap: 14px; align-content: start; }
.why > p:not(.eyebrow) { color: var(--muted); max-width: 36rem; text-wrap: pretty; }
.why__q { font: 600 clamp(1.125rem, 2vw, 1.375rem)/1.4 var(--f-display); letter-spacing: -.01em; color: var(--ink) !important; }

.index { display: grid; gap: 14px; margin-top: 8px; }

/* Cinci blocuri colorate, pe un rând pe desktop: număr, titlu, tip. Fără preț. */
.index__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 639px) {
  .index__grid > li:last-child:nth-child(odd) { grid-column: 1 / -1; }   /* al 5-lea, pe tot rândul, pe mobil */
  .index__grid > li:last-child:nth-child(odd) .idx { min-height: 136px; }
}
.idx {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr auto; align-items: start; column-gap: 12px;
  height: 100%; min-height: 176px; padding: 16px; border-radius: 20px;
  background: var(--accent); color: var(--on-accent); text-decoration: none;
}
/* Același efect ca înainte: culoarea „se umple” de jos în sus; aici, într-o nuanță mai adâncă */
.idx::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--accent) 78%, #000);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease);
}
.idx__n { font: 600 .8125rem/1 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: .08em; opacity: .8; }
.idx__a { width: 22px; height: 22px; transition: transform .45s var(--ease); }
.idx__t { grid-column: 1 / -1; align-self: end; padding-top: 28px; font: 700 clamp(1.125rem, 4.6vw, 1.625rem)/1.1 var(--f-display); letter-spacing: -.025em; overflow-wrap: break-word; text-wrap: balance; }
.idx__k { grid-column: 1 / -1; margin-top: 8px; font-size: .875rem; line-height: 1.3; opacity: .8; }
@media (hover: hover) {
  .idx:hover::before { transform: scaleY(1); }
  .idx:hover .idx__a { transform: translateY(4px); }
}
.idx:active::before { transform: scaleY(1); }
.idx:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

@media (min-width: 640px) {
  .index__grid { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .index__grid > li { grid-column: span 2; }
  .index__grid > li:nth-child(n+4) { grid-column: span 3; }
  .idx { min-height: 220px; padding: 22px; }
  .idx__t { font-size: clamp(1.25rem, 2.6vw, 1.625rem); }
}
@media (min-width: 1000px) {
  .index__grid { grid-template-columns: repeat(5, 1fr); }
  .index__grid > li, .index__grid > li:nth-child(n+4) { grid-column: auto; }
  .idx { min-height: 260px; }
  .idx__t { font-size: clamp(1.25rem, 1.9vw, 1.625rem); }
}
/* Aceeași grilă de 5 coloane ca blocurile cărților: „De ce” = primele 3, textul despre A.O. = ultimele 2 */
@media (min-width: 1000px) {
  .intro__cols { grid-template-columns: repeat(5, 1fr); column-gap: 14px; align-items: start; }
  .why { grid-column: span 3; padding-right: clamp(24px, 4vw, 56px); }
  .why > p:not(.eyebrow) { max-width: none; }
  .intro__about { grid-column: span 2; }
}

/* ==========================================================================
   Carte (secțiune full-screen)
   ========================================================================== */
.book { position: relative; display: grid; background: var(--paper); scroll-margin-top: var(--head-full); }
main > .book:nth-child(even) { background: var(--paper-2); }

.book__media { position: relative; aspect-ratio: 4 / 5; max-height: 92svh; width: 100%; background: var(--accent); overflow: hidden; }
.book__body { display: grid; align-content: start; gap: 0; padding: clamp(32px, 7vw, 56px) var(--pad) clamp(56px, 10vw, 96px); }

.book__title { margin-top: 20px; font: 700 clamp(2.5rem, 11vw, 4.75rem)/.95 var(--f-display); letter-spacing: -.04em; text-wrap: balance; }
.book__lead { margin-top: 22px; font: 500 clamp(1.1875rem, 2.4vw, 1.5rem)/1.4 var(--f-display); letter-spacing: -.01em; text-wrap: pretty; }
.prose { display: grid; gap: 14px; margin-top: 18px; color: var(--muted); max-width: 38rem; text-wrap: pretty; }

.specs { margin-top: 28px; max-width: 28rem; border-top: 1px solid var(--line); }
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; text-align: right; }

/* Segmented control: etichetă în fața unui singur câmp; selecția e un glisor în culoarea cărții */
.seg { margin: 28px 0 0; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.seg__label { font: 500 .875rem/1.2 var(--f-body); color: var(--muted); white-space: nowrap; }
.seg__ctl { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 999px; background: var(--accent-soft); }
.seg__opt { position: relative; z-index: 1; cursor: pointer; }
.seg__opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg__opt span { display: block; padding: 10px 20px; border-radius: 999px; text-align: center; font: 600 .9375rem/1 var(--f-body); color: var(--ink); transition: color .25s var(--ease), background-color .25s var(--ease); }
.seg__opt input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg__opt input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Pentru două opțiuni: glisorul se mută fluid (unde :has() nu există, rămâne fundalul simplu de mai sus) */
@supports selector(:has(*)) {
  .seg__ctl::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 2); border-radius: 999px; background: var(--accent); transition: transform .3s var(--ease); }
  .seg__ctl:has(.seg__opt:nth-child(2) input:checked)::before { transform: translateX(100%); }
  .seg__opt input:checked + span { background: transparent; }
}

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.price { display: flex; align-items: baseline; gap: .3em; }
.price strong { font: 700 clamp(2.5rem, 7vw, 3.25rem)/1 var(--f-display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price small { font: 500 1rem/1 var(--f-body); color: var(--muted); }
.buy .btn { flex: 1 1 220px; max-width: 360px; }

/* Desktop: 2 coloane, fotografia lipită sus (sticky), pe toată înălțimea ecranului */
@media (min-width: 900px) {
  .book { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100svh; align-items: start; }
  .book__media { position: sticky; top: var(--head-full); aspect-ratio: auto; max-height: none; height: calc(100svh - var(--head-full)); }
  main > .book:nth-child(odd) .book__media { order: 2; }
  .book__body { min-height: calc(100svh - var(--head-full)); align-content: center; padding: clamp(40px, 6vw, 88px) clamp(40px, 6vw, 96px); }
  .book__title { font-size: clamp(2.75rem, 5vw, 4.75rem); }
}

/* ---------- Slider ---------- */
.slider { position: absolute; inset: 0; }
.slider__track {
  position: relative; display: flex; height: 100%; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track:focus-visible { outline-offset: -6px; --ring: #fff; }
.slide { position: relative; flex: 0 0 100%; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: var(--accent); }
/* Pozele sunt pregătite în raport 4:5, cu fundalul prelungit, deci umplu cadrul fără efecte */
.slide > img { display: block; width: 100%; height: 100%; object-fit: cover; }

.slider__ui {
  position: absolute; inset: auto 0 0 0; z-index: 2; display: flex; align-items: center; gap: 16px;
  padding: 36px var(--pad) 14px; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, .32), transparent);
}
@media (min-width: 900px) { .slider__ui { padding-inline: clamp(24px, 3vw, 40px); } }
.slider__bars { display: flex; gap: 6px; flex: 1; }
.slider__bar { position: relative; flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.slider__bar::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: rgba(255, 255, 255, .5); transition: background-color .3s, height .3s var(--ease), margin .3s var(--ease); }
.slider__bar.is-on::after { background: #fff; height: 4px; margin-top: -2px; }
.slider__count { color: #fff; font: 600 .8125rem/1 var(--f-body); letter-spacing: .1em; font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }

.slider__btn {
  position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; margin-top: -26px; display: none; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer;
  opacity: 0; transition: opacity .3s, transform .25s var(--ease), background-color .2s;
}
.slider__btn--prev { left: 20px; }
.slider__btn--next { right: 20px; }
.slider__btn:hover { background: #fff; transform: scale(1.06); }
@media (hover: hover) and (min-width: 900px) {
  .slider__btn { display: grid; }
  .slider:hover .slider__btn, .slider__btn:focus-visible { opacity: 1; }
}
.slider.is-single .slider__ui, .slider.is-single .slider__btn { display: none; }

/* ---------- Reveal la scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Coș + checkout
   ========================================================================== */
.cart {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden;
}
.cart::backdrop { background: rgba(20, 21, 26, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade-in .35s var(--ease); }
.cart.is-closing::backdrop { animation: fade-out .28s var(--ease) forwards; }
.cart__panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper);
  animation: panel-up .5s var(--ease);
}
.cart.is-closing .cart__panel { animation: panel-down .28s var(--ease) forwards; }
@media (min-width: 700px) {
  .cart__panel { inset: 0 0 0 auto; width: min(500px, 100%); box-shadow: -30px 0 80px rgba(0, 0, 0, .18); animation-name: panel-left; }
  .cart.is-closing .cart__panel { animation-name: panel-right; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes panel-up { from { transform: translateY(5%); opacity: 0; } }
@keyframes panel-down { to { transform: translateY(5%); opacity: 0; } }
@keyframes panel-left { from { transform: translateX(48px); opacity: 0; } }
@keyframes panel-right { to { transform: translateX(48px); opacity: 0; } }

.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px 24px; }
.cart__title { font: 700 1.5rem/1.1 var(--f-display); letter-spacing: -.025em; }

.steps { display: flex; gap: 6px; padding: 8px 24px 16px; counter-reset: s; }
.steps li { position: relative; flex: 1; padding-top: 12px; font: 600 .75rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: #9a9ba1; transition: color .3s; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: 2px; background: var(--line); transition: background-color .4s var(--ease); }
.steps li.is-done, .steps li.is-on { color: var(--ink); }
.steps li.is-done::before, .steps li.is-on::before { background: var(--ink); }

.cart__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; }
.pane { animation: pane-in .45s var(--ease); }
@keyframes pane-in { from { opacity: 0; transform: translateX(14px); } }

.lines { border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 76px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.line__thumb { width: 76px; height: 76px; border-radius: 16px; overflow: hidden; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font: 700 1.75rem/1 var(--f-display); }
.line__thumb img { width: 100%; height: 100%; object-fit: cover; }
.line__main { min-width: 0; }
.line__name { font: 600 1rem/1.3 var(--f-body); }
.line__var, .line__unit { margin-top: 2px; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.qty { display: inline-flex; align-items: center; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); }
.qty button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; font-size: 1.375rem; line-height: 1; cursor: pointer; transition: background-color .2s; }
.qty button:hover:not([disabled]) { background: var(--paper-2); }
.qty button[disabled] { opacity: .3; cursor: default; }
.qty output { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.line__sum { font: 700 1.1875rem/1 var(--f-display); letter-spacing: -.015em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line__rm { margin-top: 10px; padding: 4px 0; border: 0; background: none; color: var(--muted); font-size: .8125rem; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }
.line__rm:hover { color: var(--danger); }

.zone { margin-top: 22px; }
.zone .choice { margin: 0 0 12px; }
.cart__ship { font-size: .875rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }

.empty { display: grid; justify-items: center; gap: 6px; padding: 56px 0; text-align: center; }
.empty__t { font: 700 1.5rem/1.2 var(--f-display); letter-spacing: -.02em; }
.empty__s { color: var(--muted); margin-bottom: 16px; }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label { font: 600 .8125rem/1.2 var(--f-body); color: var(--muted); }
.opt-tag { font-weight: 500; opacity: .75; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line); font: 400 1rem/1.4 var(--f-body); color: var(--ink);
  transition: box-shadow .2s;
}
textarea.input { min-height: 96px; padding: 14px 16px; resize: vertical; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 46px; cursor: pointer;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314151A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 18px;
}
select.input:required:invalid { color: var(--muted); }
.input::placeholder { color: #a3a4aa; }
.input:hover { box-shadow: inset 0 0 0 1.5px #c9c7c0; }
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 5px rgba(20, 21, 26, .08); }
.field.is-invalid .input { box-shadow: inset 0 0 0 2px var(--danger); }
.field__err { display: none; color: var(--danger); font-size: .8125rem; line-height: 1.3; }
.field.is-invalid .field__err { display: block; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 20px; padding: 0; border: 0; min-width: 0; }
.choice--stack { grid-template-columns: 1fr; }
.choice legend { padding: 0; margin-bottom: 10px; font: 600 .8125rem/1.2 var(--f-body); color: var(--muted); }
.choice { position: relative; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; }
.opt__box { display: grid; gap: 3px; height: 100%; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--paper); transition: box-shadow .25s var(--ease), background-color .25s; }
.opt__box strong { font-weight: 700; }
.opt__box small { color: var(--muted); font-size: .875rem; line-height: 1.35; }
.opt__box small s { margin-right: .3em; opacity: .7; }
.opt:hover .opt__box { box-shadow: inset 0 0 0 1.5px #bdbbb3; }
.opt input:checked + .opt__box { box-shadow: inset 0 0 0 2px var(--ink); background: var(--paper-2); }
.opt input:focus-visible + .opt__box { outline: 3px solid var(--ink); outline-offset: 3px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; line-height: 1.5; color: var(--ink) !important; font-weight: 400 !important; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer; }
.check a { font-weight: 600; }
.field--check.is-invalid .check { color: var(--danger) !important; }

.recap { margin-bottom: 20px; padding: 14px 16px; border-radius: 14px; background: var(--paper-2); font-size: .9375rem; line-height: 1.5; color: var(--muted); }
.recap strong { color: var(--ink); }
.recap button { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: .25em; cursor: pointer; }

.pane--done { display: grid; justify-items: center; gap: 12px; padding: 40px 0; text-align: center; }
.done__ico { width: 84px; height: 84px; color: var(--ok); margin-bottom: 8px; }
.done__ico circle, .done__ico path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .8s var(--ease) .1s forwards; }
.done__ico path { animation-delay: .5s; }
.done__t { font: 700 2rem/1.1 var(--f-display); letter-spacing: -.03em; outline: none; }
.done__s { color: var(--muted); max-width: 22rem; }
.done__s strong { color: var(--ink); }
.done__demo { padding: 8px 14px; border-radius: 10px; background: var(--accent-soft); font-size: .8125rem; color: var(--muted); }
.pane--done .btn { margin-top: 16px; }

.cart__foot { padding: 16px 24px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.free { margin-bottom: 14px; }
.free__t { font-size: .875rem; line-height: 1.4; color: var(--muted); }
.free__t strong { color: var(--ink); }
.free__bar { height: 6px; margin-top: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.free__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sun); transition: width .6s var(--ease), background-color .3s; }
.free.is-done .free__bar i { background: var(--ok); }
.free.is-done .free__t strong { color: var(--ok); }

.totals { display: grid; gap: 6px; margin-bottom: 14px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; color: var(--muted); }
.totals dd { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.totals__grand { padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--line); font: 700 1.25rem/1.2 var(--f-display) !important; letter-spacing: -.02em; color: var(--ink) !important; }
.totals__grand dd { font-weight: 700; }
.cart__error { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: #FCE9E7; color: var(--danger); font-size: .875rem; line-height: 1.4; }
.cart__actions { display: flex; gap: 10px; }
.cart__actions .btn { flex: 1; }
.cart__actions .btn--ghost { flex: 0 0 auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; translate: -50% 0;
  display: flex; align-items: center; gap: 18px; width: max-content; max-width: calc(100% - 32px);
  padding: 12px 12px 12px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .9375rem;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); animation: toast-in .5s var(--ease);
}
.toast.is-out { animation: toast-out .3s var(--ease) forwards; }
.toast__act { padding: 10px 18px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; white-space: nowrap; --ring: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot { --ring: #fff; background: var(--ink); color: #EDEBE6; padding: clamp(56px, 9vw, 104px) 0 36px; }
.foot__grid { display: grid; gap: 36px 32px; grid-template-columns: 1fr; }
.foot p { font-size: .9375rem; line-height: 1.7; }
.foot a { text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: .25em; transition: text-decoration-color .2s, color .2s; }
.foot a:hover { color: #fff; text-decoration-color: #fff; }
.foot__h { margin-bottom: 12px; font: 600 .75rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #9a9ba1; }
.brand--light { margin-left: 0; color: #fff; }
.foot__hi { margin-top: 20px; font: 600 1.375rem/1.2 var(--f-display) !important; letter-spacing: -.02em; color: #fff; }
.foot__social { display: flex; gap: 18px; margin-top: 10px; }
.foot__pay { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: clamp(32px, 5vw, 48px); }
.foot__pay .foot__h { margin: 0; }
/* Logo-urile (PNG) stau direct pe fundalul footerului, ca pe situl vechi */
.foot__logos { display: block; width: 170px; height: auto; }
.foot__legal { margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); max-width: 64rem; font-size: .8125rem !important; line-height: 1.7 !important; color: #9a9ba1; }
@media (min-width: 640px) { .foot__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

.noscript { padding: 16px var(--pad); background: var(--accent-soft); text-align: center; font-size: .9375rem; }

/* ---------- Mișcare redusă ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
