/* Dilsho Customer PWA styles (on top of brand tokens). Mobile-first, app-like. */
body.pwa { padding-bottom: 72px; background: var(--bg); }
.app-top { position: sticky; top: 0; z-index: 20; background: var(--cream);
  border-bottom: 1px solid var(--border); padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
.app-top img { height: 26px; }
.app-main { max-width: 680px; margin-inline: auto; padding: 14px; }

/* search */
.search-bar { display: flex; gap: 8px; position: sticky; top: 56px; z-index: 10; background: var(--bg); padding: 8px 0; }
.search-bar input { flex: 1; }

/* store group + product rows (store -> product -> price, §9.2) */
.store-group { margin-bottom: 16px; }
.store-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; margin: 10px 2px 6px; }
.store-head .pin { width: 18px; height: 18px; }
.store-head .area { font-family: var(--font-body); font-weight: 400; font-size: 13px; color: var(--text-muted); }
.prod-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 12px; margin-bottom: 8px; }
.prod-row .info { flex: 1; }
.prod-row .name { font-weight: var(--fw-semibold); }
.prod-row .price { color: var(--coral); font-weight: 700; }
.prod-row .add { background: var(--coral); color: var(--cream); border: none; border-radius: var(--r-pill);
  width: 38px; height: 38px; font-size: 22px; cursor: pointer; flex: none; }
.prod-row .add:disabled { background: var(--warm-300); }
.qtybox { display: flex; align-items: center; gap: 6px; }
.qtybox button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--coral); background: var(--surface); color: var(--coral); font-size: 18px; cursor: pointer; }

/* bottom nav */
.app-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
.app-nav button { background: none; border: none; color: var(--text-muted); font-size: 12px; font-weight: 600; cursor: pointer; display: grid; justify-items: center; gap: 2px; }
.app-nav button .ico { font-size: 20px; }
.app-nav button.is-active { color: var(--coral); }
.cart-count { position: absolute; transform: translate(12px,-6px); background: var(--coral); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 6px; }

/* cards, lists, empty states */
.empty { text-align: center; color: var(--text-muted); padding: 40px 16px; }
.empty img { width: 64px; opacity: .8; margin-bottom: 10px; }
.line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.totals .line:last-child { border: none; font-weight: 700; font-size: 18px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 26px; position: relative; color: var(--text-muted); }
.timeline li.done { color: var(--text); }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--warm-300); }
.timeline li.done::before { background: var(--success); }
#map { height: 240px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface-soft); display:grid; place-items:center; color:var(--text-muted); }
.auth-wrap { max-width: 420px; margin: 30px auto; }
.seg { display: flex; gap: 6px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 9px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); font-weight: 600; cursor: pointer; }
.seg button.is-active { background: var(--coral); color: #fff; border-color: var(--coral); }

/* modal + address rows for the PWA */
.modal-backdrop { position: fixed; inset: 0; background: rgba(43,32,26,.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; padding: 20px; }
.modal h3 { margin-top: 0; }
.modal .field { margin-bottom: 12px; }
.modal .field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.addr-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.addr-row .meta { flex: 1; }
.addr-row.is-default { background: var(--surface-soft); border-radius: var(--r-md); padding: 10px; }
.notif { padding: 10px 0; border-bottom: 1px solid var(--border); }
.notif.unread { font-weight: 600; }
.notif .when { color: var(--text-muted); font-size: 12px; font-weight: 400; }
