/* Design tokens ported from the wime-wellness-market (Lovable) design. */
:root {
  --radius: 0.875rem;
  --background: oklch(0.975 0.012 85);
  --foreground: oklch(0.24 0.03 150);
  --card: oklch(0.995 0.005 85);
  --primary: oklch(0.38 0.07 155);
  --primary-foreground: oklch(0.98 0.01 85);
  --secondary: oklch(0.93 0.025 85);
  --secondary-foreground: oklch(0.3 0.04 150);
  --muted: oklch(0.94 0.018 85);
  --muted-foreground: oklch(0.5 0.025 140);
  --accent: oklch(0.72 0.12 70);
  --accent-foreground: oklch(0.22 0.03 60);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.89 0.02 85);
  --ring: var(--primary);
  --shadow-soft: 0 12px 30px -14px color-mix(in oklab, var(--primary) 35%, transparent);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-3xl: calc(var(--radius) + 12px);
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.5 var(--font-sans);
}
main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; font-weight: 600; margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.wrap { width: min(72rem, 100%); margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.875rem; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; margin-bottom: 0; }

.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

/* ── header ── */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 90%, transparent);
  backdrop-filter: blur(8px);
}
.header-row { height: 64px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.wordmark span { color: var(--accent); }
.header-nav { display: none; gap: 32px; font-size: 0.875rem; }
.header-nav a { text-decoration: none; }
.header-nav a:hover { color: var(--primary); }
@media (min-width: 640px) { .header-nav { display: flex; } }
.icon-button { position: relative; display: grid; place-items: center; padding: 8px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
.icon-button:hover { background: var(--secondary); }
.cart-count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-foreground);
  font-size: 0.75rem; font-weight: 700;
}
.cart-count[hidden] { display: none; }

/* ── hero ── */
.hero { display: grid; gap: 40px; align-items: center; padding-block: 48px; }
@media (min-width: 768px) { .hero { grid-template-columns: 1fr 1fr; padding-block: 80px; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 4px 12px; border-radius: 999px;
  background: var(--secondary); color: var(--secondary-foreground); font-size: 0.875rem;
}
.hero h1 { font-size: 2.25rem; line-height: 1.25; }
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; line-height: 1.1; } }
.lede { margin-top: 20px; max-width: 28rem; font-size: 1.125rem; color: var(--muted-foreground); }
.hero .btn-lg { margin-top: 32px; }

/* real product photos on one surface: multiply drops their white/grey backgrounds into the panel */
.hero-shelf {
  aspect-ratio: 4 / 3; border-radius: var(--radius-3xl); box-shadow: var(--shadow-soft);
  background: radial-gradient(120% 90% at 50% 100%, var(--muted) 0%, var(--secondary) 70%);
  display: flex; align-items: flex-end; justify-content: center; gap: 2%;
  padding: 6% 6% 7%; overflow: hidden;
}
.hero-shelf img { mix-blend-mode: multiply; object-fit: contain; min-width: 0; }
.shelf-main { height: 100%; width: auto; flex: 0 1 auto; margin-inline: -6%; }
.shelf-side { height: 72%; width: auto; }

/* ── trust strip ── */
.trust { border-block: 1px solid var(--border); background: var(--card); }
.trust-row { list-style: none; margin: 0 auto; display: grid; gap: 16px 24px; padding-block: 24px; font-size: 0.875rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .trust-row { grid-template-columns: repeat(4, 1fr); } }
.trust-row li { display: flex; align-items: center; gap: 12px; }
.trust-row .icon { color: var(--primary); }

/* ── shop ── */
.shop { padding-block: 64px; }
.shop-head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
@media (min-width: 640px) { .shop-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.shop-head h2 { font-size: 1.875rem; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); font-size: 0.875rem; cursor: pointer; transition: background-color .15s, color .15s;
}
.filter:hover { background: var(--secondary); }
.filter[aria-pressed='true'] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

.product-grid { display: grid; gap: 24px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-3xl); background: var(--card);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-soft); }
.card.skeleton { min-height: 420px; background: linear-gradient(90deg, var(--card), var(--muted), var(--card)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .card.skeleton { animation: none; } }
.card-media { display: block; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; background: var(--muted); cursor: pointer; }
.product-img { width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; transition: transform .5s; }
.card:hover .product-img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .product-img { transition: none; } .card:hover .product-img { transform: none; } }
.img-placeholder { display: grid; place-items: center; font-family: var(--font-display); font-size: 3rem; color: var(--muted-foreground); mix-blend-mode: normal; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); }
.card-body h3 { margin-top: 4px; font-size: 1.25rem; }
.card-body h3 button { all: unset; cursor: pointer; }
.card-body h3 button:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-body h3 button:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.tagline { margin-top: 8px; flex: 1; font-size: 0.875rem; color: var(--muted-foreground); }
.card-foot { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 1.125rem; font-weight: 700; }
.card.is-out .product-img { opacity: .6; }
.badge-out { padding: 6px 12px; border-radius: 999px; background: var(--secondary); color: var(--muted-foreground); font-size: 0.875rem; }
.notice { padding: 14px 16px; border-radius: var(--radius-xl); background: var(--secondary); color: var(--secondary-foreground); margin-bottom: 24px; }
.empty { color: var(--muted-foreground); }

