/* Avenues Mall — mobile-first, low-data stylesheet. System fonts only (no downloads). */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #1b2326;
  --ink-2: #4b575b;
  --ink-3: #7a8588;
  --line: #e2ded4;
  --brand: #0d5466;
  --brand-ink: #ffffff;
  --brand-soft: #e2eef0;
  --store: #b8741a;
  --store-soft: #f8ecd9;
  --wa: #128c4a;
  --wa-soft: #e3f4ea;
  --danger: #a3341f;
  --danger-soft: #f7e3de;
  --ok: #24724a;
  --warn: #8a5a00;
  --warn-soft: #fbf0d6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 30, 35, .06), 0 4px 14px rgba(20, 30, 35, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-2); }
.tiny { font-size: .82rem; color: var(--ink-3); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #f0b23a; outline-offset: 2px; border-radius: 6px; }

/* Header */
.top { position: sticky; top: 0; z-index: 30; background: rgba(246, 244, 239, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 34px; color: var(--brand); flex: none; }
.brand span { line-height: 1.05; font-size: 1.02rem; }
.brand span em { display: block; font-style: normal; font-weight: 500; font-size: .7rem; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.topnav { display: none; gap: 4px; margin-left: 12px; }
.topnav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.topnav a[aria-current="page"], .topnav a:hover { background: var(--surface); color: var(--ink); }
.top-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.iconbtn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--ink); text-decoration: none; position: relative; background: transparent; border: 0; }
.iconbtn:hover { background: var(--surface); }
.iconbtn svg { width: 22px; height: 22px; }
.count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--store); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.count[data-n="0"] { display: none; }

