/* Order / checkout / track pages (mobile-first). Uses tokens from style.css */
[hidden] { display: none !important; }
html:has(.shop-page) { overflow-x: hidden; }
.shop-page { overflow-x: hidden; padding-bottom: 110px; background: var(--bg); }
.shop-head {
  position: sticky; top: 0; z-index: 50; height: 60px;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: 0 10px;
  background: rgba(18,8,6,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.sh-back, .sh-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--gold-2); }
.sh-back svg, .sh-icon svg { width: 24px; height: 24px; }
.sh-title { text-align: center; line-height: 1; }
.sh-title .script { font-size: 22px; display: block; }
.sh-title small { font-family: var(--f-label); font-size: 9px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.shop-main { max-width: 760px; margin: 0 auto; padding: 14px 14px 0; }
.shop-main.narrow { max-width: 560px; }

.status-banner { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; font-size: 13.5px; background: rgba(232,176,75,.12); border: 1px solid var(--line); color: var(--gold-2); }
.status-banner.closed { background: rgba(216,57,43,.12); border-color: rgba(216,57,43,.35); color: #ffb3a6; }

.shop-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 46px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; outline: 0; color: var(--cream); font: inherit; font-size: 15px; }
.veg-toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; color: var(--text); }
.veg-toggle input { accent-color: var(--green); width: 18px; height: 18px; }

.cat-chips { position: sticky; top: 60px; z-index: 40; display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; margin: 0 -14px 6px; background: rgba(18,8,6,.95); scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a { flex: none; padding: 8px 14px; border-radius: 100px; font-size: 13px; border: 1px solid var(--line); color: var(--text); }
.cat-chips a.active { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1406; border-color: transparent; font-weight: 500; }

.cat-sec { scroll-margin-top: 120px; padding-top: 10px; }
.cat-sec h2 { font-family: var(--f-display); font-size: 26px; color: var(--gold-2); margin: 10px 0 4px; }
.cat-sec h2 small { font-family: var(--f-body); font-size: 12px; color: var(--muted); font-weight: 400; }
.item { display: flex; gap: 14px; padding: 16px 0 22px; border-bottom: 1px dashed rgba(232,176,75,.15); }
.item.off { opacity: .5; }
.item-info { flex: 1; min-width: 0; }
.item-name { font-weight: 500; color: var(--cream); font-size: 15px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.item-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.item-price { font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--gold-2); margin-top: 6px; }
.item-media { position: relative; width: 112px; flex: none; }
.item-media img { width: 112px; height: 100px; object-fit: cover; border-radius: 14px; background: var(--bg-3); }
.item-action { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); }
.add-btn, .stepper { height: 36px; min-width: 92px; border-radius: 10px; background: #fff8ec; color: #1f8a3a; font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); border: 1px solid #e3d6bd; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1406; border: 0; }
.stepper button { width: 32px; height: 36px; font-size: 20px; font-weight: 600; color: inherit; }
.stepper b { min-width: 20px; text-align: center; }
.sold-out { display: block; padding: 7px 10px; border-radius: 10px; background: var(--bg-3); color: var(--muted); font-size: 12px; white-space: nowrap; border: 1px solid var(--line); }
.mi-badge { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 100px; background: rgba(216,57,43,.2); color: #ff9a85; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; line-height: 2.4; }

.cart-bar {
  position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  width: calc(100% - 24px); max-width: 560px; margin: 0 auto; min-height: 60px; padding: 8px 18px; border-radius: 16px;
  font: inherit; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #2f8f45, #1f6e33); color: #fff;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,.8); animation: barIn .4s var(--ease);
}
.cart-bar[hidden] { display: none; }
@keyframes barIn { from { transform: translateY(120%); } }
.cb-left { text-align: left; line-height: 1.25; }
.cb-left b { display: block; font-size: 13px; font-weight: 500; }
.cb-left small { font-size: 16px; font-weight: 600; }
.cb-right { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.cb-right svg { width: 18px; height: 18px; }

.sheet-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; max-width: 600px; margin: 0 auto;
  max-height: 85vh; display: flex; flex-direction: column;
  background: var(--bg-2); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line);
  transform: translateY(105%); transition: transform .4s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: none; }
.sheet-handle { width: 44px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 4px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 18px; }
.sheet-head h2 { font-family: var(--f-display); font-size: 26px; color: var(--cream); }
.link-btn { color: var(--muted); font-size: 13px; text-decoration: underline; padding: 8px; }
.cart-lines { overflow-y: auto; padding: 0 18px; flex: 1; }
.cart-line { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cl-name { flex: 1; min-width: 0; font-size: 14px; color: var(--cream); line-height: 1.3; }
.cl-name small { display: block; color: var(--muted); font-size: 12px; }
.cart-line .stepper { min-width: 88px; height: 32px; }
.cart-line .stepper button { height: 32px; }
.cl-total { min-width: 56px; text-align: right; color: var(--gold-2); font-size: 14px; }
.sheet-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); }