/* ── footer ── */
.site-footer { border-top: 1px solid var(--border); background: var(--card); }
.footer-row { display: flex; flex-direction: column; gap: 8px; padding-block: 40px; font-size: 0.875rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .footer-row { flex-direction: row; justify-content: space-between; } }
.footer-brand { font-family: var(--font-display); font-size: 1.125rem; color: var(--foreground); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.875rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: opacity .15s, background-color .15s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover:not(:disabled) { opacity: .9; }
.btn-lg { height: 48px; padding-inline: 28px; font-size: 1rem; box-shadow: var(--shadow-soft); }
.btn-block { width: 100%; height: 48px; font-size: 1rem; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--secondary); }
.btn-danger { background: transparent; border-color: var(--destructive); color: var(--destructive); }
.btn-sm { padding: 6px 12px; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font-size: 0.875rem; color: var(--muted-foreground); text-decoration: underline; }

.qty { display: flex; align-items: center; gap: 12px; }
.qty button { display: grid; place-items: center; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: transparent; cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--secondary); }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty span { min-width: 1.5ch; text-align: center; }

/* ── dialogs ── */
dialog { border: 0; padding: 0; color: var(--foreground); background: var(--background); }
dialog::backdrop { background: color-mix(in oklab, var(--foreground) 40%, transparent); }

.drawer {
  margin: 0 0 0 auto; width: 100%; max-width: 28rem;
  height: 100dvh; max-height: 100dvh; display: none; flex-direction: column;
  box-shadow: var(--shadow-soft);
}
.drawer[open] { display: flex; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 1.5rem; }
.drawer-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.cart-lines { list-style: none; margin: 0; padding: 20px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.cart-line { display: flex; gap: 16px; }
.cart-thumb { width: 80px; height: 80px; flex: none; border-radius: var(--radius-xl); background: var(--muted); overflow: hidden; }
.cart-thumb .product-img { padding: 6%; }
.cart-thumb .img-placeholder { width: 100%; height: 100%; font-size: 1.5rem; }
.cart-line-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cart-line-name { font-weight: 500; line-height: 1.3; }
.cart-line-info .qty { margin-top: auto; padding-top: 6px; }
.drawer-foot { border-top: 1px solid var(--border); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.total-row { display: flex; justify-content: space-between; font-size: 1.125rem; font-weight: 700; }
.empty-cart { flex: 1; display: grid; place-items: center; padding: 32px; text-align: center; color: var(--muted-foreground); }
.empty-cart > div { display: flex; flex-direction: column; gap: 16px; align-items: center; }

.checkout { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 20px; overflow-y: auto; }
.checkout .total-row { margin-top: auto; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 0.875rem; font-weight: 500; }
.optional { color: var(--muted-foreground); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card); font-size: 1rem; font-weight: 400;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; box-shadow: 0 0 0 2px var(--ring); }
.hint { font-size: 0.8125rem; color: var(--muted-foreground); font-weight: 400; }
.form-error { padding: 10px 12px; border-radius: var(--radius-xl); background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); font-size: 0.875rem; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }

.done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 20px; text-align: center; }
.done-icon { width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; background: var(--secondary); color: var(--primary); }
.done-icon .icon { width: 32px; height: 32px; }
.done h3 { font-size: 1.5rem; }
.done p { max-width: 32ch; color: var(--muted-foreground); }

