/* StarWhites — shared styles */
[hidden] { display: none !important; }
:root {
  --orange: #F08650;
  --orange-dark: #C9581F;
  --lime: #B5E61D;
  --lime-soft: #F3FBDD;
  --gold: #FFC107;
  --green: #357A09;        /* readable green for buttons/text (lime is too light for text) */
  --green-dark: #2A6206;
  --ink: #1C1C1C;
  --ink-2: #5F6368;
  --ink-3: #8A9099;
  --line: #E5E7EB;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --danger: #D93025;
  --blue: #1A73E8;
  --radius: 12px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.45;
}
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- Logo ---------- */
.logo { font-weight: 700; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: baseline; }
.logo .s { color: var(--orange); }
.logo .w { color: var(--lime); }
.logo .i { position: relative; display: inline-block; }
.logo .i svg { position: absolute; left: 50%; transform: translateX(-50%); top: -0.12em; width: 0.42em; height: 0.42em; }
.logo-tag { display: block; font-size: 10px; letter-spacing: 0.18em; color: #64748B; font-weight: 600; margin-top: 4px; }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 20px; height: 76px; }
.hdr .brand { font-size: 28px; padding-right: 20px; border-right: 1px solid var(--line); height: 100%; display: flex; align-items: center; }
.hdr .eta { min-width: 0; }
.hdr .eta b { display: block; font-size: 17px; font-weight: 800; }
.hdr .eta span { font-size: 13px; color: var(--ink-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.search { flex: 1; position: relative; }
.search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #F8F8F8; padding: 0 16px 0 42px; outline: none; }
.search input:focus { border-color: var(--green); background: #fff; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.hdr-link { padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.hdr-link:hover { background: var(--bg); }
.cart-btn { background: var(--green); color: #fff; border: 0; border-radius: 10px; height: 50px; padding: 0 16px; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; min-width: 112px; }
.cart-btn small { display: block; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: left; }
.cart-btn.empty { background: #E8E8E8; color: #555; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }

@media (max-width: 860px) {
  .hdr .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px 12px; }
  .hdr .brand { font-size: 22px; border: 0; padding: 0; }
  /* Row 1: logo + actions · Row 2: pickup promise on one line · Row 3: search */
  .hdr .brand { order: 1; }
  .hdr-actions { order: 2; margin-left: auto; }
  .hdr-spacer { display: none; }
  .hdr .eta { order: 3; flex-basis: 100%; display: flex; align-items: baseline; gap: 6px; min-width: 0; margin-top: -4px; }
  .hdr .eta b { font-size: 15px; white-space: nowrap; flex: none; }
  .hdr .eta span { max-width: none; flex: 1; min-width: 0; }
  .hdr .eta span::before { content: "· "; }
  .search { order: 4; flex-basis: 100%; }
  .hdr .cart-btn.desk { display: none; }
  .hdr-link .txt { display: none; }
}

/* ---------- Home ---------- */
.hero { margin: 16px 0; border-radius: 18px; overflow: hidden; background: linear-gradient(110deg, #FFF3EA 0%, #FFF8EF 45%, var(--lime-soft) 100%); padding: 32px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: center; border: 1px solid #F6E3D6; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--orange-dark); }
.hero p { margin: 0 0 18px; color: var(--ink-2); font-size: 16px; }
.hero .art { font-size: 96px; text-align: center; line-height: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--green); color: #fff; font-weight: 700; text-decoration: none; font-size: 15px; }
.btn:hover { background: var(--green-dark); }
.btn:disabled { background: #C9CCD1; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn.block { width: 100%; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; padding: 22px; } .hero .art { display: none; } }

.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.promo { border-radius: 14px; padding: 18px; min-height: 120px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.promo b { font-size: 18px; line-height: 1.2; }
.promo span { font-size: 13px; opacity: 0.92; }
.promo.p1 { background: linear-gradient(135deg, #E9773F, #F59E61); }
.promo.p2 { background: linear-gradient(135deg, #3E8E0B, #7DBB1B); }
.promo.p3 { background: linear-gradient(135deg, #2B5797, #4A86D8); }
@media (max-width: 760px) { .promo-row { grid-template-columns: 1fr; } .promo { min-height: 0; gap: 6px; } }

.cats { margin-top: 18px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; margin-bottom: 26px; }
.cat { text-align: center; text-decoration: none; }
.cat .tile { aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; font-size: 40px; margin-bottom: 8px; transition: transform .15s; }
.cat:hover .tile { transform: translateY(-2px); }
.cat span { font-size: 13px; font-weight: 600; line-height: 1.25; display: block; }
@media (max-width: 760px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 10px; } .cat .tile { font-size: 32px; } .cat span { font-size: 12px; } }

.sec { margin-bottom: 28px; scroll-margin-top: 140px; }
.sec-hd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-hd h2 { font-size: 22px; margin: 0; letter-spacing: -0.01em; }
.sec-hd span { font-size: 13px; color: var(--ink-2); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
@media (max-width: 640px) { .rail { grid-auto-columns: 150px; gap: 10px; } }

.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; position: relative; }
.pcard .img { aspect-ratio: 1.15; border-radius: 10px; display: grid; place-items: center; font-size: 54px; margin-bottom: 10px; position: relative; }
.pcard .tag { position: absolute; top: 6px; left: 6px; background: #fff; color: var(--orange-dark); font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.02em; }
.pcard .time { display: inline-flex; align-items: center; gap: 3px; background: #F2F3F5; border-radius: 6px; font-size: 10px; font-weight: 800; padding: 2px 6px; align-self: flex-start; margin-bottom: 6px; }
.pcard .nm { font-weight: 700; font-size: 14px; line-height: 1.25; min-height: 36px; margin-bottom: 2px; }
.pcard .unit { font-size: 12px; color: var(--ink-2); margin-bottom: 10px; }
.pcard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price b { font-size: 14px; display: block; }
.price s { font-size: 12px; color: var(--ink-3); }

.add { height: 34px; min-width: 70px; border-radius: 8px; border: 1px solid var(--green); background: #F7FFF0; color: var(--green); font-weight: 800; font-size: 13px; }
.stepper { height: 34px; min-width: 70px; border-radius: 8px; background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: 14px; }
.stepper button { background: none; border: 0; color: #fff; width: 26px; height: 100%; font-size: 18px; font-weight: 700; padding: 0; }
.stepper span { min-width: 16px; text-align: center; }

.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 10px 0 30px; }
.how div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.how .n { font-size: 30px; }
.how b { display: block; margin: 6px 0 2px; }
.how span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 760px) { .how { grid-template-columns: 1fr 1fr; } }

.empty-search { text-align: center; padding: 50px 0; color: var(--ink-2); display: none; }

/* ---------- Floating cart bar (mobile) ---------- */
.cartbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; background: var(--green); color: #fff; border-radius: 12px; padding: 10px 14px; display: none; align-items: center; justify-content: space-between; border: 0; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.cartbar b { display: block; font-size: 14px; }
.cartbar small { font-size: 12px; opacity: .9; }
.cartbar .go { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .cartbar.has { display: flex; } body.has-cartbar { padding-bottom: 80px; } }

/* ---------- Cart drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); z-index: 60; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-hd { background: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-hd h3 { margin: 0; font-size: 18px; }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); }
.icon-btn:hover { background: var(--bg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; }
.box { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.box h4 { margin: 0 0 10px; font-size: 15px; }
.line-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.line-item + .line-item { border-top: 1px solid #F1F1F1; }
.line-item .ic { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-size: 26px; flex: none; border: 1px solid var(--line); }
.line-item .mid { flex: 1; min-width: 0; }
.line-item .mid b { display: block; font-size: 13px; font-weight: 600; }
.line-item .mid small { color: var(--ink-2); font-size: 12px; }
.bill-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; color: #333; }
.bill-row.total { font-weight: 800; font-size: 15px; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.free { color: var(--green); font-weight: 700; }
.note { font-size: 12px; color: var(--ink-2); background: #FFF8E6; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.drawer-ft { background: #fff; padding: 12px; border-top: 1px solid var(--line); }
.drawer-empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.drawer-empty .big { font-size: 64px; }

/* ---------- Generic pages ---------- */
.page { padding: 20px 0 40px; }
.page h1 { font-size: 24px; margin: 0 0 16px; }
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--green); background: #F7FFF0; }
.choice input { margin-top: 3px; accent-color: var(--green); }
.choice small { color: var(--ink-2); display: block; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; font-size: 13px; font-weight: 600; }
.chip.on { border-color: var(--green); background: #F7FFF0; color: var(--green); }
.chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 4px; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #D0D4DA; border-radius: 8px; padding: 10px 12px; outline: none; background: #fff; }
.field input:focus, .field textarea:focus { border-color: var(--green); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--danger); font-size: 13px; margin: 8px 0; }
.link-btn { background: none; border: 0; color: var(--green); font-weight: 700; padding: 0; }
.muted { color: var(--ink-2); font-size: 13px; }

.order { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.order-hd { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.order-hd b { font-size: 16px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #FFF1E8; color: var(--orange-dark); }
.badge.done { background: var(--lime-soft); color: var(--green); }
.badge.cancelled { background: #FDECEC; color: var(--danger); }
.track { display: grid; grid-template-columns: repeat(5, 1fr); margin: 14px 0; position: relative; }
.track div { text-align: center; font-size: 11px; color: var(--ink-3); position: relative; padding-top: 22px; }
.track div::before { content: ""; position: absolute; top: 4px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: #D7DADF; z-index: 1; }
.track div::after { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 2px; background: #D7DADF; }
.track div:first-child::after { display: none; }
.track div.on { color: var(--green); font-weight: 700; }
.track div.on::before, .track div.on::after { background: var(--green); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 90; display: none; }

.site-ft { border-top: 1px solid var(--line); background: #fff; padding: 26px 0; margin-top: 20px; font-size: 13px; color: var(--ink-2); }
.site-ft .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Installed app / install prompts ---------- */
.install-link { color: var(--green); }
.install-banner { position: fixed; left: 12px; right: 12px; top: 12px; z-index: 45; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px 10px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14); max-width: 480px; margin: 0 auto; }
.install-banner[hidden] { display: none; }
.install-banner img { border-radius: 10px; flex: none; }
.install-banner div { flex: 1; min-width: 0; }
.install-banner b { display: block; font-size: 14px; }
.install-banner small { display: block; font-size: 12px; color: var(--ink-2); }
@media (min-width: 861px) { .install-banner { left: auto; right: 24px; top: auto; bottom: 24px; } }
.ios-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #fff; border-radius: 20px 20px 0 0; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .25s ease; max-width: 520px; margin: 0 auto; text-align: center; }
.ios-sheet.open { transform: none; }
.ios-sheet img { border-radius: 14px; }
.ios-sheet h3 { margin: 10px 0 12px; font-size: 18px; }
.ios-sheet ol { text-align: left; padding-left: 22px; margin: 0 0 18px; line-height: 1.5; }
.ios-sheet li { margin-bottom: 10px; }
#iosScrim { z-index: 65; }

/* Running as an installed app: respect notches / home bar */
.in-app .hdr { padding-top: env(safe-area-inset-top); }
.in-app .cartbar { bottom: calc(12px + env(safe-area-inset-bottom)); }
.in-app .drawer-ft { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-tabs a { padding: 10px 14px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admin-tabs a.on { color: var(--green); border-bottom-color: var(--green); }

/* Product photos */
.pcard .img { overflow: hidden; }
.pcard .img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard .img .tag { z-index: 1; }
.line-item .ic { overflow: hidden; }
.line-item .ic img { width: 100%; height: 100%; object-fit: cover; }
.cat .tile { overflow: hidden; }
.cat .tile img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Motion ---------- */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-pop: cubic-bezier(.3, 1.6, .5, 1); }

/* Scroll reveal (only when JS is running and motion is allowed) */
.anim .rv { opacity: 0; transform: translateY(22px) scale(.98); transition: opacity .55s var(--ease-out), transform .65s var(--ease-out); transition-delay: var(--d, 0ms); }
.anim .rv.in { opacity: 1; transform: none; }
.anim .cat.rv { transform: translateY(16px) scale(.85); }
.anim .cat.rv.in { transform: none; }

/* Cards: lift on hover, image zoom */
.pcard { transition: box-shadow .25s ease, transform .25s var(--ease-out), border-color .25s; }
.pcard .img img { transition: transform .5s var(--ease-out); }
@media (hover: hover) {
  .pcard:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(28, 28, 28, .10); border-color: #D9E8C6; }
  .pcard:hover .img img { transform: scale(1.06); }
  .cat:hover .tile { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 18px rgba(0,0,0,.08); }
}
.cat .tile { transition: transform .3s var(--ease-pop), box-shadow .3s; }

/* ADD → stepper pop */
.add { transition: transform .15s, background .15s; }
.add:active { transform: scale(.92); }
.stepper { animation: pop .32s var(--ease-pop); }
@keyframes pop { from { transform: scale(.7); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* Flying product on ADD */
.fly-ghost { position: fixed; z-index: 120; margin: 0; pointer-events: none; border-radius: 14px; display: grid; place-items: center; font-size: 54px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.25); will-change: transform, opacity; }

/* Cart drawer: fast spring-out from the right, rows slide in one after another */
.drawer { transition: transform .38s var(--ease-out); box-shadow: -18px 0 50px rgba(0,0,0,.18); }
.scrim { transition: opacity .3s ease; backdrop-filter: blur(2px); }
.drawer.entering .box { animation: slideIn .45s var(--ease-out) both; }
.drawer.entering .box:nth-child(2) { animation-delay: .06s; }
.drawer.entering .line-item { animation: slideIn .45s var(--ease-out) both; }
.drawer.entering .line-item:nth-child(2) { animation-delay: .04s; }
.drawer.entering .line-item:nth-child(3) { animation-delay: .08s; }
.drawer.entering .line-item:nth-child(4) { animation-delay: .12s; }
.drawer.entering .line-item:nth-child(n+5) { animation-delay: .16s; }
.drawer.entering .drawer-ft { animation: slideUp .45s var(--ease-out) .1s both; }
.fly-ghost img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.line-item.just-added { animation: flash 1.2s ease both !important; border-radius: 10px; }
@keyframes flash { 0% { background: #EAF8D3; transform: translateX(40px); opacity: 0; } 25% { background: #EAF8D3; transform: none; opacity: 1; } 100% { background: transparent; } }

/* Floating cart bar slides up when it first appears */
.cartbar.has { animation: slideUp .4s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Order Again / Suggested rails */
.rec .sec-hd { align-items: center; gap: 12px; }
.rec .sec-hd h2 { margin-bottom: 2px; }
.rec .sec-hd span { display: block; }
.rec .reorder { height: 36px; padding: 0 14px; font-size: 13px; white-space: nowrap; flex: none; }
#order-again .rail { padding: 12px; margin: 0 -4px; border-radius: 16px; background: linear-gradient(110deg, #FFF3EA, #F6FBEA); }
#suggested .pcard { border-color: #F3DCCB; }
.tab-dot { font-style: normal; background: var(--orange); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; }
