/* ================================================================
   Rimes Making — storefront styles (mobile-first, app-like)
   ================================================================ */
:root {
  --brand: #BE3E6E;
  --brand-deep: #93264F;
  --brand-soft: #F9E3EC;
  --accent: #E9A13B;
  --accent-soft: #FBEED7;
  --bg: #FFF6EE;
  --surface: #FFFFFF;
  --ink: #33201A;
  --muted: #8C7266;
  --line: #F1DFD3;
  --ok: #2E8B57;
  --ok-soft: #E3F2E9;
  --warn: #B3261E;
  --wa: #25D366;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 8px 28px rgba(72, 35, 16, 0.09);
  --shadow-sm: 0 3px 12px rgba(72, 35, 16, 0.07);
  /* sans-serif everywhere — system fallbacks keep it clean even offline */
  --font-head: 'Poppins', 'Hind Siliguri', -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-body: 'Nunito Sans', 'Hind Siliguri', -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --tabbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100dvh;
}
body.bn { --font-head: 'Hind Siliguri', 'Poppins', sans-serif; font-family: 'Hind Siliguri', var(--font-body); }
h1, h2, h3 { letter-spacing: -0.3px; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.18; }
::selection { background: var(--brand-soft); }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 18px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.brand-mark svg, .brand-mark img { width: 34px; height: 34px; border-radius: 10px; box-shadow: var(--shadow-sm); object-fit: cover; }
.brand-name { font-family: var(--font-head); font-size: 20px; font-weight: 700; letter-spacing: -0.2px; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--brand); }
.topnav { display: none; }
.lang-toggle {
  display: flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); background: var(--surface);
  padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 13px;
  color: var(--muted); box-shadow: var(--shadow-sm);
}
.lang-toggle span[data-l].on { color: var(--brand); }
.lang-divider { opacity: .5; }

/* ---------------- bottom tab bar ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--r-sm); font-size: 11px; font-weight: 700; color: var(--muted);
  transition: color .18s, background .18s, transform .12s;
}
.tab svg { width: 23px; height: 23px; }
.tab:active { transform: scale(0.94); }
.tab.on { color: var(--brand); background: var(--brand-soft); }

/* ---------------- WhatsApp FAB ---------------- */
.wa-fab {
  position: fixed; z-index: 45;
  right: max(16px, calc(50% - 260px + 16px));
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa);
  display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.42);
  transition: transform .15s;
}
.wa-fab:active { transform: scale(0.92); }
/* when a sticky order bar is on screen, float the FAB above it */
#view.has-sticky ~ .wa-fab { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 96px); }
.wa-fab::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--wa); opacity: 0; animation: waPulse 2.6s ease-out infinite;
}
@keyframes waPulse { 0% { opacity: .55; transform: scale(.86); } 70% { opacity: 0; transform: scale(1.18); } 100% { opacity: 0; } }

/* ---------------- views ---------------- */
.view { padding: 6px 18px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 90px); outline: none; }
/* NOTE: opacity-only — a transform here would turn #view into a containing
   block and break the fixed sticky-cta / FAB positioning */
