/* M Mart design system: one stylesheet for the store, the shop panel, the rider page and the owner panel.
   Light is the default; 🌙 switches to dark (data-theme on <html>). */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root, :root[data-theme="light"] {
  --bg: #f5f6f8; --bg-2: #eef0f3; --surface: #ffffff; --surface-2: #f9fafb; --elev: #ffffff;
  --ink: #0d1526; --ink-2: #344054; --muted: #667085; --faint: #98a2b3; --line: #e7e9ee; --line-2: #d6dae1;
  --brand: #0b7a5c; --brand-2: #10a37c; --brand-ink: #ffffff; --brand-soft: #e7f6f0; --brand-soft-2: #cfeee2;
  --accent: #f59e0b; --accent-soft: #fff4dc; --danger: #e5484d; --danger-soft: #fdecec; --ok: #12a150; --ok-soft: #e6f7ed;
  --info: #3466f6; --info-soft: #e9efff; --warn: #c27803; --warn-soft: #fff6e0;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.06);
  --shadow: 0 8px 24px -6px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.05);
  --shadow-lg: 0 24px 60px -12px rgba(16,24,40,.28);
  --hero: linear-gradient(120deg, #063d2f 0%, #0b7a5c 55%, #18b088 100%);
  --glass: rgba(255,255,255,.82);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0a0e16; --bg-2: #0f1520; --surface: #121a27; --surface-2: #161f2e; --elev: #1a2434;
  --ink: #eef2f8; --ink-2: #c8d0dc; --muted: #93a0b4; --faint: #6b788c; --line: #232e40; --line-2: #2e3a4f;
  --brand: #19b48a; --brand-2: #2fd3a5; --brand-ink: #04140f; --brand-soft: #0f2c25; --brand-soft-2: #134036;
  --accent: #fbbf24; --accent-soft: #2e2410; --danger: #ff6b6f; --danger-soft: #341719; --ok: #3ccf7a; --ok-soft: #12291c;
  --info: #7c9cff; --info-soft: #17213d; --warn: #f5b942; --warn-soft: #2c2310;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 10px 30px -8px rgba(0,0,0,.6); --shadow-lg: 0 30px 70px -10px rgba(0,0,0,.7);
  --hero: linear-gradient(120deg, #04241c 0%, #0a5a45 55%, #0f8a69 100%);
  --glass: rgba(18,26,39,.82);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: "cv11", "ss01";
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; } svg.i.lg { width: 24px; height: 24px; } svg.i.xl { width: 32px; height: 32px; }
::selection { background: var(--brand-soft-2); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.strong { font-weight: 650; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hide { display: none !important; }
.spacer { height: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px;
  font-weight: 650; font-size: 15px; background: var(--brand); color: var(--brand-ink); transition: transform .12s, filter .15s, background .15s;
  white-space: nowrap; user-select: none; }
.btn:hover { filter: brightness(1.06); } .btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.block { width: 100%; } .btn.lg { height: 52px; font-size: 16px; border-radius: 14px; } .btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); filter: none; }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger.soft { background: var(--danger-soft); color: var(--danger); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.accent { background: var(--accent); color: #1f1300; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--ink-2); transition: background .15s; position: relative; }
.icon-btn:hover { background: var(--bg-2); }
.badge-dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #1f1300;
  font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* Pills, chips, tags */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 550; color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--line-2); } .chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 650; background: var(--bg-2); color: var(--ink-2); }
.tag.green { background: var(--ok-soft); color: var(--ok); } .tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.amber { background: var(--warn-soft); color: var(--warn); } .tag.blue { background: var(--info-soft); color: var(--info); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }

/* Cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.card.flat { box-shadow: none; } .card.pad-0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 16px; font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s; font-size: 15px; }
textarea.input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-icon { position: relative; } .input-icon > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon > .input { padding-left: 44px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + span { background: var(--ok); } .switch input:checked + span::after { transform: translateX(20px); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: .15s; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.radio-card input { accent-color: var(--brand); width: 18px; height: 18px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* Toast, modal, sheet */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 550; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in .25s ease; display: flex; gap: 8px; align-items: center; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.overlay { position: fixed; inset: 0; background: rgba(5,10,20,.48); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--elev); border-radius: 22px; width: 100%; max-width: 520px; max-height: calc(100dvh - 32px); overflow: auto; box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
.modal.wide { max-width: 820px; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--elev); border-bottom: 1px solid var(--line); }
.modal-head h3 { flex: 1; font-size: 18px; }
.modal-body { padding: 18px; } .modal-foot { position: sticky; bottom: 0; padding: 14px 18px; background: var(--elev); border-top: 1px solid var(--line); display: flex; gap: 10px; }
@media (max-width: 640px) {
  .overlay.sheet-mode { align-items: flex-end; padding: 0; }
  .overlay.sheet-mode .modal { border-radius: 22px 22px 0 0; max-height: 92dvh; animation: up .28s cubic-bezier(.2,.9,.3,1); }
}
@keyframes up { from { transform: translateY(100%); } }

