/* ==========================================================================
   Belbio Cosmetics — design system (mockups)
   White base · beige touches · green accents only
   ========================================================================== */
:root {
  --white: #ffffff;
  --ivory: #faf8f4;
  --sand-50: #f7f3ec;
  --sand-100: #f1ece3;
  --sand-200: #e6ddcf;
  --sand-400: #c9b9a0;
  --ink: #1e2420;
  --ink-80: #3a403c;
  --ink-60: #5c625d;
  --ink-40: #8b908c;
  --line: #e9e4db;
  --leaf-900: #163826;
  --leaf-700: #1f4b32;
  --leaf-500: #3d7353;
  --leaf-100: #e4ece5;
  --clay: #b08a5a;
  --danger: #b4452f;
  --warn: #b7791f;
  --ok: #2f7a4b;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Manrope", "Inter", system-ui, -apple-system, sans-serif;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 36, 32, .06);
  --shadow: 0 10px 30px -12px rgba(30, 36, 32, .18);
  --shadow-lg: 0 30px 60px -20px rgba(30, 36, 32, .25);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1440px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--leaf-100); color: var(--leaf-900); }
:focus-visible { outline: 2px solid var(--leaf-700); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; line-height: 1.02; }
.display em, .h1 em, .h2 em { font-style: italic; font-weight: 400; color: var(--leaf-700); }
.h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(50px, 8.2vw, 124px); line-height: .95; letter-spacing: -.015em; margin: 0; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.9vw, 72px); line-height: 1.02; letter-spacing: -.01em; margin: 0; }
.h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 34px); line-height: 1.12; letter-spacing: 0; margin: 0; }
.eyebrow { font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-60); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.lead { font-size: clamp(15px, 1.25vw, 18px); color: var(--ink-60); max-width: 46ch; }
.muted { color: var(--ink-60); }
.small { font-size: 13px; }
.price { font-weight: 600; font-variant-numeric: tabular-nums; }
.price s { color: var(--ink-40); font-weight: 400; margin-left: 6px; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  font: 600 14px/1 var(--sans); letter-spacing: .02em;
  overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn::after { /* fill sweep */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--leaf-700); transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::after { transform: translateY(0); }
.btn:active { transform: scale(.97); }
.btn--green { --bg: var(--leaf-700); }
.btn--green::after { background: var(--leaf-900); }
.btn--ghost { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost:hover { --fg: #fff; }
.btn--light { --bg: #fff; --fg: var(--ink); }
.btn--light:hover { --fg: #fff; }
.btn--sm { height: 40px; padding: 0 18px; font-size: 13px; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .4s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* button states: loading (drops) → done (check) */
.btn .btn__label, .btn .btn__drops, .btn .btn__done { transition: opacity .25s, transform .35s var(--ease); }
.btn .btn__drops, .btn .btn__done { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(8px); }
.btn.is-loading .btn__label, .btn.is-done .btn__label { opacity: 0; transform: translateY(-8px); }
.btn.is-loading .btn__drops { opacity: 1; transform: none; }
.btn.is-done .btn__done { opacity: 1; transform: none; }
.btn.is-done { --bg: var(--leaf-700); }
.drops { display: inline-flex; gap: 6px; align-items: flex-end; height: 14px; }
.drops i { width: 7px; height: 9px; background: currentColor; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; animation: drop 1s var(--ease-in-out) infinite; }
.drops i:nth-child(2) { animation-delay: .15s; }
.drops i:nth-child(3) { animation-delay: .3s; }
@keyframes drop { 0%, 100% { transform: translateY(0) scale(1); opacity: .5; } 40% { transform: translateY(-6px) scale(1.12); opacity: 1; } }
.check-draw path { stroke-dasharray: 30; stroke-dashoffset: 30; }
.is-done .check-draw path { animation: draw .5s .1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.link { position: relative; font-weight: 600; font-size: 13px; letter-spacing: .04em; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform-origin: right; transition: transform .5s var(--ease); }
.link:hover::after { transform: scaleX(0); transform-origin: left; animation: relink .5s .45s var(--ease) forwards; }
@keyframes relink { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }

.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: background .25s; position: relative; }
.icon-btn:hover { background: var(--sand-100); }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); font: 600 11px/1 var(--sans); letter-spacing: .04em; background: #fff; color: var(--ink); }
.badge--green { background: var(--leaf-700); color: #fff; }
.badge--soft { background: var(--leaf-100); color: var(--leaf-900); }
.badge--sand { background: var(--sand-100); color: var(--ink-80); }
.badge--clay { background: #f4ebdf; color: #7a5a31; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(47,122,75,.4); animation: ping 2s infinite; }
.dot--warn { background: var(--warn); animation-name: pingw; }
.dot--out { background: var(--danger); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47,122,75,.45); } 80%, 100% { box-shadow: 0 0 0 7px rgba(47,122,75,0); } }
@keyframes pingw { 0% { box-shadow: 0 0 0 0 rgba(183,121,31,.45); } 80%, 100% { box-shadow: 0 0 0 7px rgba(183,121,31,0); } }

.chip { height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line); font-weight: 500; font-size: 13px; transition: border-color .2s, background .2s, color .2s; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.chip:hover { border-color: var(--ink-40); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* segmented pill (sliding) */
.seg { position: relative; display: inline-flex; padding: 4px; background: var(--sand-100); border-radius: var(--r-pill); }
.seg button { position: relative; z-index: 1; height: 36px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 600; font-size: 13px; color: var(--ink-60); transition: color .3s; }
.seg button.is-active { color: var(--ink); }
.seg__pill { position: absolute; top: 4px; bottom: 4px; border-radius: var(--r-pill); background: #fff; box-shadow: var(--shadow-sm); transition: left .45s var(--ease), width .45s var(--ease); }

.stars { display: inline-flex; gap: 2px; color: var(--clay); }
.stars svg { width: 14px; height: 14px; fill: currentColor; }
.stars .off { color: var(--sand-200); }

/* ---------- Topbar & header ---------- */
.topbar { background: var(--leaf-900); color: #e9efe9; font-size: 12px; letter-spacing: .04em; height: 36px; overflow: hidden; }
.topbar__track { display: flex; gap: 64px; white-space: nowrap; height: 100%; align-items: center; animation: marquee 56s linear infinite; width: max-content; }
.topbar__track span { display: inline-flex; align-items: center; gap: 10px; }
.topbar__track span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--sand-400); }
@keyframes marquee { to { transform: translateX(-50%); } }

.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.0); transition: background .4s, box-shadow .4s, backdrop-filter .4s; }
.header.is-solid { background: rgba(255,255,255,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.header__inner { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; transition: height .4s var(--ease); }
.header.is-solid .header__inner { height: 60px; }
.header__logo img { height: 40px; width: auto; transition: height .4s var(--ease); }
.header.is-solid .header__logo img { height: 32px; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 13px; font-weight: 500; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__actions { display: flex; justify-content: flex-end; gap: 4px; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--leaf-700); color: #fff; font: 700 10px/18px var(--sans); text-align: center; transform: scale(0); transition: transform .4s var(--ease); }
.cart-count.has { transform: scale(1); }
.cart-count.pop { animation: pop .6s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.5); } 100% { transform: scale(1); } }
.burger { display: none; }
.header--over { position: fixed; left: 0; right: 0; color: #fff; }
.header--over.is-solid { color: var(--ink); }
.header--over:not(.is-solid) .header__logo img { filter: brightness(0) invert(1); }

.header__left { display: flex; align-items: center; gap: 4px; min-width: 0; }
.search-m { display: none; }

/* Phone/tablet: [menu + search] [logo, truly centered] [tracking + cart] */
@media (max-width: 960px) {
  .nav, .search-d { display: none; }
  .burger, .search-m { display: grid; }
  .header__inner { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .header__logo { justify-self: center; }
  .header__logo img { height: 34px; }
}

/* mobile menu */
.menu { position: fixed; inset: 0; z-index: 90; background: var(--ivory); transform: translateY(-100%); transition: transform .7s var(--ease); display: flex; flex-direction: column; padding: 20px var(--gutter) 32px; }
.menu.is-open { transform: none; }
.menu__links { margin-top: 48px; display: grid; gap: 6px; }
.menu__links a { font: 400 48px/1.1 var(--serif); letter-spacing: -.02em; opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .6s var(--ease); }
.menu.is-open .menu__links a { opacity: 1; transform: none; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: .06s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: .12s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: .18s; }
.menu.is-open .menu__links a:nth-child(5) { transition-delay: .24s; }
.menu.is-open .menu__links a:nth-child(6) { transition-delay: .3s; }
.menu__foot { margin-top: auto; display: grid; gap: 10px; font-size: 14px; }

/* ---------- Intro loader (first visit) ---------- */
.intro { position: fixed; inset: 0; z-index: 200; background: var(--ivory); display: grid; place-items: center; transition: transform 1s var(--ease-in-out) .1s, border-radius 1s var(--ease-in-out) .1s; }
.intro.is-out { transform: translateY(-100%); border-radius: 0 0 50% 50% / 0 0 12% 12%; }
.intro__mark { display: grid; justify-items: center; gap: 18px; }
.intro__leaf { width: 64px; height: 64px; }
.intro__leaf path { fill: transparent; stroke: var(--leaf-700); stroke-width: 1.4; stroke-dasharray: 220; stroke-dashoffset: 220; animation: leafdraw 1.1s var(--ease) forwards, leaffill .5s .9s forwards; }
.intro__leaf .vein { fill: none !important; stroke: var(--ivory); animation: leafdraw 1.1s var(--ease) forwards; animation-delay: .5s; }
@keyframes leafdraw { to { stroke-dashoffset: 0; } }
@keyframes leaffill { to { fill: var(--leaf-700); } }
.intro__word { font: 400 13px/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: var(--ink-60); opacity: 0; animation: fadeup .8s .5s var(--ease) forwards; padding-left: .5em; }
.intro__bar { width: 120px; height: 1px; background: var(--sand-200); position: relative; overflow: hidden; }
.intro__bar::after { content: ""; position: absolute; inset: 0; background: var(--leaf-700); transform: scaleX(0); transform-origin: left; animation: bar 1.2s .2s var(--ease) forwards; }
@keyframes bar { to { transform: scaleX(1); } }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* route progress line */
.route-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300; pointer-events: none; }
.route-progress i { display: block; height: 100%; background: var(--leaf-700); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease), opacity .4s; }
.route-progress.is-on i { transform: scaleX(.7); transition-duration: 1.4s; }
.route-progress.is-done i { transform: scaleX(1); opacity: 0; }

/* page curtain transition */
.curtain { position: fixed; inset: 0; z-index: 250; background: var(--sand-100); transform: translateY(100%); pointer-events: none; display: grid; place-items: center; }
.curtain.is-in { transition: transform .6s var(--ease-in-out); transform: none; }
.curtain svg { width: 34px; height: 34px; animation: sway 1.4s var(--ease-in-out) infinite; }

/* leaf spinner */
.leaf-spin { width: 20px; height: 20px; animation: spin 1.1s var(--ease-in-out) infinite; color: var(--leaf-700); }
.leaf-spin--lg { width: 34px; height: 34px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }

/* ---------- Skeletons ---------- */
.sk { position: relative; overflow: hidden; background: var(--sand-100); border-radius: var(--r-sm); }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk--line { height: 12px; border-radius: 6px; }
.sk--title { height: 20px; border-radius: 6px; }
.sk--card { aspect-ratio: 4/5; border-radius: var(--r); }
.sk--circle { border-radius: 50%; }
.sk-stack { display: grid; gap: 10px; }
.sk-leaf { position: absolute; inset: 0; display: grid; place-items: center; color: var(--sand-200); z-index: 1; }
.sk-leaf svg { width: 36px; height: 36px; animation: breathe 1.8s var(--ease-in-out) infinite; }
@keyframes breathe { 0%, 100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
[data-skeleton] > .is-real { display: none; }
[data-skeleton].is-ready > .is-real { display: block; animation: fadein .6s var(--ease); }
[data-skeleton].is-ready > .is-sk { display: none; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease); }
[data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
[data-reveal="clip"] img { transform: scale(1.15); transition: transform 1.6s var(--ease); }
[data-reveal="clip"].is-in img { transform: scale(1); }
.split-line { display: block; overflow: hidden; }
.split-line > span { display: block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-in .split-line > span, .split-line.is-in > span { transform: none; }
.split-line:nth-child(2) > span { transition-delay: .08s; }
.split-line:nth-child(3) > span { transition-delay: .16s; }
.split-line:nth-child(4) > span { transition-delay: .24s; }

/* ---------- Product card ---------- */
.pcard { position: relative; display: grid; gap: 14px; container-type: inline-size; }
/* quick-add sits on the photo's bottom corner (photo is 4:5, so its height is 125% of the card width) */
.pcard__quick { top: calc(125cqw - 56px); bottom: auto !important; }
.pcard__media { position: relative; aspect-ratio: 4/5; border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.pcard__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .7s var(--ease); }
.pcard__media img.alt { opacity: 0; }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard:hover .pcard__media img.alt { opacity: 1; }
.pcard__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.pcard__quick { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .45s var(--ease), background .3s, color .3s, width .45s var(--ease); overflow: hidden; }
.pcard__quick:hover { background: var(--ink); color: #fff; }
.pcard__quick.is-done { background: var(--leaf-700); color: #fff; }
.pcard__quick .qa-txt { display: none; }
@media (max-width: 720px) {
  /* phones: a labelled "Ajouter" pill instead of an icon-only button */
  .pcard__quick { width: auto !important; height: 36px !important; padding: 0 12px 0 8px; border-radius: 999px !important; display: inline-flex !important; gap: 4px; font-weight: 600; font-size: 12px; }
  .pcard__quick .qa-txt { display: inline; }
  .pcard__quick .icon { width: 16px; height: 16px; }
  .pcard__quick { top: calc(125cqw - 44px); right: 8px !important; }
}
/* order tracking label */
.track-link { width: auto !important; padding: 0 10px; gap: 6px; border-radius: 999px !important; display: inline-flex !important; align-items: center; font-size: 12px; font-weight: 600; }
@media (max-width: 960px) { .track-txt { display: none; } .track-link { width: 44px !important; padding: 0; justify-content: center; } }
/* search overlay */
.search { position: fixed; left: 0; right: 0; top: 0; z-index: 95; background: #fff; transform: translateY(-100%); transition: transform .5s var(--ease); box-shadow: var(--shadow-lg); max-height: 88svh; overflow: auto; padding-bottom: 28px; }
.search.is-open { transform: none; }
.search__bar { display: flex; align-items: center; gap: 12px; height: 76px; border-bottom: 1px solid var(--line); }
.search__bar > svg { width: 22px; height: 22px; color: var(--ink-60); flex: none; }
.search__bar input { flex: 1; min-width: 0; border: 0; outline: 0; font: 400 clamp(22px, 3vw, 32px) var(--serif); background: none; }
.search__hint { margin: 22px 0 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-60); }
.search__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.search__item { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; transition: background .25s; }
.search__item:hover, .search__item:focus-visible { background: var(--ivory); }
.search__item img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.search__item b { display: block; font: 500 19px var(--serif); }
.search__item span span { font-size: 12px; color: var(--ink-60); display: block; }
.search__item em { font-style: normal; font-weight: 600; font-size: 13px; }
.pcard__wish { position: absolute; top: 10px; right: 10px; z-index: 2; }
.pcard__body { display: grid; gap: 4px; }
.pcard__title { font: 500 22px/1.15 var(--serif); }
.pcard__sub { font-size: 12px; color: var(--ink-60); }
.pcard__row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.pcard__row .price { white-space: nowrap; }
.pcard__badges .badge { white-space: nowrap; }
@media (max-width: 720px) {
  .pcard__row { flex-wrap: wrap; gap: 2px 8px; }
  .pcard__badges { flex-wrap: wrap; right: 8px; }
  .pcard__badges .badge { font-size: 10px; padding: 4px 8px; }
}
.pcard--out .pcard__media img { filter: grayscale(.35) opacity(.8); }
@media (hover: none) { .pcard__media img.alt { display: none; } }

.grid-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; }
@media (max-width: 1100px) { .grid-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid-products { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; } .pcard__title { font-size: 18px; } .pcard__quick { width: 38px; height: 38px; right: 8px; bottom: 8px; } }

/* ---------- Drawer (cart) ---------- */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(22, 30, 25, .35); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); backdrop-filter: blur(2px); }
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 85; width: min(460px, 100vw); background: #fff; transform: translateX(100%); transition: transform .7s var(--ease); display: flex; flex-direction: column; }
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow: auto; padding: 8px 24px 24px; }
.drawer__foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: grid; gap: 14px; background: var(--ivory); }
.free-ship { display: grid; gap: 8px; font-size: 12px; color: var(--ink-60); padding: 16px 0; }
.free-ship__bar { height: 4px; background: var(--sand-200); border-radius: 2px; overflow: hidden; }
.free-ship__bar i { display: block; height: 100%; background: var(--leaf-700); border-radius: 2px; transition: width .9s var(--ease); }

.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line.is-new { animation: flashline 1.6s var(--ease); }
@keyframes flashline { 0% { background: var(--leaf-100); } 100% { background: transparent; } }
.line__img { aspect-ratio: 4/5; border-radius: var(--r-sm); overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__name { font: 400 17px/1.2 var(--serif); }
.line.is-leaving { animation: leave .45s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; } }

.qty { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.qty button { width: 34px; height: 100%; display: grid; place-items: center; font-size: 16px; }
.qty output { min-width: 22px; text-align: center; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.qty output.bump { animation: bump .35s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }
.qty--lg { height: 52px; }
.qty--lg button { width: 46px; }

.upsell { display: grid; gap: 10px; margin-top: 18px; }
.upsell__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--ivory); opacity: 0; transform: translateY(12px); }
.drawer.is-open .upsell__item { animation: fadeup .6s var(--ease) forwards; }
.drawer.is-open .upsell__item:nth-child(2) { animation-delay: .1s; }
.drawer.is-open .upsell__item:nth-child(3) { animation-delay: .2s; }
.upsell__item img { width: 56px; height: 70px; object-fit: cover; border-radius: 8px; }

/* fly to cart */
.flyer { position: fixed; z-index: 400; border-radius: 12px; overflow: hidden; pointer-events: none; box-shadow: var(--shadow); transition: transform .8s cubic-bezier(.5, -0.2, .3, 1), opacity .8s, border-radius .8s; }
.flyer img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 500; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: 14px; animation: toastin .55s var(--ease); }
.toast.is-out { animation: toastout .4s var(--ease) forwards; }
.toast__icon { width: 28px; height: 28px; border-radius: 50%; background: var(--leaf-500); display: grid; place-items: center; flex: none; }
.toast--error .toast__icon { background: var(--danger); }
.toast a { margin-left: auto; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@keyframes toastin { from { opacity: 0; transform: translateY(20px) scale(.96); } }
@keyframes toastout { to { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ---------- WhatsApp FAB ---------- */
.wa { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6); transition: transform .4s var(--ease); }
.wa:hover { transform: scale(1.08) rotate(-6deg); }
.wa svg { width: 28px; height: 28px; fill: currentColor; }
.wa.pulse::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: waring 1.6s var(--ease) 2; }
@keyframes waring { to { transform: scale(1.7); opacity: 0; } }
.wa__tip { position: absolute; right: 68px; white-space: nowrap; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 12px; font-size: 13px; box-shadow: var(--shadow); opacity: 0; transform: translateX(10px); transition: .4s var(--ease); pointer-events: none; }
.wa.show-tip .wa__tip { opacity: 1; transform: none; }
.wa { transition: transform .4s var(--ease), opacity .3s, bottom .4s var(--ease); }
.wa.is-away { opacity: 0; transform: translateY(24px) scale(.6); pointer-events: none; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 8px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink-80); }
.input, .select, .textarea { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; transition: border-color .2s, box-shadow .2s; font-size: 15px; }
.textarea { height: auto; min-height: 100px; padding: 14px 16px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%235c625d' stroke-width='1.5'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--leaf-700); box-shadow: 0 0 0 4px var(--leaf-100); }
.field.is-error .input, .field.is-error .select { border-color: var(--danger); box-shadow: 0 0 0 4px #f6e1dc; }
.field__hint { font-size: 12px; color: var(--ink-60); min-height: 0; }
.field.is-error .field__hint { color: var(--danger); }
.field.is-valid .input { border-color: var(--leaf-500); }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.radio-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color .25s, background .25s; }
.radio-card:has(input:checked) { border-color: var(--leaf-700); background: #f6faf6; }
.radio-card input { accent-color: var(--leaf-700); width: 18px; height: 18px; }

/* ---------- Accordion ---------- */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; text-align: left; font: 400 clamp(17px, 1.6vw, 21px)/1.3 var(--serif); }
.acc__icon { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s, color .3s; }
.acc__item.is-open .acc__icon { transform: rotate(45deg); background: var(--ink); color: #fff; border-color: var(--ink); }
.acc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { margin: 0 0 22px; color: var(--ink-60); max-width: 60ch; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); position: relative; overflow-x: auto; scrollbar-width: none; }
.tabs button { padding: 14px 0; font-weight: 600; font-size: 14px; color: var(--ink-60); transition: color .3s; white-space: nowrap; }
.tabs button.is-active { color: var(--ink); }
.tabs__ink { position: absolute; bottom: -1px; height: 2px; background: var(--ink); transition: left .45s var(--ease), width .45s var(--ease); }
.tabpanel { animation: fadein .5s var(--ease); }

/* ---------- Footer ---------- */
.footer { background: var(--ivory); padding-top: clamp(64px, 8vw, 120px); overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-60); margin: 0 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }
.footer a:hover { color: var(--leaf-700); }
.footer__word { font: 400 clamp(84px, 22vw, 360px)/.8 var(--serif); letter-spacing: -.03em; text-align: center; margin-top: clamp(48px, 7vw, 100px); white-space: nowrap; color: var(--ink); user-select: none; }
.footer__word em { font-style: italic; color: var(--leaf-700); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-60); }
.socials { display: flex; gap: 8px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.socials a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Section rhythm ---------- */
.section { padding-block: clamp(56px, 7vw, 108px); }
.section--tight { padding-block: clamp(36px, 4.5vw, 64px); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 4vw, 56px); flex-wrap: wrap; }

/* ---------- Empty state ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 56px 16px; }
.empty__art { width: 120px; height: 120px; border-radius: 50%; background: var(--sand-100); display: grid; place-items: center; color: var(--sand-400); }
.empty__art svg { width: 54px; height: 54px; animation: sway 3s var(--ease-in-out) infinite; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal], [data-reveal="clip"], .split-line > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .topbar__track { animation: none; }
}

/* short button labels on phones */
.lbl-sm { display: none; }
@media (max-width: 480px) { .lbl-lg { display: none; } .lbl-sm { display: inline; } }