.v-enter { animation: viewIn .26s ease-out; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
.v-enter > *:first-child { animation: viewSlide .26s cubic-bezier(.2,.7,.3,1); }
@keyframes viewSlide { from { transform: translateY(10px); } to { transform: none; } }

.sec-title { font-size: 20px; margin: 26px 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec-title .see-all { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--brand); }

/* ---------------- hero ---------------- */
.hero {
  margin-top: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-radius: var(--r-lg);
  padding: 24px 20px;
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::before {
  content: ''; position: absolute; right: -70px; top: -70px; width: 210px; height: 210px;
  border-radius: 50%; background: rgba(255,255,255,0.09);
}
.hero-copy { flex: 1.35; position: relative; min-width: 0; }
.hero-eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  background: rgba(255,255,255,0.16); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.hero h1 { font-size: 25px; margin-bottom: 8px; }
.hero p { font-size: 13px; opacity: .92; margin-bottom: 15px; max-width: 30ch; }
.hero-art { flex: 0.95; display: grid; place-items: center; position: relative; }
.hero-art svg { width: clamp(118px, 36vw, 185px); height: auto; }
.hero .btn { white-space: nowrap; padding: 12px 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; font-size: 15px; border-radius: 14px; padding: 13px 20px;
  transition: transform .12s, box-shadow .2s, background .2s; text-align: center;
}
.btn:active { transform: scale(0.97); }
.btn-light { background: #fff; color: var(--brand-deep); box-shadow: 0 4px 14px rgba(0,0,0,0.14); }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(190, 62, 110, 0.35); }
.btn-brand:disabled { background: #D9BFCB; box-shadow: none; cursor: not-allowed; }
.btn-ghost { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3); }
.btn-block { width: 100%; }

/* ---------------- urgent strip ---------------- */
.urgent {
  margin-top: 16px;
  background: var(--accent-soft);
  border: 1.5px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.urgent-ico { font-size: 24px; }
.urgent b { display: block; font-size: 14.5px; }
.urgent small { color: var(--muted); font-size: 12.5px; }
.urgent .btn { padding: 10px 14px; font-size: 13px; margin-left: auto; flex-shrink: 0; }
.custom-cake { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); margin-top: 22px; }

/* ---------------- category chips ---------------- */
.cat-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  min-width: 76px; padding: 12px 8px 10px; border-radius: var(--r-md);
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: 12px; font-weight: 700; color: var(--ink);
  scroll-snap-align: start; transition: border-color .18s, background .18s, transform .12s;
  flex-shrink: 0;
}
.cat-chip:active { transform: scale(0.95); }
.cat-chip .ico { font-size: 22px; line-height: 1; }
.cat-chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }

/* pill-style filter (cakes page) */
.pill-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; position: sticky; top: 58px; z-index: 30; background: var(--bg); }
.pill-scroll::-webkit-scrollbar { display: none; }
.pill {
  padding: 9px 16px; border-radius: 999px; white-space: nowrap; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--muted);
  transition: all .18s;
}
.pill.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(190,62,110,.3); }

/* ---------------- cake cards ---------------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card {
  background: var(--surface); border-radius: var(--r-md); padding: 12px;
  box-shadow: var(--shadow-sm); position: relative;
  transition: transform .15s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:active { transform: scale(0.97); }
.card .art { width: 100%; display: grid; place-items: center; }
.card .art svg { width: 100%; height: auto; max-width: 150px; }
/* real cake photos (uploaded from admin) */
.card .art img.cimg { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: #F6EADF; }
.product-art img.cimg { width: min(88vw, 340px); aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); background: #F6EADF; }
img.cimg-thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 12px; background: #F6EADF; }
img.cimg-mini { width: 62px; height: 62px; object-fit: cover; border-radius: 12px; background: #F6EADF; }
.card h3 { font-size: 14.5px; margin: 8px 0 3px; font-family: var(--font-body); font-weight: 800; }
.card .price { font-size: 13px; color: var(--muted); margin-top: auto; }
.card .price b { color: var(--brand-deep); font-size: 15px; }
.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px; box-shadow: 0 3px 8px rgba(233,161,59,.4);
  max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.badge.pop { background: var(--brand); box-shadow: 0 3px 8px rgba(190,62,110,.35); }

/* ---------------- how it works ---------------- */
.how { display: grid; gap: 10px; }
.how-step {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.how-num {
  width: 34px; height: 34px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: var(--brand-soft); color: var(--brand-deep); font-family: var(--font-head);
}
.how-step b { font-size: 14.5px; display: block; }
.how-step small { color: var(--muted); font-size: 12.5px; line-height: 1.45; display: block; }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 34px; }

/* ---------------- product page ---------------- */
.back-row { display: flex; align-items: center; gap: 8px; margin: 6px 0 4px; }
.back-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1.5px solid var(--line); font-size: 17px; box-shadow: var(--shadow-sm);
}
.product-art { display: grid; place-items: center; padding: 6px 0 2px; }
.product-art svg { width: min(62vw, 230px); height: auto; }
.product-head h1 { font-size: 23px; }
.product-head .pdesc { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.pbadge { display: inline-block; background: var(--accent-soft); color: #9A6A1B; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; margin-top: 8px; }

.opt-label { font-weight: 800; font-size: 14px; margin: 18px 0 8px; display: flex; justify-content: space-between; align-items: baseline; }
.opt-label small { color: var(--muted); font-weight: 600; font-size: 12px; }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  padding: 10px 14px; border-radius: 13px; border: 1.5px solid var(--line);
  background: var(--surface); font-size: 13.5px; font-weight: 700; transition: all .15s;
}
.opt small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); }
.opt.on small { color: var(--brand); }
.opt:active { transform: scale(0.96); }

