/* ======================================================================
   Poa Supermarkets — app styles (mobile-first)
   Bootstrap 5 supplies components; this file owns the brand & layout.
   ====================================================================== */

:root {
  --poa:        #0b8a4a;
  --poa-dark:   #076b39;
  --poa-light:  #e7f6ee;
  --poa-accent: #ff6b35;
  --ink:        #15231c;
  --ink-soft:   #5d6b63;
  --line:       #e7ebe8;
  --bg:         #f5f7f5;
  --card:       #ffffff;
  --radius:     18px;
  --radius-sm:  12px;
  --shadow:     0 6px 24px rgba(16, 40, 28, .08);
  --shadow-sm:  0 2px 10px rgba(16, 40, 28, .06);
  --nav-h:      66px;
  --header-h:   118px;
  --maxw:       540px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body.is-pulling-refresh .app-shell {
  transform: translateY(var(--pull-refresh-offset, 0px));
  transition: none;
}
body.is-refreshing .app-shell {
  transform: translateY(58px);
  transition: transform .18s ease;
}
.pull-refresh {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -82px);
  z-index: 1200;
  width: calc(100% - 32px);
  max-width: calc(var(--maxw) - 32px);
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  opacity: 0;
  transition: transform .18s ease, opacity .18s ease;
}
body.is-pulling-refresh .pull-refresh,
body.is-refreshing .pull-refresh {
  transform: translate(-50%, 0);
  opacity: 1;
}
.pull-refresh__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d9e2dd;
  border-top-color: var(--poa);
  border-radius: 50%;
  transform: rotate(var(--pull-refresh-rotation, 0deg));
}
body.is-refreshing .pull-refresh__spinner {
  animation: spin .75s linear infinite;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.app-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
}

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(160deg, var(--poa) 0%, var(--poa-dark) 100%);
  color: #fff;
  padding: max(12px, env(safe-area-inset-top)) 16px 14px;
  border-radius: 0 0 22px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