/* Skeleton loading */
.sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--surface-2) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .art { width: 88px; height: 88px; border-radius: 28px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--brand-soft); color: var(--brand); }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 18px; }

/* Brand mark */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.03em; font-size: 20px; }
.logo .mk { width: 36px; height: 36px; border-radius: 11px; background: var(--hero); color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 850; position: relative; box-shadow: 0 6px 16px -6px rgba(11,122,92,.6); }
.logo .mk { padding-right: 5px; }
.logo .mk::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; right: 5px; bottom: 9px; }
.logo small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); margin-top: -2px; }

/* ===== STORE ===== */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--glass); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 70px; }
.loc-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; max-width: 280px; text-align: left; transition: background .15s; }
.loc-btn:hover { background: var(--bg-2); }
.loc-btn .eta { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 4px; }
.loc-btn .where { font-size: 12.5px; color: var(--muted); max-width: 220px; }
.search { flex: 1; max-width: 560px; position: relative; }
.search .input { height: 46px; background: var(--bg-2); border-color: transparent; border-radius: 14px; }
.search .input:focus { background: var(--surface); }
.cart-btn { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.cart-btn .cnt { font-size: 12px; font-weight: 600; opacity: .85; display: block; line-height: 1; }
.cart-btn .amt { font-size: 14px; line-height: 1.1; }
.mobile-search { display: none; padding: 0 16px 12px; }
.msearch .input { height: 44px; background: var(--bg-2); border-color: transparent; border-radius: 14px; }
.mob-logo, .icon-btn.mob { display: none; }
@media (max-width: 860px) {
  .topbar .search, .topbar .desk { display: none; }
  .mobile-search { display: block; }
  .topbar .wrap { height: 62px; gap: 6px; }
  .loc-btn { flex: 1; max-width: none; padding: 6px 4px; }
  .loc-btn > svg { display: none; }
  .mob-logo { display: block; } .mob-logo .mk { width: 38px; height: 38px; }
  .icon-btn.mob { display: inline-grid; }
}

.hero { margin-top: 18px; border-radius: 26px; background: var(--hero); color: #fff; padding: 34px; position: relative; overflow: hidden; min-height: 230px; display: flex; align-items: center; }
.hero::before { content: ""; position: absolute; width: 420px; height: 420px; right: -80px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); }
.hero::after { content: ""; position: absolute; width: 300px; height: 300px; right: 140px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(245,158,11,.35), transparent 65%); }
.hero .txt { position: relative; z-index: 1; max-width: 560px; }
.hero .kicker { display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; margin: 14px 0 10px; letter-spacing: -0.035em; }
.hero p { opacity: .88; font-size: 16px; max-width: 460px; }
.hero .art { position: absolute; right: 34px; top: 50%; transform: translateY(-50%); display: flex; gap: 14px; z-index: 1; }
.hero .art .bub { width: 92px; height: 92px; border-radius: 26px; background: rgba(255,255,255,.13); display: grid; place-items: center; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18);
  animation: float 6s ease-in-out infinite; }
