:root {
  --brand: #056bfe;
  --brand-600: #0052d6;
  --brand-50: #edf4ff;
  --brand-100: #d8e7ff;
  --navy: #0b1b3f;
  --accent: #ff6a00;
  --accent-50: #fff3e8;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #7a8699;
  --line: #e4e8ef;
  --bg: #f5f7fb;
  --card: #ffffff;
  --danger: #c0392b;
  --warn: #b7791f;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 30, 20, .05), 0 4px 16px rgba(20, 30, 20, .05);
  --font: "Inter", "Noto Sans Sinhala", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar-h: 76px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; flex: none; }
.brand-mark svg { width: 18px; height: 18px; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.spacer { flex: 1; }

.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; transition: background .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-primary:disabled { background: #a9c4f5; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cfd6cf; }
.btn-link { background: none; border: 0; color: var(--brand); font-weight: 600; padding: 0; min-height: 0; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 16px; /* 16px stops iOS zoom */ outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(5,107,254,.18); }
.field.invalid .input { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 12.5px; display: none; }
.field.invalid .err { display: block; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card h2, .card h3 { margin: 0 0 14px; font-size: 16px; letter-spacing: -.01em; }

/* ---------- Order page ---------- */
.shop { max-width: 1160px; margin: 0 auto; padding: 16px 16px calc(var(--bar-h) + 24px); }
.hero { padding: 6px 0 14px; }
.hero h1 { font-size: 22px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.02em; }
.hero p { margin: 0; color: var(--ink-2); font-size: 14px; }

.steps { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); background: none; border: 0; padding: 0; text-align: left; }
.step::before { content: ""; height: 4px; border-radius: 4px; background: var(--line); }
.step.done::before, .step.on::before { background: var(--brand); }
.step.on { color: var(--ink); }
.step.done { color: var(--brand); }
.step:disabled { cursor: default; }

.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.layout > * { min-width: 0; }
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .hero h1 { font-size: 28px; }
}
@media (min-width: 1200px) { .layout { grid-template-columns: minmax(0, 1fr) 360px; } }

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.search { position: relative; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }
.search .input { padding-left: 40px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Products
 *  < 560px : one-column list rows (photo left, details right) — thumb-friendly on phones
 *  ≥ 560px : card grid that auto-fits as many ~210px columns as the space allows
 *            (2 on large phones / small tablets, 3–4 on tablets & laptops)
 */
.products { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.product { display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 6px 12px; padding: 12px; min-width: 0; }
.product .thumb { position: relative; grid-row: 1 / 3; width: 88px; height: 116px; border-radius: 12px; background: var(--brand-50); display: grid; place-items: center; overflow: hidden; }
.product .thumb svg { width: 36px; height: 36px; color: var(--brand); }
.product h3 { font-size: 14.5px; font-weight: 600; margin: 0 0 2px; line-height: 1.3; }
.product .meta { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.product .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; grid-column: 2; align-self: end; }
.product .price { font-weight: 700; font-size: 16px; line-height: 1.2; }
.add-btn { white-space: nowrap; }
@media (max-width: 399px) {
  .product { grid-template-columns: 78px minmax(0, 1fr); gap: 6px 10px; }
  .product .thumb { width: 78px; height: 106px; }
  .add-btn { padding: 0 12px; font-size: 13.5px; }
}
@media (max-width: 359px) {
  .product { grid-template-columns: 70px minmax(0, 1fr); gap: 6px 10px; padding: 10px; }
  .product .thumb { width: 70px; height: 96px; }
}
@media (min-width: 560px) {
  .products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 14px; }
  .product { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding: 12px; gap: 10px; }
  .product .thumb { grid-row: auto; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 220px; }
  .product .thumb svg { width: 52px; height: 52px; }
  .product .foot { grid-column: 1; }
}

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.stepper button { width: 38px; height: 38px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--brand); display: grid; place-items: center; }
.stepper button:active { background: var(--brand-50); }
.stepper input { width: 40px; height: 38px; border: 0; text-align: center; font-weight: 700; font-size: 15px; outline: none; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.add-btn { min-height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--brand); color: var(--brand); background: #fff; font-weight: 700; font-size: 14px; }
.add-btn:active { background: var(--brand-50); }

.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .name { font-weight: 600; font-size: 14.5px; }
.cart-line .sub { font-size: 12.5px; color: var(--ink-3); }
.cart-line .lt { font-weight: 700; text-align: right; }
.cart-line .ctrl { display: flex; align-items: center; gap: 14px; }

.totals { display: grid; gap: 8px; font-size: 14px; }
.totals .r { display: flex; justify-content: space-between; gap: 12px; }
.totals .r span:first-child { color: var(--ink-2); }
.totals .r small { display: block; color: var(--ink-3); font-size: 12px; }
.totals .grand { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; font-size: 17px; font-weight: 800; }
.totals .grand span:first-child { color: var(--ink); }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); background: var(--brand-50); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.note svg { flex: none; width: 16px; height: 16px; color: var(--brand); margin-top: 1px; }
.warnbox { background: #fff7e8; color: #7a5212; }

.pay-opt { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--brand); background: var(--brand-50); border-radius: 12px; padding: 14px; }
.pay-opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 6px solid var(--brand); background: #fff; flex: none; margin-top: 1px; }
.pay-opt b { display: block; }
.addr-block { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sec-head h3 { margin: 0; }

.empty { text-align: center; padding: 40px 16px; color: var(--ink-3); }
.empty svg { width: 44px; height: 44px; color: #c4ccc5; margin-bottom: 8px; }

/* summary aside (desktop) */
.summary { display: none; }
@media (min-width: 960px) {
  .summary { display: block; position: sticky; top: 76px; }
  .summary .lines { max-height: 260px; overflow: auto; margin-bottom: 12px; }
  .summary .mini { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 6px 0; }
  .summary .mini span:first-child { color: var(--ink-2); }
}

/* bottom bar (mobile) */
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px;
  box-shadow: 0 -6px 20px rgba(20,30,20,.06);
}
.bottom-bar .info { flex: 1; min-width: 0; }
.bottom-bar .info b { display: block; font-size: 17px; }
.bottom-bar .info span { font-size: 12.5px; color: var(--ink-3); }
.bottom-bar .btn { min-width: 150px; }
@media (min-width: 960px) { .bottom-bar { display: none; } .shop { padding-bottom: 40px; } }

.success { max-width: 520px; margin: 30px auto; text-align: center; }
.success .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-50); display: grid; place-items: center; margin: 0 auto 16px; }
.success .tick svg { width: 38px; height: 38px; color: var(--brand); }
.success h2 { font-size: 22px; margin: 0 0 8px; }
.order-no { display: inline-block; margin: 14px 0; padding: 10px 18px; border-radius: 12px; background: #fff; border: 1px dashed var(--brand); font-weight: 800; font-size: 20px; letter-spacing: .03em; }
.success .actions { display: grid; gap: 10px; margin-top: 18px; }

.bump { animation: bump .3s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60;
  transition: all .2s; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 960px) { .toast { bottom: 24px; } }

/* product photos + MRP / discount */
.product .thumb.has-img { background: #f7f8f7; }
/* absolute so the tall photo never stretches its grid track — always fully visible */
.product .thumb.has-img img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.product .thumb .save { position: absolute; z-index: 1; top: 5px; left: 5px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; padding: 2px 5px; border-radius: 6px; }
.product .price .mrp { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); }
@media (min-width: 560px) {
  .product .thumb.has-img img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
  .product .thumb .save { top: 8px; left: 8px; font-size: 12px; padding: 3px 7px; }
}

/* ---------- App bar: exact logo + mobile back (iOS / Android pattern) ---------- */
.brand.logo img { display: block; height: 34px; width: auto; }
.nav-back { display: none; width: 40px; height: 40px; margin-left: -8px; border: 0; background: none; border-radius: 50%; color: var(--ink); place-items: center; -webkit-tap-highlight-color: transparent; }
.nav-back svg { width: 24px; height: 24px; }
.nav-back:active { background: var(--brand-50); }
.nav-title { display: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 959px) {
  .topbar-in { min-height: 56px; }
  body.has-back .nav-back { display: grid; }
  body.has-back .nav-title { display: block; }
  body.has-back .brand.logo { display: none; }
  body.has-back .steps { margin-top: 0; }
}
@media (max-width: 359px) { .brand.logo img { height: 28px; } }

/* ---------- Custom district picker ---------- */
.picker-field { position: relative; }
.picker-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.picker-btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn svg { flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s; }
.picker-btn.placeholder > span { color: var(--ink-3); }
.picker-open .picker-btn svg { transform: rotate(180deg); }
.picker-field.invalid .picker-btn { border-color: var(--danger); }

.picker-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border: 0; background: none; text-align: left; font-size: 15.5px; color: var(--ink); border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.picker-opt small { display: block; font-size: 12px; color: var(--ink-3); }
.picker-opt:hover, .picker-opt:focus-visible { background: var(--brand-50); outline: none; }
.picker-opt.on { color: var(--brand); font-weight: 700; background: var(--brand-50); }
.picker-opt svg { width: 18px; height: 18px; flex: none; }
.picker-empty { padding: 24px; text-align: center; color: var(--ink-3); }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 10px; font-size: 16px; }
.picker-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 22px; line-height: 1; color: var(--ink-2); }
.picker-search { margin: 0 12px 8px; }
.picker-search .input { min-height: 44px; }
.picker-list { overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }

/* phones: bottom sheet */
@media (max-width: 959px) {
  body.picker-open { overflow: hidden; }
  .picker { position: fixed; inset: 0; z-index: 100; }
  .picker-scrim { position: absolute; inset: 0; background: rgba(15, 22, 17, .42); opacity: 0; transition: opacity .2s; }
  .picker-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; max-height: 80dvh; display: flex; flex-direction: column; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 0 env(safe-area-inset-bottom); transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 -10px 40px rgba(0,0,0,.15); }
  .picker.show .picker-scrim { opacity: 1; }
  .picker.show .picker-panel { transform: none; }
  .picker-grip { width: 38px; height: 4px; border-radius: 4px; background: #d6dbd6; margin: 2px auto 10px; }
  .picker-list { flex: 1; }
}
/* desktop: dropdown under the field */
@media (min-width: 960px) {
  .picker { position: absolute; left: 0; right: 0; top: calc(100% - 8px); z-index: 50; }
  .picker-scrim { position: fixed; inset: 0; }
  .picker-panel { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 30, 20, .14); padding-top: 10px; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
  .picker.show .picker-panel { opacity: 1; transform: none; }
  .picker-grip, .picker-head { display: none; }
  .picker-list { max-height: 300px; }
  .picker-opt { padding: 10px 12px; font-size: 14.5px; }
}