/* Brand, full nav and the header cart are desktop-only by default. */
.header-brand,
.header-nav,
.header-cart { display: none; }
.branch-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 7px 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.branch-pill__icon { font-size: 16px; }
.branch-pill__text { text-align: left; line-height: 1.05; overflow: hidden; }
.branch-pill__text small { display: block; font-size: 10px; opacity: .8; }
.branch-pill__text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.branch-pill__chev { font-size: 11px; opacity: .85; }
.header-icon, .header-cart {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, .15);
  border-radius: 50%;
  color: #fff;
  flex: none;
  position: relative;
}
.header-cart .cart-badge { top: -4px; right: -4px; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: var(--shadow-sm);
  /* On mobile the search bar wraps to its own full-width row. */
  order: 5;
  flex: 1 1 100%;
}
.search-bar__icon { color: var(--ink-soft); flex: none; font-size: 18px; }
.header-cart__icon, .header-icon__bi { font-size: 22px; }
.header-brand__logo .bi { font-size: 24px; color: #fff; }
.search-bar input {
  border: none; outline: none; flex: 1;
  font-size: 15px; background: transparent; color: var(--ink);
}

/* ── Main ─────────────────────────────────────────────────── */
.app-main {
  padding: 16px 16px calc(var(--nav-h) + 24px);
}

/* ── Flash & toast ────────────────────────────────────────── */
.flash {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  font-weight: 500;
}
.flash--success { background: var(--poa-light); color: var(--poa-dark); }
.flash--error   { background: #fdecec; color: #c0392b; }
.flash--info    { background: #eef4ff; color: #2c5fb3; }

.toast-host {
  position: fixed;
  left: 50%; bottom: calc(var(--nav-h) + 16px);
  transform: translateX(-50%);
  z-index: 1100;
  width: calc(var(--maxw) - 32px);
  max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast-msg {
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow);
  animation: toastIn .25s ease;
}
.toast-msg.is-success { background: var(--poa); }
.toast-msg.is-error   { background: #c0392b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.password-toggle {
  position: relative;
  width: 100%;
}
.password-toggle > input {
  padding-right: 48px !important;
}
.password-toggle__btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.password-toggle__btn:hover,
.password-toggle__btn:focus {
  background: var(--poa-light);
  color: var(--poa-dark);
  outline: none;
}
.password-toggle__btn .bi {
  font-size: 18px;
  line-height: 1;
}

/* PWA install prompt */
.pwa-install-btn {
  position: fixed;
  right: max(16px, calc((100vw - var(--maxw)) / 2 + 16px));
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  z-index: 1050;
  min-height: 44px;
  border: none;
  border-radius: 999px;
  padding: 11px 15px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 26px rgba(16, 40, 28, .18);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}
.pwa-install-btn[hidden] { display: none; }
.pwa-install-btn .bi { font-size: 17px; }
.pwa-install-panel {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
}
.pwa-install-panel.is-open { display: block; }
.pwa-install-panel__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 20, 13, .48);
}
.pwa-install-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(18px);
  width: min(100%, var(--maxw));
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 -16px 40px rgba(16, 40, 28, .18);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.pwa-install-panel.is-open .pwa-install-sheet {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.pwa-install-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.pwa-install-sheet__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.pwa-install-sheet__icon img { width: 100%; height: 100%; object-fit: cover; }
.pwa-install-sheet__copy { padding-right: 44px; }
.pwa-install-sheet__copy h2 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 800;
}
.pwa-install-sheet__copy p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
}
.pwa-install-sheet__action { margin-top: 14px; }
.pwa-ios-guide {
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 2px 0 6px;
}
.pwa-ios-guide[hidden] { display: none; }
.pwa-ios-guide__svg {
  width: min(100%, 300px);
  height: auto;
}
.pwa-ios-guide__phone,
.pwa-ios-guide__screen,
.pwa-ios-guide__share-box,
.pwa-ios-guide__menu {
  fill: #fff;
  stroke: var(--poa);
  stroke-width: 4;
}
.pwa-ios-guide__screen { fill: var(--poa-light); opacity: .95; }
.pwa-ios-guide__home { fill: var(--poa); }
.pwa-ios-guide__share-arrow,
.pwa-ios-guide__dock,
.pwa-ios-guide__plus,
.pwa-ios-guide__line {
  fill: none;
  stroke: var(--poa-dark);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pwa-ios-guide__menu {
  fill: #fff;
  animation: iosMenuFloat 2.2s ease-in-out infinite;
}
.pwa-ios-guide__share-arrow {
  animation: iosSharePulse 1.4s ease-in-out infinite;
}
.pwa-ios-guide__plus {
  animation: iosPlusPulse 1.8s ease-in-out infinite;
}
.pwa-ios-guide__steps {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.pwa-ios-guide__steps li {
  background: var(--bg);
  border-radius: 13px;
  padding: 11px 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
@keyframes iosSharePulse {
  0%, 100% { transform: translateY(0); opacity: .65; }
  50% { transform: translateY(-8px); opacity: 1; }
}
@keyframes iosMenuFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
@keyframes iosPlusPulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}

/* ── Section headings ─────────────────────────────────────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 22px 2px 12px;
}
.section-head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.section-head a { color: var(--poa); font-size: 13px; font-weight: 600; }

/* ── Promo banner ─────────────────────────────────────────── */
.promo {
  background: linear-gradient(120deg, var(--poa-accent), #ff9446);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 6px;
}
.promo__icon { font-size: 34px; line-height: 1; }
.promo__icon .bi { font-size: 34px; }
.promo__text strong { display: block; font-size: 16px; font-weight: 800; }
.promo__text span { font-size: 13px; opacity: .95; }

/* ── Category chips ───────────────────────────────────────── */
.cat-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 76px;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { text-align: center; }
.cat-chip__icon {
  width: 64px; height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  margin: 0 auto 6px;
  transition: transform .12s ease;
  line-height: 1;
}
.cat-chip:active .cat-chip__icon { transform: scale(.94); }
.cat-chip__icon .bi, .cat-chip__bi { font-size: 28px; color: var(--poa); line-height: 1; display: block; }
.cat-chip__label { font-size: 11px; font-weight: 600; color: var(--ink-soft); line-height: 1.1; display: block; }

/* ── Product grid & cards ─────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card__img {
  aspect-ratio: 1 / 1;
  background: var(--poa-light);
  display: grid; place-items: center;
  font-size: 46px;
  overflow: hidden;
}
.product-card__img img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.product-card__name { font-size: 13.5px; font-weight: 600; line-height: 1.25; margin: 0 0 2px; }
.product-card__unit { font-size: 11px; color: var(--ink-soft); margin-bottom: 8px; }
.product-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.product-card__price { font-size: 14px; font-weight: 800; color: var(--ink); }
.product-card__price small { display: block; font-weight: 500; font-size: 10px; color: var(--ink-soft); }
.infinite-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.infinite-status[hidden],
.infinite-load-more[hidden] {
  display: none;
}
.infinite-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d9e2dd;
  border-top-color: var(--poa);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.infinite-status.is-done .infinite-spinner {
  display: none;
}
.infinite-load-more {
  margin: 8px auto 20px;
  display: block;
  width: auto;
  min-width: 150px;
}
.infinite-sentinel {
  height: 1px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.badge-soft {
  position: absolute; top: 8px; left: 8px;
  background: var(--poa-accent); color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.badge-out {
  position: absolute; top: 8px; left: 8px;
  background: #b1b8b3; color: #fff;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}

/* ── Add / quantity stepper ───────────────────────────────── */
.add-btn {
  width: 34px; height: 34px;
  border: none; border-radius: 11px;
  background: var(--poa); color: #fff;
  font-size: 22px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(11, 138, 74, .3);
  transition: transform .1s ease;
}
.add-btn:active { transform: scale(.9); }
.add-btn:disabled { background: #c3cbc6; box-shadow: none; }
.stepper {
  display: inline-flex; align-items: center;
  background: var(--poa-light);
  border-radius: 11px;
  overflow: hidden;
}
.stepper button {
  border: none; background: transparent; color: var(--poa-dark);
  width: 30px; height: 34px; font-size: 18px; font-weight: 700;
}
.stepper span { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }

/* ── Bottom navigation ────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex; align-items: stretch;
  z-index: 60;
  box-shadow: 0 -2px 14px rgba(16, 40, 28, .05);
}
.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: var(--ink-soft);
  font-size: 10.5px; font-weight: 600;
}
.bottom-nav__item .bi { font-size: 23px; line-height: 1; }
.bottom-nav__item.is-active { color: var(--poa); }
.bottom-nav__cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--poa-accent); color: #fff;
  font-size: 10px; font-weight: 800;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; display: grid; place-items: center;
}
.cart-badge[hidden] { display: none; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-poa {
  background: var(--poa); color: #fff; border: none;
  border-radius: 14px; padding: 14px 18px;
  font-weight: 700; font-size: 15px; width: 100%;
  box-shadow: 0 6px 16px rgba(11, 138, 74, .25);
  transition: transform .1s ease, opacity .1s;
}
.btn-poa:active { transform: scale(.98); }
.btn-poa:disabled { opacity: .55; box-shadow: none; }
.btn-poa--outline {
  background: #fff; color: var(--poa);
  border: 1.5px solid var(--poa); box-shadow: none;
}
.btn-ghost {
  background: var(--poa-light); color: var(--poa-dark);
  border: none; border-radius: 12px; padding: 11px 16px; font-weight: 700; font-size: 14px;
}
.btn-locate {
  width: 100%; border: 1.5px dashed var(--poa); color: var(--poa-dark);
  background: var(--poa-light); border-radius: 14px; padding: 13px;
  font-weight: 700; margin-bottom: 16px;
}

/* ── Cards / lists ────────────────────────────────────────── */
.card-soft {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px;
}
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }

/* ── Cart line items ──────────────────────────────────────── */
.cart-line {
  display: flex; gap: 12px; align-items: center;
  background: var(--card); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-sm); margin-bottom: 10px;
}
.cart-line__img {
  width: 60px; height: 60px; border-radius: 14px;
  background: var(--poa-light); display: grid; place-items: center; font-size: 28px; flex: none; overflow: hidden;
}
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__info h4 { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.cart-line__info p { font-size: 12px; color: var(--ink-soft); margin: 0; }
.cart-line__price { font-weight: 800; font-size: 14px; }

/* ── Sticky checkout bar ──────────────────────────────────── */
.sticky-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  width: 100%; max-width: var(--maxw);
  background: #fff; border-top: 1px solid var(--line);
  padding: 12px 16px; z-index: 55;
  box-shadow: 0 -4px 16px rgba(16, 40, 28, .06);
}
.sticky-bar--bottom {
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: 12px;
}
.sticky-bar__row { display: flex; align-items: center; gap: 12px; }
.sticky-bar__total { flex: none; }
.sticky-bar__total small { display: block; font-size: 11px; color: var(--ink-soft); }
.sticky-bar__total strong { font-size: 18px; font-weight: 800; }
.sticky-bar-spacer { height: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }

/* ── Empty states ─────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state__icon { font-size: 56px; margin-bottom: 12px; line-height: 1; color: var(--poa); }
.empty-state__icon .bi { font-size: 56px; }
.empty-state h3 { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.empty-state p { color: var(--ink-soft); font-size: 14px; margin: 0 0 18px; }

/* ── Branch modal ─────────────────────────────────────────── */
.branch-modal { border-radius: 22px; max-width: var(--maxw); margin-inline: auto; }
.branch-list { display: flex; flex-direction: column; gap: 10px; }
.branch-option {
  text-align: left; background: var(--bg); border: 1.5px solid transparent;
  border-radius: 14px; padding: 14px; display: grid; gap: 2px;
  color: var(--ink); font-family: inherit; -webkit-appearance: none; appearance: none;
}
.branch-option.is-active { border-color: var(--poa); background: var(--poa-light); }
.branch-option__name {
  font-weight: 700; font-size: 15px; color: var(--ink);
  -webkit-text-fill-color: var(--ink);
}
.branch-option__area {
  font-size: 12px; color: var(--ink-soft);
  -webkit-text-fill-color: var(--ink-soft);
}
.branch-option__status { font-size: 11px; font-weight: 700; margin-top: 4px; }
.branch-option__status.open { color: var(--poa); -webkit-text-fill-color: var(--poa); }
.branch-option__status.closed { color: #c0392b; -webkit-text-fill-color: #c0392b; }

/* ── Forms ────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 15px; background: #fff; color: var(--ink);
  font-family: inherit; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--poa); }
.field .err { color: #c0392b; font-size: 12px; margin-top: 5px; }
.location-use-current {
  width: 100%;
  margin-bottom: 12px;
}
.location-search-field {
  position: relative;
}
.location-search-wrap {
  position: relative;
}
.location-search-wrap input {
  padding-left: 40px;
}
.location-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  z-index: 2;
}
.location-helper {
  font-size: 12px;
  margin-top: 6px;
}
.location-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.location-suggestions[hidden] {
  display: none;
}
.location-suggestion {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  padding: 10px;
  display: grid;
  gap: 3px;
}
.location-suggestion:active,
.location-suggestion:hover {
  background: var(--poa-light);
}
.location-suggestion strong {
  font-size: 13px;
  color: var(--ink);
}
.location-suggestion span,
.location-suggestions__empty {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.35;
}
.location-suggestions__empty {
  padding: 10px;
}

/* ── OTP inputs ───────────────────────────────────────────── */
.otp-row { display: flex; gap: 10px; justify-content: center; margin: 20px 0; }
.otp-row input {
  width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 800;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
}
.otp-row input:focus { border-color: var(--poa); outline: none; }

/* ── Status timeline (tracking) ───────────────────────────── */
.timeline { position: relative; padding-left: 30px; }
.timeline__step { position: relative; padding-bottom: 22px; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step::before {
  content: ''; position: absolute; left: -22px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--line);
}
.timeline__step::after {
  content: ''; position: absolute; left: -16px; top: 16px; bottom: -2px;
  width: 2px; background: var(--line);
}
.timeline__step:last-child::after { display: none; }
.timeline__step.done::before { background: var(--poa); border-color: var(--poa); }
.timeline__step.done::after  { background: var(--poa); }
.timeline__step.active::before { border-color: var(--poa); box-shadow: 0 0 0 4px var(--poa-light); }
.timeline__step h4 { font-size: 14px; font-weight: 700; margin: 0; }
.timeline__step p { font-size: 12px; color: var(--ink-soft); margin: 2px 0 0; }

/* ── Map ──────────────────────────────────────────────────── */
.map { width: 100%; height: 280px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.map--tall { height: 320px; }
.rider-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); margin-top: -28px;
  position: relative; z-index: 5;
}
.rider-card__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--poa-light); display: grid; place-items: center; font-size: 24px; flex: none;
}
.rider-card__info { flex: 1; }
.rider-card__info h4 { font-size: 15px; font-weight: 700; margin: 0; }
.rider-card__info p { font-size: 12px; color: var(--ink-soft); margin: 1px 0 0; }
.rider-card__call {
  width: 44px; height: 44px; border-radius: 50%; background: var(--poa); color: #fff;
  display: grid; place-items: center; flex: none;
}

