/* ==========================================================================
   Al Shahd Al Fareed Markets — shared styles (store + staff)
   ========================================================================== */
/* Brand tokens — from the أسواق الشهد الفريد brand files (tokens.json) */
:root {
  --green-600: #13804A;   /* primary: header, primary buttons, add-to-cart, active tab, links */
  --green-800: #0B5530;   /* deep: pressed buttons, text on honey, dark bands */
  --honey-400: #F5B82E;   /* accent: offer banners, badges, cart count — never text on white */
  --green-50:  #E7F3EC;   /* tint: category circles, product image wells, selected chips */

  --brand: var(--green-600);
  --brand-600: var(--green-800);
  --brand-700: var(--green-800);
  --brand-100: #CFE6D8;
  --brand-50: var(--green-50);
  --accent: var(--honey-400);
  --accent-50: #FEF5DF;
  --ink: #1C2B24;
  --ink-2: #33433A;
  --muted: #5E6B64;
  --line: #DDE5E0;
  --bg: #F6F8F7;
  --card: #FFFFFF;
  --danger: #C8372D;

  --font-display: "El Messiri", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-text: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --font-latin: "Montserrat", "IBM Plex Sans Arabic", sans-serif;

  --radius-sm: 8px;   /* small badges, steppers */
  --radius-md: 12px;  /* image wells, inputs */
  --radius: 18px;     /* cards, banners, sheets */
  --shadow-sheet: 0 -4px 20px rgba(11, 85, 48, .12); /* bottom sheets / floating bars only */
  --shadow-sm: none;
  --shadow: none;     /* cards use a 1px border, not a shadow */
  --shadow-lg: 0 12px 40px rgba(11, 85, 48, .16);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.3; font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
:focus-visible { outline: 3px solid rgba(19, 128, 74, .4); outline-offset: 2px; }
.small { font-size: 13px; color: var(--muted); }
.row { display: flex; justify-content: space-between; gap: 8px; }
.total { font-size: 18px; font-weight: 800; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 12px max(24px, calc((100% - 1240px) / 2));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(140deg, #13a467, var(--brand-700));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 23px; box-shadow: 0 4px 12px rgba(11, 122, 75, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 19px; color: var(--brand-700); font-weight: 800; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: 11.5px; letter-spacing: .02em; }

.mainnav { display: flex; gap: 2px; }
.mainnav a {
  padding: 8px 12px; border-radius: 10px; text-decoration: none;
  font-weight: 600; font-size: 15px; color: var(--ink-2); white-space: nowrap;
}
.mainnav a:hover { background: var(--bg); }
.mainnav a.active { background: var(--brand-50); color: var(--brand); }

.search {
  flex: 1; max-width: 520px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.search input { border: 0; background: transparent; outline: none; padding: 10px 0; width: 100%; min-width: 0; }
.search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-50); }
.actions { display: flex; gap: 6px; align-items: center; margin-inline-start: auto; }
.ghost-btn {
  background: none; border: 0; padding: 8px 12px; border-radius: 10px;
  cursor: pointer; text-decoration: none; font-weight: 600; white-space: nowrap; color: var(--ink-2);
}
.ghost-btn:hover { background: var(--bg); }
.wallet-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.wallet-chip:hover { background: var(--brand-100); }
.cart-btn {
  background: var(--brand); color: #fff; border: 0; border-radius: 12px;
  padding: 10px 14px; cursor: pointer; font-weight: 700;
  display: flex; gap: 8px; align-items: center; box-shadow: 0 4px 12px rgba(11, 122, 75, .25);
}
.cart-btn:hover { background: var(--brand-600); }
.badge { background: #fff; color: var(--brand); border-radius: 999px; min-width: 22px; padding: 0 6px; font-size: 13px; text-align: center; font-weight: 800; }
.badge.bump { animation: bump .3s var(--ease); }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- Bottom tab bar (phones) ---------- */
.bottomnav { display: none; }

/* ---------- Layout ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 24px; }
.section { margin-top: 36px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.see-all { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 14px; white-space: nowrap; }
.see-all:hover { text-decoration: underline; }
.page-head { margin-bottom: 18px; }
.page-head h1 { margin: 6px 0 4px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.page-head p { margin: 0; color: var(--muted); }
.back { color: var(--brand); text-decoration: none; font-weight: 700; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .16), transparent 38%),
    radial-gradient(circle at 70% 110%, rgba(255, 159, 28, .28), transparent 40%),
    linear-gradient(135deg, var(--brand-700) 0%, var(--brand) 45%, #14a96a 100%);
  color: #fff; border-radius: 28px; padding: 36px;
}
.hero-badge { display: inline-block; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.hero h1 { margin: 14px 0 10px; font-size: 38px; font-weight: 800; letter-spacing: -.03em; max-width: 14em; }
.hero p { margin: 0 0 20px; opacity: .9; max-width: 34em; }
.mode-card { background: #fff; color: var(--ink); border-radius: 18px; padding: 14px; max-width: 460px; box-shadow: var(--shadow-lg); }
.mode-info { margin: 10px 4px 2px; font-size: 14px; color: var(--muted); }
.hero-art { position: relative; height: 260px; }
.bubble {
  position: absolute; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(2px); animation: float 6s ease-in-out infinite;
}
.bubble:nth-child(2) { animation-delay: -1.5s; } .bubble:nth-child(3) { animation-delay: -3s; }
.bubble:nth-child(4) { animation-delay: -4.5s; } .bubble:nth-child(5) { animation-delay: -2s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }

.segmented { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 4px; gap: 4px; }
.segmented button {
  border: 0; background: transparent; padding: 10px; border-radius: 9px;
  cursor: pointer; font-weight: 700; color: var(--muted); transition: background .15s, color .15s;
}
.segmented button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

/* ---------- Offers ---------- */
.offer-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: none; }
.offer-strip::-webkit-scrollbar { display: none; }
.offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.offer {
  scroll-snap-align: start; position: relative; overflow: hidden;
  display: flex; gap: 16px; align-items: flex-start; text-decoration: none;
  border-radius: 22px; padding: 20px; min-height: 150px; color: var(--ink);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.offer:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.offer .ic { flex: none; width: 58px; height: 58px; border-radius: 18px; background: rgba(255, 255, 255, .75); display: grid; place-items: center; font-size: 30px; }
.offer h3 { margin: 2px 0 6px; font-size: 18px; font-weight: 800; }
.offer p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); }
.offer .cta { font-weight: 800; font-size: 14px; }
.offer.orange { background: linear-gradient(135deg, #fff3e0, #ffe0b5); } .offer.orange .cta { color: #b45f00; }
.offer.green  { background: linear-gradient(135deg, #e6f7ed, #c6ebd6); } .offer.green .cta { color: var(--brand-700); }
.offer.blue   { background: linear-gradient(135deg, #e7f0fd, #cadffb); } .offer.blue .cta { color: #1d4f9c; }
.offer.purple { background: linear-gradient(135deg, #f2ebfc, #ded1f6); } .offer.purple .cta { color: #5a33a0; }
.offer.big { min-height: 180px; padding: 26px; }
.offer.big h3 { font-size: 22px; }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.cat-tile { text-align: center; text-decoration: none; display: grid; gap: 8px; }
.cat-tile .ic {
  aspect-ratio: 1; border-radius: 22px; background: var(--tint);
  display: grid; place-items: center; font-size: 38px;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.cat-tile:hover .ic { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-tile span { font-size: 13.5px; font-weight: 700; color: var(--ink-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  white-space: nowrap; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.chip:hover { border-color: var(--brand-100); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.deal[aria-pressed="true"] { background: var(--accent); color: #2b1a00; border-color: var(--accent); }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px; }
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: 180px; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.scroller > * { scroll-snap-align: start; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s var(--ease), border-color .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-2px); }
.thumb {
  position: relative; aspect-ratio: 1 / .82; display: grid; place-items: center; font-size: 60px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .95) 0, var(--tint) 68%);
}
.thumb .em { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .12)); transition: transform .25s var(--ease); }
.card:hover .thumb .em { transform: scale(1.07) rotate(-3deg); }
/* Product photos fill the tile; emoji stays as the fallback */
.thumb.has-photo { background: #fff; overflow: hidden; }
.pimg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.card:hover .pimg { transform: scale(1.05); }
.line-item .em.has-photo { background: #fff; overflow: hidden; border: 1px solid var(--line); }
.line-item .em .pimg { border-radius: inherit; }
.mini-pic { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; vertical-align: middle; border: 1px solid var(--line); background: #fff; }
.mini-em { display: inline-block; width: 26px; text-align: center; vertical-align: middle; }
.order-row .emojis { display: flex; gap: 4px; justify-content: flex-end; letter-spacing: 0; }
.sum-item { display: inline-flex; align-items: center; gap: 6px; }
.tag {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--accent); color: #2b1a00; font-size: 12px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 2px 6px rgba(255, 159, 28, .35);
}
.card-body { padding: 10px 12px 8px; display: flex; flex-direction: column; flex: 1; }
.price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 16px; }
.price-row s { color: var(--muted); font-size: 12px; }
.card h3 {
  margin: 4px 0 2px; font-size: 14px; font-weight: 600; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.unit { color: var(--muted); font-size: 12.5px; }
.card-action { padding: 0 12px 12px; min-height: 48px; display: flex; align-items: flex-end; }
.card-action > * { width: 100%; }
.add-btn {
  width: 100%; border: 1.5px solid var(--brand); color: var(--brand); background: #fff;
  border-radius: 10px; padding: 7px 10px; font-weight: 800; cursor: pointer; transition: background .15s, color .15s;
}
.add-btn:hover { background: var(--brand); color: #fff; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--brand); color: #fff; border-radius: 10px; overflow: hidden; min-width: 96px; }
.stepper button { background: none; border: 0; color: #fff; width: 34px; height: 34px; cursor: pointer; font-size: 18px; line-height: 1; font-weight: 700; }
.stepper button:hover { background: var(--brand-600); }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; }
.card.oos .thumb { filter: grayscale(1); opacity: .55; }
.card.oos .price, .card.oos h3 { color: var(--muted); }
.oos-label { font-size: 12px; font-weight: 800; color: var(--danger); }
.card-action .oos-label { display: block; text-align: center; padding: 8px 0; background: #fdf0ef; border-radius: 10px; }

/* ---------- Products page ---------- */
.shop { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 88px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.sidebar h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 10px 8px; }
.cat-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  background: none; border: 0; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--ink-2);
}
.cat-link:hover { background: var(--bg); }
.cat-link[aria-pressed="true"] { background: var(--brand-50); color: var(--brand-700); }
.cat-link .em { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--tint, var(--bg)); font-size: 17px; flex: none; }
.cat-link .n { margin-inline-start: auto; font-size: 12px; color: var(--muted); font-weight: 700; }
.shop > * { min-width: 0; }
.cat-link.open { color: var(--brand-700); font-weight: 700; }
.sub-list { margin: 2px 0 6px; padding-inline-start: 22px; border-inline-start: 2px solid var(--brand-50); margin-inline-start: 24px; }
.cat-link.sub { padding: 7px 10px; font-size: 14px; font-weight: 500; }
.subchips { padding-top: 0; }
.subchips .chip { background: var(--brand-50); border-color: transparent; color: var(--brand-700); font-size: 13.5px; }
.subchips .chip[aria-pressed="true"] { background: var(--brand); color: #fff; }
.subchips .chip .n { opacity: .7; font-size: 12px; margin-inline-start: 2px; }
.link-like { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.shop-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shop-toolbar .count-lbl { font-weight: 700; color: var(--ink-2); margin-inline-end: auto; }
.select {
  border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 600; cursor: pointer;
}
.mobile-only { display: none; }

/* ---------- Wallet ---------- */
.wallet-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wallet-card {
  position: relative; overflow: hidden; color: #fff; border-radius: 26px; padding: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .18), transparent 45%),
    radial-gradient(circle at 0% 120%, rgba(255, 159, 28, .35), transparent 45%),
    linear-gradient(135deg, var(--brand-700), var(--brand) 60%, #14a96a);
  box-shadow: 0 14px 40px rgba(6, 77, 47, .3);
}
.wallet-card .lbl { opacity: .85; font-size: 14px; font-weight: 600; }
.wallet-card .balance { font-size: 42px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 18px; }
.wallet-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-weight: 800; }
.wallet-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); border-radius: 14px; padding: 12px 14px; }
.wallet-code .mono { font-size: 22px; font-weight: 800; letter-spacing: .12em; direction: ltr; }
.wallet-code .copy { margin-inline-start: auto; background: #fff; color: var(--brand-700); border: 0; border-radius: 9px; padding: 6px 12px; font-weight: 800; cursor: pointer; }
.wallet-card .hint { font-size: 13px; opacity: .85; margin: 10px 0 0; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps3 div { background: var(--bg); border-radius: 14px; padding: 14px; font-size: 14px; font-weight: 600; }
.steps3 b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; margin-bottom: 8px; }
.tx-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tx-row:last-child { border-bottom: 0; }
.tx-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--bg); flex: none; }
.tx-row .info { flex: 1; min-width: 0; }
.tx-row .info div:first-child { font-weight: 700; }
.amt { font-weight: 800; white-space: nowrap; direction: ltr; }
.amt.plus { color: var(--brand); }
.promo-banner {
  display: flex; align-items: center; gap: 18px; text-decoration: none;
  background: linear-gradient(135deg, var(--ink), #23382c); color: #fff; border-radius: 22px; padding: 22px 26px;
}
.promo-banner .ic { font-size: 40px; }
.promo-banner h3 { margin: 0 0 4px; font-size: 19px; }
.promo-banner p { margin: 0; opacity: .8; font-size: 14px; }
.promo-banner .btn { margin-inline-start: auto; background: var(--accent); border-color: var(--accent); color: #2b1a00; }

/* ---------- Account / sign in ---------- */
.auth-wrap { max-width: 440px; margin: 8px auto 0; display: grid; gap: 18px; }
.auth-card { padding: 28px; display: grid; gap: 14px; text-align: center; box-shadow: var(--shadow); }
.auth-card h1 { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.auth-card > .small { margin: 0; }
.auth-logo { margin: 0 auto; width: 54px; height: 54px; font-size: 28px; border-radius: 16px; }
.auth-form { display: grid; gap: 12px; text-align: start; margin-top: 4px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 64px; }
.pw-toggle {
  position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 6px;
  background: var(--bg); border: 0; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer;
}
.switch-line { margin: 2px 0 0; }
.link-btn.strong { color: var(--brand); font-weight: 800; font-size: 13px; text-decoration: none; }
.link-btn.strong:hover { text-decoration: underline; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.benefits li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.account-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.account-card .who { flex: 1; min-width: 160px; }
.account-card h2 { margin: 0 0 2px; font-size: 20px; }
.account-card [dir="ltr"] { text-align: start; }
.avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(140deg, #13a467, var(--brand-700)); color: #fff; font-size: 26px; font-weight: 800;
}
.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-link { display: flex; align-items: center; gap: 14px; text-decoration: none; transition: box-shadow .2s; }
.acct-link:hover { box-shadow: var(--shadow); }
.acct-link .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; font-size: 22px; flex: none; }
.acct-link strong { display: block; }
.guest-prompt {
  display: block; text-decoration: none; background: var(--accent-50); border: 1px solid #ffe0b0; color: #6b4300;
  border-radius: 12px; padding: 12px 14px; font-size: 14px;
}
.guest-prompt strong { color: #b45f00; white-space: nowrap; }
.guest-prompt:hover { border-color: var(--accent); }
.signed-in { background: var(--brand-50); color: var(--brand-700); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 14px; }
.account-btn.in { background: var(--brand-50); color: var(--brand-700); }

/* ---------- Drawer ---------- */
#overlay { position: fixed; inset: 0; background: rgba(10, 20, 15, .45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
body.drawer-open #overlay { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%);
  background: #fff; z-index: 40; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s var(--ease); visibility: hidden; box-shadow: var(--shadow-lg);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.drawer-body { flex: 1; overflow: auto; padding: 4px 20px; }
.drawer-foot { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: #fcfdfc; }
.icon-x { background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 9px; border-radius: 9px; }
.icon-x:hover { background: var(--bg); }

.line-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.line-item .em { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; font-size: 28px; background: var(--tint); flex: none; }
.line-item .info { flex: 1; min-width: 0; }
.line-item .name { font-weight: 700; }
.line-item .stepper { min-width: 0; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.progress { height: 7px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ffc15e); transition: width .3s; border-radius: 999px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  border: 1.5px solid var(--brand); background: var(--brand); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-weight: 800; cursor: pointer; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.secondary:hover { background: var(--brand-50); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #fdecea; }
.btn.block { width: 100%; }

/* ---------- Panels & forms ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin: 0 0 14px; font-size: 17px; font-weight: 800; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; margin-inline-end: 10px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 5px; align-content: start; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.field .err { color: var(--danger); font-size: 12px; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid .err { display: block; }
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: 1fr 1fr; }
.option { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 13px; padding: 13px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--brand-100); }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.option input { margin-top: 3px; accent-color: var(--brand); width: 17px; height: 17px; flex: none; }
.option strong { display: block; }
.option.wallet-opt { background: linear-gradient(135deg, #f3fbf6, #fff); }
.pay-note { margin: 12px 0 8px; font-weight: 700; font-size: 14px; }
.summary { position: sticky; top: 88px; display: grid; gap: 10px; }
.summary h2 { margin-bottom: 4px; }
.summary .items { max-height: 260px; overflow: auto; display: grid; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.row.green { color: var(--brand); font-weight: 700; }
.earn { background: var(--brand-50); color: var(--brand-700); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 700; }
.notice { background: #fff7e6; border: 1px solid #f7d79b; color: #7a4d00; border-radius: 11px; padding: 10px 12px; font-size: 14px; }
.notice.danger { background: #fdecea; border-color: #f3b8b1; color: var(--danger); }

/* ---------- Order ---------- */
.order-wrap { max-width: 840px; margin: 0 auto; display: grid; gap: 16px; }
.order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.order-head h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.thanks { background: var(--brand-50); color: var(--brand-700); border-radius: 14px; padding: 14px 16px; font-weight: 700; }
.tracker { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.step { text-align: center; position: relative; font-size: 13px; color: var(--muted); padding: 0 4px; }
.step .dot { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 8px; display: grid; place-items: center; background: #fff; border: 2px solid var(--line); position: relative; z-index: 1; font-size: 17px; }
.step::before { content: ""; position: absolute; top: 19px; inset-inline-end: 50%; width: 100%; height: 3px; background: var(--line); }
.step:first-child::before { display: none; }
.step.done { color: var(--ink); font-weight: 700; }
.step.done .dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done::before { background: var(--brand); }
.step.current .dot { box-shadow: 0 0 0 6px var(--brand-50); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(11, 122, 75, .08); } }
.code-box { text-align: center; }
.code { font-size: 44px; font-weight: 800; letter-spacing: 10px; color: var(--brand); direction: ltr; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.details dt { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; }
.details dd { margin: 3px 0 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--brand-50); color: var(--brand); white-space: nowrap; }
.pill.pickup { background: #fff3dc; color: #8a5a00; }
.pill.cancelled { background: #fdecea; color: var(--danger); }
.pill.muted { background: var(--bg); color: var(--muted); }
.order-list { display: grid; gap: 12px; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; transition: box-shadow .2s; }
.order-row:hover { box-shadow: var(--shadow); }
.order-row .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.order-row .emojis { font-size: 20px; letter-spacing: 2px; }
.demo-note { font-size: 12px; color: var(--muted); text-align: center; margin: 0; }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 56px; }
.empty h2 { color: var(--ink); margin: 8px 0 4px; }
.empty p { margin: 0 0 18px; }

.site-foot { max-width: 1240px; margin: 48px auto 0; padding: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600;
  opacity: 0; transition: .25s var(--ease); z-index: 50; pointer-events: none; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mainnav a { padding: 8px 9px; }
  .wallet-chip .lbl { display: none; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .checkout, .wallet-layout { grid-template-columns: minmax(0, 1fr); }
  .checkout > * { min-width: 0; }
  .summary { position: static; }
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shop { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  .mobile-only { display: flex; }
  .offer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.store { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .mainnav, .wallet-chip, .hide-sm { display: none !important; }
  /* Brand bottom nav: white, 4 tabs, active green-600, idle muted, 2px outline icons */
  .bottomnav {
    display: grid; grid-template-columns: repeat(4, 1fr);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 25;
    background: var(--card); box-shadow: var(--shadow-sheet);
    border-top: 1px solid var(--line); padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .bottomnav a, .bottomnav button {
    position: relative; display: grid; justify-items: center; gap: 2px; text-decoration: none;
    font: 500 12px/16px var(--font-text); color: var(--muted); padding: 2px 0; background: none; border: 0; cursor: pointer;
  }
  .bottomnav a.active { color: var(--green-600); }
  .bottomnav .tab-badge {
    position: absolute; top: -4px; inset-inline-start: calc(50% + 2px);
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--honey-400); color: var(--green-800); font: 700 12px/20px var(--font-text); text-align: center;
  }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .ghost-btn .lbl { display: none; }
  main { padding: 16px; }
  .hero { padding: 22px; border-radius: 22px; }
  .hero h1 { font-size: 27px; }
  .section { margin-top: 28px; }
  .sec-head h2 { font-size: 18px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scroller { grid-auto-columns: 152px; gap: 10px; }
  .thumb { font-size: 48px; }
  .cats { gap: 10px; }
  .cat-tile .ic { font-size: 30px; border-radius: 18px; }
  .cat-tile span { font-size: 12px; }
  .offer-strip { grid-auto-columns: 86%; }
  .fields, .options.two, .details, .steps3, .acct-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 22px 18px; }
  .field input, .field select, .field textarea { font-size: 16px; } /* stops iOS zooming into inputs */
  .tracker { font-size: 12px; }
  .code { font-size: 36px; }
  .wallet-card { padding: 22px; }
  .wallet-card .balance { font-size: 34px; }
  .promo-banner { flex-wrap: wrap; }
  .promo-banner .btn { margin-inline-start: 0; }
  .page-head h1 { font-size: 24px; }
}

/* ==========================================================================
   BRAND LAYER — أسواق الشهد الفريد (Al Shahd Al Fareed Markets)
   Follows APP-BRIEF.md / tokens.json from the brand files. Placed last so it
   takes precedence over the earlier generic styles.
   ========================================================================== */

.ic-svg { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- Header: green-600, trolley mark + name in white El Messiri, white pill search ---------- */
.topbar {
  background: var(--green-600); border-bottom: 0; color: #fff;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { gap: 12px; }
.brand-mark { width: 44px; height: auto; display: block; }
.brand-text { line-height: 1.15; }
.brand-text strong { font: 700 26px/1.2 var(--font-display); color: #fff; letter-spacing: 0; white-space: nowrap; }
.brand-text small { font: 400 14px/1.4 var(--font-text); color: rgba(255, 255, 255, .9); letter-spacing: 0; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.mainnav a { color: rgba(255, 255, 255, .9); font: 600 15px/20px var(--font-text); border-radius: 999px; padding: 8px 14px; }
.mainnav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.mainnav a.active { background: #fff; color: var(--green-800); }
.search {
  background: var(--surface, #fff); border: 0; height: 46px; border-radius: 999px; padding: 0 16px; gap: 10px;
  color: var(--muted); max-width: 560px;
}
.search input { font: 400 15px var(--font-text); color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 3px var(--honey-400); background: #fff; }
.hdr-btn {
  display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; background: none; border: 0;
  padding: 8px 12px; border-radius: 999px; font: 600 14px var(--font-text); cursor: pointer; white-space: nowrap;
}
.hdr-btn:hover { background: rgba(255, 255, 255, .12); }
.lang-btn { border: 1.5px solid rgba(255, 255, 255, .45); padding: 6px 12px; }
.wallet-chip { background: rgba(255, 255, 255, .14); color: #fff; font: 600 14px var(--font-text); }
.wallet-chip:hover { background: rgba(255, 255, 255, .22); }
.cart-btn {
  position: relative; background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none;
  width: 46px; height: 46px; padding: 0; border-radius: 999px; justify-content: center;
}
.cart-btn:hover { background: rgba(255, 255, 255, .24); }
.badge, .cart-btn .badge {
  position: absolute; top: -4px; inset-inline-end: -4px;
  background: var(--honey-400); color: var(--green-800); font: 700 12px/20px var(--font-text);
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
}
.badge[hidden], .tab-badge[hidden] { display: none; }

/* ---------- Type scale ---------- */
.sec-head h2 { font: 700 19px/28px var(--font-display); }
.page-head h1 { font: 700 24px/32px var(--font-display); letter-spacing: 0; }
.see-all { color: var(--green-600); font: 600 14px var(--font-text); }
.small { font-size: 13px; }

/* ---------- Delivery / pick-up switch ---------- */
.mode-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
}
.mode-bar .segmented { flex: 0 1 380px; }
.mode-bar .mode-info { margin: 0; flex: 1 1 220px; font-size: 14px; }
.segmented { background: var(--green-50); border-radius: 999px; padding: 4px; }
.segmented button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font: 600 15px var(--font-text); color: var(--green-800); min-height: 40px;
}
.segmented button[aria-pressed="true"] { background: var(--green-600); color: #fff; box-shadow: none; }

/* ---------- Categories: 66px green-50 circles, label 14px under ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px 12px; }
.cat-tile { gap: 8px; justify-items: center; }
.cat-tile .ic {
  width: 66px; height: 66px; aspect-ratio: auto; border-radius: 999px; background: var(--green-50);
  font-size: 30px; transition: transform .2s var(--ease), background .2s;
}
.cat-tile:hover .ic { transform: translateY(-2px); background: var(--brand-100); box-shadow: none; }
.cat-tile span:last-child { font: 500 14px/20px var(--font-text); color: var(--ink); text-align: center; }

/* ---------- Offer banner: honey-400, El Messiri headline green-800, green-800 pill button ---------- */
.honey-banner {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px;
  background: var(--honey-400); color: var(--green-800); border-radius: var(--radius); padding: 28px 32px; text-decoration: none; min-height: 180px;
}
.hb-text h2 { margin: 0 0 6px; font: 700 32px/40px var(--font-display); color: var(--green-800); }
.hb-text p { margin: 0 0 18px; font: 500 17px/26px var(--font-text); color: var(--green-800); }
.btn-deep {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  background: var(--green-800); color: #fff; border-radius: 999px; font: 600 15px var(--font-text);
}
.honey-banner:hover .btn-deep { background: #08402A; }
.hb-art { position: relative; width: 260px; height: 150px; }
.hb-ball {
  position: absolute; display: grid; place-items: center; overflow: hidden; border-radius: 999px;
  background: #fff; border: 4px solid rgba(255, 255, 255, .7); font-size: 46px;
}
.hb-ball .pimg { width: 100%; height: 100%; object-fit: cover; }
.hb-ball.b0 { width: 140px; height: 140px; inset-inline-end: 0; top: 0; z-index: 2; }
.hb-ball.b1 { width: 104px; height: 104px; inset-inline-end: 118px; top: 40px; z-index: 1; }
.hb-ball.b2 { width: 80px; height: 80px; inset-inline-end: 200px; top: 4px; }

/* Smaller offers in the brand palette */
.offer { border-radius: var(--radius); min-height: 132px; }
.offer:hover { box-shadow: none; transform: translateY(-2px); }
.offer .ic { width: 52px; height: 52px; border-radius: 999px; background: #fff; color: var(--green-800); }
.offer h3 { font: 700 19px/28px var(--font-display); }
.offer p { font-size: 14px; }
.offer .cta { font: 600 14px var(--font-text); text-decoration: underline; text-underline-offset: 3px; }
.offer.honey { background: var(--honey-400); color: var(--green-800); }
.offer.honey p, .offer.honey .cta { color: var(--green-800); }
.offer.green { background: var(--green-600); color: #fff; }
.offer.green p, .offer.green .cta { color: #fff; }
.offer.green .ic { color: var(--green-600); }
.offer.mint { background: var(--green-50); color: var(--green-800); }
.offer.mint p { color: var(--ink-2); }
.offer.mint .cta { color: var(--green-600); }

/* ---------- Product card: white, 1px border, radius 18, green-50 image well (radius 12) ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; }
.card:hover { box-shadow: none; transform: none; border-color: var(--brand-100); }
.thumb, .thumb.has-photo {
  margin: 8px 8px 0; border-radius: var(--radius-md); background: var(--green-50); overflow: hidden; aspect-ratio: 1 / .86;
}
.thumb .em { filter: none; }
.card:hover .thumb .em { transform: scale(1.06); }
.tag {
  top: 8px; inset-inline-start: 8px; background: var(--honey-400); color: var(--green-800);
  font: 700 12px/16px var(--font-text); padding: 4px 10px; border-radius: 999px; box-shadow: none;
}
.card-body { padding: 10px 12px 12px; gap: 2px; }
.card h3 { margin: 0; font: 600 16px/24px var(--font-text); color: var(--ink); }
.unit { font: 400 13px/18px var(--font-text); color: var(--muted); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price-col { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.price { font: 700 17px/24px var(--font-text); color: var(--green-800); white-space: nowrap; }
.price-col s { font-size: 12px; color: var(--muted); }
.card-action { padding: 0; min-height: 0; display: block; }
.card-action > * { width: auto; }
.card-action .oos-label { display: inline-block; padding: 4px 10px; background: #fdf0ef; border-radius: 999px; }
.add-round {
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--green-600); color: #fff;
  display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, transform .1s;
}
.add-round:hover { background: var(--green-800); }
.add-round:active { transform: scale(.94); }
.stepper { border-radius: 999px; background: var(--green-600); min-width: 0; height: 40px; }
.stepper button { width: 34px; height: 40px; display: grid; place-items: center; }
.stepper button:hover { background: var(--green-800); }
.stepper span { min-width: 18px; font: 700 15px var(--font-text); }
.line-item .em { border-radius: var(--radius-md); background: var(--green-50); }

/* ---------- Buttons: pill, 48px; secondary = white with green border ---------- */
.btn {
  min-height: 48px; border-radius: 999px; font: 600 15px var(--font-text); padding: 0 24px;
  background: var(--green-600); border-color: var(--green-600);
}
.btn:hover { background: var(--green-800); border-color: var(--green-800); }
.btn.secondary { background: #fff; color: var(--green-600); border: 1.5px solid var(--green-600); }
.btn.secondary:hover { background: var(--green-50); }
.btn.danger { border-radius: 999px; }
.btn .ic-svg { margin-inline-end: 2px; }

/* ---------- Chips: pill; selected = green-50 ---------- */
.chip { border-radius: 999px; font: 500 14px var(--font-text); }
.chip[aria-pressed="true"] { background: var(--green-50); color: var(--green-800); border-color: var(--green-600); }
.chip.deal[aria-pressed="true"] { background: var(--honey-400); color: var(--green-800); border-color: var(--honey-400); }
.cat-link[aria-pressed="true"] { background: var(--green-50); color: var(--green-800); }
.cat-link .em { border-radius: 999px; background: var(--green-50); }

/* ---------- Panels, inputs, pills ---------- */
.panel, .sidebar { border-radius: var(--radius); box-shadow: none; }
.field input, .field select, .field textarea { border-radius: var(--radius-md); }
.option { border-radius: var(--radius-md); }
.pill { background: var(--green-50); color: var(--green-800); font: 600 12px var(--font-text); display: inline-flex; align-items: center; gap: 4px; }
.pill.pickup { background: var(--accent-50); color: var(--green-800); }
.num { background: var(--green-600); }
.earn, .signed-in, .thanks { background: var(--green-50); color: var(--green-800); display: flex; align-items: center; gap: 8px; }
.guest-prompt { background: var(--accent-50); border-color: #F7DFA4; color: var(--green-800); }
.guest-prompt strong { color: var(--green-600); }
.notice { border-radius: var(--radius-md); }
.progress span { background: var(--honey-400); }
.step.done .dot { background: var(--green-600); border-color: var(--green-600); }
.step .dot { color: var(--green-800); }
.empty .big { color: var(--green-600); }
.empty .big .ic-svg { width: 48px; height: 48px; }
.tx-ic { background: var(--green-50); color: var(--green-800); border-radius: 999px; }
.acct-link .ic { background: var(--green-50); color: var(--green-800); border-radius: 999px; }
.benefits li { display: flex; align-items: center; gap: 10px; border-radius: var(--radius-md); }
.benefits li .ic-svg { color: var(--green-600); }
.avatar { background: var(--green-600); }
.auth-logo { background: var(--green-600) url('/assets/brand/trolley-mark-white.svg') center / 62% no-repeat; color: transparent; border-radius: 999px; box-shadow: none; }

/* Wallet promo + wallet card: deep green bands with honey */
.promo-banner { background: var(--green-800); border-radius: var(--radius); }
.promo-banner .ic { color: var(--honey-400); }
.promo-banner h3 { font: 700 19px/28px var(--font-display); }
.promo-banner .btn { background: var(--honey-400); border-color: var(--honey-400); color: var(--green-800); }
.wallet-card {
  border-radius: var(--radius);
  background: radial-gradient(circle at 100% 0%, rgba(245, 184, 46, .28), transparent 45%), linear-gradient(135deg, var(--green-800), var(--green-600));
  box-shadow: none;
}
.wallet-card .balance { font-family: var(--font-display); }
.wallet-code .copy { border-radius: 999px; color: var(--green-800); }
.steps3 b { background: var(--green-600); }

/* Drawer = bottom sheet shadow */
.drawer { box-shadow: var(--shadow-sheet); }
.drawer-head h2 { font: 700 19px/28px var(--font-display); }

/* Footer */
.site-foot a { color: var(--green-600); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; }

/* Staff dashboard header in brand colours */
.staff-bar .brand-text strong { font-size: 22px; }
.staff-bar .ghost-btn { color: #fff; }
.staff-bar .ghost-btn:hover { background: rgba(255, 255, 255, .12); }
.staff-tag { background: #fff; color: var(--green-800); }
.staff-bar .tabs { background: rgba(255, 255, 255, .14); border-radius: 999px; }
.staff-bar .tabs button { color: rgba(255, 255, 255, .9); border-radius: 999px; }
.staff-bar .tabs button[aria-selected="true"] { background: #fff; color: var(--green-800); }
.staff-bar .tabs .count { background: var(--honey-400); color: var(--green-800); }

/* ---------- Brand layer: phones ---------- */
@media (max-width: 900px) {
  .lang-btn { padding: 4px 10px; }
}
@media (max-width: 640px) {
  .topbar { padding: 14px 16px 16px; gap: 12px; }
  .brand-mark { width: 40px; }
  .brand-text strong { font-size: 24px; }
  .brand-text small { max-width: 190px; }
  .search { height: 46px; }
  main { padding: 16px; }
  .section { margin-top: 24px; }
  .mode-bar { padding: 10px; gap: 8px; }
  .mode-bar .segmented { flex-basis: 100%; }
  .cats { display: flex; overflow-x: auto; gap: 14px; padding-bottom: 4px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat-tile { flex: 0 0 74px; }
  .cat-tile span:last-child { font-size: 13px; }
  .honey-banner { grid-template-columns: 1fr; padding: 22px 20px; min-height: 0; }
  .hb-text h2 { font-size: 26px; line-height: 34px; }
  .hb-text p { font-size: 15px; margin-bottom: 14px; }
  .hb-art { position: absolute; inset-inline-end: -30px; bottom: -24px; width: 170px; height: 120px; opacity: .95; }
  .hb-text { position: relative; z-index: 3; max-width: 62%; }
  .hb-ball.b0 { width: 104px; height: 104px; top: 6px; inset-inline-end: 30px; }
  .hb-ball.b1 { width: 76px; height: 76px; top: 40px; inset-inline-end: 110px; }
  .hb-ball.b2 { display: none; }
  .grid { gap: 12px; }
  .scroller { grid-auto-columns: 164px; gap: 12px; }
  .card h3 { font-size: 15px; line-height: 22px; }
  .price { font-size: 16px; }
}

/* ===================== Checkout, search filters, product page, tracking, invoice ===================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.err-text { color: var(--danger); }
.link-btn.danger { color: var(--danger); }
.brand-lbl { display: block; font-size: 11.5px; font-weight: 700; color: var(--green-600); letter-spacing: .02em; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
a.thumb { display: grid; text-decoration: none; }
.unit .wt { color: var(--green-600); font-weight: 600; }
.low-left { display: inline-block; font-size: 12px; font-weight: 700; color: #9a5b00; background: #fff4dc; border-radius: 6px; padding: 1px 7px; margin-top: 4px; }
.stepper.weight { min-width: 118px; }
.stepper.weight span { font-size: 13px; }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }

/* Skeletons */
.skel .thumb, .sk-line, .sk-block { background: linear-gradient(90deg, #eef2ef 25%, #f6f8f7 50%, #eef2ef 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skel .thumb { aspect-ratio: 1 / .86; }
.sk-line { display: block; height: 12px; border-radius: 6px; margin: 8px 0; width: 80%; }
.sk-line.short { width: 45%; }
.sk-line.btn { width: 40px; height: 40px; border-radius: 50%; margin-inline-start: auto; }
.sk-block { height: 120px; border-radius: var(--radius); margin-bottom: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel .thumb, .sk-line, .sk-block { animation: none; } }

/* Filters */
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px; margin-bottom: 14px; display: grid; gap: 12px; }
.filter-panel[hidden] { display: none; }
.fp-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fp-row label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.fp-pair { display: flex; align-items: center; gap: 6px; }
.fp-pair input { width: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.shop-toolbar .chip .n { background: var(--green-600); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }

/* Product page */
.pdp-wrap { max-width: 1000px; margin: 0 auto; }
.crumbs { margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--green-600); text-decoration: none; font-weight: 600; }
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.pdp-img { aspect-ratio: 1; border-radius: var(--radius-md); background: var(--green-50); display: grid; place-items: center; font-size: 120px; position: relative; overflow: hidden; margin: 0; }
.pdp-img .pimg { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { display: grid; gap: 10px; align-content: start; }
.pdp-info h1 { margin: 0; font-size: 28px; }
.pdp-info h2 { font-size: 16px; margin: 10px 0 0; }
.pdp-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pdp-price .price { font-size: 26px; }
.pdp-price s { color: var(--muted); }
.pdp-price .save { font-size: 13px; font-weight: 700; color: #9a5b00; background: #fff4dc; padding: 2px 8px; border-radius: 6px; }
.pdp-ctrl { max-width: 220px; }
.pdp-ctrl .add-round { width: auto; border-radius: 12px; padding: 0 22px; height: 46px; }
.pdp-ctrl .stepper { height: 46px; }
.pdp-desc { margin: 0; line-height: 1.7; color: var(--ink-2); white-space: pre-line; }
.pdp.oos .pdp-img { filter: grayscale(1); opacity: .6; }

/* Sticky "View cart" bar (phones) */
.cart-bar { display: none; }
@media (max-width: 900px) {
  .cart-bar:not([hidden]) { display: block; position: fixed; inset-inline: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 40; }
  .cart-bar button { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--green-600); color: #fff; border: 0; border-radius: 14px; padding: 13px 16px; font: inherit; font-weight: 700; box-shadow: 0 8px 24px rgba(11, 85, 48, .28); cursor: pointer; }
  .cart-bar .cb-count { background: #fff; color: var(--green-800); border-radius: 8px; min-width: 28px; padding: 2px 6px; text-align: center; }
  .cart-bar strong { margin-inline-start: auto; }
  body.store.has-cartbar { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  body.drawer-open .cart-bar { display: none; }
  body.has-cartbar .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
}

/* Checkout */
.options.three { grid-template-columns: repeat(3, 1fr); }
.option.disabled { opacity: .55; cursor: not-allowed; }
.pay-group { font-size: 13px; color: var(--muted); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.pay-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.pay-opt { align-items: center; }
.check-line { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; grid-column: 1 / -1; cursor: pointer; }
.new-address { margin-top: 12px; }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.small-btn { padding: 8px 12px; font-size: 13.5px; }
.map-wrap { position: relative; margin-top: 10px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); }
.map { height: 260px; background: var(--green-50); }
.map-pin { position: absolute; top: 50%; left: 50%; translate: -50% calc(-50% - 27px); /* the tip is exactly on the centre */ z-index: 500; pointer-events: none; color: #fff; background: var(--green-600); border-radius: 50% 50% 50% 0; rotate: -45deg; width: 38px; height: 38px; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.map-pin svg { rotate: 45deg; }
[data-err] { color: var(--danger); font-size: 12px; }
.signin-panel { border-color: var(--green-600); }
.otp-form { margin-top: 12px; }
.otp-input { font-size: 22px; letter-spacing: .4em; text-align: center; font-weight: 700; }
.demo-code { background: var(--green-50); border-color: #bfe0cc; color: var(--green-800); }
.sum-line { display: grid; gap: 4px; }
.sub-select { font: inherit; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: #fff; justify-self: start; max-width: 100%; }
.coupon-box { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; font: inherit; text-transform: uppercase; }
.coupon-on { display: flex; align-items: center; gap: 8px; color: var(--green-800); font-size: 14px; background: var(--green-50); border-radius: 10px; padding: 8px 10px; }
.coupon-on .link-btn { margin-inline-start: auto; }
.row.green { color: var(--green-600); font-weight: 600; }
.offline-banner { margin-bottom: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Demo payment sheet */
.sheet { position: fixed; inset: 0; background: rgba(12, 30, 20, .45); z-index: 80; display: grid; place-items: center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-card { background: #fff; border-radius: var(--radius); padding: 20px; width: min(420px, 100%); display: grid; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.pay-brand { font-weight: 800; color: var(--green-800); font-size: 15px; }
.pay-amt { font-size: 32px; font-weight: 800; font-family: Montserrat, 'IBM Plex Sans Arabic', sans-serif; }
@media (max-width: 640px) { .sheet { align-items: end; padding: 0; } .sheet-card { border-radius: var(--radius) var(--radius) 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); } }

/* Order page */
.tracker.five { grid-template-columns: repeat(5, 1fr); }
.line-item.removed { opacity: .5; }
.line-item.removed strong { text-decoration: line-through; }
.small.adj { color: #9a5b00; font-weight: 600; }
.addr-list { display: grid; gap: 8px; }
.addr-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 12px; }
.addr-row .info { display: grid; flex: 1; min-width: 0; }
.addr-row .ic { color: var(--green-600); }
.addr-add { margin-top: 12px; }
.addr-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 16px; }
.loc-title { margin: 0 0 4px; font-size: 26px; }
#pinStatus.err { color: var(--danger, #b3261e); font-weight: 600; }
.auth-logo-img { margin: 0 auto; display: block; }

/* Invoice */
.invoice-wrap { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.invoice-wrap .btn-row { justify-content: space-between; align-items: center; }
.invoice { display: grid; gap: 18px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--green-600); padding-bottom: 14px; }
.inv-logo { height: 52px; }
.inv-title h1 { margin: 0 0 4px; font-size: 20px; }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inv-parties h3 { margin: 0 0 4px; font-size: 14px; }
.inv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inv-table th { text-align: start; background: var(--green-50); color: var(--green-800); padding: 8px; font-size: 12.5px; }
.inv-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-table td:not(:first-child), .inv-table th:not(:first-child) { white-space: nowrap; }
.inv-totals { display: grid; gap: 6px; max-width: 360px; margin-inline-start: auto; width: 100%; }
.inv-foot { text-align: center; margin: 0; }
@media (max-width: 640px) {
  .pdp { grid-template-columns: 1fr; gap: 16px; }
  .pdp-info h1 { font-size: 22px; }
  .options.three { grid-template-columns: 1fr; }
  .tracker.five .step { font-size: 11px; }
  .tracker.five .step .dot { width: 32px; height: 32px; }
  .tracker.five .step::before { top: 15px; }
  .inv-parties { grid-template-columns: 1fr; }
  .inv-table { font-size: 12.5px; }
}
@media print {
  body.store { padding: 0 !important; background: #fff; }
  .topbar, .bottomnav, .site-foot, .no-print, .cart-bar, #toast, .drawer, #overlay { display: none !important; }
  main { padding: 0 !important; }
  .invoice { border: 0; padding: 0; }
}
.checkout-signin { margin-bottom: 20px; max-width: 620px; }
.summary { grid-template-columns: minmax(0, 1fr); }
.summary > *, .sum-line > * { min-width: 0; }
.sum-item { overflow-wrap: anywhere; }
.coupon-row input { width: auto; flex: 1 1 0; }
.coupon-box { grid-template-columns: minmax(0, 1fr); }
.coupon-row { min-width: 0; }
.coupon-row input { width: 100px; }

/* ===== Account deletion, legal links, phone app ===== */
.danger-zone { border-color: #f3c7c2; }
.danger-zone h2 { color: var(--danger); font-size: 17px; margin: 0 0 6px; }
.app-version { text-align: center; margin: 4px 0 0; }
.foot-links a { color: inherit; }
/* In the iOS/Android app: keep content clear of the notch and the home indicator, no text-selection callouts */
html.native-app .topbar { padding-top: calc(14px + env(safe-area-inset-top)); }
html.native-app body { -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
html.native-app .site-foot { display: none; }