.modal { width: min(48rem, 100% - 32px); border-radius: var(--radius-3xl); box-shadow: var(--shadow-soft); background: var(--card); }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 1; background: var(--card); }
.pd { display: grid; }
@media (min-width: 640px) { .pd { grid-template-columns: 1fr 1fr; } }
.pd-media { aspect-ratio: 1; background: var(--muted); }
.pd-info { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.pd-info h2 { font-size: 1.75rem; padding-right: 32px; }
.pd-desc { white-space: pre-line; color: var(--muted-foreground); }
.pd-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ── admin ── */
.admin-main { padding-block: 32px 64px; }
.login-card { max-width: 400px; margin: 48px auto; padding: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-3xl); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-soft); }
.login-card h1 { font-size: 1.75rem; }
.tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 0.875rem; cursor: pointer; }
.tab[aria-selected='true'] { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .field { flex-direction: row; align-items: center; gap: 8px; }
.toolbar select { width: auto; }
.list { display: flex; flex-direction: column; gap: 12px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.order-head h3 { font-size: 1.15rem; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px 24px; margin-top: 12px; }
.order-items { margin: 0; padding-left: 18px; }
.kv { margin: 0; }
.kv dt { font-size: 0.75rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; }
.kv dd { margin: 0 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.status { padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--secondary); }
.status-new { background: color-mix(in oklab, var(--accent) 30%, transparent); }
.status-confirmed { background: color-mix(in oklab, var(--primary) 18%, transparent); }
.status-cancelled { color: var(--destructive); }
.product-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; }
.product-row .cart-thumb { width: 56px; height: 56px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; background: var(--secondary); color: var(--muted-foreground); margin-left: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; }
  .product-row { grid-template-columns: 48px 1fr; } .product-row .row-actions { grid-column: span 2; justify-content: flex-start; }
}
.preview-img { width: 120px; height: 120px; object-fit: contain; border-radius: var(--radius-xl); border: 1px solid var(--border); background: var(--muted); }
.preview-wide { width: 200px; object-fit: cover; }
.hero-fieldset { margin: 4px 0 0; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-xl); display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.hero-fieldset legend { padding: 0 6px; font-weight: 600; font-family: var(--font-display); }
.tag-hero { background: color-mix(in oklab, var(--accent) 30%, transparent); color: var(--accent-foreground); }
.toast { position: fixed; bottom: 20px; left: 50%; translate: -50% 0; background: var(--foreground); color: var(--background); padding: 10px 16px; border-radius: var(--radius-xl); z-index: 100; font-weight: 500; }
.btn-whatsapp { background: var(--primary); color: var(--primary-foreground); }
.btn-whatsapp:hover { opacity: .9; }
img.cart-thumb { object-fit: contain; padding: 4px; }
[tabindex="-1"]:focus { outline: none; }

/* ── mobile-friendly layer ── */
:root { --safe-bottom: env(safe-area-inset-bottom, 0px); }
.hero h1 { font-size: clamp(2rem, 4.5vw + 1rem, 3.75rem); }
.header-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; }
.icon-button { min-width: 44px; min-height: 44px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; }
.card-body h3 button { display: inline; padding-block: 6px; }
#footer-whatsapp { display: inline-block; padding-block: 12px; font-weight: 500; color: var(--primary); }
.filter { min-height: 40px; }

/* sticky cart bar (phones only) */
.cart-bar {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-soft), 0 6px 20px -8px rgb(0 0 0 / .35);
  font-size: 1rem; font-weight: 500; cursor: pointer;
}
.cart-bar[hidden] { display: none; }
.cart-bar-cta { font-weight: 700; }
@media (min-width: 640px) { .cart-bar { display: none !important; } }

.drawer-foot, .checkout { padding-bottom: calc(20px + var(--safe-bottom)); }

@media (max-width: 639px) {
  body.has-cart-bar .site-footer { padding-bottom: 80px; }
  .hero { gap: 24px; padding-block: 28px 32px; }
  .lede { margin-top: 14px; font-size: 1rem; }
  .hero .btn-lg { margin-top: 22px; }
  .hero-shelf { aspect-ratio: 16 / 10; }
  .trust-row { padding-block: 18px; font-size: 0.8125rem; gap: 14px 16px; }
  .shop { padding-block: 40px; }
  .shop-head { margin-bottom: 20px; }
  .shop-head h2 { font-size: 1.625rem; }

  /* one swipeable row of filters, bleeding to the screen edge */
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -20px; padding: 2px 20px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; scroll-snap-align: start; }

  /* compact row cards: photo left, details right */
  .product-grid { gap: 12px; }
  .card { flex-direction: row; border-radius: var(--radius-xl); }
  .card-media { flex: none; width: 112px; aspect-ratio: auto; align-self: stretch; min-height: 136px; }
  .product-img { padding: 10%; }
  .card-body { padding: 12px 14px; min-width: 0; }
  .eyebrow { font-size: 0.6875rem; }
  .card-body h3 { margin-top: 2px; font-size: 1.0625rem; line-height: 1.25; }
  .tagline { margin-top: 4px; font-size: 0.8125rem; }
  .card-foot { margin-top: 10px; }
  .card-foot .btn { min-height: 44px; padding-inline: 16px; }
  .card-foot .badge-out { font-size: 0.8125rem; }

  .modal { width: 100%; max-width: none; max-height: calc(100dvh - 24px); margin: auto 0 0; border-radius: var(--radius-3xl) var(--radius-3xl) 0 0; }
  .pd-media { aspect-ratio: 4 / 3; }
  .pd-info { padding: 20px 20px calc(24px + var(--safe-bottom)); }
  .pd-info h2 { font-size: 1.5rem; }
  .pd-actions .btn { flex: 1; min-height: 48px; }

  .qty button { min-width: 36px; min-height: 36px; }
}
@media (max-width: 359px) {
  .card-media { width: 96px; }
  .card-foot { flex-wrap: wrap; gap: 8px; }
}
.wordmark small { margin-left: 6px; font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500; }

