:root {
  --brand: #5b3cc4;
  --brand-dark: #45299f;
  --brand-soft: #efeafd;
  --accent: #ff6b4a;
  --ok: #1f9d55;
  --ok-soft: #e6f6ec;
  --ink: #1c1b22;
  --ink-2: #55535f;
  --ink-3: #8a8895;
  --line: #e7e5ee;
  --bg: #f6f5fa;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(28, 27, 34, .08);
  --topbar-h: 76px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
/* Shop theme: light by default; the customer can pick Dark or "Same as phone" in Profile.
   The admin panel follows the device's dark mode. */
:root { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
    --brand: #9b85ff;
    --brand-dark: #b7a8ff;
    --brand-soft: #2a2440;
    --ok: #46c47e;
    --ok-soft: #1b3326;
    --ink: #f1f0f6;
    --ink-2: #c3c1cf;
    --ink-3: #8e8b9c;
    --line: #2e2c38;
    --bg: #121118;
    --card: #1b1a22;
    --shadow: 0 6px 24px rgba(0, 0, 0, .4);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
      --brand: #9b85ff;
      --brand-dark: #b7a8ff;
      --brand-soft: #2a2440;
      --ok: #46c47e;
      --ok-soft: #1b3326;
      --ink: #f1f0f6;
      --ink-2: #c3c1cf;
      --ink-3: #8e8b9c;
      --line: #2e2c38;
      --bg: #121118;
      --card: #1b1a22;
      --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.admin {
    color-scheme: dark;
    --brand: #9b85ff;
    --brand-dark: #b7a8ff;
    --brand-soft: #2a2440;
    --ok: #46c47e;
    --ok-soft: #1b3326;
    --ink: #f1f0f6;
    --ink-2: #c3c1cf;
    --ink-3: #8e8b9c;
    --line: #2e2c38;
    --bg: #121118;
    --card: #1b1a22;
    --shadow: 0 6px 24px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 16px;
  height: var(--topbar-h); display: flex; align-items: center; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 22px; line-height: 1;
}
.logo-text { font-weight: 800; font-size: 21px; letter-spacing: -.3px; color: var(--brand); display: flex; flex-direction: column; line-height: 1.05; }
.logo-text small { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-2); }
.eta {
  background: none; border: 0; text-align: left; padding: 4px 0; display: flex; flex-direction: column;
  min-width: 0; max-width: 270px; flex-shrink: 1;
}
.eta-time { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eta-addr { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; height: 46px;
}
.search-icon { font-size: 20px; color: var(--ink-3); }
.search input { flex: 1; border: 0; background: none; outline: none; min-width: 0; height: 100%; font-size: 15px; }
.nav-link { font-weight: 600; font-size: 15px; color: var(--ink-2); flex-shrink: 0; }
.nav-link:hover { color: var(--brand); }
.cart-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; border: 0; border-radius: 10px; height: 46px; padding: 0 16px; font-weight: 700;
}
.cart-btn:hover { background: var(--brand-dark); }
.cart-btn .two-line { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; text-align: left; }

main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 120px; outline: none; }

/* ---------- home ---------- */
.hero {
  border-radius: 18px; padding: 28px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, #5b3cc4 0%, #8a4fd8 55%, #ff6b4a 130%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 180px;
}
.hero h1 { font-size: clamp(24px, 4vw, 38px); letter-spacing: -.5px; line-height: 1.1; }
.hero p { margin: 10px 0 18px; opacity: .92; font-size: 16px; max-width: 460px; }
.hero .btn { background: #fff; color: #45299f; }
.hero-art { font-size: clamp(56px, 10vw, 110px); line-height: 1; letter-spacing: -10px; flex-shrink: 0; }
.promo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.promo {
  border-radius: 16px; padding: 18px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); background: var(--card);
}
.promo b { font-size: 17px; }
.promo span { font-size: 13px; color: var(--ink-2); }
.promo .big { font-size: 34px; }

