:root {
  --navy: #06235c;
  --navy-2: #0b3a8c;
  --teal: #0e9f8e;
  --teal-dark: #0a7c6f;
  --sand: #f4ede1;
  --gold: #d4a24c;
  --ink: #16202b;
  --muted: #5d6b78;
  --line: #e3e7eb;
  --bg: #fbfaf7;
  --card: #ffffff;
  --danger: #c2413a;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 6px 20px rgba(10, 37, 64, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.5;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.promo { background: var(--navy); color: #cfe3f5; font-size: 13px; text-align: center; padding: 6px 12px; }
.promo b { color: var(--gold); font-weight: 600; }
header.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 250, 247, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); font-size: 18px; white-space: nowrap; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
.logo small { display: block; font-weight: 600; font-size: 10px; letter-spacing: .14em; color: var(--teal); text-transform: uppercase; margin-top: -3px; }
.search { flex: 1; display: none; }
.search input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.icon-btn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; border: 0; background: transparent; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 2px; right: 0; background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
@media (min-width: 760px) { .search { display: block; } body { padding-bottom: 0; } .bottom-nav { display: none !important; } }

/* Bottom nav (app feel on phones) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; color: var(--muted); font-weight: 600; position: relative; }
.bottom-nav a.on { color: var(--teal); }
.bottom-nav svg { width: 22px; height: 22px; }
.bottom-nav .badge { top: 2px; right: calc(50% - 22px); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 80% -20%, #1b5e86 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0d3050 100%); color: #fff; overflow: hidden; position: relative; }
.hero .wrap { padding-top: 40px; padding-bottom: 56px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(28px, 6vw, 48px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 12px; max-width: 640px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { color: #c3d6e8; max-width: 520px; margin: 0 0 22px; }
.hero .waves { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 60px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 5px 12px; font-size: 13px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 20px; font-weight: 700; cursor: pointer; background: var(--teal); color: #fff; transition: background .15s, transform .05s; text-align: center; }
.btn:hover { background: var(--teal-dark); }
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: #fff; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.wa { background: #25d366; color: #073b1f; }
.btn.big { padding: 16px 22px; font-size: 17px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { color: var(--teal-dark); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }

/* Sections */
section.block { padding: 28px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head a { white-space: nowrap; font-size: 14px; }
.sec-head h2 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat { border-radius: var(--radius); padding: 16px 12px; color: #fff; font-weight: 700; min-height: 96px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; }
.cat svg { position: absolute; right: -6px; top: -4px; width: 64px; height: 64px; opacity: .35; }
.cat small { font-weight: 500; opacity: .85; font-size: 12px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .img { aspect-ratio: 1; position: relative; }
.card .body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 14px; margin: 0; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 800; color: var(--navy); }
.price s { color: var(--muted); font-weight: 500; font-size: .85em; margin-left: 6px; }
.sale { position: absolute; top: 8px; left: 8px; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 7px; }

.ph { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255, 255, 255, .92); }
.ph svg { width: 42%; height: 42%; }
.ph.fashion { background: linear-gradient(145deg, #0e9f8e, #06235c); }
.ph.beauty { background: linear-gradient(145deg, #d4a24c, #9b4d5a); }
.ph.accessories { background: linear-gradient(145deg, #3a6ea5, #06235c); }
.ph.other { background: linear-gradient(145deg, #5d6b78, #16202b); }
.img img { width: 100%; height: 100%; object-fit: cover; }

/* Trust strip */
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font-size: 13px; color: var(--muted); }
.trust b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }

/* Product page */
.pdp { display: grid; gap: 20px; padding: 16px 0 32px; }
@media (min-width: 760px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 40px; padding-top: 32px; } }
.pdp .img { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.pdp h1 { font-size: 24px; line-height: 1.2; margin: 4px 0 8px; letter-spacing: -.02em; }
.pdp .price { font-size: 26px; }
.crumbs { font-size: 13px; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.opt { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.opt.on { border-color: var(--teal); background: #e8f6f4; color: var(--teal-dark); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 40px; height: 42px; border: 0; background: none; font-size: 20px; cursor: pointer; }
.qty span { min-width: 32px; text-align: center; font-weight: 700; }
.info-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.info-list li { display: flex; gap: 10px; }
.info-list li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-top: 7px; flex: none; }
.label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* Panels & forms */
.page { padding-top: 20px; padding-bottom: 40px; }
.page h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 16px; }
.two { display: grid; gap: 20px; }
@media (min-width: 860px) { .two { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel h2 { font-size: 17px; margin: 0 0 12px; }
.line-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item .img { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; }
.line-item .meta { font-size: 13px; color: var(--muted); }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--navy); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14, 159, 142, .15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.alert.err { background: #fdecea; color: #8a211b; }
.alert.ok { background: #e7f5ec; color: #145c33; }
.alert.info { background: #eaf3fb; color: #16456f; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 56px; height: 56px; margin: 0 auto 12px; opacity: .5; }

/* Pay page */
.pay-card { background: linear-gradient(160deg, var(--navy), #0d3a5e); color: #fff; border-radius: 18px; padding: 22px; }
.pay-card .amount { font-size: 40px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 6px; }
.pay-card .ussd { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 20px; background: rgba(255, 255, 255, .1); border-radius: 10px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 14px 0; word-break: break-all; }
.pay-card .ussd button { background: rgba(255, 255, 255, .16); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; font-size: 14px; }
.steps li::before { content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.status-pill { display: inline-block; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; background: #eef2f5; color: var(--navy); }
.status-pill.pending_payment, .status-pill.payment_submitted, .status-pill.on_hold { background: #fff4e0; color: #8a5a00; }
.status-pill.paid, .status-pill.sent_to_supplier, .status-pill.in_transit, .status-pill.arrived_hub, .status-pill.out_for_delivery { background: #e6f5f3; color: var(--teal-dark); }
.status-pill.delivered { background: #e7f5ec; color: var(--ok); }
.status-pill.cancelled, .status-pill.refunded { background: #f1f1f1; color: #666; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 28px; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px #e6f5f3; }
.timeline li::after { content: ''; position: absolute; left: 11px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.future::before { background: #cfd6dc; box-shadow: none; }
.timeline li.future { color: var(--muted); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }
.code-box { font-size: 34px; font-weight: 800; letter-spacing: .3em; text-align: center; background: var(--sand); border-radius: 12px; padding: 14px; color: var(--navy); }

footer.foot { background: var(--navy); color: #a9c0d6; font-size: 14px; margin-top: 32px; }
footer.foot .wrap { padding: 28px 16px; display: grid; gap: 18px; }
@media (min-width: 760px) { footer.foot .wrap { grid-template-columns: 2fr 1fr 1fr; } }
footer.foot h4 { color: #fff; margin: 0 0 8px; font-size: 14px; }
footer.foot a { display: block; padding: 3px 0; }
footer.foot .copy { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; font-size: 12px; grid-column: 1 / -1; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .2s; z-index: 50; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.install { display: none; }
.install.show { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; }
.install img { width: 40px; height: 40px; border-radius: 10px; }
.install div { flex: 1; font-size: 13px; color: var(--muted); }
.install b { color: var(--ink); display: block; font-size: 14px; }
.skeleton { background: linear-gradient(90deg, #eef1f3 25%, #f6f8f9 50%, #eef1f3 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.legal { max-width: 760px; }
.legal h2 { font-size: 18px; margin-top: 24px; }
.legal p, .legal li { color: #333; }

/* Categories & sub-categories */
.cats { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .cats { grid-template-columns: repeat(4, 1fr); } }
.cat { min-height: 112px; }
.cat small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph.clothes { background: linear-gradient(145deg, #0e9f8e, #06235c); }
.ph.electronics { background: linear-gradient(145deg, #3a6ea5, #06235c); }
.ph.shoes { background: linear-gradient(145deg, #8a5a3c, #2b1d14); }
.ph.jewelry { background: linear-gradient(145deg, #d4a24c, #8a5a12); }
.opts.chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 4px; scrollbar-width: none; }
.opts.chips::-webkit-scrollbar { display: none; }
.opts.chips .opt { white-space: nowrap; flex: none; }
.opts.chips + .opts.chips .opt { font-size: 14px; padding: 6px 12px; }
.gallery { display: grid; gap: 10px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; }
.thumbs button { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; cursor: pointer; }
.thumbs button.on { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.btn.danger { background: var(--danger); color: #fff; }

/* Tafaariiq / Jumlo switch */
.mode-bar { background: #fff; border-bottom: 1px solid var(--line); }
.mode-bar .wrap { padding-top: 8px; padding-bottom: 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #eef1f3; border-radius: 12px; padding: 4px; max-width: 480px; }
.seg button { border: 0; background: none; border-radius: 9px; padding: 7px 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: var(--muted); }
.seg button b { font-size: 15px; }
.seg button small { font-size: 11px; font-weight: 600; }
.seg button.on { background: var(--navy); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.seg button.on small { color: var(--gold); }
.mode-note { margin: 6px 0 0; color: var(--teal-dark); font-weight: 600; }
.wtag { display: inline-block; align-self: flex-start; background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px; }
.wtag.light { background: #f6ecd8; color: #7a5410; font-weight: 700; }
.jumlo-box { background: #fbf3e2; border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 12px; margin: 10px 0 4px; font-size: 14px; color: #6b4a00; }
.qty input { width: 56px; border: 0; text-align: center; font-weight: 700; font-size: 16px; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.sm button { width: 34px; height: 34px; }
.qty.sm input { width: 48px; font-size: 14px; }
.line-item { grid-template-columns: 64px 1fr auto; }
.price small { font-size: 12px; font-weight: 600; }

/* Categories grid: 2 across on phones, 3 on larger screens */
@media (min-width: 760px) { .cats { grid-template-columns: repeat(3, 1fr); } }
.ph.cosmetics { background: linear-gradient(145deg, #c2577a, #5a1f3a); }
.ph.pharmacy { background: linear-gradient(145deg, #2f9e6e, #0d4a36); }
.ph.gifts { background: linear-gradient(145deg, #e0556e, #7a1631); }

/* Romantic gifts banner */
.gifts-banner { display: grid; grid-template-columns: 56px 1fr; gap: 6px 14px; align-items: center; background: linear-gradient(120deg, #7a1631, #c23a5a 60%, #e98a8a); color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 28px; }
.gifts-banner svg { width: 52px; height: 52px; fill: rgba(255,255,255,.2); }
.gifts-banner b { display: block; font-size: 18px; }
.gifts-banner span { font-size: 14px; opacity: .92; }
.gifts-banner .btn { grid-column: 1 / -1; background: #fff; color: #7a1631; opacity: 1; }
@media (min-width: 760px) { .gifts-banner { grid-template-columns: 56px 1fr auto; } .gifts-banner .btn { grid-column: auto; } }

/* Official logo */
.hero { background: radial-gradient(900px 420px at 70% 10%, #0f55b8 0%, transparent 65%), linear-gradient(165deg, #06235c 0%, #041a47 100%); }
.hero-grid { display: grid; gap: 8px; align-items: center; }
.hero-logo { width: 100%; max-width: 520px; height: auto; margin: 4px auto 12px; display: block;
  border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.hero .wrap.hero-grid { padding-top: 12px; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1fr 1.1fr; } .hero-logo { order: 2; max-width: 520px; } }
.logo img { border-radius: 9px; }
.logo span { color: var(--navy); }
.logo small { color: #b8862c; }

/* Product details */
.img-wrap { position: relative; }
.sale.big { top: 12px; left: 12px; z-index: 1; font-size: 15px; padding: 6px 12px; border-radius: 8px; background: #c2413a; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.card .sale { background: #c2413a; color: #fff; }
.spec { display: flex; gap: 10px; margin: 12px 0 4px; }
.spec span { background: #fbf3e2; border: 1px solid #efdcb2; border-radius: 10px; padding: 6px 12px; display: flex; flex-direction: column; }
.spec small { font-size: 11px; color: #7a5410; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.spec b { color: var(--navy); }
.promo-row { display: flex; gap: 8px; }
.promo-row input { flex: 1; text-transform: uppercase; }
.promo-row .btn { padding: 10px 16px; }
.sum-row.disc { color: var(--ok); font-weight: 700; }