/* ───────────────────────── alive layer ─────────────────────────
   Motion grammar: entrances ease-out, on-screen movement ease-in-out, nothing from scale(0),
   only transform/opacity/filter animate. Exits are faster than entrances. */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --hero-interval: 5.5s;
}

/* hero copy: staggered rise on load */
.hero-copy > * { animation: rise 700ms var(--ease-out) both; }
.hero-copy > :nth-child(2) { animation-delay: 70ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }
.hero-copy > :nth-child(4) { animation-delay: 210ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.pill { gap: 10px; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: oklch(0.62 0.16 150); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2s var(--ease-out) infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

/* the accent underline draws itself in under "naturally." */
.swash {
  font-style: normal; color: var(--primary);
  background: linear-gradient(var(--accent), var(--accent)) 0 92% / 0% 0.16em no-repeat;
  animation: swash 900ms var(--ease-out) 450ms forwards;
}
@keyframes swash { to { background-size: 100% 0.16em; } }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 32px; }
.hero-actions .btn-lg { margin-top: 0; }
.hero-note { font-size: 0.875rem; color: var(--muted-foreground); }

/* stage */
.hero-stage {
  position: relative; isolation: isolate; overflow: hidden; outline: none;
  aspect-ratio: 1 / 1; border-radius: var(--radius-3xl); box-shadow: var(--shadow-soft);
  background: radial-gradient(120% 90% at 50% 100%, var(--muted) 0%, var(--secondary) 70%);
  touch-action: pan-y; animation: rise 800ms var(--ease-out) 120ms both;
}
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); opacity: .55; pointer-events: none; }
.orb-a { width: 55%; aspect-ratio: 1; left: -10%; top: -8%; background: color-mix(in oklab, var(--accent) 55%, transparent); animation: drift-a 16s var(--ease-in-out) infinite alternate; }
.orb-b { width: 60%; aspect-ratio: 1; right: -15%; bottom: 5%; background: color-mix(in oklab, var(--primary) 30%, transparent); animation: drift-b 19s var(--ease-in-out) infinite alternate; }
@keyframes drift-a { to { transform: translate(30%, 20%) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-25%, -15%) scale(.9); } }