.field { margin-top: 6px; }
.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 13px 14px; background: var(--surface); outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.err { border-color: var(--warn); }
.input-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input-err { font-size: 12px; color: var(--warn); margin-top: 5px; font-weight: 700; display: none; }
.input-err.show { display: block; }
.char-count { font-size: 11.5px; color: var(--muted); text-align: right; margin-top: 4px; }

.qty-row { display: inline-flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); overflow: hidden; }
.qty-btn { width: 44px; height: 44px; font-size: 20px; font-weight: 800; color: var(--brand); display: grid; place-items: center; }
.qty-btn:disabled { color: #D8C9BE; }
.qty-val { min-width: 40px; text-align: center; font-weight: 800; font-size: 16px; }

/* sticky bottom CTA */
.sticky-cta {
  position: fixed; z-index: 44; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  width: calc(100% - 32px); max-width: 488px;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: 18px; padding: 10px 10px 10px 18px;
  box-shadow: 0 10px 34px rgba(72, 35, 16, 0.18);
  border: 1px solid var(--line);
}
.sticky-cta .total { flex-shrink: 0; }
.sticky-cta .total small { display: block; font-size: 11px; color: var(--muted); font-weight: 700; }
.sticky-cta .total b { font-size: 19px; color: var(--brand-deep); font-family: var(--font-head); }
.sticky-cta .btn { flex: 1; }
.has-sticky { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 170px) !important; }

/* ---------------- wizard ---------------- */
.wiz-head { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; }
.wiz-title { font-size: 20px; flex: 1; }
.wiz-progress { display: flex; gap: 6px; margin-bottom: 18px; }
.wiz-progress .seg { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background .3s; }
.wiz-progress .seg.on { background: var(--brand); }
.wiz-steps-label { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 800; color: var(--muted); margin: -12px 0 16px; }
.wiz-steps-label span.on { color: var(--brand); }