.hero .art .bub svg { width: 40px; height: 40px; stroke: #fff; }
.hero .art .bub:nth-child(2) { margin-top: 48px; animation-delay: -2s; } .hero .art .bub:nth-child(3) { animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (max-width: 860px) { .hero .art { display: none; } .hero { padding: 22px 20px; min-height: 0; border-radius: 22px; margin-top: 4px; }
  .hero h1 { font-size: 25px; margin: 10px 0 6px; } .hero p { font-size: 14px; } .hero .kicker { font-size: 12px; } .hero .btn.lg { height: 46px; font-size: 15px; } .section { margin-top: 26px; } .section-head h2 { font-size: 19px; } }

.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.perk { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.perk .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.perk b { font-size: 14px; display: block; } .perk span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .perks { display: flex; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; gap: 8px; }
  .perks::-webkit-scrollbar { display: none; } .perk { padding: 10px 12px; flex: none; border-radius: 14px; } .perk .ic { width: 34px; height: 34px; border-radius: 10px; } .perk b { font-size: 13px; white-space: nowrap; } .perk span { white-space: nowrap; } }

.section { margin-top: 34px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 22px; font-weight: 800; }
.section-head a, .section-head button { color: var(--brand); font-weight: 650; font-size: 14px; display: flex; align-items: center; gap: 2px; }

.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 8px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s, border-color .18s; text-align: center; }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.cat .ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; }
.cat .ic svg { width: 28px; height: 28px; }
.cat b { font-size: 13px; font-weight: 650; line-height: 1.25; }
@media (max-width: 860px) { .cats { grid-template-columns: repeat(4, 1fr); gap: 8px; } .cat { padding: 12px 4px; border-radius: 16px; } .cat .ic { width: 48px; height: 48px; border-radius: 15px; } .cat b { font-size: 11.5px; } }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; } .rail > * { scroll-snap-align: start; }
@media (max-width: 640px) { .rail { grid-auto-columns: 158px; gap: 10px; } }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; } }

.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: transform .18s, box-shadow .18s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard .media { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; position: relative; overflow: hidden; }
.pcard .media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .3s; }
.pcard:hover .media img { transform: scale(1.04); }
.pcard .off { position: absolute; top: 10px; left: 10px; background: var(--info); color: #fff; font-size: 11.5px; font-weight: 800; padding: 4px 7px; border-radius: 7px; letter-spacing: .01em; }
.pcard .oos { position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 65%, transparent); display: grid; place-items: center; }
.pcard .oos span { background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; }
.pcard .body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .brand { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; }
.pcard .name { font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 38px; }
.pcard .size { font-size: 12.5px; color: var(--muted); }
.pcard .buy { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.mrp { font-size: 12.5px; color: var(--faint); text-decoration: line-through; margin-left: 2px; font-weight: 500; }
.add { height: 36px; min-width: 76px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--brand); color: var(--brand); background: var(--brand-soft); font-weight: 800; font-size: 13.5px; letter-spacing: .02em; transition: .15s; }
.add:hover { background: var(--brand); color: var(--brand-ink); }
.stepper { display: inline-flex; align-items: center; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 800; overflow: hidden; min-width: 76px; }
.stepper button { width: 30px; height: 36px; display: grid; place-items: center; color: inherit; }
.stepper button:hover { background: rgba(0,0,0,.12); }
.stepper span { min-width: 18px; text-align: center; font-size: 14px; }
.stepper.lg { height: 48px; border-radius: 14px; } .stepper.lg button { width: 46px; height: 48px; } .stepper.lg span { min-width: 28px; font-size: 16px; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; }
.ph svg { width: 42%; height: 42%; opacity: .55; stroke-width: 1.3; }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.sort { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font-size: 14px; }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 32px; margin-top: 20px; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; gap: 18px; } }
.gallery .main { aspect-ratio: 1; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.gallery .thumbs { display: flex; gap: 10px; margin-top: 12px; }
.gallery .thumbs button { width: 70px; height: 70px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); overflow: hidden; }
.gallery .thumbs button.on { border-color: var(--brand); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.pdp h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 6px 0; }
.pdp .pricebox { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 4px; }
.pdp .pricebox .price { font-size: 30px; }
.pdp .pricebox .mrp { font-size: 16px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.fact { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.fact .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-2); color: var(--ink-2); flex: none; }
.prose { color: var(--ink-2); white-space: pre-line; font-size: 14.5px; line-height: 1.65; }
.bullets { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bullets li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.bullets li svg { color: var(--ok); margin-top: 2px; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); margin-top: 18px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand); }