.hero-slides { position: absolute; inset: 0; }
.hero-slides .hero-shelf { height: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; background: none; }
.hero-slide {
  position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 7% 12% 32%;
  opacity: 0; transform: scale(1.06) translateY(10px); filter: blur(8px);
  transition: opacity 450ms ease, transform 900ms var(--ease-out), filter 450ms ease;
}
.hero-slide.is-active { opacity: 1; transform: none; filter: none; }
/* blend the whole slide (not the img): an animated slide is its own compositing group, so a multiply on the img alone would blend against nothing */
.hero-slide { mix-blend-mode: multiply; }
/* the product sits in a fixed box above the card, whatever its own proportions */
.hero-slide img { position: absolute; left: 10%; top: 6%; width: 80%; height: 60%; object-fit: contain; }
.hero-slide.is-active img { animation: float 6s var(--ease-in-out) infinite alternate; }
@keyframes float { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-10px) rotate(1deg); } }
/* a separate hero photo (lifestyle shot) fills the stage instead of floating */
.hero-slide.is-photo { padding: 0; mix-blend-mode: normal; }
.hero-slide.is-photo img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide.is-photo.is-active img { animation: kenburns 12s ease-out both; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

/* product card on the stage */
.hero-card {
  position: absolute; left: 12px; right: 12px; bottom: 52px; z-index: 2;
  padding: 12px 12px 12px 16px; border-radius: var(--radius-xl);
  background: color-mix(in oklab, var(--card) 86%, transparent); backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .25);
}
.hero-card-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-card-inner.is-entering { animation: card-in 380ms var(--ease-out) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
.hero-card-text { display: flex; flex-direction: column; min-width: 0; }
.hero-card-name {
  all: unset; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-card-name:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.hero-card-price { font-weight: 700; margin-top: 2px; }
.hero-card-add { flex: none; min-height: 44px; padding-inline: 16px; }

/* controls: progress pills (the active one fills over the interval) + arrows on larger screens */
.hero-controls { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: flex; justify-content: center; align-items: center; gap: 8px; }
.hero-dots { display: flex; gap: 2px; }
.hero-dot { position: relative; width: 26px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 300ms var(--ease-out); }
.hero-dot::before, .hero-dot-fill { content: ""; position: absolute; left: 4px; right: 4px; top: 11px; height: 6px; border-radius: 999px; }
.hero-dot::before { background: color-mix(in oklab, var(--foreground) 18%, transparent); }
.hero-dot-fill { background: var(--primary); transform: scaleX(0); transform-origin: left; }
.hero-dot[aria-current="true"] { width: 52px; }
.hero-dot-fill.is-running { animation: fill var(--hero-interval) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.hero-stage.is-paused .hero-dot-fill { animation-play-state: paused; }
.hero-stage.is-static .hero-dot-fill.is-running { animation: none; transform: scaleX(1); }
.hero-arrow { display: none; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: color-mix(in oklab, var(--card) 85%, transparent); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease; }
.hero-arrow:active { transform: scale(.94); }
@media (min-width: 640px) { .hero-arrow { display: grid; } }
@media (min-width: 768px) { .hero-card { left: 20px; right: 20px; bottom: 64px; padding: 14px 14px 14px 20px; } .hero-card-name { font-size: 1.2rem; } .hero-controls { bottom: 16px; } }

/* press feedback everywhere */
.btn, .filter, .icon-button, .qty button, .cart-bar, .tab { transition: transform 160ms var(--ease-out), opacity .15s, background-color .15s, color .15s; }
.btn:active:not(:disabled), .filter:active, .icon-button:active, .qty button:active:not(:disabled), .tab:active { transform: scale(.97); }
.cart-bar:active { transform: scale(.98); }

/* cart badge pops when something is added */
.cart-count.bump { animation: bump 420ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.4); } }

/* cards: staggered fade-up as they scroll in; a small lift on hover (mouse only) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms ease, transform 700ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-i="1"] { transition-delay: 70ms; }
.reveal[data-i="2"] { transition-delay: 140ms; }
.card { transition: box-shadow .25s, transform 300ms var(--ease-out), opacity 600ms ease; }
@media (hover: hover) and (pointer: fine) {
  .card.is-in:hover { transform: translateY(-4px); }
  .hero-arrow:hover { background: var(--card); }
}

/* dialogs: drawer slides from the right, modal rises; exits are quicker than entrances */
dialog, dialog::backdrop { transition: opacity 200ms ease, transform 220ms var(--ease-out), overlay 220ms allow-discrete, display 220ms allow-discrete; }
dialog::backdrop { opacity: 0; }
dialog[open]::backdrop { opacity: 1; transition-duration: 300ms; }
.drawer { transform: translateX(100%); }
.drawer[open] { transform: none; transition: transform 340ms var(--ease-drawer), overlay 340ms allow-discrete, display 340ms allow-discrete; }
.modal { opacity: 0; transform: translateY(12px) scale(.98); }
.modal[open] { opacity: 1; transform: none; transition: opacity 260ms ease, transform 340ms var(--ease-drawer), overlay 340ms allow-discrete, display 340ms allow-discrete; }
@starting-style {
  .drawer[open] { transform: translateX(100%); }
  .modal[open] { opacity: 0; transform: translateY(12px) scale(.98); }
  dialog[open]::backdrop { opacity: 0; }
}
@media (max-width: 639px) {
  .modal { transform: translateY(100%); opacity: 1; }
  @starting-style { .modal[open] { transform: translateY(100%); opacity: 1; } }

  .hero-stage { aspect-ratio: 1 / 1.04; }
  .hero-actions { margin-top: 22px; }
  /* sticky cart bar rises in from the bottom edge */
  .cart-bar { transition: transform 320ms var(--ease-drawer); }
  @starting-style { .cart-bar { transform: translateY(140%); } }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-stage, .hero-card-inner.is-entering, .cart-count.bump { animation: none; }
  .hero-orb, .pulse::after, .hero-slide.is-active img { animation: none; }
  .swash { animation: none; background-size: 100% 0.16em; }
  .hero-slide { transform: none; filter: none; transition: opacity 300ms ease; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .drawer, .modal, .drawer[open], .modal[open] { transform: none; }
  .btn:active, .filter:active, .icon-button:active { transform: none; }
}
