:root {
  --green: #0e8a3e;
  --green-dark: #086b2e;
  --yellow: #ffc900;
  --yellow-soft: #fff4cc;
  --ink: #1a1a1a;
  --grey: #6b7280;
  --grey-light: #e8e8e8;
  --bg: #fafafa;
  --card: #ffffff;
  --danger: #d64545;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
h1,h2,h3,.brand { font-family: 'Poppins','Inter',sans-serif; }
button { font-family: inherit; cursor: pointer; border: none; }
.app-shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; padding-bottom: 90px; }
.topbar { background: var(--green); color: #fff; padding: 14px 16px 18px; border-radius: 0 0 20px 20px; }
.topbar-row { display: flex; align-items: flex-start; justify-content: space-between; }
.topbar .brand { font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 6px; }
.topbar .brand .dot { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; display: inline-block; }
.topbar .sub { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.my-orders-btn { background: rgba(255,255,255,.16); color: #fff; font-size: 12.5px; font-weight: 600; padding: 8px 12px; border-radius: 20px; flex: 0 0 auto; }
.eta-pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.16); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; margin-top: 10px; }
.search-box { margin-top: 12px; background: #fff; border-radius: var(--radius-sm); padding: 10px 12px; color: var(--grey); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.search-box input { border: none; outline: none; flex: 1; font-size: 14px; font-family: inherit; color: var(--ink); background: transparent; }
.cat-row { display: flex; gap: 10px; overflow-x: auto; padding: 14px 16px 4px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-chip { flex: 0 0 auto; background: var(--card); border: 1px solid var(--grey-light); border-radius: 20px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--grey); white-space: nowrap; }
.cat-chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.section-title { padding: 16px 16px 8px; font-size: 15px; font-weight: 700; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.product-card { background: var(--card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.product-card.is-out-of-stock { opacity: .55; }
.product-thumb { height: 64px; border-radius: var(--radius-sm); background: var(--yellow-soft); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.product-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; min-height: 34px; }
.product-unit { font-size: 11.5px; color: var(--grey); }
.product-row { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.product-price { font-weight: 700; font-size: 14px; }
.add-btn { background: #fff; border: 1.5px solid var(--green); color: var(--green); font-weight: 700; font-size: 12.5px; padding: 6px 14px; border-radius: var(--radius-sm); }
.out-of-stock-tag { font-size: 11px; font-weight: 700; color: var(--danger); background: #fbe4e4; padding: 5px 9px; border-radius: var(--radius-sm); }
.qty-stepper { display: flex; align-items: center; background: var(--green); border-radius: var(--radius-sm); overflow: hidden; }
.qty-stepper button { background: none; color: #fff; width: 26px; height: 26px; font-size: 15px; font-weight: 700; }
.qty-stepper span { color: #fff; font-weight: 700; font-size: 13px; min-width: 18px; text-align: center; }
.xerox-banner { margin: 16px; background: linear-gradient(135deg,#1a1a1a,#2c2c2c); color: #fff; border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 12px; }
.xerox-banner .icon { font-size: 30px; }
.xerox-banner .title { font-weight: 700; font-size: 15px; }
.xerox-banner .desc { font-size: 12px; opacity: .8; margin-top: 2px; }
.xerox-banner button { margin-left: auto; background: var(--yellow); color: #1a1a1a; font-weight: 700; font-size: 12.5px; padding: 8px 14px; border-radius: var(--radius-sm); flex: 0 0 auto; }
.cart-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--green); color: #fff; padding: 12px 16px; display: none; align-items: center; justify-content: space-between; box-shadow: 0 -2px 10px rgba(0,0,0,.12); }
.cart-bar.visible { display: flex; }
.cart-bar .cart-info { font-size: 13px; }
.cart-bar .cart-info b { font-size: 15px; display: block; }
.cart-bar .view-cart-btn { background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13.5px; padding: 9px 16px; border-radius: var(--radius-sm); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: flex-end; justify-content: center; z-index: 40; }
.overlay.visible { display: flex; }
.sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; max-height: 88vh; overflow-y: auto; padding: 18px 16px 24px; }
.sheet-handle { width: 36px; height: 4px; background: var(--grey-light); border-radius: 4px; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 14px; font-size: 17px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--grey); margin-bottom: 5px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--grey-light); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; outline: none; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 60px; }
.segmented { display: flex; gap: 8px; }
.segmented button { flex: 1; padding: 9px; border-radius: var(--radius-sm); border: 1.5px solid var(--grey-light); background: #fff; font-size: 13px; font-weight: 600; color: var(--grey); }
.segmented button.active { background: var(--green); border-color: var(--green); color: #fff; }
.primary-btn { width: 100%; background: var(--green); color: #fff; font-weight: 700; font-size: 15px; padding: 13px; border-radius: var(--radius-sm); margin-top: 4px; }
.primary-btn:disabled { background: var(--grey-light); color: var(--grey); }
.file-drop { border: 1.5px dashed var(--grey-light); border-radius: var(--radius-sm); padding: 18px 12px; text-align: center; font-size: 13px; color: var(--grey); position: relative; }
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop.has-file { border-color: var(--green); color: var(--green); font-weight: 600; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--grey-light); }
.cart-item .thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--yellow-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: 0 0 auto; }
.cart-item .meta { flex: 1; }
.cart-item .meta .name { font-size: 13.5px; font-weight: 600; }
.cart-item .meta .sub { font-size: 11.5px; color: var(--grey); margin-top: 2px; }
.cart-item .price { font-weight: 700; font-size: 13.5px; }
.remove-x { background: none; color: var(--danger); font-size: 18px; padding: 2px 6px; }
.bill-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 6px 0; color: var(--grey); }
.bill-row.total { color: var(--ink); font-weight: 700; font-size: 15px; border-top: 1px dashed var(--grey-light); margin-top: 6px; padding-top: 10px; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--grey); grid-column: 1/-1; }
.empty-state .icon { font-size: 40px; margin-bottom: 10px; }
.toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 13px; z-index: 60; opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.toast.visible { opacity: 1; }
.order-confirm { text-align: center; padding: 10px 4px 4px; }
.order-confirm .check { font-size: 46px; margin-bottom: 6px; }
.order-confirm .oid { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.order-confirm .note { font-size: 12.5px; color: var(--grey); line-height: 1.5; }

/* ---------- My Orders (new) ---------- */
.order-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px; }
.order-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.order-id { font-weight: 700; font-size: 14px; }
.order-time { font-size: 11.5px; color: var(--grey); margin-top: 2px; }
.my-order-items { font-size: 12.5px; color: var(--grey); margin-top: 8px; line-height: 1.4; }
.status-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: capitalize; flex: 0 0 auto; }
.status-placed { background: var(--yellow-soft); color: #8a6d00; }
.status-preparing { background: #dbeafe; color: #1d4ed8; }
.status-out_for_delivery { background: #ede9fe; color: #6d28d9; }
.status-delivered { background: #dcfce7; color: var(--green-dark); }