/* Cart drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(5,10,20,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 900; animation: fade .2s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--bg); z-index: 901; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slide .28s cubic-bezier(.2,.9,.3,1); }
@keyframes slide { from { transform: translateX(100%); } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h3 { flex: 1; font-size: 18px; }
.drawer-body { flex: 1; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { padding: 14px; background: var(--surface); border-top: 1px solid var(--line); }
.citem { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.citem + .citem { border-top: 1px solid var(--line); }
.citem .th { width: 62px; height: 62px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; flex: none; display: grid; place-items: center; }
.citem .th img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.progress { height: 6px; background: var(--bg-2); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 99px; transition: width .4s; }
.bill .line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--ink-2); }
.bill .line.total { font-weight: 800; font-size: 16px; color: var(--ink); border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 10px; }
.save-banner { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: 13.5px; }
.addr-pick { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.addr-pick .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }

/* Floating cart bar (phones) and bottom nav */
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 60; display: none; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 16px; background: var(--brand); color: var(--brand-ink); box-shadow: 0 14px 30px -10px rgba(11,122,92,.6); animation: up .3s; }
.cartbar b { font-size: 15px; } .cartbar span { font-size: 12px; opacity: .85; display: block; }
.cartbar .go { margin-left: auto; display: flex; align-items: center; gap: 4px; font-weight: 750; }
.botnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; display: none; background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.botnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; border-radius: 12px; }
.botnav a.on { color: var(--brand); }
@media (max-width: 860px) { .botnav { display: flex; } .cartbar.show { display: flex; } body.store { padding-bottom: 150px; } }

footer.site { margin-top: 60px; padding: 36px 0 30px; border-top: 1px solid var(--line); background: var(--surface); }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
footer.site h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
footer.site a { display: block; color: var(--ink-2); font-size: 14px; padding: 3px 0; } footer.site a:hover { color: var(--brand); }
@media (max-width: 640px) { footer.site .cols { grid-template-columns: 1fr 1fr; } footer.site .cols > :first-child { grid-column: 1 / -1; } }