/* Highlighted delivery offer */
.ship-badge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0 0 14px; border-radius: 14px; background: linear-gradient(135deg, var(--brand) 0%, #3d8bff 100%); color: #fff; box-shadow: 0 6px 18px rgba(5,107,254,.25); }
.ship-badge .ship-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.ship-badge .ship-ic svg { width: 22px; height: 22px; }
.ship-badge b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; line-height: 1.25; }
.ship-badge small { display: block; font-size: 12.5px; opacity: .9; margin-top: 1px; }
.card .ship-badge { margin: 14px 0 0; }

/* Brand: logo mark + wordmark */
.brand.logo { gap: 9px; }
.brand.logo img { height: 34px; width: 34px; }
.brand-txt { color: var(--navy); font-weight: 800; letter-spacing: -.01em; line-height: 1.1; font-size: 16px; }
.brand-txt small { display: block; font-weight: 600; font-size: 10.5px; color: var(--brand); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Bulk offer ---------- */
.product .price .per { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.product .thumb .save { background: var(--accent); }
.offer { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--accent-50); border: 1px dashed #ffb27a; color: #7a3300; font-size: 12.5px; line-height: 1.3; }
.offer-ic { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.offer-txt { flex: 1; min-width: 0; }
.offer b { display: block; color: #5c2600; font-size: 13px; }
.offer small { display: block; color: #9a4a10; }
.offer-btn { flex: none; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: 12.5px; padding: 8px 10px; white-space: nowrap; }
.offer-btn:active { transform: scale(.97); }
.offer .offer-ic + span:not(.offer-txt) { flex: 1; }
.bulk-tag { color: var(--accent); font-weight: 700; }
.nudge { font-size: 12px; color: #9a4a10; margin-top: 4px; }
.nudge.ok { color: var(--brand); font-weight: 600; }
.totals .save-row span { color: var(--accent) !important; font-weight: 700; }
@media (min-width: 560px) { .offer { grid-column: 1; } }

/* ---------- Simplified product card (v3) ---------- */
.perks { display: grid; gap: 10px; margin: 0 0 14px; }
.perks .ship-badge { margin: 0; }
@media (min-width: 640px) { .perks { grid-template-columns: 1fr 1fr; } }
.bulk-badge { background: linear-gradient(135deg, var(--accent) 0%, #ff8f3d 100%); box-shadow: 0 6px 18px rgba(255, 106, 0, .22); }
.bulk-badge .ship-ic { font-weight: 800; font-size: 18px; }

.product h3 { font-size: 15px; }
.product .meta { margin-top: 1px; }
.deal { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; line-height: 1.35; color: #8a4510; min-height: 28px; }
.deal b { color: var(--accent); font-weight: 800; }
.deal-btn { flex: none; border: 1px solid #ffc49a; background: var(--accent-50); color: #c2410c; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.deal-btn:active { transform: scale(.96); }
.deal-ok { color: #15803d; font-weight: 700; }
.pdetails { grid-column: 2; font-size: 12.5px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 6px; }
.pdetails summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-weight: 600; padding: 2px 0; -webkit-tap-highlight-color: transparent; }
.pdetails summary::-webkit-details-marker { display: none; }
.pdetails summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.pdetails[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.pdetails > div { padding: 4px 0 2px; line-height: 1.5; }
@media (min-width: 560px) { .deal, .pdetails { grid-column: 1; } }

.deal-txt { flex: 1; min-width: 0; }
@media (max-width: 559px) {
  .perks .ship-badge { padding: 10px 12px; gap: 10px; }
  .perks .ship-ic { width: 34px; height: 34px; }
  .perks .ship-badge b { font-size: 14.5px; }
}

/* =====================================================================
   v4 — layout from the approved mockup (Oct 2026)
   ===================================================================== */
.hero h1 { color: var(--navy); font-weight: 800; }
.ok-txt { color: #15803d; }
.req { color: var(--danger); font-weight: 700; }
.ic-ok { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #16a34a; color: #fff; vertical-align: -3px; flex: none; }
.ic-ok svg { width: 11px; height: 11px; }

/* header */
.hdr-cart { display: none; position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy); place-items: center; margin-left: 8px; }
.hdr-cart svg { width: 22px; height: 22px; }
.hdr-cart .badge { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: none; place-items: center; }
.hdr-cart.has .badge { display: grid; }
@media (min-width: 960px) { .hdr-cart { display: grid; } }
@media (max-width: 959px) {
  body.has-back .nav-title { flex: 1; text-align: center; padding-right: 32px; font-size: 17px; }
  body.has-back .topbar .spacer, body.has-back #lang { display: none; }
}

/* steps: numbered circles joined by a line */
.steps { gap: 0; margin: 6px 0 18px; overflow: visible; }
.stp { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.stp:disabled { cursor: default; }
.stp:not(:first-child)::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stp.done::before, .stp.on::before { background: var(--brand); }
.stp .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); color: var(--ink-3); font-size: 12px; font-weight: 800; }
.stp .dot svg { width: 12px; height: 12px; }
.stp.done .dot, .stp.on .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.stp.on { color: var(--brand); }
.stp.done { color: var(--ink-2); }

/* perks */
.perks { display: grid; gap: 10px; margin: 0 0 16px; }
@media (min-width: 640px) { .perks { grid-template-columns: 1fr 1fr; } }
.perk { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid; }
.perk-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; }
.perk-ic svg { width: 32px; height: 32px; }
.perk b { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; }
.perk small { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.perk-blue { background: #edf4ff; border-color: #d8e7ff; }
.perk-blue .perk-ic, .perk-blue b { color: var(--brand); }
.perk-orange { background: #fff3e8; border-color: #ffdcc2; }
.perk-orange .perk-ic, .perk-orange b { color: var(--accent); }

/* product cards: photo left, details right, at every width */
.products.v4 { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .products.v4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 14px; } }
.products.v4 .product { display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto auto; gap: 10px 14px; padding: 14px; align-content: start; }
.products.v4 .product .thumb { grid-row: 1; grid-column: 1; width: 88px; height: 104px; aspect-ratio: auto; max-height: none; border-radius: 12px; background: #f3f5f9; }
.products.v4 .pinfo { grid-column: 2; min-width: 0; display: grid; gap: 4px; align-content: start; }
.ptop { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ptitle { min-width: 0; }
.products.v4 .product h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0 0 2px; }
.products.v4 .product .meta { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.products.v4 .price { font-size: 18px; font-weight: 800; color: var(--navy); margin-top: 4px; }
.products.v4 .price .per { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.products.v4 .price .mrp { display: inline; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.products.v4 .deal { grid-column: auto; min-height: 0; }
.products.v4 .pdetails { grid-column: 1 / -1; border: 0; padding: 0; }
.products.v4 .pdetails summary { width: 100%; justify-content: space-between; background: #f3f5f9; border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.products.v4 .pdetails[open] summary { border-radius: 10px 10px 0 0; }
.products.v4 .pdetails > div { background: #f8f9fc; border-radius: 0 0 10px 10px; padding: 8px 12px 10px; }
.add-btn { background: var(--brand); color: #fff; border-color: var(--brand); border-radius: 10px; min-height: 36px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.add-btn:active { background: var(--brand-600); }
.deal-txt { font-size: 13px; color: #b45309; text-align: left; }
.deal-txt b { color: var(--accent); }
.deal-link { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: #b45309; text-align: left; }
.deal-link:hover { text-decoration: underline; }
.deal-ok { color: #15803d; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.nudge { font-size: 12.5px; color: #b45309; }
.nudge.ok { color: #15803d; font-weight: 600; display: flex; align-items: center; gap: 6px; }

/* thumbs */
.thumb.xs { width: 40px !important; height: 46px !important; border-radius: 8px; background: #f3f5f9; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; }
.thumb.sm { width: 52px !important; height: 62px !important; border-radius: 10px; background: #f3f5f9; flex: none; position: relative; overflow: hidden; display: grid; place-items: center; }
.thumb.xs img, .thumb.sm img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.cart-item > .thumb, .rv-item > .thumb { position: relative; overflow: hidden; display: grid; place-items: center; }
.cart-item > .thumb { width: 72px; height: 86px; border-radius: 12px; background: #f3f5f9; }
.cart-item > .thumb img { position: absolute; inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); object-fit: contain; }

/* bottom bar */
.bottom-bar .info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bottom-bar .info b { display: inline; font-size: 17px; }
.bar-cart { display: grid; place-items: center; color: var(--brand); }
.bar-cart svg { width: 22px; height: 22px; }
.bar-sub { font-size: 12.5px; color: var(--ink-3); }
.bottom-bar .btn { position: relative; }
.btn-badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }

/* desktop cart sidebar */
.side-cart h3 { display: flex; align-items: center; gap: 8px; }
.h-ic { color: var(--brand); display: grid; }
.h-ic svg { width: 20px; height: 20px; }
.side-empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 18px 0 20px; color: var(--ink-3); font-size: 13px; }
.side-empty svg { width: 48px; height: 48px; color: #c7cfdb; margin-bottom: 4px; }
.side-empty b { color: var(--ink); font-size: 14.5px; }
.mini-line { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; }
.ml-name { min-width: 0; font-weight: 600; }
.ml-name small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.summary .lines { max-height: 300px; overflow: auto; margin-bottom: 10px; }
@media (min-width: 960px) { .mob-totals { display: none; } }

/* cart */
.cart-list { padding: 4px 14px; }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ci-main { min-width: 0; display: grid; gap: 6px; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.ci-name { font-size: 15.5px; color: var(--navy); }
.ci-price { text-align: right; }
.ci-price s { color: var(--ink-3); font-size: 12.5px; }
.ci-price b { font-size: 17px; color: var(--navy); }
.ci-price small { display: block; color: var(--ink-3); font-size: 12px; }
.ci-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ci-foot .remove { color: var(--ink-3); flex: none; }
.add-more { display: block; width: 100%; text-align: center; padding: 14px 0 10px; }

/* totals */
.totals .grand { font-size: 20px; }
.totals .grand span:last-child { color: var(--navy); }

/* delivery form */
.dform .field:last-child { margin-bottom: 0; }

/* review */
.rv-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-size: 14px; }
.rv-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.rv-ic svg { width: 18px; height: 18px; }
.rv-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rv-item:last-child { border-bottom: 0; }
.rv-main .meta { color: var(--ink-3); font-size: 12.5px; }
.pay-opt { align-items: center; border-width: 1.5px; }
.pay-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #fff; color: var(--brand); display: grid; place-items: center; }
.pay-ic svg { width: 22px; height: 22px; }
.pay-check { margin-left: auto; }

/* thank-you */
.success .tick { position: relative; width: 92px; height: 92px; background: #16a34a; box-shadow: 0 10px 30px rgba(22, 163, 74, .3); margin-top: 10px; }
.success .tick > svg { width: 46px; height: 46px; color: #fff; }
.success .tick i { position: absolute; width: 7px; height: 7px; border-radius: 50%; }
.success .tick i:nth-child(1) { background: var(--brand); left: -22px; top: 10px; }
.success .tick i:nth-child(2) { background: var(--accent); right: -26px; top: 22px; width: 6px; height: 6px; }
.success .tick i:nth-child(3) { background: #16a34a; left: -12px; bottom: -6px; width: 5px; height: 5px; }
.success .tick i:nth-child(4) { background: var(--brand); right: -14px; bottom: 2px; }
.success .tick i:nth-child(5) { background: #facc15; left: 50%; top: -20px; width: 6px; height: 6px; }
.success .tick i:nth-child(6) { background: var(--accent); left: -34px; top: 54px; width: 5px; height: 5px; }
.success h2 { font-size: 26px; line-height: 1.25; color: var(--navy); margin-top: 18px; }
.order-no { border: 0; background: var(--brand-50); color: var(--brand); border-radius: 999px; padding: 10px 26px; font-size: 22px; margin: 6px 0 14px; }
.btn-outline { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline svg, .btn-wa svg { width: 20px; height: 20px; }
.btn-wa { background: #1f9d55; color: #fff; }
.btn-wa:hover { background: #18864a; }
.success .actions { display: grid; gap: 10px; margin-top: 14px; }
.done-sum { text-align: left; margin-top: 18px; }
.done-sum .r { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.done-sum .r span:first-child { color: var(--ink-2); }
.done-sum .grand { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-size: 18px; font-weight: 800; }
.done-sum .save-row span { color: var(--accent) !important; font-weight: 700; }
@media (min-width: 960px) {
  .shop, .topbar-in { max-width: 1240px; }
  .products.v4 { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
  .products.v4 .product { grid-template-columns: 72px minmax(0, 1fr); padding: 12px; gap: 10px 12px; }
  .products.v4 .product .thumb { width: 72px; height: 88px; }
  .products.v4 .product h3 { font-size: 15px; }
  .products.v4 .price { font-size: 16px; }
  .add-btn { padding: 0 12px; min-height: 34px; font-size: 13.5px; }
}

/* v4.1 fixes: price + button on one row, compact cart rows, centred thank-you */
.pbuy { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.products.v4 .pbuy .price { margin-top: 0; white-space: nowrap; }
.products.v4 .ptitle .meta { white-space: normal; }
.products.v4 .stepper button { width: 34px; height: 36px; }
.products.v4 .stepper input { width: 42px; height: 36px; }
@media (min-width: 960px) {
  .products.v4 .stepper button { width: 30px; height: 32px; font-size: 18px; }
  .products.v4 .stepper input { width: 36px; height: 32px; font-size: 14px; }
}

.cart-item { grid-template-columns: 60px minmax(0, 1fr); align-items: start; padding: 12px 0; }
.cart-item > .thumb { width: 60px; height: 70px; }
.ci-main { gap: 4px; }
.ci-top { align-items: center; }
.ci-t { min-width: 0; }
.ci-ctl { display: flex; align-items: center; gap: 6px; flex: none; }
.ci-ctl .stepper button { width: 32px; height: 34px; }
.ci-ctl .stepper input { width: 40px; height: 34px; }
.icon-del { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--ink-3); display: grid; place-items: center; }
.icon-del svg { width: 18px; height: 18px; }
.icon-del:hover { background: #fff0f0; color: var(--danger); }
.ci-foot { align-items: center; min-height: 22px; }
.ci-foot .ci-price { flex: none; text-align: right; white-space: nowrap; }
.ci-price b { font-size: 16px; }
@media (max-width: 400px) { .ci-top { flex-wrap: wrap; } .ci-ctl { margin-left: auto; } }

.layout.single { grid-template-columns: minmax(0, 1fr) !important; }
.layout.single .success { margin: 30px auto 40px; }
@media (min-width: 640px) {
  /* photo + title on top, then price/button and offer across the full card width */
  .products.v4 .pinfo { display: contents; }
  .products.v4 .product { grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .products.v4 .product .thumb { grid-column: 1; grid-row: 1; width: 72px; height: 84px; }
  .products.v4 .ptitle { grid-column: 2; grid-row: 1; }
  .products.v4 .pbuy, .products.v4 .deal, .products.v4 .pdetails { grid-column: 1 / -1; }
  .products.v4 .pbuy { margin-top: 0; flex-wrap: nowrap; }
}

/* Busy buttons: keep size, hide label, show spinner; can't be clicked again */
.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.is-busy > * { visibility: hidden; }
.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(255,255,255,.55); border-top-color: #fff; animation: spin .7s linear infinite; visibility: visible; }
.btn-ghost.is-busy::after, .btn-link.is-busy::after, .btn-outline.is-busy::after, .icon-del.is-busy::after, .cs-btn.is-busy::after, .icon-btn.is-busy::after, .status-flow button.is-busy::after { border-color: rgba(5,107,254,.25); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
/* while an order is being placed nothing on the page can change it */
body.placing #panel, body.placing #steps, body.placing #lang, body.placing .hdr-cart { pointer-events: none; opacity: .6; transition: opacity .2s; }