.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; letter-spacing: -.3px; }
.section-head a { color: var(--brand); font-weight: 700; font-size: 15px; }

.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cat-tile .pic {
  width: 100%; aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; font-size: 40px;
  transition: transform .15s;
}
.cat-tile:hover .pic { transform: translateY(-3px); }
.cat-tile span { font-size: 13px; font-weight: 600; line-height: 1.25; }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rail > * { scroll-snap-align: start; }

/* ---------- product card ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0;
}
.card .thumb {
  aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 64px;
  background: var(--bg); border: 0; padding: 0; width: 100%;
}
.card .badge {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 6px; border-radius: 6px; line-height: 1.2;
}
.card .eta-chip { font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--bg); align-self: flex-start; padding: 2px 6px; border-radius: 5px; }
.card .name { font-size: 14px; font-weight: 600; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: none; border: 0; padding: 0; text-align: left; }
.card .size { font-size: 13px; color: var(--ink-3); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price b { font-size: 14px; }
.price s { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

.add-btn {
  border: 1.5px solid var(--ok); color: var(--ok); background: var(--ok-soft);
  font-weight: 800; font-size: 13px; border-radius: 8px; height: 34px; min-width: 72px; padding: 0 12px;
}
.add-btn:hover { background: var(--ok); color: #fff; }
.stepper {
  display: inline-flex; align-items: center; background: var(--ok); color: #fff; border-radius: 8px;
  height: 34px; min-width: 72px; overflow: hidden; font-weight: 800; font-size: 14px;
}
.stepper button { background: none; border: 0; color: #fff; width: 26px; height: 100%; font-size: 17px; font-weight: 800; }
.stepper span { flex: 1; text-align: center; min-width: 20px; }

/* ---------- category page ---------- */
.cat-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.subnav {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  align-self: start; position: sticky; top: calc(var(--topbar-h) + 16px); overflow: hidden;
}
.subnav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px;
  border: 0; border-left: 4px solid transparent; background: none; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.subnav button .mini { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 20px; background: var(--bg); flex-shrink: 0; }