.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.sum-row.grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 16px; color: var(--cream); }
.sum-row.grand b { font-family: var(--f-display); font-size: 26px; color: var(--gold-2); }
.sum-line { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; }
.sum-line span:nth-child(2) { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; margin-top: 12px; }

.card { display: block; padding: 18px 16px; border-radius: 16px; margin-bottom: 14px; background: linear-gradient(180deg, rgba(255,240,215,.05), rgba(255,240,215,.015)); border: 1px solid var(--line); }
.card h3 { font-family: var(--f-display); font-size: 22px; color: var(--gold-2); margin-bottom: 10px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit; font-size: 16px; color: var(--cream); background: var(--bg-3); border: 1px solid var(--line); outline: 0; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg label[hidden] { display: none; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.seg input:checked + span { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #2a1406; font-weight: 600; border-color: transparent; }
.seg:has(label[hidden]) { grid-template-columns: 1fr; }
.pay-opt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; padding: 10px 0; }
.pay-opt[hidden] { display: none; }
.pay-opt small { width: 100%; padding-left: 24px; color: var(--muted); }
.pay-opt input { accent-color: var(--gold); }
.form-error { color: #ff9a85; font-size: 14px; min-height: 22px; margin-bottom: 8px; text-align: center; }

.success { text-align: center; padding: 18px 0 22px; }
.tick { width: 74px; height: 74px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 38px; color: #fff; background: linear-gradient(135deg, #3fbf62, #1f8a3a); animation: pop .6s var(--ease); box-shadow: 0 0 0 10px rgba(63,191,98,.15); }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.15); } }
.success h2 { font-family: var(--f-display); font-size: 32px; color: var(--cream); }
.success p { color: var(--muted); font-size: 14px; }
.track { list-style: none; margin: 8px 0 0; padding-left: 4px; }
.track li { position: relative; padding: 0 0 20px 30px; color: var(--muted); font-size: 14.5px; }
.track li::before { content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); }
.track li::after { content: ""; position: absolute; left: 8px; top: 21px; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.track li:last-child::after { display: none; }
.track li.done { color: var(--text); }
.track li.done::before { background: var(--green); border-color: var(--green); }
.track li.done::after { background: var(--green); }
.track li.now { color: var(--gold-2); font-weight: 600; }
.track li.now::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 6px rgba(232,176,75,.2); animation: pulse 1.6s infinite; }
.page-h { font-family: var(--f-display); color: var(--cream); font-size: 28px; margin: 6px 0 12px; }
.order-row { display: flex; justify-content: space-between; align-items: center; }
.order-row b { display: block; color: var(--cream); }
.order-row small { font-size: 12.5px; }
.pill { padding: 5px 12px; border-radius: 100px; font-size: 12px; background: rgba(232,176,75,.15); color: var(--gold-2); white-space: nowrap; }

.loading { display: flex; justify-content: center; gap: 8px; padding: 60px 0; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: beat 1s infinite; }
.loading span:nth-child(2) { animation-delay: .15s; }
.loading span:nth-child(3) { animation-delay: .3s; }
.toast { position: fixed; left: 50%; bottom: 90px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 100px; background: var(--cream); color: #2a1406; font-size: 13px; transition: .3s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  .item-media, .item-media img { width: 140px; }
  .item-media img { height: 116px; }
}

.pay-box { text-align: center; border-color: var(--gold); }
.pay-box .btn { margin: 6px 0 10px; }
.upi-id { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--bg-3); font-size: 14px; color: var(--cream); }
.upi-id button { color: var(--gold-2); font-size: 13px; text-decoration: underline; }
.paid-ok { color: #8fe0a3; font-weight: 600; }
.btn-wa { background: #25d366; color: #fff; font-weight: 600; }
.qr-wrap { display: grid; place-items: center; margin: 6px 0 12px; }
.qr-wrap #payQr { width: 244px; height: 244px; padding: 12px; background: #fff; border-radius: 14px; box-sizing: border-box; }
#payQr img, #payQr canvas { width: 220px !important; height: 220px !important; max-width: none; }
.pay-box h3 { margin-top: 10px; }

/* Small phones: keep search + veg toggle inside the screen */
@media (max-width: 420px) {
  .veg-toggle { font-size: 12px; gap: 4px; }
  .search { padding: 0 10px; }
  .search input { font-size: 14px; }
}