/* date strip */
.date-strip { display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.dchip {
  min-width: 62px; padding: 10px 6px 9px; border-radius: 14px; text-align: center; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--line); transition: all .15s; position: relative;
}
.dchip .dow { font-size: 10.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.dchip .day { font-size: 19px; font-weight: 800; font-family: var(--font-head); margin: 1px 0; }
.dchip .mon { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.dchip.on { border-color: var(--brand); background: var(--brand); }
.dchip.on .dow, .dchip.on .day, .dchip.on .mon { color: #fff; }
.dchip.locked { opacity: .45; background: var(--bg); }
.dchip.locked .day { color: var(--muted); }
.dchip .lock { position: absolute; top: -7px; right: -4px; font-size: 13px; }
.dchip:not(.locked):active { transform: scale(0.94); }

.note-info {
  display: block; background: var(--brand-soft); border-radius: var(--r-sm);
  padding: 11px 14px; font-size: 12.8px; color: var(--brand-deep); line-height: 1.5; margin-top: 2px;
}
.note-info a, .note-info .link { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }

/* option cards (slots, method) */
.optcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.optcards.two { grid-template-columns: 1fr 1fr; }
.optcard {
  border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  padding: 13px 10px; text-align: center; transition: all .15s;
}
.optcard .ico { font-size: 21px; margin-bottom: 4px; }
.optcard b { display: block; font-size: 13.5px; }
.optcard small { color: var(--muted); font-size: 11px; line-height: 1.3; display: block; margin-top: 2px; }
.optcard.on { border-color: var(--brand); background: var(--brand-soft); }
.optcard.on b { color: var(--brand-deep); }
.optcard:active { transform: scale(0.96); }

/* review */
.review-card { background: var(--surface); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 12px; }
.review-card .rc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.review-card .rc-head b { font-size: 14px; }
.review-card .rc-head .link { color: var(--brand); font-size: 12.5px; font-weight: 800; }
.rc-cake { display: flex; gap: 13px; align-items: center; }
.rc-cake .art svg { width: 74px; height: 74px; }
.rc-cake .t b { font-size: 15px; display: block; }
.rc-cake .t small { color: var(--muted); font-size: 12.5px; display: block; margin-top: 2px; }
.rc-line { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.rc-line span { color: var(--muted); }
.rc-line.total { border-top: 1.5px dashed var(--line); margin-top: 8px; padding-top: 10px; font-weight: 800; font-size: 15px; }
.rc-line.total b { color: var(--brand-deep); font-size: 18px; font-family: var(--font-head); }
.pay-note { background: var(--accent-soft); border-radius: var(--r-sm); padding: 11px 14px; font-size: 12.5px; color: #7A5417; line-height: 1.5; margin: 12px 0; }

/* bKash advance payment */
.pay-card { border: 1.5px solid color-mix(in srgb, #E2136E 30%, transparent); }
.pc-text { font-size: 13px; line-height: 1.55; margin-bottom: 8px; }
.pc-text.muted { color: var(--muted); font-size: 12.5px; }
.pc-later { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.bkash-row {
  display: flex; align-items: center; gap: 10px;
  background: #FDF0F6; border: 1.5px dashed #E2136E; border-radius: 12px;
  padding: 10px 14px; margin-top: 4px;
}
.bk-label { font-size: 11px; font-weight: 800; color: #E2136E; text-transform: uppercase; letter-spacing: .4px; }
.bk-num { font-size: 17px; font-weight: 800; letter-spacing: .8px; flex: 1; }
.mini-copy { color: #E2136E; font-weight: 800; font-size: 12.5px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid #F3C2DA; }
.trx-in { text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.pay-alert {
  text-align: left; background: #FFF6E3; border: 1.5px solid #F2CF66; border-radius: var(--r-md);
  padding: 15px 16px; margin: 14px 0;
}
.pay-alert > b { font-size: 14.5px; color: #8A5A00; }
.pay-alert p { font-size: 12.8px; color: #7A5417; line-height: 1.55; margin: 6px 0 10px; }
.pay-row { display: flex; gap: 9px; margin-top: 10px; }
.pay-row .input { flex: 1; min-width: 0; }
.pay-row .btn { flex-shrink: 0; padding: 12px 16px; font-size: 13.5px; }
.trx-ok {
  display: block; text-align: left; background: var(--ok-soft); color: var(--ok);
  border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; font-weight: 600; margin: 12px 0;
}
.trx-wait { display: block; text-align: left; background: var(--brand-soft); color: var(--brand-deep); border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; font-weight: 600; margin: 12px 0; }
.trx-rejected { display: block; text-align: left; background: #FDE3E1; color: var(--warn); border-radius: var(--r-sm); padding: 11px 14px; font-size: 12.8px; font-weight: 600; margin: 12px 0 -4px; line-height: 1.5; }

/* ---------------- success ---------------- */
.success-wrap { text-align: center; padding-top: 26px; }
.check-ring {
  width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--ok-soft); display: grid; place-items: center;
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.check-ring svg { width: 48px; height: 48px; }
.check-ring path { stroke: var(--ok); stroke-width: 3.4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .55s .25s ease-out forwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confetti { position: relative; height: 0; }
.confetti i { position: absolute; width: 8px; height: 8px; border-radius: 2px; top: -80px; animation: fall 1.5s ease-in forwards; }
@keyframes fall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(190px) rotate(320deg); opacity: 0; } }
.order-id-chip {
  display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 6px;
  background: var(--surface); border: 1.5px dashed var(--brand); border-radius: 14px; padding: 11px 16px;
}
.order-id-chip b { font-size: 21px; font-family: var(--font-head); color: var(--brand-deep); letter-spacing: 1px; }
.order-id-chip button { color: var(--brand); font-weight: 800; font-size: 12.5px; }
.next-steps { text-align: left; margin: 22px 0; display: grid; gap: 0; }
.nstep { display: flex; gap: 13px; position: relative; padding-bottom: 18px; }
.nstep:last-child { padding-bottom: 0; }
.nstep::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.nstep:last-child::before { display: none; }
.nstep .dot { width: 27px; height: 27px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; z-index: 1; }
.nstep p { font-size: 13.5px; padding-top: 3px; }

/* ---------------- track ---------------- */
.track-form { background: var(--surface); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-sm); display: grid; gap: 12px; margin-top: 10px; }
.timeline { margin-top: 22px; background: var(--surface); border-radius: var(--r-md); padding: 20px 18px; box-shadow: var(--shadow-sm); }
.tl-order { display: flex; gap: 13px; align-items: center; padding-bottom: 15px; border-bottom: 1.5px dashed var(--line); margin-bottom: 17px; }
.tl-order .art svg { width: 62px; height: 62px; }
.tl-order b { display: block; font-size: 15px; }
.tl-order small { color: var(--muted); font-size: 12.5px; }
.tl-step { display: flex; gap: 14px; position: relative; padding-bottom: 22px; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content: ''; position: absolute; left: 12px; top: 28px; bottom: 0; width: 2.5px; background: var(--line); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--ok); }
.tl-dot { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: var(--line); color: #fff; z-index: 1; font-size: 12px; }
.tl-step.done .tl-dot { background: var(--ok); }
.tl-step.now .tl-dot { background: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); animation: nowPulse 1.8s infinite; }
@keyframes nowPulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-soft) 55%, transparent); } }
.tl-step.bad .tl-dot { background: var(--warn); }
.tl-step b { font-size: 14.5px; display: block; }
.tl-step small { color: var(--muted); font-size: 12.3px; display: block; }
.tl-step .when { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* status chips */
.chip { display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.chip.pending { background: #FFF0D6; color: #9A6A1B; }
.chip.confirmed { background: #E1F0FF; color: #1A5B9E; }
.chip.baking { background: #FBE3EC; color: var(--brand-deep); }
.chip.ready { background: #EDE4FF; color: #5B3AA0; }
.chip.done { background: var(--ok-soft); color: var(--ok); }
.chip.declined, .chip.cancelled { background: #FDE3E1; color: var(--warn); }

/* ---------------- contact ---------------- */
.contact-grid { display: grid; gap: 12px; margin-top: 12px; }
.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-sm);
}
.contact-card .cico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 21px; flex-shrink: 0; }
.contact-card b { display: block; font-size: 15px; }
.contact-card small { color: var(--muted); font-size: 12.5px; }
.contact-card .go { margin-left: auto; color: var(--muted); }

/* ---------------- hero slider ---------------- */
.hero-slider { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; scrollbar-width: none; }
.hero-slider::-webkit-scrollbar { display: none; }
.hero-slider .hero { flex: 0 0 100%; scroll-snap-align: center; }
.hero-img { width: clamp(118px, 36vw, 185px); aspect-ratio: 1 / 1; object-fit: cover; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,0.22); }

/* shared dots (hero + gallery) */
.dots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); padding: 0; transition: all .2s; }
.dot.on { background: var(--brand); width: 20px; border-radius: 4px; }

/* ---------------- product photo gallery (square 1:1) ---------------- */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; scrollbar-width: none; border-radius: 20px; }
.gallery::-webkit-scrollbar { display: none; }
.gslide { flex: 0 0 100%; scroll-snap-align: center; }
.gimg { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 20px; background: #F6EADF; display: block; }

/* ---------------- my orders ---------------- */
.sub-note { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }
.order-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--surface); border-radius: var(--r-md); padding: 11px 13px;
  box-shadow: var(--shadow-sm); margin-bottom: 10px; border: 2px solid transparent;
  transition: border-color .15s, transform .12s;
}
.order-row:active { transform: scale(0.98); }
.order-row.sel { border-color: var(--brand); }
.order-row .or-t { flex: 1; min-width: 0; }
.order-row .or-t b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-row .or-t small { color: var(--muted); font-size: 12px; }
.row-links { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.link-sm { color: var(--brand); font-weight: 800; font-size: 13px; }
.link-sm.muted { color: var(--muted); }

/* ---------------- OTP ---------------- */
.otp-form { margin-top: 14px; }
.otp-in { text-align: center; font-size: 26px; letter-spacing: 12px; font-weight: 800; font-family: var(--font-head); }
.demo-note { margin-top: 8px; background: var(--accent-soft); color: #7A5417; border-radius: 10px; padding: 9px 12px; font-size: 12px; line-height: 1.45; }

/* ---------------- toast ---------------- */
.toast-wrap { position: fixed; z-index: 90; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px); display: grid; gap: 8px; width: calc(100% - 48px); max-width: 420px; pointer-events: none; }
.toast {
  background: #2E1C15; color: #fff; border-radius: 13px; padding: 12px 16px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  animation: toastIn .25s cubic-bezier(.2,.9,.3,1.2) both; text-align: center;
}
.toast.err { background: #8E2A33; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.95); } }

/* skeleton */
.skel { border-radius: var(--r-md); background: linear-gradient(100deg, #F4E7DB 40%, #FBF1E8 50%, #F4E7DB 60%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty state */
.empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ================================================================
   Desktop / tablet ≥ 880px — top nav, wider grids
   ================================================================ */
@media (min-width: 880px) {
  :root { --tabbar-h: 0px; }
  #app { max-width: 1080px; }
  .topbar { padding: 18px 28px; }
  .brand-mark svg { width: 40px; height: 40px; }
  .brand-name { font-size: 24px; }
  .topnav { display: flex; gap: 4px; margin-left: 16px; }
  .topnav a { padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--muted); transition: all .15s; }
  .topnav a.on { color: var(--brand-deep); background: var(--brand-soft); }
  .topnav a:hover { color: var(--brand-deep); }
  .tabbar { display: none; }
  .view { padding: 10px 28px 80px; }
  .wa-fab { right: 30px; bottom: 30px; }
  .toast-wrap { bottom: 30px; }
  .sticky-cta { bottom: 24px; max-width: 560px; }
  .has-sticky { padding-bottom: 140px !important; }

  .hero { padding: 46px 48px; border-radius: 28px; }
  .hero h1 { font-size: 42px; max-width: 14ch; }
  .hero p { font-size: 16px; max-width: 44ch; }
  .hero-art svg { width: 250px; height: 250px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .card h3 { font-size: 15.5px; }
  .how { grid-template-columns: repeat(4, 1fr); }
  .how-step { flex-direction: column; gap: 10px; }
  .cat-chip { min-width: 96px; }
  .pill-scroll { top: 74px; }
  .sec-title { font-size: 24px; margin-top: 38px; }
  .product-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; margin-top: 20px; }
  .product-art svg { width: 320px; }
  .wiz-wrap, .track-wrap, .success-wrap { max-width: 560px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr 1fr; max-width: 760px; }
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
  .dchip { min-width: 68px; }
}

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