.subnav button.on { border-left-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.cat-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cat-title h1 { font-size: 22px; letter-spacing: -.3px; }
.select { border: 1px solid var(--line); background: var(--card); border-radius: 10px; height: 38px; padding: 0 10px; font: inherit; color: inherit; }
.cat-strip { display: none; }

/* ---------- drawer / cart ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 8, 20, .45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 50;
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.drawer.open { transform: none; box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 14px; background: var(--card); border-top: 1px solid var(--line); }
.icon-btn { background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; }
.icon-btn:hover { background: var(--bg); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.panel h3 { font-size: 15px; margin-bottom: 10px; }
.eta-panel { display: flex; gap: 12px; align-items: center; }
.eta-panel .clock { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.eta-panel b { display: block; font-size: 16px; }
.eta-panel span { font-size: 13px; color: var(--ink-2); }
.line-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.line-item + .line-item { border-top: 1px dashed var(--line); }
.line-item .pic { width: 52px; height: 52px; border-radius: 10px; background: var(--bg); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.line-item .info { flex: 1; min-width: 0; }
.line-item .info div:first-child { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line-item .info div + div { font-size: 12px; color: var(--ink-3); }
.line-item .info b { font-size: 13px; color: var(--ink); }
.bill-row { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; color: var(--ink-2); }
.bill-row.total { color: var(--ink); font-weight: 800; font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.bill-row .free { color: var(--ok); font-weight: 700; }
.saving { background: var(--ok-soft); color: var(--ok); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .4s; }
.tips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700;
}
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-2); }
.empty .big { font-size: 64px; margin-bottom: 10px; }
.empty h2 { color: var(--ink); font-size: 20px; margin-bottom: 6px; }

.btn {
  border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; font-size: 15px;
  height: 48px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--brand); border: 1.5px solid var(--brand); }
.btn.split { justify-content: space-between; }
.btn.split .sm { display: flex; flex-direction: column; line-height: 1.15; text-align: left; font-size: 15px; }
.btn.split .sm small { font-weight: 500; font-size: 12px; opacity: .85; }

/* ---------- checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.checkout h1 { font-size: 24px; margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.opt {
  display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--card);
}
.opt + .opt { margin-top: 8px; }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; }
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt .t { font-weight: 700; font-size: 14px; }
.opt .d { font-size: 13px; color: var(--ink-2); }
.opt .ico { font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; background: var(--card); outline: none; font-size: 15px;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); }
.sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }

/* ---------- order tracking ---------- */
.track-hero {
  border-radius: 18px; padding: 24px; color: #fff;
  background: linear-gradient(120deg, #1f9d55, #2bb673);
}
.track-hero.done { background: linear-gradient(120deg, #5b3cc4, #8a4fd8); }
.track-hero small { opacity: .9; font-weight: 600; }
.track-hero h1 { font-size: clamp(24px, 4vw, 32px); margin: 6px 0; }
.track-hero .mins { font-size: 15px; opacity: .95; }
.map {
  margin-top: 14px; height: 200px; border-radius: 16px; position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(127,127,140,.15) 38px 40px),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(127,127,140,.15) 58px 60px),
    var(--card);
  border: 1px solid var(--line);
}
.map .route { position: absolute; left: 12%; right: 12%; top: 50%; height: 4px; background: var(--line); border-radius: 4px; }
.map .route i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); border-radius: 4px; transition: width 1s linear; }
.map .pin { position: absolute; top: 50%; transform: translate(-50%, -100%); font-size: 30px; }
.map .rider { position: absolute; top: 50%; transform: translate(-50%, -60%); font-size: 30px; transition: left 1s linear; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--line); }
.steps li.done:not(:last-child)::before { background: var(--ok); }
.steps .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 13px; flex-shrink: 0; z-index: 1; }
.steps li.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now .dot { border-color: var(--ok); color: var(--ok); animation: pulse 1.2s infinite; }
.steps b { display: block; font-size: 14px; }
.steps span { font-size: 13px; color: var(--ink-2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(31, 157, 85, .2); } }
.rider-card { display: flex; align-items: center; gap: 12px; }
.rider-card .av { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: 26px; }
.rider-card .grow { flex: 1; }

.order-row { display: flex; align-items: center; gap: 14px; }
.order-row .pics { font-size: 26px; letter-spacing: -6px; min-width: 70px; }
.order-row .grow { flex: 1; min-width: 0; }
.order-row .grow div:first-child { font-weight: 700; }
.order-row .grow div + div { font-size: 13px; color: var(--ink-2); }
.status-pill { font-size: 12px; font-weight: 800; padding: 4px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); white-space: nowrap; }
.status-pill.live { background: var(--brand-soft); color: var(--brand-dark); }