/* ── Misc ─────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.pill-tag { display: inline-block; background: var(--poa-light); color: var(--poa-dark); font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.muted { color: var(--ink-soft); }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; } .mb-4 { margin-bottom: 20px; }
.mt-3 { margin-top: 14px; }

/* Skeleton loaders */
.skeleton { background: linear-gradient(90deg, #eef1ef 25%, #e3e8e5 37%, #eef1ef 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Page header (sub pages) */
.page-head {
  display: flex; align-items: center; gap: 12px; margin: 2px 0 16px;
}
.page-head .back {
  width: 40px; height: 40px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none; font-size: 18px;
}
.page-head .back .bi { font-size: 20px; color: var(--ink); }
.product-card__img .bi { font-size: 46px; color: var(--poa); }
.cart-line__img .bi { font-size: 28px; color: var(--poa); }
.list-row__bi { margin-right: 8px; color: var(--poa); vertical-align: -2px; }
.product-hero__bi { font-size: 84px; color: var(--poa); }
.inline-bi { font-size: 1em; margin-right: 4px; vertical-align: -2px; color: inherit; }
.account-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--poa-light);
  display: grid; place-items: center;
}
.account-avatar .bi { font-size: 26px; color: var(--poa); }
.addr-card__icon .bi { font-size: 22px; color: var(--poa); }
.pay-opt__icon .bi { font-size: 20px; color: var(--poa); }
.pay-modal__icon .bi { font-size: 48px; color: var(--poa); }
.track-eta__icon .bi { font-size: 30px; color: var(--poa); }
.rider-card__avatar .bi { font-size: 28px; }
.rider-card__call .bi { font-size: 20px; }
.brand-mark { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.header-brand__logo { display: grid; place-items: center; }
.header-brand__mark { height: 28px; width: auto; }
.header-brand__mark.brand-mark--icon .bi { font-size: 24px; color: #fff; }
.auth-hero .logo .brand-mark { height: 42px; width: auto; margin: 0 auto; }
.auth-hero .logo .brand-mark--icon .bi { font-size: 38px; color: #fff; }
.page-head h1 .bi { margin-right: 6px; vertical-align: -2px; color: var(--poa); }
.product-card__price .price-hidden,
.price-hidden { color: var(--ink-soft); font-size: 13px; font-weight: 600; }

/* ======================================================================
   Tablet / desktop — widen the shell, move navigation into the top bar,
   and let the catalogue use the extra space. Mobile stays untouched.
   ====================================================================== */
@media (min-width: 768px) {
  :root { --maxw: 1140px; }

  .app-shell { box-shadow: none; }

  /* Header becomes a single top bar: brand · branch · search · nav · cart · account */
  .app-header {
    flex-wrap: nowrap;
    gap: 16px;
    padding: 14px 28px;
    border-radius: 0;
  }
  .header-brand { display: flex; align-items: center; gap: 8px; color: #fff; flex: none; }
  .header-brand__logo { font-size: 24px; }
  .header-brand__name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }

  .branch-pill { flex: 0 0 auto; }
  .branch-pill__text strong { max-width: 200px; }

  .search-bar { order: 0; flex: 1 1 auto; max-width: 460px; margin: 0 auto; }

  .header-nav { display: flex; align-items: center; gap: 4px; flex: none; }
  .header-nav a {
    color: rgba(255, 255, 255, .9);
    font-weight: 600; font-size: 14.5px;
    padding: 9px 14px; border-radius: 11px;
  }
  .header-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
  .header-nav a.is-active { background: rgba(255, 255, 255, .2); color: #fff; }

  .header-cart { display: grid; }

  /* No bottom tab bar on desktop */
  .bottom-nav { display: none; }
  .app-main { padding: 26px 28px 60px; }

  /* Use the width for the catalogue */
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
  .product-card__img { font-size: 54px; }

  /* Category row wraps instead of scrolling */
  .cat-scroll {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    grid-auto-columns: unset;
    overflow: visible;
    gap: 14px;
  }

  /* Single-column flows (cart, checkout, account, tracking…) read better in a
     centered column rather than stretched across the full shell width. */
  .app-main--narrow { max-width: 820px; margin-left: auto; margin-right: auto; }

  /* Sticky action bars span the footer but keep their content centered. */
  .sticky-bar { bottom: 0; }
  .sticky-bar--bottom { bottom: 0; padding-bottom: 12px; }
  .sticky-bar__row { max-width: 760px; margin: 0 auto; }
  .sticky-bar-spacer { height: 96px; }
  .toast-host { bottom: 24px; width: 360px; }
  .pwa-install-btn { bottom: 24px; }
  .pwa-install-sheet {
    max-width: 420px;
    bottom: 24px;
    border-radius: 26px;
    padding: 22px;
  }
}
