:root { --red:#b71c1c; --navy:#1f3864; --gold:#ffc107; --bg:#fff8ec; --line:#ecdcc0; --text:#222; }
* { box-sizing: border-box; }
body { margin:0; font-family: Arial, "Noto Sans Tamil", sans-serif; background: var(--bg); color: var(--text); padding-bottom: 80px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.top { background: linear-gradient(90deg, var(--red), #e65100); color:#fff; padding: 18px 0; }
.top h1 { margin:0; font-size: 26px; }
.top p { margin: 6px 0 0; opacity:.9; font-size: 14px; }
.badge { background: var(--gold); color:#000; font-size: 13px; padding: 3px 8px; border-radius: 12px; vertical-align: middle; }

.cats { display:flex; gap:8px; overflow-x:auto; padding-top:12px; padding-bottom:12px; position: sticky; top:0; background: var(--bg); z-index: 5; border-bottom:1px solid var(--line); }
.cats a { white-space:nowrap; text-decoration:none; color: var(--navy); background:#fff; border:1px solid var(--line); padding:6px 12px; border-radius: 16px; font-size: 13px; }
.cats a:hover { background: var(--navy); color:#fff; }

.cat { margin-top: 22px; scroll-margin-top: 60px; }
.cat h2 { background: var(--navy); color:#fff; margin:0; padding: 10px 14px; border-radius: 8px 8px 0 0; font-size: 18px; }
.cat h2 small { color: var(--gold); font-weight: normal; margin-left: 8px; }

.table { background:#fff; border:1px solid var(--line); border-radius: 0 0 8px 8px; overflow:hidden; }
.row { display:grid; grid-template-columns: 44px 1fr 50px 90px 90px 80px 100px; align-items:center; gap:6px; padding: 8px 10px; border-top:1px solid var(--line); font-size: 14px; }
.row.head { background:#fdf0d8; font-weight:bold; border-top:0; font-size: 13px; }
.row.picked { background: #fff3cd; }
.row .name small { display:block; color:#777; font-size: 12px; }
.row .mrp { color:#888; }
.row .offer { color: var(--red); font-weight: bold; }
.row .amt { text-align:right; font-weight:bold; }
.row .qty input { width: 70px; padding: 6px; border:1px solid #ccc; border-radius: 6px; font-size: 15px; text-align:center; }

.checkout { margin-top: 28px; background:#fff; border:1px solid var(--line); border-radius: 8px; padding: 16px; scroll-margin-top: 60px; }
.checkout h2 { margin-top:0; color: var(--navy); }
.grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid label { display:flex; flex-direction:column; font-size: 13px; font-weight: bold; gap: 4px; }
.grid .full { grid-column: 1 / -1; }
.grid input, .grid textarea { padding: 9px; border:1px solid #ccc; border-radius: 6px; font: inherit; font-weight: normal; font-size: 15px; }

.bar { position: fixed; left:0; right:0; bottom:0; background: var(--navy); color:#fff; padding: 10px 0; z-index: 10; box-shadow: 0 -2px 8px rgba(0,0,0,.2); }
.bar-in { display:flex; justify-content: space-between; align-items:center; gap: 10px; flex-wrap: wrap; }
.bar s { opacity:.7; }
.bar .total { color: var(--gold); font-size: 20px; }
.bar-btns { display:flex; gap: 8px; }
button, .btn { background: var(--gold); color:#000; border:0; padding: 10px 18px; border-radius: 6px; font-weight: bold; font-size: 15px; cursor:pointer; text-decoration:none; display:inline-block; }
button.ghost { background: transparent; color:#fff; border:1px solid #fff; }
button:disabled { opacity:.6; }
.hp { position:absolute; left:-9999px; }

.done { padding-top: 24px; }
.done .summary .row { grid-template-columns: 1fr 60px 110px; }
.done .row.tot { font-weight: bold; background:#fff3e0; }
.err { color: var(--red); }
.warn { background:#fff3cd; padding: 10px; border-radius: 6px; }

@media (max-width: 700px) {
  .row { grid-template-columns: 30px 1fr 74px; grid-template-areas: "s n q" "s m a"; row-gap: 2px; }
  .row.head { display:none; }
  .row .sno { grid-area: s; color:#999; }
  .row .name { grid-area: n; }
  .row .unit { display:none; }
  .row .mrp { grid-area: m; font-size: 12px; }
  .row .offer { grid-area: m; margin-left: 70px; }
  .row .qty { grid-area: q; }
  .row .amt { grid-area: a; font-size: 13px; }
  .row .qty input { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .top h1 { font-size: 21px; }
  .done .summary .row { grid-template-columns: 1fr 40px 90px; grid-template-areas: none; }
}

.order-head { display:flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.order-head > div { background:#fff; border:1px solid var(--line); border-radius: 8px; padding: 10px 14px; flex: 1 1 160px; }
.order-head small { display:block; color:#777; font-size: 12px; margin-bottom: 4px; }
.status { color:#fff; padding: 2px 10px; border-radius: 10px; font-size: 13px; }
.addr { background:#fff; border:1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; line-height: 1.5; }
.summary .row small { display:block; color:#777; font-size: 12px; }
.btn.ghost-dark { background:#fff; border:1px solid var(--navy); color: var(--navy); }
.track { max-width: 560px; }
.top-link { color:#fff; float:right; font-size: 14px; margin-top: 6px; }
@media print { .btn, .top p { display:none; } body { padding:0; background:#fff; } }

/* Combos */
.row.combo { background: #fffaf0; }
.row.combo .name { font-weight: bold; font-size: 15px; }
.free { display:inline-block; font-style: normal; background: #2e7d32; color:#fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; margin-top: 4px; }
.contents { margin-top: 6px; font-weight: normal; }
.contents summary { cursor: pointer; color: var(--navy); font-size: 13px; text-decoration: underline; }
.contents ol { margin: 8px 0 4px; padding-left: 22px; columns: 2; column-gap: 24px; font-size: 13px; }
.contents li { break-inside: avoid; padding: 2px 0; }
.contents li span { margin-right: 6px; }
.contents li b { color: var(--red); }
.contents li.is-free { color: #2e7d32; font-weight: bold; }
.summary .combo-list { margin: 4px 0 0; padding-left: 18px; font-size: 12px; color: #555; columns: 2; }
@media (max-width: 700px) { .contents ol, .summary .combo-list { columns: 1; } }
.summary .combo-list li.is-free { color:#2e7d32; font-weight:bold; }

/* Shop selection */
body.no-bar { padding-bottom: 20px; }
.top-link + .top-link { margin-right: 14px; }
.shops { padding-top: 24px; display:grid; gap: 16px; }
.shop-card { display:flex; justify-content: space-between; align-items:center; gap: 16px; flex-wrap: wrap; background:#fff; border:1px solid var(--line);
  border-left: 6px solid var(--red); border-radius: 10px; padding: 18px 20px; text-decoration:none; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.shop-card:hover { border-left-color: var(--gold); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.shop-card h2 { margin: 0 0 4px; color: var(--navy); font-size: 22px; }
.shop-card p { margin: 3px 0; font-size: 14px; color:#555; }
.shop-card .ta { color: var(--red); font-weight: bold; }
.shop-card .go { text-align:right; font-size: 13px; color:#777; }
.shop-card .go b { display:block; margin-top: 6px; background: var(--gold); color:#000; padding: 10px 16px; border-radius: 6px; font-size: 15px; }
@media (max-width: 700px) { .shop-card .go { text-align:left; width: 100%; } }

/* One-shop cart lock */
.other-cart { background:#fff3cd; border:2px solid #ffb300; border-radius: 8px; padding: 12px 16px; margin-top: 14px; }
.other-cart p { margin: 6px 0; }
.other-cart .btn { margin-right: 6px; }
form.locked .row.item { opacity: .55; }
form.locked .qty input { background:#eee; cursor: not-allowed; }
.shop-card.has-cart { border-left-color: #2e7d32; }
.shop-card.locked { opacity: .7; }
.cart-note { display:block; font-style: normal; font-weight: bold; color:#2e7d32; margin-bottom: 4px; }
.shop-card.locked .cart-note { color: var(--red); }

/* Terms & Aadhaar */
.grid label small { font-weight: normal; color:#b71c1c; }
.terms { margin-top: 16px; background:#fffaf0; border:1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.terms h3 { margin: 0 0 6px; color: var(--navy); font-size: 16px; }
.terms ol { margin: 0 0 10px; padding-left: 20px; font-size: 13px; line-height: 1.5; color:#444; }
.terms ol li:first-child { color: var(--red); font-weight: bold; }
.terms .agree { display:flex; gap: 8px; align-items: flex-start; font-weight: bold; font-size: 14px; }
.terms .agree input { margin-top: 3px; width: 18px; height: 18px; }

/* Logo + WhatsApp */
.top h1 .logo { height: 42px; width: auto; vertical-align: middle; margin-right: 10px; border-radius: 6px; background:#fff; padding: 2px; }
.wa-btn { position: fixed; right: 16px; bottom: 84px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display:flex;
  align-items:center; justify-content:center; box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 20; }
body.no-bar .wa-btn { bottom: 20px; }
.ad-msg { font-size: 12px; font-weight: bold; min-height: 14px; }
.ad-msg.ok { color: #2e7d32; } .ad-msg.bad { color: var(--red); }
/* Printing a normal page: hide buttons, links and the WhatsApp button */
@media print { .wa-btn, .top-link, .btn, button, .bar, nav.cats { display: none !important; } }

/* Shop page while online orders are paused */
body.closed-page { min-height: 100vh; padding: 0; background: radial-gradient(circle at 15% 10%, #18345b, transparent 42%), #071328; color: #fff; }
.closed-shell { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; }
.closed-brand { display: flex; align-items: center; gap: 10px; min-height: 46px; margin-bottom: 20px; font-size: 19px; font-weight: bold; }
.closed-brand img { max-width: 50px; max-height: 46px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }
.closed-panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 22px; background: #fff; box-shadow: 0 22px 70px rgba(0,0,0,.3); }
.closed-visual { display: flex; align-items: center; justify-content: center; min-height: 520px; padding: 20px; background: radial-gradient(circle at 50% 47%, #264064, #081a35 58%, #061126); }
.closed-visual img { display: block; width: 100%; height: auto; max-width: 560px; }
.closed-content { padding: clamp(26px, 5vw, 60px); color: var(--text); }
.closed-kicker { margin: 0 0 12px; color: #a75a13; font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.closed-content h1 { max-width: 560px; margin: 0 0 14px; color: #102647; font-size: clamp(28px, 3.5vw, 43px); line-height: 1.12; }
.closed-intro { margin: 0 0 8px; color: #405066; line-height: 1.55; }
.closed-tamil { margin: 0 0 22px; color: #405066; line-height: 1.6; }
.closed-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.closed-form label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #27394f; font-size: 13px; font-weight: 700; }
.closed-form input:not(.hp) { width: 100%; padding: 12px; border: 1px solid #bbc5d1; border-radius: 8px; background: #fff; font: 16px Arial, sans-serif; }
.closed-form input:focus { outline: 2px solid #e6a600; outline-offset: 1px; }
.closed-form button { grid-column: 1 / -1; justify-self: start; padding: 12px 24px; background: #f2b705; }
.closed-success, .closed-error { padding: 11px 14px; border-radius: 8px; font-weight: 700; }
.closed-success { color: #17642e; background: #e5f6e9; }
.closed-error { color: #9a1e1e; background: #ffeded; }
.closed-address { display: block; margin-top: 24px; padding-top: 18px; border-top: 1px solid #dce2e8; color: #405066; font-size: 14px; font-style: normal; line-height: 1.5; }
.closed-address span { display: block; margin-bottom: 5px; color: #64758a; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
@media (max-width: 760px) {
  .closed-shell { padding: 16px 14px 28px; }
  .closed-brand { margin-bottom: 12px; }
  .closed-panel { grid-template-columns: 1fr; border-radius: 16px; }
  .closed-visual { min-height: 0; padding: 4px 20px; }
  .closed-visual img { max-width: 370px; }
  .closed-content { padding: 26px 22px 30px; }
}
@media (max-width: 480px) { .closed-form { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .closed-visual img { display: none; } .closed-visual { min-height: 90px; } }