/* ---------- modal & toast ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(10, 8, 20, .5); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 18px; width: min(480px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px; box-shadow: var(--shadow); position: relative; }
.modal-card h2 { font-size: 19px; margin-bottom: 14px; padding-right: 30px; }
.modal-card .icon-btn { position: absolute; top: 14px; right: 14px; }
.pd-pic { aspect-ratio: 16/10; border-radius: 14px; background: var(--bg); display: grid; place-items: center; font-size: 110px; margin-bottom: 14px; }
.pd-meta { color: var(--ink-2); font-size: 14px; margin: 4px 0 14px; }
.pd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pd-price b { font-size: 20px; }
.pd-price s { color: var(--ink-3); margin-left: 6px; }
.pd-price em { font-style: normal; color: var(--accent); font-weight: 800; margin-left: 6px; font-size: 13px; }
.pd-notes { margin-top: 16px; font-size: 13px; color: var(--ink-2); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }
.otp { display: flex; gap: 10px; justify-content: center; margin: 10px 0 16px; }
.otp input { width: 52px; height: 56px; text-align: center; font-size: 22px; font-weight: 800; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); outline: none; }
.otp input:focus { border-color: var(--brand); }
.muted { color: var(--ink-2); font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px;
  transition: all .2s; z-index: 70; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.cart-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; display: none;
  justify-content: space-between; align-items: center; background: var(--ok); color: #fff; border: 0;
  border-radius: 14px; padding: 14px 16px; font-weight: 800; box-shadow: var(--shadow);
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 900px) {
  .checkout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .nav-link { display: none; }
}
@media (max-width: 760px) {
  :root { --topbar-h: auto; }
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .logo-text { display: none; }
  .eta { flex: 1; max-width: none; }
  .search { order: 5; flex-basis: 100%; height: 42px; }
  .cart-btn { display: none; }
  .nav-link { display: block; }
  .cart-bar:not([hidden]) { display: flex; }
  .hero { padding: 20px; min-height: 0; }
  .hero-art { display: none; }
  .promo-row { grid-template-columns: 1fr; }
  .promo { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-tile .pic { font-size: 30px; border-radius: 12px; }
  .cat-tile span { font-size: 11px; }
  .rail { grid-auto-columns: 150px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .thumb { font-size: 48px; }
  .cat-layout { grid-template-columns: 76px 1fr; gap: 10px; }
  .subnav button { flex-direction: column; text-align: center; gap: 4px; padding: 10px 4px; font-size: 10px; border-left-width: 3px; }
  .subnav button .mini { width: 40px; height: 40px; }
  .subnav { top: 120px; }
  main { padding-top: 14px; }
}

/* ---------- live data states ---------- */
.notice { background: var(--brand-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; line-height: 1.4; }
.notice.warn { background: #fdecea; color: #a12a1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .admin .notice.warn { background: #3a1d19; color: #ffb4a8; } }
.modal-card .notice, .drawer .notice, #placeError .notice { margin: 0 0 12px; }
.spinner { width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.oos { font-size: 12px; font-weight: 800; color: var(--ink-3); white-space: nowrap; }
.card.is-oos .thumb { opacity: .45; }
.thumb img, .line-item .pic img, .pd-pic img, .subnav .mini img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.pd-pic img { max-height: 260px; }
.track-hero.cancelled { background: linear-gradient(120deg, #8a8895, #55535f); }
.status-pill.cancel { background: var(--bg); color: var(--ink-3); }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.opt .icon-btn { flex-shrink: 0; }
.cat-tile .pic { overflow: hidden; } .cat-tile .pic img { width: 100%; height: 100%; object-fit: cover; }

/* Items without a photo show their initials instead of an icon. */
.ini { font-size: .5em; font-weight: 800; letter-spacing: -.02em; color: var(--brand); opacity: .75; line-height: 1; user-select: none; }
.pics { display: flex; gap: 4px; letter-spacing: 0; }
.mini-pic { width: 36px; height: 36px; border-radius: 8px; background: var(--bg); display: grid; place-items: center; font-size: 28px; overflow: hidden; flex-shrink: 0; }
.mini-pic img { width: 100%; height: 100%; object-fit: cover; }
.order-row .pics { letter-spacing: 0; min-width: 0; }
.cat-tile .pic .ini { font-size: .75em; }

/* ================= shop: navigation ================= */
.top-links { display: flex; gap: 18px; flex-shrink: 0; }
.top-links a { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.top-links a:hover, .top-links a.on { color: var(--brand); }
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .top-links { display: none; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 36;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--ink-3); padding: 4px 0; }
  .bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .bottom-nav a.on { color: var(--brand); }
  .bottom-nav a.on svg { fill: var(--brand-soft); }
  .cart-bar { bottom: calc(70px + env(safe-area-inset-bottom)); }
  main { padding-bottom: 150px; }
  .toast { top: calc(12px + env(safe-area-inset-top)); bottom: auto; transform: translate(-50%, -20px); }
  .toast.show { transform: translate(-50%, 0); }
}
:root[data-theme="dark"] .notice.warn { background: #3a1d19; color: #ffb4a8; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .notice.warn { background: #3a1d19; color: #ffb4a8; } }

/* ================= categories page ================= */
.all-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; }
.all-cats .cat-tile .pic { aspect-ratio: 1; }
.all-cats .count { font-size: 11px; color: var(--ink-3); font-weight: 600; }
@media (max-width: 760px) { .all-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; } }
.subnav .mini { overflow: hidden; }
.subnav .mini img { object-fit: cover; }
.subnav .mini .ini { font-size: 14px; }

/* ================= filters ================= */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.filter-bar .chip .n { background: var(--brand); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; line-height: 17px; }
.filter-bar .chip.clear { border-style: dashed; }
.sheet-opts { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; margin-bottom: 14px; }
.sheet-opts label { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: 15px; }
.sheet-opts label.on { border-color: var(--brand); background: var(--brand-soft); }
.sheet-opts input { width: 18px; height: 18px; accent-color: var(--brand); }
.sheet-opts .cnt { margin-left: auto; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
@media (max-width: 760px) {
  .modal.sheet { align-items: end; padding: 0; }
  .modal.sheet .modal-card { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ================= product details ================= */
.unit-rate { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.stars { color: #f5a623; font-weight: 800; font-size: 12px; white-space: nowrap; }
.stars small { color: var(--ink-3); font-weight: 600; }
.low-left { font-size: 11px; font-weight: 800; color: var(--accent); }
.card .meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 16px; }
.pd-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.pd-fact { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.pd-fact small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.pd-fact b { font-size: 15px; }
.pd-note { background: var(--brand-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.rate-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.rate-row:first-of-type { border-top: 0; }
.rate-row .grow { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.star-pick { display: flex; gap: 2px; }
.star-pick button { background: none; border: 0; font-size: 22px; line-height: 1; padding: 2px; color: var(--line); }
.star-pick button.on { color: #f5a623; }

/* ================= profile ================= */
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; flex-shrink: 0; }
.menu-list a, .menu-list button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-weight: 600; font-size: 15px; }
.menu-list > :last-child { border-bottom: 0; }
.addr-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.addr-row:last-child { border-bottom: 0; }
.addr-row .grow { flex: 1; min-width: 0; }
.addr-row .grow div:last-child { font-size: 13px; color: var(--ink-2); }
.theme-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-pick button { border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 6px; font-weight: 700; font-size: 13px; }
.theme-pick button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.loc-badge { font-size: 12px; color: var(--ok); font-weight: 700; }
.geo-btn { margin-bottom: 12px; }

/* ================= finishing pass ================= */
/* compact home banner, categories first */
.hero.hero-compact { min-height: 0; padding: 18px 22px; align-items: center; }
.hero.hero-compact h1 { font-size: clamp(20px, 3vw, 28px); }
.hero.hero-compact p { margin: 6px 0 0; font-size: 14px; }
.hero.hero-compact .btn { flex-shrink: 0; }
.section.first { margin-top: 18px; }
.offer-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.offer { border-radius: 14px; padding: 14px 16px; background: linear-gradient(135deg, var(--brand-soft), var(--card)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.offer b { font-size: 15px; }
.offer span { font-size: 12px; color: var(--ink-2); }
@media (max-width: 760px) {
  .hero.hero-compact { padding: 14px 16px; border-radius: 16px; }
  .hero.hero-compact p { font-size: 13px; }
  .hero.hero-compact .btn { height: 40px; padding: 0 14px; font-size: 14px; }
  .offer-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .offer-strip::-webkit-scrollbar { display: none; }
  .offer { scroll-snap-align: start; }
  .map { height: 140px; }
}
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; font-size: 14px; cursor: pointer; }

/* cart bar: item pictures + free-delivery hint */
.cart-bar .cb-left { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.cart-bar .cb-pics { display: flex; }
.cart-bar .cb-pics .mini-pic { width: 34px; height: 34px; border: 2px solid var(--ok); background: #fff; margin-left: -10px; font-size: 26px; }
.cart-bar .cb-pics .mini-pic:first-child { margin-left: 0; }
.cart-bar .cb-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.cart-bar .cb-text small { font-weight: 600; font-size: 11px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar .cb-go { flex-shrink: 0; }
.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.03); } }

/* checkout: pinned "Place order" on phones, no bottom bar */
@media (max-width: 760px) {
  body.on-checkout .bottom-nav { display: none; }
  body.on-checkout #placeOrder { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; z-index: 35; box-shadow: var(--shadow); }
  body.on-checkout main { padding-bottom: 110px; }
}

/* loading placeholders */
.sk { background: linear-gradient(90deg, var(--line) 25%, var(--bg) 50%, var(--line) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-hero { height: 90px; }
.sk-cats { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; margin-top: 22px; }
.sk-cats .sk { aspect-ratio: 1; }
.sk-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 26px; }
.sk-rail .sk { height: 240px; }
@media (max-width: 760px) { .sk-cats { grid-template-columns: repeat(4, 1fr); gap: 10px; } .sk-rail { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .sk, .cart-bar.bump { animation: none; } }

/* pay online with UPI */
.upi-pay { border: 2px solid var(--brand); }
.upi-pay.paid { border-color: var(--ok); background: var(--ok-soft); }
.upi-qr { width: 220px; max-width: 70%; margin: 4px auto 10px; background: #fff; border-radius: 12px; padding: 6px; }
.upi-qr svg { display: block; width: 100%; height: auto; }
.upi-to { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; margin-bottom: 12px; text-align: center; }
.upi-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink-2); }
.upi-app { display: none; }
@media (max-width: 760px), (pointer: coarse) { .upi-app { display: flex; } }

/* ---------- Phase 4: coupons, offers, banners ---------- */
.bill-row.save { color: var(--ok); font-weight: 700; }
.coupon-panel h3 { margin-bottom: 10px; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form input { flex: 1; min-width: 0; height: 42px; border: 1.5px dashed var(--line); border-radius: 10px; padding: 0 12px; background: var(--card); color: var(--ink); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; outline: none; }
.coupon-form input:focus { border-color: var(--brand); }
.coupon-form .btn { height: 42px; }
.coupon-panel .notice { margin-top: 10px; }
.coupon-on, .coupon-mini { display: flex; align-items: center; gap: 10px; }
.coupon-on .grow, .coupon-mini .grow { flex: 1; min-width: 0; font-size: 14px; }
.coupon-on .muted { font-size: 12px; }
.coupon-on .tag, .coupon-mini .tag { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-weight: 900; flex-shrink: 0; }
.coupon-mini { width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.coupon-list { display: grid; gap: 10px; margin-top: 12px; }
.coupon-list.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 0; }
.coupon-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 320px); gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.coupon-rail .coupon-card { scroll-snap-align: start; }
.coupon-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.coupon-card.on { border-color: var(--ok); }
.coupon-card .tag { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 900; flex-shrink: 0; }
.coupon-card.on .tag { background: var(--ok-soft); color: var(--ok); }
.cc-code { justify-self: start; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; letter-spacing: .6px; color: var(--brand); border: 1.5px dashed currentColor; border-radius: 6px; padding: 1px 8px; max-width: 100%; overflow-wrap: anywhere; }
.cc-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cc-body b { font-size: 14px; }
.cc-body small { color: var(--ink-3); font-size: 12px; }
.cc-applied { color: var(--ok); font-weight: 800; font-size: 13px; }
.coupon-card .btn.sm { height: 34px; padding: 0 14px; flex-shrink: 0; }
.banners { margin-top: 16px; }
.banner-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.banner-track::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .banner-track { grid-auto-columns: calc(50% - 6px); } }
.banner { position: relative; display: block; aspect-ratio: 2.4 / 1; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; border: 0; padding: 0; text-decoration: none; color: #1c1b22; cursor: pointer; font: inherit; text-align: left; }
div.banner { cursor: default; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn-text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 18px 22px; }
.bn-text b { font-size: clamp(18px, 3vw, 26px); line-height: 1.15; letter-spacing: -.3px; max-width: 80%; }
.bn-text span { font-size: 14px; max-width: 80%; opacity: .85; }
.bn-text.over { justify-content: flex-end; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,0) 65%); }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s; }
.banner-dots i.on { width: 18px; background: var(--brand); }
@media (min-width: 900px) { .banner-dots { display: none; } }

/* ---------- Phase 5: returns ---------- */
.ret-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.ret-card.ok { border-color: var(--ok); background: var(--ok-soft); }
.ret-card .ret-st { font-weight: 700; font-size: 13px; }
.ret-card.ok .ret-st { color: var(--ok); }
.ret-card.warn .ret-st { color: var(--accent); }
.ret-lines { display: grid; gap: 8px; margin-bottom: 12px; }
.ret-line { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ret-line .pic { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; flex-shrink: 0; }
.ret-line .pic img { width: 100%; height: 100%; object-fit: cover; }
.ret-line .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.ret-line .nm small { display: block; color: var(--ink-3); font-weight: 500; font-size: 12px; }
.ret-line .stepper { flex-shrink: 0; }
.ret-card .ret-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }

/* ---------- Motion (fx.js). All of it stops for "reduce motion". ---------- */
/* 3D tilt + light shine on product photos */
.card .thumb, .pd-pic { position: relative; overflow: hidden; transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .3s; will-change: transform; }
.card .thumb::after, .pd-pic::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 30%), rgba(255,255,255,.45), rgba(255,255,255,0) 55%); opacity: 0; transition: opacity .3s; }
.fx-tilting { transition: transform .08s linear !important; box-shadow: 0 14px 30px rgba(28,27,34,.16); }
.fx-tilting::after { opacity: 1; }
.card .thumb img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .card:hover .thumb img { transform: scale(1.06); } }
.card { transition: box-shadow .25s, transform .25s; }
@media (hover: hover) { .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } }
/* product window: the photo floats gently */
.pd-pic img, .pd-pic .ini { animation: fx-float 4.5s ease-in-out infinite; }
@keyframes fx-float { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-8px) rotate(.6deg); } }

/* cards, tiles and banners rise in */
.fx-pre { opacity: 0; transform: translateY(18px) scale(.98); }
.fx-pre.fx-in { opacity: 1; transform: none; transition: opacity .5s ease var(--fx-delay, 0ms), transform .55s cubic-bezier(.2,.8,.2,1) var(--fx-delay, 0ms); }
.card.fx-pre.fx-in { transition: opacity .5s ease var(--fx-delay, 0ms), transform .55s cubic-bezier(.2,.8,.2,1) var(--fx-delay, 0ms), box-shadow .25s; }

/* discount badge shine */
.card .badge { z-index: 2; overflow: hidden; }
.card .badge::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent); animation: fx-shine 3.2s ease-in-out infinite; }
@keyframes fx-shine { 0%, 55% { left: -60%; } 85%, 100% { left: 130%; } }