/* Map */
.map { width: 100%; height: 300px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); position: relative; z-index: 0; background: var(--bg-2); }
.map.tall { height: 360px; }
.pin-center { position: absolute; left: 50%; top: 50%; z-index: 500; transform: translate(-50%, -100%); pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.pin-center svg { width: 40px; height: 40px; fill: var(--danger); stroke: #fff; stroke-width: 1.5; }
.map-hint { position: absolute; z-index: 500; left: 50%; top: 12px; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.map-btn { position: absolute; z-index: 500; right: 12px; bottom: 12px; }
.mk-pin { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0,0,0,.3); }
.mk-pin svg { width: 18px; height: 18px; stroke: #fff; }
.mk-pin.shop { background: var(--brand); } .mk-pin.home { background: var(--danger); } .mk-pin.rider { background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245,158,11,.6); } 70% { box-shadow: 0 0 0 16px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }
.leaflet-container { font-family: inherit; }
:root[data-theme="dark"] .leaflet-tile { filter: brightness(.72) invert(1) contrast(.9) hue-rotate(200deg) saturate(.35) brightness(.9); }

/* Order tracking */
.track-head { border-radius: 22px; background: var(--hero); color: #fff; padding: 24px; position: relative; overflow: hidden; }
.track-head h2 { font-size: 24px; font-weight: 800; margin-top: 6px; }
.track-head .sub { opacity: .85; }
.steps { display: flex; gap: 0; margin-top: 20px; position: relative; }
.steps .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; text-align: center; opacity: .55; position: relative; }
.steps .st .dot { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; z-index: 1; }
.steps .st .dot svg { width: 15px; height: 15px; stroke: #fff; }
.steps .st.done, .steps .st.now { opacity: 1; } .steps .st.done .dot { background: #fff; } .steps .st.done .dot svg { stroke: var(--brand); }
.steps .st.now .dot { background: var(--accent); box-shadow: 0 0 0 6px rgba(245,158,11,.25); }
.steps .st:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: 50%; width: 100%; height: 2px; background: rgba(255,255,255,.25); }
.steps .st.done:not(:last-child)::after { background: #fff; }
.code-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 18px; background: var(--accent-soft); border: 1.5px dashed var(--accent); }
.code-card .digits { font-size: 34px; font-weight: 850; letter-spacing: .25em; color: var(--ink); font-variant-numeric: tabular-nums; }
.olist .ocard { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: .15s; }
.olist .ocard:hover { box-shadow: var(--shadow); }
.olist .ocard + .ocard { margin-top: 12px; }
.thumbs-stack { display: flex; } .thumbs-stack > div { width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--surface); overflow: hidden; margin-left: -12px; display: grid; place-items: center; }
.thumbs-stack > div:first-child { margin-left: 0; } .thumbs-stack img { width: 100%; height: 100%; object-fit: contain; }

/* ===== PANELS (shop, admin, rider) ===== */
body.panel { background: var(--bg); }
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100dvh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow: auto; }
.side .logo { padding: 4px 8px 18px; }
.side a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: .15s; }
.side a.nav:hover { background: var(--bg-2); }
.side a.nav.on { background: var(--brand-soft); color: var(--brand); }
.side a.nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11.5px; font-weight: 800; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; }
.side .foot { margin-top: auto; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.shell > div { min-width: 0; }
.main { min-width: 0; padding: 24px 28px 60px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; flex: 1; letter-spacing: -0.03em; }
.mtop { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 14px 14px 100px; }
  .mtop { display: flex; position: sticky; top: 0; z-index: 40; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); height: 60px; align-items: center; gap: 8px; padding: 0 12px; }
  .pnav { display: flex !important; }
  .page-head h1 { font-size: 22px; }
}
.pnav { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 41; background: var(--glass); 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)); }
.pnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; font-weight: 650; color: var(--muted); position: relative; }
.pnav a.on { color: var(--brand); }
.pnav a .count { position: absolute; top: 0; left: 55%; background: var(--danger); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .stats { grid-template-columns: 1fr 1fr; gap: 10px; } }
.stat { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.stat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 550; }
.stat.hero-stat { background: var(--hero); color: #fff; border: 0; } .stat.hero-stat .l { color: rgba(255,255,255,.8); } .stat.hero-stat .ic { background: rgba(255,255,255,.16); color: #fff; }
.c-green { background: var(--ok-soft); color: var(--ok); } .c-amber { background: var(--warn-soft); color: var(--warn); } .c-red { background: var(--danger-soft); color: var(--danger); }
.c-blue { background: var(--info-soft); color: var(--info); } .c-brand { background: var(--brand-soft); color: var(--brand); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.prow { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); }
.prow + .prow { border-top: 1px solid var(--line); }
.prow .th { width: 54px; height: 54px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; flex: none; display: grid; place-items: center; }
.prow .th img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.list { border-radius: 18px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.mini-step { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; height: 34px; }
.mini-step button { width: 32px; height: 34px; display: grid; place-items: center; color: var(--ink-2); } .mini-step button:hover { background: var(--bg-2); }
.mini-step b { min-width: 34px; text-align: center; font-size: 14px; }

.ocard-p { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ocard-p.new { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ocard-p .items { font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .ogrid { grid-template-columns: 1fr; } }

.uploader { display: grid; grid-template-columns: repeat(auto-fill, 92px); gap: 10px; }
.uploader .slot { width: 92px; height: 92px; border-radius: 14px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); position: relative; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.uploader .slot img { width: 100%; height: 100%; object-fit: cover; }
.uploader .slot .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.uploader .slot .first { position: absolute; left: 4px; bottom: 4px; font-size: 10px; font-weight: 700; background: var(--brand); color: #fff; border-radius: 6px; padding: 2px 6px; }
.scan-box { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-box .frame { position: absolute; inset: 22% 12%; border: 3px solid rgba(255,255,255,.9); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-box .laser { position: absolute; left: 14%; right: 14%; height: 2px; background: #ff4d4f; box-shadow: 0 0 12px #ff4d4f; top: 50%; animation: laser 1.6s ease-in-out infinite; }
@keyframes laser { 0%, 100% { top: 26%; } 50% { top: 74%; } }

.login-page { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-page .art { background: var(--hero); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-page .art::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -180px; bottom: -200px; background: radial-gradient(circle, rgba(245,158,11,.35), transparent 65%); }
.login-page .art h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; max-width: 440px; }
.login-page .form { display: grid; place-items: center; padding: 32px 20px; }
.login-page .box { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .login-page { grid-template-columns: 1fr; } .login-page .art { padding: 28px 22px; min-height: 200px; } .login-page .art h1 { font-size: 26px; } .login-page .art .hide-sm { display: none; } }

.bars { display: flex; align-items: end; gap: 6px; height: 140px; padding-top: 10px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b { width: 100%; max-width: 28px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); min-height: 3px; }
.bars span { font-size: 10.5px; color: var(--muted); }

/* Rider */
.rider-top { background: var(--hero); color: #fff; padding: 18px 16px 70px; }
.rider-top .logo small { color: rgba(255,255,255,.75); } .rider-top .mk { background: rgba(255,255,255,.16); box-shadow: none; }
.rider-body { margin-top: -54px; padding: 0 14px 40px; display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-left: auto; margin-right: auto; }
.online-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.big-code { display: flex; gap: 10px; justify-content: center; }
.big-code input { width: 58px; height: 66px; border-radius: 14px; text-align: center; font-size: 28px; font-weight: 800; border: 2px solid var(--line-2); background: var(--surface); outline: none; }
.big-code input:focus { border-color: var(--brand); }
