/* Veggies: farm-market look modelled on the client's reference app. Olive-green header, cream ground,
   white cards, serif display type (Gilda Display) over a clean sans body (Inter, Mukta for Hindi). */
:root {
  --bg: #f6f4ec;
  --surface: #ffffff;
  --surface-2: #efede3;
  --ink: #1f2a1c;
  --muted: #6d7468;
  --line: #e4e1d5;
  --head: #4e8a2c;
  --head-ink: #ffffff;
  --leaf: #3d7a22;
  --leaf-ink: #ffffff;
  --leaf-soft: #e8f1df;
  --price: #2f6b19;
  --turmeric: #a66a00;
  --turmeric-soft: #fff4d6;
  --danger: #d23b2f;
  --danger-soft: #fde8e5;
  --ok: #3d7a22;
  --info: #2459a6;
  --info-soft: #e5eefb;
  --shadow: 0 1px 3px rgba(40, 50, 30, .08);
  --font-display: "Gilda Display", Georgia, "Mukta", serif;
  --font-body: "Inter", "Mukta", system-ui, sans-serif;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11140f; --surface: #1a1f17; --surface-2: #242a20; --ink: #e9ede4; --muted: #a0a898; --line: #2e3529;
    --head: #2f5a1a; --head-ink: #f2f6ee; --leaf: #7cc456; --leaf-ink: #0b1606; --leaf-soft: #20321a; --price: #9bd77a;
    --turmeric: #f0b43c; --turmeric-soft: #33290f; --danger: #f2a49c; --danger-soft: #3d1f1c; --ok: #7cc456; --info: #9cc0f0; --info-soft: #1d2a3d;
    --shadow: 0 1px 2px rgba(0,0,0,.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11140f; --surface: #1a1f17; --surface-2: #242a20; --ink: #e9ede4; --muted: #a0a898; --line: #2e3529;
  --head: #2f5a1a; --head-ink: #f2f6ee; --leaf: #7cc456; --leaf-ink: #0b1606; --leaf-soft: #20321a; --price: #9bd77a;
  --turmeric: #f0b43c; --turmeric-soft: #33290f; --danger: #f2a49c; --danger-soft: #3d1f1c; --ok: #7cc456; --info: #9cc0f0; --info-soft: #1d2a3d;
  --shadow: 0 1px 2px rgba(0,0,0,.5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-body); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
.serif { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--head); color: var(--head-ink); padding-top: env(safe-area-inset-top, 0px); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.topbar .top1 { gap: 10px; padding-block: 12px; }
.topbar .top2 { padding-block: 0 12px; }
.brandmark { display: flex; align-items: center; gap: 6px; flex: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.deliv { flex: 1; min-width: 0; display: grid; justify-items: start; text-align: left; background: transparent; border: 0; color: inherit; padding: 0 0 0 10px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.3); line-height: 1.2; }
.deliv-k { font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.deliv-v { display: flex; align-items: center; gap: 3px; font-weight: 700; font-size: .95rem; max-width: 100%; }
.deliv-v span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.deliv-v svg { flex: none; }
.hdr-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: inherit; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.searchbox { display: flex; align-items: center; gap: 8px; background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 14px; height: 44px; }
.searchbox svg { width: 20px; height: 20px; flex: none; }
.searchbox input { border: 0; outline: none; background: transparent; flex: 1; min-width: 0; height: 100%; color: var(--ink); font-size: .95rem; }
/* admin header reuses .topbar */
.brand { font-family: var(--font-display); font-size: 1.45rem; display: flex; align-items: center; gap: 6px; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: #f3d36b; display: inline-block; }
.logo { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--head-ink); color: var(--head); display: grid; place-items: center; font-size: 1.25rem; font-family: var(--font-display); }
.lang-btn { background: transparent; border: 1.5px solid currentColor; color: inherit; border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.loc-chip { flex: 1; min-width: 0; background: rgba(255,255,255,.14); border: 0; border-radius: 999px; padding: 6px 12px; color: inherit; text-align: left; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-flag { background: var(--turmeric-soft); color: var(--turmeric); font-size: .76rem; font-weight: 600; text-align: center; padding: 4px; }

/* ---------- buttons & fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 10px 16px; font-weight: 600; background: var(--leaf); color: var(--leaf-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--surface-2); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--leaf); padding-inline: 8px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { width: 100%; padding-block: 14px; font-size: 1.02rem; }
.btn.pill { border-radius: 999px; letter-spacing: .06em; font-weight: 700; }
.field { display: grid; gap: 4px; }
.field label { font-size: .875rem; font-weight: 600; color: var(--muted); }
.input { width: 100%; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.input:focus { border-color: var(--leaf); outline: none; }
textarea.input { resize: vertical; min-height: 64px; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------- shop ---------- */
.shop { padding-block: 14px 110px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.shop > * { min-width: 0; width: 100%; }
.hero { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 22px; scrollbar-width: none; }
.hero::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; min-height: 170px; padding: 20px 14px 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #fff; }
.slide .txt { display: grid; gap: 6px; max-width: 62%; }
.slide .kick { justify-self: start; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,.2); border-radius: 999px; padding: 3px 10px; }
.slide b { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.slide span { font-size: .88rem; opacity: .92; }
.slide img { width: 118px; height: 118px; flex: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.2)); }
.slide.s1 { background: linear-gradient(135deg, #4e8a2c, #2f6418); }
.slide.s2 { background: linear-gradient(135deg, #c77d1a, #8f4f0c); }
.slide.s3 { background: linear-gradient(135deg, #8a3f6b, #5a2347); }
.dots { display: flex; justify-content: center; gap: 6px; padding-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--line); transition: width .2s; }
.dots i.on { width: 18px; background: var(--leaf); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin: 18px auto 10px; scroll-margin-top: 80px; width: 100%; }
.kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); }
.sec-title { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; }
.sortbtn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.hrow { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 10px; overflow-x: auto; padding: 2px max(16px, env(safe-area-inset-left, 0px)) 6px; scrollbar-width: none; max-width: 1100px; margin: 0 auto; width: 100%; }
.hrow::-webkit-scrollbar { display: none; }
.produce { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: start; width: 100%; }
.side { position: sticky; top: 76px; display: grid; gap: 4px; background: var(--surface); border-radius: 16px; padding: 6px 0; box-shadow: var(--shadow); }
.scat { position: relative; border: 0; background: transparent; display: grid; justify-items: center; gap: 4px; padding: 8px 4px; font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1.15; text-align: center; }
.scat-img { width: 48px; height: 48px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.scat-img img { width: 32px; height: 32px; }
.scat.on { color: var(--leaf); }
.scat.on .scat-img { background: var(--leaf-soft); }
.scat.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--leaf); }
#sections { min-width: 0; }
.results { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); gap: 10px; }
@media (max-width: 380px) { .grid { grid-template-columns: 1fr 1fr; gap: 8px; } .produce { grid-template-columns: 66px 1fr; gap: 8px; } }

/* product card */
.pcard { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 8px 8px 10px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.pimg { background: var(--surface-2); border-radius: 14px; aspect-ratio: 1 / .86; display: grid; place-items: center; overflow: hidden; margin-bottom: 4px; }
.pimg .photo { width: 100%; height: 100%; background: transparent; border-radius: 0; font-size: 52px; display: grid; place-items: center; }
.pimg .photo img { width: 74%; height: 74%; object-fit: contain; }
.pmeta { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.vdot { width: 14px; height: 14px; flex: none; border: 1.5px solid #2e8b2e; border-radius: 3px; position: relative; }
.vdot::after { content: ""; position: absolute; inset: 2.5px; border-radius: 50%; background: #2e8b2e; }
.psel { min-width: 0; appearance: none; -webkit-appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7468' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0 center / 12px; padding: 2px 15px 2px 2px; font-size: .74rem; font-weight: 600; color: var(--muted); text-align: right; }
.pname { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pprice { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.pprice b { font-size: 1rem; font-weight: 700; color: var(--price); }
.pprice small { color: var(--muted); font-size: .7rem; }
.addbtn { margin-top: 4px; width: 100%; height: 36px; border: 0; border-radius: 999px; background: var(--leaf); color: var(--leaf-ink); font-weight: 700; font-size: .82rem; letter-spacing: .1em; }
.qty { margin-top: 4px; display: flex; align-items: center; justify-content: space-between; height: 36px; border: 1.5px solid var(--leaf); border-radius: 999px; color: var(--leaf); }
.qty button { border: 0; background: transparent; color: inherit; width: 40px; height: 100%; font-size: 1.25rem; font-weight: 700; padding: 0; }
.qty span { font-weight: 700; color: var(--ink); }
.qty.sm { margin: 0; height: 32px; width: 104px; }
.qty.sm button { width: 32px; }

/* bottom nav */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); pointer-events: none; }
.bottomnav .inner { pointer-events: auto; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 420px; margin: 0 auto; background: var(--surface); border-radius: 999px; box-shadow: 0 6px 24px rgba(30, 40, 20, .16); padding: 6px; }
.bottomnav button { border: 0; background: transparent; height: 46px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .85rem; font-weight: 700; color: var(--muted); position: relative; }
.bottomnav button svg { width: 22px; height: 22px; flex: none; }
.bottomnav button span[data-t] { display: none; }
.bottomnav button.on { background: var(--leaf); color: var(--leaf-ink); }
.bottomnav button.on span[data-t] { display: inline; }
.badge { position: absolute; top: 4px; left: calc(50% + 4px); background: var(--danger); color: #fff; border-radius: 999px; font-size: .68rem; min-width: 18px; padding: 0 5px; line-height: 18px; font-weight: 700; text-align: center; }

/* basket sheet */
.sheet.basket { gap: 12px; }
.bk-list { display: grid; gap: 10px; }
.bk-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border-radius: 16px; padding: 10px; box-shadow: var(--shadow); }
.bk-img .photo { width: 64px; height: 64px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 34px; }
.bk-img .photo img { width: 80%; height: 80%; object-fit: contain; }
.bk-meta { min-width: 0; display: grid; gap: 1px; }
.bk-name { font-family: var(--font-display); font-size: 1.08rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-price { color: var(--price); }
.bk-ctl { display: grid; justify-items: end; gap: 8px; }
.bk-del { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; }
.bk-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1.5px dashed var(--line); padding-top: 12px; font-family: var(--font-display); font-size: 1.3rem; }
.bk-total b { font-family: var(--font-body); font-size: 1.3rem; color: var(--price); }

/* ---------- pages ---------- */
.page { max-width: 640px; margin: 0 auto; padding-block: 16px 120px; display: grid; gap: 14px; }
.page-title { font-size: 1.8rem; }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 12px; }
.panel h3 { font-size: 1.05rem; }
.panel h3.serif { font-size: 1.3rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.photo { width: 72px; height: 72px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.cline { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; }
.cline .photo { width: 44px; height: 44px; font-size: 24px; border-radius: 10px; }
.cline .photo img { width: 80%; height: 80%; }
.cline .meta { min-width: 0; }
.line-price { font-weight: 700; color: var(--price); font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; border-radius: 10px; background: var(--leaf); color: var(--leaf-ink); }
.stepper button { border: 0; background: transparent; color: inherit; width: 34px; height: 34px; font-size: 1.2rem; font-weight: 700; }
.stepper span { min-width: 56px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bill { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.bill .row { display: flex; justify-content: space-between; gap: 12px; }
.bill .total { border-top: 1.5px dashed var(--line); padding-top: 8px; font-weight: 800; font-size: 1.15rem; }
.bill .save { color: var(--ok); }
.note { border-radius: 12px; padding: 8px 12px; font-size: .9rem; background: var(--turmeric-soft); }
.note.info { background: var(--info-soft); color: var(--info); }
.note.err { background: var(--danger-soft); color: var(--danger); }
.note.ok { background: var(--leaf-soft); color: var(--ok); }
.choice { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: var(--surface); }
.opt input { margin-top: 4px; accent-color: var(--leaf); }
.opt.on { border-color: var(--leaf); background: var(--leaf-soft); }
.opt.disabled { opacity: .55; cursor: not-allowed; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { text-transform: uppercase; }
#placeBtn { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* profile */
.prof-head { background: var(--head); color: var(--head-ink); padding-block: 22px 46px; border-radius: 0 0 28px 28px; }
.prof-head .wrap { display: flex; align-items: center; gap: 14px; max-width: 640px; }
.prof-head h2 { font-size: 1.6rem; }
.avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--head-ink); color: var(--head); display: grid; place-items: center; font-family: var(--font-display); font-size: 1.9rem; border: 3px solid rgba(255,255,255,.4); }
.profile .page { margin-top: -34px; padding-top: 0; }
.info-row { display: grid; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { border: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 2px; text-align: left; min-width: 0; }
.stat b { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; color: var(--leaf); line-height: 1.1; }
.stat b.area-v { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.98rem; display: flex; align-items: center; }
.stat span { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.panel.list { gap: 0; padding-block: 8px; }
.panel.list h3 { padding-block: 6px 8px; }
.lrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: transparent; padding: 12px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 600; min-height: 50px; }
a.lrow { color: inherit; text-decoration: none; }
.lrow svg { color: var(--muted); flex: none; }
.lrow.danger { color: var(--danger); }
.panel.list .btn { margin-top: 10px; }

/* orders */
.status { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 700; }
.status.placed { background: var(--info-soft); color: var(--info); }
.status.confirmed, .status.out_for_delivery { background: var(--turmeric-soft); color: var(--turmeric); }
.status.delivered { background: var(--leaf-soft); color: var(--ok); }
.status.cancelled { background: var(--danger-soft); color: var(--danger); }
.order-card { display: grid; gap: 6px; text-align: left; border: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.order-card .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.tl .dot { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: var(--surface); margin-top: 3px; position: relative; }
.tl:not(:last-child) .dot::after { content: ""; position: absolute; left: 4.5px; top: 15px; width: 3px; height: 30px; background: var(--line); }
.tl.done .dot { border-color: var(--leaf); background: var(--leaf); }
.tl.done:not(:last-child) .dot::after { background: var(--leaf); }
.tl .lbl { padding-bottom: 14px; }
.tl.done .lbl b { color: var(--leaf); }
.delivered-banner { background: var(--head); color: var(--head-ink); border-radius: var(--radius); padding: 18px; font-family: var(--font-display); font-size: 1.4rem; text-align: center; }
.ocard a { color: var(--leaf); font-weight: 600; }

/* sheets */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15, 22, 10, .55); display: grid; align-items: end; justify-items: center; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; border-radius: 26px 26px 0 0; padding: 20px max(16px, env(safe-area-inset-left, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 14px; }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 24px; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-head h2.serif { font-size: 1.7rem; }
.close { border: 0; background: var(--surface-2); border-radius: 50%; width: 36px; height: 36px; font-size: 1.05rem; flex: none; }
.map { height: 300px; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); background: var(--surface-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--leaf); }
.seg.mini { width: 104px; }
.seg.mini button { padding: 4px 6px; }
.otp-hint { font-size: .9rem; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom, 0px)); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: no-preference) { .sheet { animation: up .2s ease-out; } @keyframes up { from { transform: translateY(24px); opacity: .6; } } }
.rate-row .photo img, .sheet .photo img { width: 80%; height: 80%; }
html[lang="hi"] .kicker, html[lang="hi"] .deliv-k, html[lang="hi"] .sortbtn, html[lang="hi"] .stat span, html[lang="hi"] .addbtn { letter-spacing: 0; }
.gps-check { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.spin { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 3px solid var(--leaf-soft); border-top-color: var(--leaf); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.photo.real img, .pimg .photo.real img, .sheet .photo.real img, .rate-row .photo.real img { width: 100%; height: 100%; object-fit: cover; }
.pimg:has(.photo.real) { background: var(--surface); }
.map-search { display: flex; gap: 8px; }
.map-search .input { flex: 1; min-width: 0; }
.map-hits { display: grid; gap: 6px; }
.map-hits:empty { display: none; }
.hit { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }

/* ---------- v4: stock, favourites, slots, rating, help, install ---------- */
.pimg { position: relative; }
.fav { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--muted); display: grid; place-items: center; box-shadow: var(--shadow); }
.fav.on { color: var(--danger); }
.fav-ico { font-size: 22px; color: var(--danger); line-height: 1; }
.sold-tag { position: absolute; left: 6px; bottom: 6px; background: var(--ink); color: var(--surface); border-radius: 999px; padding: 2px 9px; font-size: .72rem; font-weight: 700; }
.pcard.sold .pimg .photo { opacity: .45; filter: grayscale(.6); }
.pcard.sold .pprice { opacity: .55; }
.addbtn.notify { background: var(--turmeric-soft); color: var(--ink); letter-spacing: 0; }
.addbtn.wait { background: var(--surface-2); color: var(--muted); letter-spacing: 0; }
.left-hint { font-size: .74rem; color: var(--danger); font-weight: 600; }
.trend { font-weight: 700; font-size: .72rem; margin-left: 2px; white-space: nowrap; }
.trend.up { color: var(--danger); }
.trend.down { color: var(--ok); }
.err-text { color: var(--danger); }
.closed-banner { display: flex; gap: 10px; align-items: center; background: var(--danger-soft); color: var(--danger); border-radius: var(--radius); padding: 12px 14px; margin-top: 10px; font-size: 1.2rem; }
.closed-banner b { font-size: 1rem; }
.closed-banner .small { color: var(--ink); font-size: .85rem; }
.install-banner { display: flex; gap: 10px; align-items: center; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; margin-top: 10px; }
.install-banner > div { flex: 1; min-width: 0; }
.install-banner .ib-ico { font-size: 1.6rem; }
.install-banner .close { flex: none; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slot { position: relative; display: grid; gap: 2px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot.on { border-color: var(--leaf); background: var(--leaf-soft); }
.slot.disabled { opacity: .5; cursor: not-allowed; }
.slot .small { color: var(--muted); min-height: 1em; }
.seg button:disabled { opacity: .45; }
.order-wrap { display: grid; gap: 4px; }
.order-wrap .again { justify-self: end; }
.stars { display: flex; gap: 6px; }
.stars button { border: 0; background: none; font-size: 2rem; line-height: 1; color: var(--turmeric); padding: 0 2px; }
.stars-ro { color: var(--turmeric); font-size: 1.4rem; letter-spacing: 2px; }
.cphoto { max-width: 160px; max-height: 160px; border-radius: 10px; object-fit: cover; }
.help .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.wa { background: #25d366; color: #0b3d1f; text-decoration: none; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
label.chip input { margin: 0 4px 0 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: .9rem; }
.chip.on, .chip:has(input:checked) { border-color: var(--leaf); background: var(--leaf-soft); color: var(--leaf); }

/* Cards in a row line up: the button always sits at the bottom, and the rate arrow lives on the photo. */
.pcard { display: flex; flex-direction: column; }
.pcard > .addbtn, .pcard > .qty { margin-top: auto; }
.pcard > .pprice { margin-bottom: 4px; }
.pimg .trend { position: absolute; left: 6px; top: 6px; background: var(--surface); border-radius: 999px; padding: 2px 8px; font-size: .72rem; box-shadow: var(--shadow); margin: 0; }

.field .ferr { font-size: .82rem; color: var(--danger); font-weight: 600; }
.field.bad .input { border-color: var(--danger); background: var(--danger-soft); }

/* Checkout: chosen delivery point */
.loc-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.loc-row .loc-pin { font-size: 1.2rem; }
.loc-row .loc-txt { flex: 1; min-width: 0; }
.loc-row .loc-txt b { display: block; }
.loc-row .loc-txt .small { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Full-screen map picker: fixed centre pin, map moves underneath */
body.mp-open { overflow: hidden; }
.mp { position: fixed; inset: 0; z-index: 80; background: #eef0ea; }
.mp-map { position: absolute; inset: 0; }
.mp .leaflet-control-attribution { font-size: 9px; background: rgba(255,255,255,.7); }
.mp-top { position: absolute; z-index: 500; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.mp-back { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; color: #1d2a1f; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: grid; place-items: center; }
.mp-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; background: #fff; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.18); color: #6b746c; }
.mp-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: #1d2a1f; font-size: 16px; }
.mp-hits { position: absolute; z-index: 500; top: calc(64px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; max-width: 560px; margin: 0 auto; background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.18); overflow: hidden; }
.mp-hits:empty { display: none; }
.mp-hit { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf0ea; background: #fff; padding: 12px 14px; color: #1d2a1f; }
.mp-hit:last-child { border-bottom: 0; }
.mp-hit.err { color: var(--danger); }
.mp-pin { position: absolute; z-index: 450; left: 50%; top: 50%; transform: translate(-50%, calc(-100% + 10px)); display: grid; justify-items: center; pointer-events: none; }
.mp-pin svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,.3)); transition: transform .18s ease; }
.mp-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.35); margin-top: 2px; transition: transform .18s ease, opacity .18s; }
.mp.moving .mp-pin svg { transform: translateY(-12px); }
.mp.moving .mp-dot { transform: scale(1.6); opacity: .5; }
.mp-tip { background: #1d2a1f; color: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; text-align: center; display: grid; gap: 2px; font-size: .82rem; white-space: nowrap; position: relative; transition: opacity .15s; }
.mp-tip span { opacity: .75; font-size: .75rem; }
.mp-tip::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #1d2a1f; }
.mp.moving .mp-tip { opacity: 0; }
.mp-card { position: absolute; z-index: 500; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; box-shadow: 0 -6px 24px rgba(0,0,0,.15); }
.mp-gps { position: absolute; top: -56px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #2f7d32; background: #fff; color: #2f7d32; font-weight: 700; border-radius: 999px; padding: 9px 16px; box-shadow: 0 4px 14px rgba(0,0,0,.15); white-space: nowrap; }
.mp-gps.busy svg { animation: mpspin 1s linear infinite; }
@keyframes mpspin { to { transform: rotate(360deg); } }
.mp-addr { display: flex; gap: 10px; align-items: flex-start; }
.mp-addr .mp-ico { font-size: 1.3rem; line-height: 1.2; }
.mp-addr b { font-size: 1.05rem; display: block; }
.mp-card .note { margin: 0; }
@media (min-width: 700px) { .mp-card { border-radius: 24px; bottom: 16px; } }