/* buttons feel pressed */
.btn, .add-btn, .stepper button, .chip, .cat-tile { transition: transform .12s ease; }
.btn:active, .add-btn:active, .stepper button:active, .chip:active, .cat-tile:active { transform: scale(.95); }
.stepper span.fx-pop { display: inline-block; animation: fx-pop .25s ease; }
@keyframes fx-pop { 50% { transform: scale(1.35); } }

/* flying product + cart bounce */
.fx-fly { position: fixed; z-index: 200; pointer-events: none; border-radius: 12px; background: var(--card); box-shadow: 0 8px 22px rgba(0,0,0,.18); overflow: hidden; display: grid; place-items: center; margin: 0; }
.fx-fly img { width: 100%; height: 100%; object-fit: contain; }
.fx-bump { animation: fx-bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes fx-bump { 30% { transform: scale(1.08); } 60% { transform: scale(.97); } }
.cart-bar.fx-bump { animation: fx-bump-bar .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes fx-bump-bar { 30% { transform: translateY(-4px) scale(1.02); } }

/* banners: slow zoom */
.banner img { animation: fx-kenburns 9s ease-in-out infinite alternate; }
@keyframes fx-kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
/* hero colours drift */
.hero { background-size: 160% 160%; animation: fx-hero 12s ease-in-out infinite alternate; }
@keyframes fx-hero { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }

/* coupon saved / free delivery */
.coupon-on.fx-won { animation: fx-won .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes fx-won { 0% { transform: scale(.9); } 60% { transform: scale(1.03); } 100% { transform: none; } }
.coupon-on.fx-won .tag { animation: fx-spin .7s ease; }
@keyframes fx-spin { from { transform: rotate(-200deg) scale(.4); } to { transform: none; } }
.bill-row.save span:last-child { display: inline-block; }
.saving.fx-won, #cartBarHint.fx-won { animation: fx-won .7s cubic-bezier(.3,1.6,.5,1); }

/* order placed */
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }
.fx-success { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; background: rgba(18,17,24,.0); backdrop-filter: blur(0); transition: background .35s, backdrop-filter .35s; }
.fx-success.on { background: rgba(18,17,24,.55); backdrop-filter: blur(3px); }
.fx-success.off { background: rgba(18,17,24,0); }
.fx-success-card { background: var(--card); color: var(--ink); border-radius: 22px; padding: 26px 30px 22px; text-align: center; min-width: 240px; max-width: calc(100vw - 48px); box-shadow: 0 24px 60px rgba(0,0,0,.3); transform: scale(.7); opacity: 0; transition: transform .45s cubic-bezier(.3,1.5,.5,1), opacity .25s; }
.fx-success.on .fx-success-card { transform: none; opacity: 1; }
.fx-success.off .fx-success-card { transform: scale(.9) translateY(10px); opacity: 0; }
.fx-success svg { width: 96px; height: 96px; display: block; margin: 0 auto 8px; }
.fx-success .c { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 5; stroke-dasharray: 330; stroke-dashoffset: 330; animation: fx-draw .6s ease-out .1s forwards; }
.fx-success .t { fill: none; stroke: var(--ok); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: fx-draw .4s ease-out .55s forwards; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
.fx-success h2 { margin: 4px 0 2px; font-size: 22px; }
.fx-success p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* delivery scooter rides along */
.map.moving .rider { animation: fx-ride .5s ease-in-out infinite alternate; }
@keyframes fx-ride { from { transform: translate(-50%, -60%) rotate(-3deg); } to { transform: translate(-50%, -68%) rotate(2deg); } }
.map.moving .route i { background-image: repeating-linear-gradient(90deg, var(--ok) 0 12px, #4fd18a 12px 24px); background-size: 48px 100%; animation: fx-road .8s linear infinite; }
@keyframes fx-road { to { background-position: 48px 0; } }
.map.moving .pin:last-of-type { animation: fx-ping 1.6s ease-out infinite; }
@keyframes fx-ping { 0%, 70%, 100% { transform: translate(-50%, -100%) scale(1); } 80% { transform: translate(-50%, -112%) scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  .card .thumb, .pd-pic, .card, .card .thumb img { transition: none !important; transform: none !important; }
  .pd-pic img, .pd-pic .ini, .card .badge::after, .banner img, .hero, .stepper span.fx-pop, .map.moving .rider, .map.moving .route i, .map.moving .pin:last-of-type,
  .coupon-on.fx-won, .coupon-on.fx-won .tag, .saving.fx-won, #cartBarHint.fx-won, .fx-bump, .cart-bar.fx-bump { animation: none !important; }
  .fx-pre { opacity: 1; transform: none; }
}
