/* Leafline: shared styles for the storefront and the admin dashboard. */
:root {
  --bg: #fafbfa;
  --surface: #ffffff;
  --surface-2: #f0f3f1;
  --ink: #10241a;
  --ink-soft: #52695c;
  --line: #e3e8e5;
  --accent: #17784a;
  --accent-ink: #ffffff;
  --highlight: #f0b429;
  --highlight-ink: #3b2a00;
  --danger: #c0392b;
  --pack: #eef4f0;
  --shadow: 0 14px 36px rgba(16, 36, 26, .14);
  --radius: 16px;
  --wrap: 1200px;
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1410; --surface: #121f18; --surface-2: #182a20; --ink: #e6f1ea; --ink-soft: #9bb3a5; --line: #243d31;
  --accent: #46c486; --accent-ink: #052016; --highlight: #f0b429; --highlight-ink: #2b1f00; --danger: #ef7b6c;
  --pack: #1d3228; --shadow: 0 14px 36px rgba(0, 0, 0, .55); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b1410; --surface: #121f18; --surface-2: #182a20; --ink: #e6f1ea; --ink-soft: #9bb3a5; --line: #243d31;
    --accent: #46c486; --accent-ink: #052016; --highlight: #f0b429; --highlight-ink: #2b1f00; --danger: #ef7b6c;
    --pack: #1d3228; --shadow: 0 14px 36px rgba(0, 0, 0, .55); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *:not(.marquee-track) { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
body { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
section[id], footer[id] { scroll-margin-top: 130px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: 12px; padding: 10px 18px; font-weight: 700; text-decoration: none; transition: transform .12s, filter .15s; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn.danger:hover { border-color: var(--danger); filter: none; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.wa { background: #1fa855; color: #fff; }
.icon-btn { width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; position: relative; }
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge-count { position: absolute; top: -4px; inset-inline-end: -4px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; font-variant-numeric: tabular-nums; }
.theme-btn .moon { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-btn .sun { display: none; } :root:not([data-theme]) .theme-btn .moon { display: block; } }

/* announcement slider */
.strip { background: var(--ink); color: var(--bg); font-size: 13px; }
.strip-inner { display: flex; align-items: center; padding-inline: 0; }
.marquee { flex: 1; min-width: 0; overflow: hidden; padding-block: 9px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 42s linear infinite; will-change: transform; }
.marquee-group { display: flex; flex: none; }
.m { position: relative; white-space: nowrap; padding-inline: 30px; }
.m::after { content: ""; position: absolute; inset-inline-end: -3px; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--highlight); translate: 0 -50%; }
.strip:hover .marquee-track { animation-play-state: paused; }
.strip b { color: var(--highlight); }
@keyframes marquee { to { transform: translateX(-50%); } }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }

/* header */
.head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.head.scrolled { border-bottom-color: var(--line); }
.head .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; text-decoration: none; min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand svg { flex: none; }
.brand-logo { flex: none; height: 40px; width: auto; max-width: 120px; object-fit: contain; border-radius: 10px; display: block; }
.brand-logo.on-dark { height: 44px; background: #fff; padding: 3px; }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="true"] { color: var(--ink); background: var(--surface-2); }

/* header search with live results */
.hsearch { position: relative; margin-inline-start: auto; flex: 0 1 380px; min-width: 0; }
.hsearch > svg { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.hsearch input { width: 100%; height: 42px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0 46px 0 42px; transition: border-color .15s, box-shadow .15s; }
.hsearch input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hsearch input::-webkit-search-cancel-button { margin-inline-end: -28px; cursor: pointer; }
.hresults { position: absolute; top: calc(100% + 8px); inset-inline: 0; min-width: min(380px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 6px; max-height: min(420px, 60vh); overflow-y: auto; z-index: 30; }
.hr-item { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: start; border: 0; background: transparent; padding: 8px; border-radius: 12px; }
.hr-item:hover, .hr-item.on { background: var(--surface-2); }
.hr-item .thumb { width: 46px; height: 46px; }
.hr-name { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.hr-name small { display: block; color: var(--ink-soft); font-weight: 400; }
.hr-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.hr-foot { padding: 8px 10px 4px; color: var(--ink-soft); font-size: 12px; }
.hr-none { padding: 14px; color: var(--ink-soft); }
@media (max-width: 900px) { .nav { display: none; } .brand { margin-inline-end: auto; } .hsearch { order: 5; flex: 1 1 100%; margin: 0; } .hsearch kbd { display: none; } }

/* hero */
.hero-bg { background: var(--bg); border-bottom: 1px solid var(--line); }
.hero { position: relative; z-index: 1; padding-block: 44px 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 28px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
.hero h1 { font-family: var(--font-display); font-size: clamp(34px, 6vw, 60px); line-height: 1.03; letter-spacing: -.025em; margin: 10px 0 14px; text-wrap: balance; }
.hero p { color: var(--ink-soft); font-size: 18px; max-width: 50ch; margin: 0 0 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 30px; margin-top: 30px; }
.stats div { display: grid; }
.stats b { font-family: var(--font-display); font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats div > span { color: var(--ink-soft); font-size: 13px; }
.stack { display: flex; justify-content: center; align-items: center; padding: 20px 0; min-width: 0; }
.stack figure { margin: 0 -26px; width: min(190px, 34%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; transition: transform .25s; }
.stack figure:nth-child(1) { transform: rotate(-6deg) translateY(14px); }
.stack figure:nth-child(2) { transform: translateY(-14px); z-index: 2; }
.stack figure:nth-child(3) { transform: rotate(6deg) translateY(14px); }
.stack figure:hover { transform: translateY(-20px) rotate(0); z-index: 3; }
.stack .pic { aspect-ratio: 1; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 26%, var(--surface)); }
.stack .pic svg { width: 66%; height: auto; }
.stack .pic img { width: 100%; height: 100%; object-fit: cover; }
.stack figcaption { padding: 8px 10px 10px; font-size: 12px; font-weight: 700; line-height: 1.3; }
.stack figcaption small { display: block; font-weight: 500; color: var(--ink-soft); }

/* trust bar */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; padding-block: 8px 12px; }
.trust div { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.trust svg { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.trust b { display: block; line-height: 1.25; }
.trust span { color: var(--ink-soft); font-size: 13px; }

/* sections */
.section { padding-block: 34px 6px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
h2 { font-family: var(--font-display); font-size: clamp(25px, 4vw, 34px); letter-spacing: -.015em; margin: 4px 0 0; line-height: 1.1; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.cat-tile { text-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 16px; display: grid; gap: 2px; transition: border-color .15s, transform .15s; }
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-tile b { font-family: var(--font-display); font-size: 18px; }
.cat-tile span { color: var(--ink-soft); font-size: 13px; }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.search-box { position: relative; flex: 1 1 240px; min-width: 0; }
.search-box svg { position: absolute; inset-inline-start: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--ink-soft); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.field, .search { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; }
.search { padding-inline-start: 42px; border-radius: 999px; }
.field:focus, .search:focus { outline: 2px solid var(--accent); border-color: transparent; }
select.field { width: auto; padding-inline-end: 34px; }
kbd { position: absolute; inset-inline-end: 12px; top: 50%; translate: 0 -50%; font: 600 11px var(--font-body); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; color: var(--ink-soft); background: var(--surface-2); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 7px 15px; font-weight: 500; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.shot { position: relative; width: 100%; border: 0; padding: 0; aspect-ratio: 1; background: color-mix(in srgb, var(--tint) 26%, var(--surface)); display: grid; place-items: center; overflow: hidden; }
.shot svg { width: 58%; height: auto; transition: transform .3s; }
.card:hover .shot svg { transform: scale(1.06); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; inset-inline-start: 10px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--highlight); color: var(--highlight-ink); }
.tag.out { background: var(--ink); color: var(--bg); }
.tag.low { background: var(--danger); color: #fff; }
.info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.cat { font-size: 12px; color: var(--ink-soft); }
.name { font-weight: 700; line-height: 1.3; background: none; border: 0; padding: 0; text-align: start; overflow-wrap: anywhere; }
.name:hover { color: var(--accent); }
.buy { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.empty { color: var(--ink-soft); padding: 28px 0; }

/* footer */
.foot { margin-top: 56px; background: var(--ink); color: var(--bg); }
.foot .wrap { padding-block: 36px 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { .foot .wrap { grid-template-columns: 1fr; } }
.foot h4 { margin: 0 0 8px; font-family: var(--font-display); font-size: 16px; }
.foot a { color: var(--bg); opacity: .85; display: block; text-decoration: none; padding-block: 2px; }
.foot a:hover { opacity: 1; text-decoration: underline; }
.foot p { opacity: .75; margin: 6px 0 0; max-width: 40ch; }
.foot .copy { grid-column: 1 / -1; opacity: .6; font-size: 13px; border-top: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); padding-top: 16px; }
.to-top { position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 15; opacity: 0; pointer-events: none; transition: opacity .2s; box-shadow: var(--shadow); }
.to-top.show { opacity: 1; pointer-events: auto; }

/* cart drawer and product modal */
.scrim { position: fixed; inset: 0; background: rgba(4, 12, 8, .55); z-index: 40; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%); background: var(--surface); z-index: 50; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.d-head h3 { margin: 0; font-family: var(--font-display); font-size: 22px; }
.x { border: 0; background: transparent; font-size: 20px; line-height: 1; padding: 8px 11px; border-radius: 10px; }
.x:hover { background: var(--surface-2); }
.meter { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }
.lines { flex: 1; overflow-y: auto; padding: 6px 18px; }
.line { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 26%, var(--surface)); }
.thumb svg { width: 60%; height: auto; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ln { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; line-height: 1.35; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.qty button { border: 0; background: transparent; width: 30px; height: 28px; font-size: 16px; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.lp { font-weight: 700; font-variant-numeric: tabular-nums; text-align: end; }
.d-foot { padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.tot { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--ink-soft); margin: 0; }
.modal { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.modal .art { position: relative; min-height: 260px; background: color-mix(in srgb, var(--tint) 26%, var(--surface)); display: grid; place-items: center; }
.modal .art svg { width: 62%; max-width: 200px; height: auto; }
.modal .art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.modal .body { padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.modal h3 { margin: 0; font-family: var(--font-display); font-size: 26px; line-height: 1.12; }
.modal p { margin: 0; color: var(--ink-soft); }
.modal .x { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2; background: var(--surface); }
@media (max-width: 580px) { .modal { grid-template-columns: 1fr; } .modal .art { min-height: 190px; } }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* ---------- Admin ---------- */
.admin-head { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-head .wrap { display: flex; align-items: center; gap: 14px; padding-block: 12px; flex-wrap: wrap; }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-end: auto; }
.admin-nav a { text-decoration: none; padding: 8px 14px; border-radius: 10px; color: var(--ink-soft); font-weight: 500; }
.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.page { padding-block: 28px 60px; }
.page h1 { font-family: var(--font-display); font-size: 32px; margin: 0 0 4px; letter-spacing: -.015em; }
.page .lead { color: var(--ink-soft); margin: 0 0 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 26px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.kpi b { display: block; font-family: var(--font-display); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--ink-soft); font-size: 13px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 18px; }
.bar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: start; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; }
.row-name { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.row-name .thumb { width: 48px; height: 48px; flex: none; }
.row-name b { display: block; line-height: 1.3; }
.row-name small { color: var(--ink-soft); }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.pill.good { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.pill.warn { background: color-mix(in srgb, var(--highlight) 30%, var(--surface)); color: var(--ink); }
.pill.bad { background: color-mix(in srgb, var(--danger) 18%, var(--surface)); color: var(--danger); }
.switch { border: 1px solid var(--line); background: var(--surface-2); width: 42px; height: 24px; border-radius: 999px; position: relative; padding: 0; }
.switch::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-soft); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.switch[aria-checked="true"]::after { background: var(--accent-ink); transform: translateX(18px); }
html[dir="rtl"] .switch[aria-checked="true"]::after { transform: translateX(-18px); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
label.lbl { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }
label.lbl small { color: var(--ink-soft); font-weight: 400; }
textarea.field { min-height: 110px; resize: vertical; }
input[type="color"].field { padding: 4px; height: 42px; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.preview { width: 120px; height: 120px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--tint) 26%, var(--surface)); border: 1px solid var(--line); }
.preview svg { width: 64%; height: auto; }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid var(--line); background: var(--surface); }
.alert.ok { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.alert.err { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth .panel { width: min(400px, 100%); padding: 28px; }
.auth h1 { font-size: 26px; }
.stack-form { display: grid; gap: 14px; }

/* ---------- Motion: small touches that keep the page alive ---------- */
@keyframes rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes appear { from { opacity: 0; scale: .88; } to { opacity: 1; scale: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes grow { from { width: 0; } to { width: 20px; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes shine { to { background-position: -200% 0; } }

/* hero entrance */
.hero > div:first-child > * { animation: rise .75s cubic-bezier(.2, .7, .2, 1) both; }
.hero > div:first-child > :nth-child(1) { animation-delay: .05s; }
.hero > div:first-child > :nth-child(2) { animation-delay: .15s; }
.hero > div:first-child > :nth-child(3) { animation-delay: .27s; }
.hero > div:first-child > :nth-child(4) { animation-delay: .38s; }
.hero > div:first-child > :nth-child(5) { animation-delay: .5s; }
.stack figure { animation: appear .8s cubic-bezier(.2, .7, .2, 1) both, float 6s ease-in-out infinite 1s; }
.stack figure:nth-child(1) { animation-delay: .25s, 1s; }
.stack figure:nth-child(2) { animation-delay: .4s, 2.2s; animation-duration: .8s, 7s; }
.stack figure:nth-child(3) { animation-delay: .55s, 1.6s; animation-duration: .8s, 6.5s; }
.stack figure:hover { animation-play-state: running, paused; }

/* scroll reveal (classes are added by app.js only for content below the fold) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .2, 1), box-shadow .2s, border-color .2s; }
.reveal.in { opacity: 1; transform: none; }
.reveal .eyebrow::before { width: 0; }
.reveal.in .eyebrow::before { animation: grow .6s .2s ease both; }

/* hover and press feedback */
.btn { position: relative; overflow: hidden; }
.btn:not(.ghost):not(.danger):not(:disabled):hover { transform: translateY(-1px); }
.btn.done { background: var(--ink); color: var(--bg); }
.trust svg { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.trust div:hover svg { transform: rotate(-8deg) scale(1.1); }
.cat-tile b { transition: color .15s; }
.cat-tile:hover b { color: var(--accent); }
.tag:not(.out):not(.low) { background-image: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); background-size: 250% 100%; background-repeat: no-repeat; background-position: 150% 0; animation: shine 3.6s ease-in-out infinite 1.5s; }
.to-top:hover { translate: 0 -3px; }
.badge-count.bump { animation: bump .45s ease; }
.theme-btn.spin svg { animation: spin .55s ease; }
.fly { position: fixed; z-index: 70; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); pointer-events: none; }
.toast { animation: rise .25s ease both; }

/* ---------- Help banner, word band, footer, chat button ---------- */
.help-band { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.help-band { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 30px clamp(20px, 4vw, 44px); width: min(calc(var(--wrap) - 40px), calc(100% - 40px)); }
.help-band .eyebrow { color: var(--highlight); }
.help-band h2 { color: var(--bg); }
.help-band p { margin: 6px 0 0; opacity: .75; max-width: 46ch; }
.help-band .btn.wa { padding: 13px 22px; font-size: 15px; }

.words { overflow: hidden; margin-top: 44px; padding-block: 8px; border-block: 1px solid var(--line); }
.words-track { display: flex; width: max-content; animation: marquee 70s linear infinite reverse; }
.words-group { display: flex; align-items: center; flex: none; }
.words .w { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 6vw, 68px); letter-spacing: -.02em; line-height: 1.3; white-space: nowrap; padding-inline: 22px; color: transparent; -webkit-text-stroke: 1.5px var(--ink-soft); }
.words .w:nth-of-type(even) { color: var(--ink); -webkit-text-stroke: 0; }
.words .leaf { flex: none; width: 22px; height: 22px; background: var(--accent); border-radius: 0 100% 0 100%; rotate: 0deg; animation: sway 5s ease-in-out infinite; }
@keyframes sway { 0%, 100% { rotate: -14deg; } 50% { rotate: 14deg; } }

.foot { margin-top: 0; }
.foot .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; padding-block: 44px 28px; gap: 32px; }
@media (max-width: 900px) { .foot .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot .foot-grid { grid-template-columns: 1fr; } }
.foot-brand { display: inline-flex !important; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 22px; opacity: 1 !important; text-decoration: none !important; }
.foot-brand:hover span { color: var(--highlight); }
.foot p { margin-top: 12px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.foot .socials a { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--bg) 28%, transparent); opacity: 1; transition: background .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1), border-color .2s; }
.foot .socials a:hover { background: var(--highlight); border-color: var(--highlight); color: var(--highlight-ink); transform: translateY(-4px) rotate(-6deg); text-decoration: none; }
.socials svg, .facts svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; align-items: center; gap: 10px; opacity: .85; }
.facts svg { flex: none; width: 18px; height: 18px; color: var(--highlight); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 18px 26px; border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); opacity: .7; font-size: 13px; }
.foot .foot-bottom { display: flex; grid-template-columns: none; padding-block: 18px 26px; }
.heart { color: #ff6b81; font-style: normal; display: inline-block; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(1); } 45% { transform: scale(1.2); } }

.chat-fab { position: fixed; z-index: 35; inset-inline-start: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 0; height: 54px; padding: 0 15px; border-radius: 999px; background: #1fa855; color: #fff; text-decoration: none; font-weight: 700; box-shadow: 0 10px 26px rgba(31, 168, 85, .4); overflow: visible; transition: gap .25s, padding .25s; }
.chat-fab svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.chat-fab span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .3s ease; }
.chat-fab:hover, .chat-fab:focus-visible { gap: 8px; padding-inline: 18px; }
.chat-fab:hover span, .chat-fab:focus-visible span { max-width: 120px; }
.chat-fab::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #1fa855; animation: ping 2.6s ease-out infinite; pointer-events: none; }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.5, 1.7); opacity: 0; } }


/* ---------- Responsive: phones, tablets, laptops, large screens ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
input, select, textarea { font-size: 16px; }
img, svg, video { max-width: 100%; }

/* large desktops and TVs */
@media (min-width: 1600px) {
  :root { --wrap: 1400px; }
  body { font-size: 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
  .hero { padding-block: 64px 40px; }
}
@media (min-width: 2200px) { :root { --wrap: 1680px; } body { font-size: 17px; } }

/* tablets and small laptops */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .hero { gap: 24px; }
  .stack figure { margin: 0 -18px; }
}
@media (max-width: 900px) {
  section[id], footer[id] { scroll-margin-top: 150px; }
  .hero h1 { max-width: 20ch; }
  .stack { padding: 10px 0 0; }
}

/* phones */
@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .head .wrap { gap: 10px; padding-block: 10px; }
  .brand { font-size: 19px; }
  .hero { padding-block: 22px 12px; }
  .hero p { font-size: 16px; }
  .cta .btn { flex: 1 1 100%; }
  .stats { gap: 6px 22px; }
  .stats b { font-size: 22px; }
  .stack figure { width: min(150px, 34%); margin: 0 -14px; }
  .trust { grid-template-columns: 1fr; }
  .section { padding-block: 26px 4px; }
  .sec-head { margin-bottom: 14px; }
  .tools { gap: 8px; }
  .tools select.field { flex: 1 1 100%; width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: -16px; padding: 0 16px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }
  .card:hover { transform: none; }
  .info { padding: 10px 11px 12px; }
  .price { font-size: 18px; }
  .buy { gap: 6px; }
  .buy .btn.small { flex: 1 1 100%; }
  .help-band { margin-top: 40px; padding: 24px 20px; border-radius: 18px; }
  .help-band .btn { width: 100%; }
  .words { margin-top: 34px; }
  .foot-bottom { flex-direction: column; text-align: center; align-items: center; padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
  .chat-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .chat-fab span { display: none; }
  .to-top { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); inset-inline-end: max(14px, env(safe-area-inset-right, 0px)); }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .strip { font-size: 12px; }

  /* product popup becomes a bottom sheet */
  .modal { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 22px 22px 0 0; animation: sheet .28s ease-out; }
  .modal .body { padding: 20px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .modal h3 { font-size: 22px; }
  .drawer { width: 100%; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* very small phones */
@media (max-width: 360px) {
  .brand span { max-width: 120px; }
  .grid { gap: 10px; }
  .name { font-size: 14px; }
  .hero h1 { font-size: 30px; }
}

/* short landscape screens (phones turned sideways) */
@media (max-height: 520px) and (orientation: landscape) {
  .modal { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); max-height: calc(100% - 16px); }
  .modal .art { min-height: 0; }
  .modal .art svg { max-width: 120px; }
  .head { position: static; }
  .hero { padding-block: 20px 8px; }
}

/* touch devices: bigger targets, no sticky hover effects */
@media (pointer: coarse) {
  .chip { min-height: 40px; }
  .btn.small { min-height: 40px; padding-inline: 14px; }
  .qty button { width: 38px; height: 36px; }
  .x { padding: 10px 13px; }
    .icon-btn { width: 44px; height: 44px; }
  .switch { width: 48px; height: 28px; }
  .switch::after { width: 22px; height: 22px; }
  .switch[aria-checked="true"]::after { transform: translateX(20px); }
}
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: var(--line); }
  .card:hover .shot svg { transform: none; }
  .cat-tile:hover { transform: none; border-color: var(--line); }
  .stack figure:hover { transform: none; }
  .stack figure:nth-child(1):hover { transform: rotate(-6deg) translateY(14px); }
  .stack figure:nth-child(2):hover { transform: translateY(-14px); }
  .stack figure:nth-child(3):hover { transform: rotate(6deg) translateY(14px); }
  .trust div:hover svg { transform: none; }
}

/* admin: product table turns into cards on phones */
@media (max-width: 720px) {
  .page { padding-block: 20px 48px; }
  .page h1 { font-size: 26px; }
  .panel { padding: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 24px; }
  .bar-row .field { max-width: none !important; width: 100%; }
  .bar-row .btn { width: 100%; }
  .admin-head .wrap { gap: 10px; }
  .admin-nav { width: 100%; order: 5; overflow-x: auto; flex-wrap: nowrap; }
  .admin-nav a { white-space: nowrap; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; display: block; }
  thead { display: none; }
  tbody { display: grid; gap: 12px; }
  tr { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 6px 14px; background: var(--surface-2); }
  td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-align: end; }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: var(--ink-soft); font-size: 13px; text-align: start; }
  td.cell-main { display: block; text-align: start; }
  td.cell-main::before, td.cell-actions::before { content: none; }
  td.cell-actions { justify-content: flex-start; }
  .actions { justify-content: flex-start; }
  .row-name { min-width: 0; }
}

/* featured row fills the width instead of leaving an empty column */
#featured .grid { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
@media (min-width: 1100px) { #featured .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { #featured .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
