/* Anu Crackers — ordering pages (shop, cart, checkout, success, track). Builds on style.css tokens and classes.
   Mobile first: no horizontal scroll at 360px, tap targets >= 44px. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.narrow { max-width: 760px; }

/* Page head */
.pagehead__in { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5, 1.5rem); flex-wrap: wrap; }
.pagehead--slim { padding-block: var(--s6, 2rem); }
.pagehead--slim h1 { margin: 0; }

/* Price list rows */
.prow__name { display: grid; gap: 2px; min-width: 0; }
.prow__name a { color: inherit; text-decoration: none; }
.prow__name a:hover b { color: var(--orange-dk, #D94F00); text-decoration: underline; }
.prow__name b { overflow-wrap: anywhere; }
.prow .badge--out { justify-self: start; margin-top: 2px; }
.prow.is-out { opacity: .72; }
.prow.is-out .stepper { opacity: .55; }
.stepper[data-disabled] .stepper__btn, .stepper [disabled] { cursor: not-allowed; }
.stepper[data-disabled] .stepper__btn:hover { background: none; color: inherit; }
.stepper__btn { min-width: 44px; min-height: 44px; }
.stepper input { min-height: 44px; }
a.thumb { text-decoration: none; }
.prow__amt { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Fallback for the out-of-stock badge if the main stylesheet hasn't defined it yet */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; }
.badge--out { background: #FDECEC; color: var(--err, #C62828); }

/* Summary extras */
.summary__pdf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted-dk, #B9AEA3); font-size: var(--t-xs, .8125rem); text-decoration: none; }
.summary__pdf:hover { color: #fff; text-decoration: underline; }
.summary__pdf .ic, .cart-more .ic { width: 18px; height: 18px; }
.btn[aria-disabled="true"] { background: #F3C9AB; color: #fff; cursor: not-allowed; pointer-events: auto; }
.btn--primary[aria-disabled="true"]:hover { background: #F3C9AB; }
.closed-note { margin: 0; padding: var(--s3, .75rem) var(--s4, 1rem); border-radius: var(--r-md, 10px); background: #3A1D08; color: #FFD9BF; font-size: var(--t-sm, .9375rem); }
.closed-note a { color: #fff; }

/* Modal buttons */
.modal__btns { display: flex; flex-wrap: wrap; gap: var(--s3, .75rem); justify-content: center; margin-top: var(--s3, .75rem); }
.modal__btns .btn { flex: 1 1 160px; }
.modal h2 { font-size: 1.375rem; margin: 0; }

/* ---------- Cart ---------- */
.page-cart .order__grid, .page-checkout .order__grid { padding-top: var(--s6, 2rem); }
.cart-empty { display: grid; justify-items: center; gap: var(--s4, 1rem); margin-block: var(--s6, 2rem) var(--s8, 4.5rem); }
.cart-empty__ic { width: 44px; height: 44px; color: var(--orange, #FF6A00); }
.prow--cart { grid-template-columns: minmax(0, 2.4fr) .9fr 140px 1fr 48px; }
.prow__rm { justify-self: end; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--muted, #6E645B); cursor: pointer; }
.iconbtn:hover, .iconbtn:focus-visible { background: #FDECEC; color: var(--err, #C62828); }
.iconbtn .ic { width: 20px; height: 20px; }
.cart-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--orange-dk, #D94F00); font-weight: 600; text-decoration: none; }
.cart-more .ic { transform: scaleX(-1); }

.coupon { display: grid; gap: 6px; padding-bottom: var(--s4, 1rem); border-bottom: 1px dashed var(--ink-3, #2E2822); }
.coupon label { color: #D9D0C7; }
.coupon__row { display: flex; gap: var(--s2, .5rem); }
.coupon__row input { flex: 1; min-width: 0; text-transform: uppercase; background: var(--ink-2, #1D1915) !important; color: #fff !important; border-color: var(--ink-3, #2E2822) !important; }
.coupon__row .btn { min-height: 46px; flex: none; }
.coupon__rm { display: none; justify-self: start; color: var(--muted-dk, #B9AEA3); min-height: 44px; padding-inline: 0; }
.coupon.has-coupon .coupon__rm { display: inline-flex; }
.coupon__msg { margin: 0; font-size: var(--t-xs, .8125rem); min-height: 1em; }
.coupon__msg.is-ok { color: #6FE09A; }
.coupon__msg.is-err { color: #FF9C8F; }

/* ---------- Checkout ---------- */
.co-errors:focus { outline: 2px solid var(--err, #C62828); outline-offset: 2px; }
.check { display: flex; gap: var(--s3, .75rem); align-items: flex-start; font-weight: 500; cursor: pointer; min-height: 44px; }
.check input[type="checkbox"] { flex: none; width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; padding: 0; accent-color: var(--orange, #FF6A00); }
.has-err > select, .field.has-err select { border-color: var(--err, #C62828); }
.co-agree.has-err .check { color: var(--err, #C62828); }
.pin-msg { margin: -6px 0 0; font-size: var(--t-xs, .8125rem); min-height: 1em; }
.pin-msg.is-ok { color: var(--ok, #148A42); }
.pin-msg.is-warn { color: var(--orange-dk, #D94F00); }
.pin-msg.is-err { color: var(--err, #C62828); font-weight: 600; }
.co-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; font-size: var(--t-sm, .9375rem); color: #D9D0C7; }
.co-items li { display: flex; justify-content: space-between; gap: var(--s3, .75rem); }
.co-items li span { min-width: 0; overflow-wrap: anywhere; }
.co-items small { color: var(--muted-dk, #B9AEA3); }
.co-items b { color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.co-edit { margin: -6px 0 0; font-size: var(--t-xs, .8125rem); }
.co-edit a { color: var(--orange, #FF6A00); display: inline-block; min-height: 32px; line-height: 32px; }

/* Pay step */
.paystep { padding-block: var(--s6, 2rem) var(--s8, 4.5rem); max-width: 560px; }
.paystep__card { display: grid; gap: var(--s4, 1rem); padding: var(--s6, 2rem); border: 1px solid var(--line, #EEE4DA); border-radius: var(--r-lg, 16px); }
.paystep__msg { margin: 0; font-size: var(--t-sm, .9375rem); min-height: 1em; }
.paystep__msg.is-err { color: var(--err, #C62828); }
.paystep__msg.is-ok { color: var(--ok, #148A42); }

/* ---------- Success ---------- */
.success { background: var(--orange-lt, #FFF2E8); padding-block: var(--s7, 3rem); text-align: center; }
.success .narrow { display: grid; justify-items: center; gap: var(--s3, .75rem); }
.success h1 { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.5rem); margin: 0; overflow-wrap: anywhere; }
.success__ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok, #148A42); color: #fff; }
.success__ic .ic { width: 34px; height: 34px; }
.success__ref { font-size: var(--t-lg, 1.25rem); margin: 0; }
.success .btnrow { justify-content: center; }
.success .notice { justify-content: center; }
.success__body { padding-block: var(--s6, 2rem) var(--s8, 4.5rem); display: grid; gap: var(--s5, 1.5rem); }
.success__body h2 { margin: 0; }
.success__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6, 2rem); }
.success__grid h3 { margin: 0 0 var(--s2, .5rem); font-size: 1.125rem; }
.next-steps { margin: 0 0 var(--s3, .75rem); padding-left: 1.25em; display: grid; gap: 4px; }
.receipt td small { display: inline-block; }
.lookup { display: grid; gap: var(--s4, 1rem); margin-block: var(--s6, 2rem) var(--s8, 4.5rem); }
.lookup h1 { font-size: 1.75rem; margin: 0; }
.lookup .btn { justify-self: start; }

/* ---------- Track ---------- */
.track .lookup { margin-bottom: var(--s5, 1.5rem); }
.track__result { display: grid; gap: var(--s4, 1rem); padding-bottom: var(--s8, 4.5rem); }
.track__result h2 { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline__step { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--s3, .75rem); padding-bottom: var(--s5, 1.5rem); color: var(--muted, #6E645B); }
.timeline__step::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line, #EEE4DA); }
.timeline__step:last-child::before { display: none; }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step.is-done { color: var(--ink, #0E0C0A); }
.timeline__step.is-done::before { background: var(--orange, #FF6A00); }
.timeline__dot { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line, #EEE4DA); background: #fff; color: #fff; }
.timeline__dot .ic { width: 18px; height: 18px; }
.is-done .timeline__dot { background: var(--orange, #FF6A00); border-color: var(--orange, #FF6A00); }
.is-current .timeline__dot { box-shadow: 0 0 0 5px rgba(255,106,0,.18); }
.timeline__step b { display: block; line-height: 36px; }
.timeline__step small { display: block; margin-top: -6px; color: var(--muted, #6E645B); }
.timeline__info { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: var(--t-sm, .9375rem); }
.timeline__info .ic { width: 18px; height: 18px; color: var(--orange-dk, #D94F00); }
.timeline--cancelled .timeline__step.is-done .timeline__dot { background: var(--muted, #6E645B); border-color: var(--muted, #6E645B); }
.timeline--cancelled .timeline__step.is-done::before { background: var(--muted, #6E645B); }
.timeline__step.is-cancelled { color: var(--err, #C62828); }
.timeline__step.is-cancelled .timeline__dot { background: var(--err, #C62828); border-color: var(--err, #C62828); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .prow--cart { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "prod rm" "rate qty" "amt amt"; }
  .prow--cart .prow__rm { grid-area: rm; align-self: start; }
  .prow--cart .prow__amt { grid-area: amt; text-align: right; }
  .pagehead__in { align-items: flex-start; }
  body.has-cartbar .site > main { padding-bottom: 72px; }
}
@media (max-width: 600px) {
  .success__grid { grid-template-columns: 1fr; }
  .success .btnrow .btn, .lookup .btn { flex: 1 1 100%; justify-self: stretch; }
  .paystep__card { padding: var(--s5, 1.5rem) var(--s4, 1rem); }
  .receipt th, .receipt td { padding: var(--s2, .5rem); font-size: var(--t-sm, .9375rem); }
  .pagehead__in .btn { width: 100%; }
}
@media (max-width: 380px) {
  .stepper input { width: 40px; }
  .prow { padding-inline: var(--s3, .75rem); }
}
@media (min-width: 901px) {
  .page-shop .prow { grid-template-columns: minmax(0, 2.4fr) .8fr .9fr 140px 1fr; }
}
.summary .btn--text, .coupon__rm { min-height: 44px; }

/* ---------- UPI payment card (order page, order_mode = upi) ---------- */
.upipay { margin-top: 8px; margin-bottom: 28px; scroll-margin-top: 90px; }
.upipay > h2 { margin: 0 0 12px; }
.upipay__card { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; padding: 18px; border: 2px solid var(--orange); border-radius: var(--r-lg); background: var(--orange-lt); }
.upipay__qr { text-align: center; }
.upipay__qr img { display: block; width: 232px; height: 232px; margin: 0 auto 8px; background: #fff; border-radius: var(--r-md); padding: 6px; image-rendering: pixelated; }
.upipay__qr small { color: var(--muted); font-size: .85rem; line-height: 1.35; display: block; }
.upipay__or { margin: 12px 0 8px; color: var(--muted); font-size: .92rem; }
.upipay__dl { margin: 0; display: grid; gap: 8px; }
.upipay__dl div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 12px; background: #fff; border-radius: var(--r-md); }
.upipay__dl dt { color: var(--muted); font-size: .9rem; }
.upipay__dl dd { margin: 0; display: flex; align-items: center; gap: 8px; word-break: break-all; }
.upipay__form { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-lg); display: grid; gap: 12px; }
.upipay__form h3 { margin: 0; }
.upipay__form .hint { color: var(--muted); font-size: .85rem; }
.upipay__done { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-lg); background: #E8F6EE; border: 1px solid #BFE5CD; }
.upipay__done h2 { margin: 0 0 6px; }
.upipay__again summary { cursor: pointer; color: var(--orange-dk); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.upipay__again .upipay__form { background: #fff; }
.success__ic--sm { width: 44px; height: 44px; flex: none; }
.mono { font-family: ui-monospace, Consolas, monospace; }
@media (hover: hover) and (pointer: fine) { .upipay__app { display: none; } .upipay__or { margin-top: 0; } }
@media (max-width: 640px) {
  .upipay__card { grid-template-columns: 1fr; padding: 14px; }
  .upipay__qr img { width: 210px; height: 210px; }
}