/* Bottom navigation (phones) */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-size: .72rem; font-weight: 600; position: relative; }
.bottomnav a svg { width: 23px; height: 23px; }
.bottomnav a[aria-current="page"] { color: var(--brand); }
.bottomnav .count { top: 6px; right: calc(50% - 22px); }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  h1 { font-size: 2rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; background: var(--brand); color: var(--brand-ink); line-height: 1.1; text-align: center; }
.btn:hover { filter: brightness(1.07); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.store { background: var(--store); color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }

/* Cards and sections */
.section { padding-top: 22px; padding-bottom: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2-md { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g3-lg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 640px) { .scroller { grid-auto-columns: 30%; } }
@media (min-width: 900px) { .scroller { grid-auto-columns: 23%; } }

/* Hero */
.hero { padding-top: 22px; padding-bottom: 8px; }
.hero h1 { font-size: 1.85rem; max-width: 16ch; }
.hero p { color: var(--ink-2); max-width: 46ch; }
@media (min-width: 900px) { .hero { padding-top: 48px; padding-bottom: 16px; } .hero h1 { font-size: 2.8rem; } }
.searchbar { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 5px 5px 16px; align-items: center; box-shadow: var(--shadow); max-width: 560px; }
.searchbar input { border: 0; outline: 0; flex: 1; font: inherit; min-width: 0; background: transparent; padding: 8px 0; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.chip[aria-current="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Value strip */
.ways { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ways { grid-template-columns: repeat(3, 1fr); } }
.way { display: flex; gap: 12px; align-items: flex-start; padding: 14px; }
.way .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.way .ic svg { width: 22px; height: 22px; }
.way h3 { margin-bottom: 2px; }
.way p { margin: 0; color: var(--ink-2); font-size: .93rem; }

/* Product card */
.pcard { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; height: 100%; }
.pcard .ph { aspect-ratio: 1 / 1; background: var(--surface-2); position: relative; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcard .nm { font-weight: 650; font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .by { font-size: .8rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-weight: 750; font-size: 1.02rem; }
.price s { color: var(--ink-3); font-weight: 500; font-size: .85em; margin-left: 4px; }
.ask { color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.tag { position: absolute; top: 8px; left: 8px; background: var(--store); color: #fff; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .02em; }
.tag.deal { background: var(--danger); }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--ink-3); font-weight: 700; font-size: 1.6rem; background: linear-gradient(135deg, var(--surface-2), #e6e1d6); }

/* Shop card */
.scard { display: flex; gap: 12px; padding: 12px; text-decoration: none; color: inherit; align-items: center; }
.logo { width: 58px; height: 58px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-2); border: 1px solid var(--line); }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.logo.lg { width: 84px; height: 84px; border-radius: 18px; border: 3px solid var(--surface); box-shadow: var(--shadow); }
.scard .nm { font-weight: 700; }
.scard .meta { font-size: .85rem; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--wa-soft); color: var(--ok); }
.pill.store { background: var(--store-soft); color: var(--store); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

/* Shop page */
.cover { height: 150px; background: var(--brand-soft) center / cover no-repeat; border-radius: 0 0 var(--radius) var(--radius); }
@media (min-width: 900px) { .cover { height: 240px; border-radius: var(--radius); margin-top: 16px; } }
.shophead { display: flex; gap: 14px; align-items: flex-end; margin-top: -42px; padding: 0 4px; }
.shophead h1 { margin: 0; font-size: 1.45rem; }

/* Product page */
.pgrid { display: grid; gap: 18px; }
@media (min-width: 900px) { .pgrid { grid-template-columns: 1.05fr 1fr; gap: 32px; padding-top: 20px; } }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); background: var(--surface-2); margin: 0 -16px; }
@media (min-width: 900px) { .gallery { margin: 0; } }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; scroll-snap-align: start; }
.buybox { padding: 16px; }
.sticky-buy { position: sticky; bottom: calc(var(--nav-h) + 8px); z-index: 10; }
@media (min-width: 900px) { .sticky-buy { position: static; } }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 44px; height: 44px; border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.qty input { width: 40px; text-align: center; border: 0; font: inherit; font-weight: 700; background: transparent; }
.soldby { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: var(--radius-sm); background: var(--surface-2); }

/* Forms */
label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid #cfcabd; background: #fff; color: var(--ink); min-height: 46px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-weight: 500; }
.radio-card input { width: 20px; height: 20px; margin-top: 2px; }
.radio-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warn-soft); color: #5b3f00; margin-bottom: 14px; }
.alert.bad { background: var(--danger-soft); color: var(--danger); }
.alert.ok { background: var(--wa-soft); color: var(--ok); }
.alert.info { background: var(--brand-soft); color: var(--brand); }

/* Basket */
.bline { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.bline:first-child { border-top: 0; }
.bline .thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.bline .thumb img { width: 100%; height: 100%; object-fit: cover; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.totals .grand { font-weight: 800; font-size: 1.15rem; padding-top: 6px; border-top: 1px solid var(--line); }

/* Steps / timeline */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 16px 30px; }
.steps li::before { content: ""; position: absolute; left: 7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.steps li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { background: var(--ok); }
.steps li.now::before { background: var(--store); box-shadow: 0 0 0 4px var(--store-soft); }

/* Tables (dashboards) */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tablewrap { overflow-x: auto; }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 14px; }
.kpi .v { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .82rem; color: var(--ink-2); }

/* Back-office shell */
.shell-top { background: var(--ink); color: #fff; }
.shell-top .wrap { display: flex; align-items: center; gap: 12px; height: 56px; }
.shell-top .brand { color: #fff; }
.shell-top .brand svg { color: #1a7487; }
.shell-top .brand span em { color: #b8c2c4; }
.shell-top a.out { color: #d6dddf; margin-left: auto; font-size: .9rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); background: var(--surface); scrollbar-width: none; }
.tabs a { padding: 13px 14px; text-decoration: none; color: var(--ink-2); font-weight: 650; white-space: nowrap; border-bottom: 3px solid transparent; font-size: .93rem; }
.tabs a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }
body.shell { padding-bottom: 24px; }

.footer { padding: 28px 0 36px; color: var(--ink-2); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 28px; }
.footer a { color: var(--ink-2); }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-2); }
.empty svg { width: 44px; height: 44px; color: var(--ink-3); margin: 0 auto 8px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 92vw; text-align: center; }
.toast.show { opacity: 1; }
.banner-store { background: linear-gradient(120deg, #3b2a12, #6b4513); color: #fff; border-radius: var(--radius); padding: 20px; position: relative; overflow: hidden; }
.banner-store h2 { color: #fff; }
.banner-store p { color: #f3e2c6; }
.banner-store .btn { background: #f2b54a; color: #2b1c05; }
.props { display: grid; gap: 10px; }
@media (min-width: 640px) { .props { grid-template-columns: repeat(3, 1fr); } }
.prop { padding: 14px; }
.prop .no { font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1; }
details summary { cursor: pointer; font-weight: 650; padding: 8px 0; }
.qr { width: 220px; height: 220px; background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); }
.score { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; background: conic-gradient(var(--brand) calc(var(--v) * 1%), var(--surface-2) 0); position: relative; flex: none; }
.score::before { content: ""; position: absolute; inset: 7px; background: var(--surface); border-radius: 50%; }
.score span { position: relative; }
@media print { .bottomnav, .top, .shell-top, .tabs, .noprint { display: none !important; } body { background: #fff; } }

/* QA fixes */
.pcard .ph { min-height: 0; overflow: hidden; }
.pcard .ph img, .pcard .ph .noimg { position: absolute; inset: 0; width: 100%; height: 100%; }
.shophead { align-items: flex-start; margin-top: -40px; }
.shophead .grow { padding-top: 46px; min-width: 0; }
.shophead h1 { overflow-wrap: anywhere; }
.hero-grid { display: grid; gap: 20px; }
.hero-side { display: none; }
.hero-side .bld { padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.hero-side .bld svg { width: 16px; height: 16px; vertical-align: -3px; }
.hero-side > svg { width: 44px; height: 44px; color: var(--brand); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; } .hero-side { display: block; } }
.sticky-buy { position: static; }
.toast { top: 72px; bottom: auto; }
.btn.grow { white-space: nowrap; min-width: 0; }
.qty input { min-width: 0; }

.reviewbar { background: #f2b54a; color: #2b1c05; font-size: .8rem; font-weight: 600; text-align: center; padding: 6px 12px; }
.hero-grid > * { min-width: 0; }

/* ---------- Version 2: Zimbabwe market features ---------- */
@media (min-width: 900px) { .g4-lg { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.zwcard { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 6px; }
.zwcard h3 { margin: 4px 0 0; font-size: 1.02rem; }
.zwcard p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.zwcard .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.zwcard .ic svg { width: 22px; height: 22px; }
.zwcard:hover { border-color: var(--brand); }
.card .no { font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1; }
.zig { color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
.stars { color: #c98a0b; letter-spacing: 1px; }
.rating { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating label { font-size: 1.9rem; line-height: 1; color: #c9cfd1; cursor: pointer; padding: 2px; min-width: 40px; min-height: 40px; display: grid; place-items: center; }
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label { color: #c98a0b; }
.rating input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 6px; }
body.datasaver img:not(.qr) { display: none !important; }
body.datasaver .ph, body.datasaver .thumb, body.datasaver .gallery { background: var(--surface-2); min-height: 60px; }
body.datasaver .cover { background-image: none !important; }
.catalogue { width: 100%; min-height: 220px; font-family: inherit; font-size: .9rem; }
[hidden] { display: none !important; }
.btn.wa.ghost { background: var(--surface); color: var(--wa); border-color: var(--wa); }
.giftnote { font-size: .85rem; color: var(--ink-2); margin: 4px 0 0 30px; }
@media (max-width: 899px) {
  .zwcard { display: grid; grid-template-columns: 42px 1fr; column-gap: 12px; row-gap: 2px; align-items: start; }
  .zwcard .ic { grid-row: span 2; }
  .zwcard h3 { margin: 0; }
}

/* Social posts */
.postcard { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: start; }
.postcard > img { width: 100%; border-radius: 10px; object-fit: cover; background: var(--line, #ddd); }
.postcard .catalogue { min-height: 140px; }
@media (max-width: 560px) { .postcard { grid-template-columns: 1fr; } .postcard > img { width: 62%; max-width: 240px; justify-self: center; } }
