/* Shared styles for the customer website, seller and rider web apps. Mobile first. */
:root {
  --brand: #0B6B43; --brand-2: #0E8553; --on-brand: #fff; --accent: #F2A20C; --accent-ink: #3b2500;
  --bg: #F6F7F4; --surface: #fff; --surface-2: #EEF2EE; --line: #DDE4DD;
  --ink: #17211B; --muted: #5C685F; --ok: #187a45; --bad: #b3261e; --info: #1d5fb8;
  --r: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --brand: #6FD8A6; --brand-2: #93E5BE; --on-brand: #062B1B; --accent: #FFC457; --bg: #0C1310; --surface: #151E19; --surface-2: #1C2821; --line: #2A3A31; --ink: #E6EFE9; --muted: #9DB0A4; --ok: #6fd49a; --bad: #f2b8b5; --info: #8ab4f8; color-scheme: dark; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", "Noto Sans", sans-serif; }
a { color: var(--brand); }
h1 { font-size: 22px; margin: 4px 0 10px; } h2 { font-size: 18px; margin: 18px 0 8px; } h3 { font-size: 16px; margin: 14px 0 6px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .bad { color: var(--bad); } .ok { color: var(--ok); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 110px; }
header.bar { position: sticky; top: 0; z-index: 50; background: var(--brand); color: var(--on-brand); }
header.bar .in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
header.bar .title { font-weight: 700; font-size: 17px; flex: 1; min-width: 0; }
header.bar .title small { display: block; font-weight: 500; font-size: 12.5px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.bar button { background: rgba(255,255,255,.16); color: inherit; border: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 12px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
button, .btn { font: 600 15px system-ui, sans-serif; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 11px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
button.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.danger { color: var(--bad); }
button.block { width: 100%; }
button.sm { padding: 6px 11px; font-size: 13.5px; border-radius: 10px; }
button.big { padding: 16px; font-size: 18px; }
button:disabled { opacity: .5; cursor: default; }
label.f { display: block; font-weight: 600; font-size: 14px; margin: 10px 0; }
label.f .hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; width: 100%; margin-top: 5px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); border-color: transparent; }
input[type=checkbox], input[type=radio] { width: auto; flex: none; margin: 0 10px 0 0; transform: scale(1.2); }
label.check { display: flex; align-items: center; margin: 10px 0; font-weight: 500; }
.field-error { color: var(--bad); font-size: 13px; margin-top: 3px; font-weight: 500; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 7px 13px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.chip.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--accent) 25%, transparent); color: #8a5a00; }
.pill.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.list > * + * { border-top: 1px solid var(--line); }
.item { display: flex; gap: 12px; padding: 10px 0; align-items: center; }
.item img, .ph { width: 58px; height: 58px; border-radius: 11px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; font-size: 22px; }
.price { font-weight: 700; } .mrp { color: var(--muted); text-decoration: line-through; font-size: 13px; margin-left: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--brand); border-radius: 10px; overflow: hidden; }
.qty button { border: 0; border-radius: 0; padding: 6px 12px; background: var(--brand); color: var(--on-brand); font-size: 17px; }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }
.add { border-color: var(--brand); color: var(--brand); padding: 6px 16px; font-size: 14px; }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.cartbar button { max-width: 728px; margin: 0 auto; display: flex; width: 100%; justify-content: space-between; padding: 14px 18px; font-size: 16px; }
.store { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.store .ph { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 6px 0 6px 26px; position: relative; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 6px; top: 11px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.steps li.done { color: var(--ink); } .steps li.done::before { background: var(--brand); border-color: var(--brand); }
.otp { font-size: 34px; font-weight: 800; letter-spacing: 8px; text-align: center; padding: 8px; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); border-radius: 12px; }
.map { height: 300px; border-radius: var(--r); border: 1px solid var(--line); z-index: 0; }
.map.tall { height: 58vh; }
.center-pin { position: relative; }
.center-pin::after { content: "📍"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); font-size: 34px; pointer-events: none; z-index: 500; }
.toast-box { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.toast.error { background: var(--bad); color: #fff; } .toast.ok { background: var(--ok); color: #fff; }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: min(760px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.banner { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-size: 14px; }
.banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; }
.banners img { width: 86%; max-width: 520px; aspect-ratio: 2.4; object-fit: cover; border-radius: 14px; scroll-snap-align: start; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.kpi b { display: block; font-size: 22px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.tabs button { flex: none; border-radius: 20px; padding: 7px 14px; font-size: 14px; }
.tabs button.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.tabs .count { background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.offer { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.big-toggle { width: 100%; padding: 18px; font-size: 19px; border-radius: 16px; }
.big-toggle.on { background: var(--ok); color: #fff; border-color: var(--ok); }
footer.links { text-align: center; font-size: 13px; color: var(--muted); padding: 20px 0; }
footer.links a { color: var(--muted); margin: 0 6px; }

/* v1.1: favourites heart, report bars, CSV preview */
button.fav { border: 0; background: none; padding: 0 2px; min-width: 32px; min-height: 32px; font-size: 20px; line-height: 1; color: var(--muted); }
button.fav.on { color: var(--bad); }
.bars { display: grid; gap: 4px; }
.bars .b { display: grid; grid-template-columns: 52px 1fr 70px; gap: 8px; align-items: center; font-size: 13px; }
.bars .b i { display: block; height: 10px; border-radius: 4px; background: var(--brand); min-width: 2px; }
.bars .b span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.errlist { max-height: 220px; overflow: auto; font-size: 13px; margin: 6px 0; padding-left: 18px; }

/* v1.2: home search, product strips, categories */
.searchbox { position: relative; margin: 12px 0 6px; }
.searchbox .ic { position: absolute; left: 14px; top: 13px; font-size: 18px; pointer-events: none; }
.searchbox input.bigsearch { width: 100%; padding: 14px 44px 14px 44px; font-size: 17px; border-radius: 14px; border: 2px solid var(--brand); background: var(--surface); margin: 0; }
.searchbox .clr { position: absolute; right: 6px; top: 6px; border: 0; background: none; min-width: 40px; min-height: 40px; font-size: 18px; color: var(--muted); }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.strip .pcard { flex: 0 0 148px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.strip .pcard img, .strip .pcard .ph { width: 100%; height: 90px; object-fit: contain; border-radius: 10px; display: grid; place-items: center; font-size: 34px; background: var(--surface-2); }
.strip .pcard .nm { font-weight: 600; margin-top: 6px; line-height: 1.25; min-height: 2.5em; }
.strip .pcard .qty button, .strip .pcard .add { min-width: 34px; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.cats .cat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; line-height: 1.2; text-align: center; min-height: 92px; }
.cats .cat .ic { font-size: 30px; }
.cats .cat img { width: 44px; height: 44px; object-fit: contain; }
.off { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--ok); }
.linkbtn { border: 0; background: none; padding: 2px 0; min-height: 0; color: var(--brand); text-decoration: underline; cursor: pointer; }
.accuracy { font-size: 13px; margin: 6px 0; }

/* trust warning (v1.3) */
.risk-box { border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.risk-box.high { border-color: color-mix(in srgb, #b3261e 55%, transparent); background: color-mix(in srgb, #b3261e 10%, transparent); }
.risk-box b { display: block; line-height: 1.35; }
.risk-box .small { margin-top: 2px; }
