/* Food On Fire - styles for the dynamic site.
   Brand tokens mirror the marketing site (index.html). */
:root{
  --red:#D42B2B; --deep-red:#C0392B; --charcoal:#1A1A1A; --smoke:#2E2E2E;
  --ash:#F5F0EB; --white:#fff; --gold:#C9973A; --ember:#8B2E00;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Alverata',Georgia,serif;color:var(--white);background:var(--charcoal);line-height:1.6}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.container{width:min(1100px,92%);margin-inline:auto}
.container.narrow{max-width:640px}

/* Nav */
.site-nav{display:flex;align-items:center;justify-content:space-between;
  padding:12px 24px;background:var(--smoke);position:sticky;top:0;z-index:10}
.site-nav .brand{display:flex;align-items:center;gap:10px;
  font-family:'Alverata',Georgia,serif;color:var(--gold)}
.site-nav .brand img{height:40px;width:auto;background:var(--ash);padding:5px 9px;border-radius:10px}
.nav-links{display:flex;align-items:center;gap:18px}
.nav-links a:hover{color:var(--gold)}
.nav-links .who{color:var(--ash);opacity:.8}
.login-link{border:1px solid var(--gold);padding:6px 14px;border-radius:6px}
.login-link:hover{background:var(--gold);color:var(--charcoal) !important}

/* Mobile app (Capacitor): pad the sticky top bar below the phone's status bar
   (clock / battery / signal) on edge-to-edge Android. Harmless in browsers —
   env(safe-area-inset-top) is 0 there, so desktop/web is untouched. */
html.fof-native .site-nav{padding-top:calc(12px + env(safe-area-inset-top))}
@media (max-width:600px){html.fof-native .site-nav{padding-top:calc(8px + env(safe-area-inset-top))}}

/* MOBILE ONLY (phones, <=600px): compact the app top bar so the whole nav fits
   neatly on one row. Hides the "Food on Fire" wordmark (the logo + Home button
   already identify the site), shrinks the logo/padding/gaps a touch, and keeps
   "Log in / Sign up" on a single horizontal line. Desktop/laptop is untouched. */
@media (max-width:600px){
  .site-nav{padding:8px 12px}
  .site-nav .brand img{height:32px}
  .site-nav .brand span{display:none}
  .nav-links{gap:10px;font-size:.88rem}
  .login-link{padding:4px 9px;font-size:.76rem;white-space:nowrap}
}

/* Cart link + live badge */
.cart-link{position:relative;font-weight:700}
.cart-badge{display:inline-grid;place-items:center;min-width:20px;height:20px;
  padding:0 6px;margin-left:4px;border-radius:999px;background:var(--red);
  color:#fff;font-size:.75rem;font-weight:700;vertical-align:middle}
.cart-badge.hidden{display:none}

/* Flash messages */
.messages{list-style:none;margin:14px auto;display:grid;gap:8px}
.msg{padding:10px 16px;border-radius:8px;background:var(--smoke);border-left:4px solid var(--gold)}
.msg.success{border-left-color:#2e7d32}
.msg.error{border-left-color:var(--red)}

/* Hero */
.hero{min-height:62vh;display:grid;place-items:center;text-align:center;
  background-size:cover;background-position:center;padding:48px 16px}
.hero-inner{max-width:720px}
.hero h1{font-family:'Alverata',Georgia,serif;font-size:clamp(2rem,5vw,3.4rem);margin-bottom:14px}
.hero p{font-size:1.1rem;color:var(--ash)}
.cta-row{margin-top:24px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}

/* Buttons */
.btn{display:inline-block;padding:12px 26px;border-radius:8px;font-weight:700;
  letter-spacing:.3px;cursor:pointer;border:none;transition:transform .15s ease,filter .15s ease}
.btn:hover{transform:translateY(-2px);filter:brightness(1.08)}
.btn-primary{background:var(--red);color:#fff}
.btn-ghost{background:transparent;border:1px solid var(--ash);color:var(--ash)}

/* Portals (home) */
.portals{padding:56px 0}
.portals h2{font-family:'Alverata',Georgia,serif;text-align:center;margin-bottom:28px;color:var(--gold)}
.portal-grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.portal-card{background:var(--smoke);border:1px solid rgba(201,151,58,.25);border-radius:14px;padding:24px}
.portal-card h3{font-size:1.3rem;margin-bottom:10px;color:var(--gold)}
.portal-card p{color:var(--ash);margin-bottom:16px}
.badge{display:inline-block;font-size:.78rem;font-weight:700;padding:5px 12px;border-radius:999px}
.badge.live{background:var(--red);color:#fff}
.badge.soon{background:rgba(255,255,255,.12);color:var(--ash)}

/* Menu — compact, Swiggy-style scannable grid (smaller square thumbnails) */
.menu-head{padding:30px 0 4px}
.menu-head h1{font-family:'Alverata',Georgia,serif;color:var(--gold);font-size:2.2rem}
.menu-sub{color:var(--ash);opacity:.85;font-size:.9rem}
.closed-banner{margin:10px 0;padding:10px 16px;border-radius:8px;
  background:rgba(212,43,43,.15);border:1px solid var(--red);color:#ffd9d9}
/* Main search bar */
.menu-search{position:relative;margin:16px 0 4px}
.menu-search input{width:100%;padding:13px 42px;border-radius:12px;border:1px solid rgba(201,151,58,.4);
  background:var(--smoke);color:#fff;font-family:inherit;font-size:1rem}
.menu-search input::placeholder{color:#9b948c}
.menu-search input:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,151,58,.15)}
.menu-search .s-ic{position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:1rem;pointer-events:none}
.menu-search .s-clear{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:none;border:none;
  color:var(--ash);font-size:1.05rem;cursor:pointer;opacity:.75;display:none;line-height:1;padding:6px}
.menu-search .s-clear:hover{opacity:1;color:var(--red)}
.menu-noresult{display:none;text-align:center;color:var(--ash);padding:34px 0}
.menu-category{padding:16px 0}
.menu-category h2{font-family:'Alverata',Georgia,serif;color:var(--white);font-size:1.4rem;
  border-bottom:2px solid var(--gold);display:inline-block;margin-bottom:14px;padding-bottom:4px}
.dish-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(158px,1fr))}
.dish-card{background:var(--smoke);border-radius:12px;overflow:hidden;
  border:1px solid rgba(255,255,255,.06);display:flex;flex-direction:column;transition:border-color .15s ease}
.dish-card:hover{border-color:rgba(201,151,58,.45)}
.dish-photo{position:relative;aspect-ratio:1/1;background:#000;overflow:hidden}
.dish-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.dish-photo--placeholder{position:absolute;inset:0;display:grid;place-items:center;text-align:center;
  color:var(--gold);font-family:'Alverata',Georgia,serif;opacity:.5;font-size:.85rem}
.veg-dot{position:absolute;top:8px;left:8px;width:14px;height:14px;border-radius:3px;border:2px solid #fff;background:#fff}
.veg-dot::after{content:"";position:absolute;inset:3px;border-radius:50%}
.veg-dot.veg::after{background:#2e7d32}
.veg-dot.nonveg::after{background:var(--red)}
.veg-dot.common{border-color:#b9b0a4}
.veg-dot.common::after{background:#b9b0a4}
.dish-body{padding:9px 10px 11px;display:flex;flex-direction:column;gap:4px;flex:1}
.dish-body h3{font-size:.9rem;line-height:1.25}
.dish-desc{font-size:.76rem;color:var(--ash);opacity:.8;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.dish-foot{margin-top:auto;padding-top:4px;display:flex;align-items:center;justify-content:space-between;gap:6px}
.price{font-weight:700;color:var(--gold);font-size:.92rem}
.cat-count{font-family:'Alverata',Georgia,serif;font-size:.8rem;color:var(--charcoal);
  background:var(--gold);border-radius:999px;padding:1px 9px;vertical-align:middle;margin-left:8px}
.qty-control{display:flex;align-items:center}
.add-btn{min-width:56px;height:30px;padding:0 10px;border-radius:8px;border:1px solid var(--red);
  cursor:pointer;background:var(--red);color:#fff;font-weight:700;letter-spacing:.05em;
  font-size:.78rem;transition:transform .15s ease,filter .15s ease}
.add-btn:hover{transform:translateY(-1px);filter:brightness(1.08)}
.add-btn[hidden]{display:none}
.stepper{display:flex;align-items:stretch;border:1px solid var(--red);border-radius:8px;overflow:hidden}
.stepper[hidden]{display:none}
.stepper .step{width:28px;border:none;cursor:pointer;background:var(--red);color:#fff;
  font-size:1.05rem;line-height:1;display:grid;place-items:center;transition:filter .15s ease}
.stepper .step:hover{filter:brightness(1.14)}
.stepper .step:disabled{opacity:.6;cursor:default}
.stepper .count{min-width:28px;display:grid;place-items:center;font-weight:700;color:#fff;
  background:var(--deep-red);padding:0 5px;font-size:.85rem}

/* Cart page */
.cart-page{padding:36px 0 60px}
.cart-page h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:20px}
.cart-table{width:100%;border-collapse:collapse;background:var(--smoke);border-radius:12px;overflow:hidden}
.cart-table th,.cart-table td{padding:12px 14px;text-align:left;border-bottom:1px solid rgba(255,255,255,.06)}
.cart-table th{background:rgba(0,0,0,.25);color:var(--gold);font-size:.85rem;text-transform:uppercase;letter-spacing:.5px}
.qty-form{display:inline-flex;align-items:center;gap:10px}
.qty-btn{width:28px;height:28px;border-radius:6px;border:none;cursor:pointer;background:var(--charcoal);color:#fff;font-size:1.1rem;line-height:1}
.qty-btn:hover{background:var(--red)}
.qty{min-width:20px;text-align:center}
.link-btn{background:none;border:none;color:var(--ash);cursor:pointer;text-decoration:underline;opacity:.8}
.link-btn:hover{color:var(--red)}
.cart-summary{margin-top:22px;display:flex;flex-direction:column;gap:10px;align-items:flex-start}
.cart-total{font-size:1.3rem}
.cart-note{color:var(--ash);opacity:.75;font-size:.9rem}
.cart-empty{text-align:center;padding:48px 0;color:var(--ash)}
.cart-empty .btn{margin-top:16px}

/* Auth placeholder */
.auth-placeholder{padding:60px 0;text-align:center}
.auth-placeholder h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:12px}
.auth-placeholder p{color:var(--ash);margin-bottom:22px}

/* Footer */
.site-footer{background:#111;color:var(--ash);text-align:center;padding:18px 16px 24px;font-size:.92rem}
.site-footer p{margin:3px 0}
.site-footer .footer-fssai{margin-top:8px;font-size:.86rem;color:var(--gold,#c9973a);letter-spacing:.02em}
.site-footer .footer-links{margin-top:6px}
.site-footer .footer-links a{color:var(--ash);text-decoration:underline;text-underline-offset:3px}
.site-footer .footer-links a:hover{color:var(--gold,#c9973a)}

/* Responsive: stack the cart table on small screens */
@media (max-width:560px){
  .cart-table thead{display:none}
  .cart-table,.cart-table tbody,.cart-table tr,.cart-table td{display:block;width:100%}
  .cart-table tr{margin-bottom:14px;border:1px solid rgba(255,255,255,.08);border-radius:10px;overflow:hidden}
  .cart-table td{display:flex;justify-content:space-between;border:none;border-bottom:1px solid rgba(255,255,255,.05)}
  .cart-table td::before{content:attr(data-label);color:var(--gold);font-weight:700}
}

/* Auth (login / signup) */
.auth-card{padding:48px 0 64px}
.auth-card h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:20px;text-align:center}
.auth-card form{background:var(--smoke);border:1px solid rgba(201,151,58,.2);border-radius:14px;padding:24px;display:flex;flex-direction:column;gap:14px}
.field{display:flex;flex-direction:column;gap:6px}
.field>span{font-size:.85rem;color:var(--ash);font-weight:700}
.auth-card input,.checkout-form input,.checkout-form textarea{width:100%;padding:10px 12px;border-radius:8px;
  border:1px solid #444;background:var(--charcoal);color:#fff;font-family:inherit;font-size:.95rem}
.auth-card input:focus,.checkout-form input:focus,.checkout-form textarea:focus{outline:none;border-color:var(--gold)}
.field-error{color:#ff9b9b;font-size:.8rem}
.form-error{background:rgba(212,43,43,.12);border:1px solid var(--red);color:#ffd9d9;padding:10px 14px;border-radius:8px}
.helptext{font-size:.76rem;color:#a59e96}
.helptext ul,ul.errorlist{margin:0;padding-left:1.1rem}
ul.errorlist{color:#ff9b9b;list-style:none;padding-left:0}
.auth-alt{text-align:center;margin-top:16px;color:var(--ash)}
.auth-alt a{color:var(--gold);text-decoration:underline}

/* Saved addresses */
.addr-page{padding:30px 0 64px}
.addr-page h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:16px}
.addr-list{display:flex;flex-direction:column;gap:12px;margin-bottom:8px}
.addr-card{background:var(--smoke);border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:16px}
.addr-card.default{border-color:var(--gold)}
.addr-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.addr-card p{color:var(--ash);font-size:.9rem;line-height:1.5}
.addr-actions{display:flex;align-items:center;gap:14px;margin-top:10px;flex-wrap:wrap}
.addr-actions form{display:inline;margin:0}

/* Logout button in nav */
.logout-form{display:inline;margin:0}
.logout-btn{background:none;border:none;color:var(--ash);cursor:pointer;font:inherit;opacity:.85;padding:0}
.logout-btn:hover{color:var(--red)}

/* Checkout */
.checkout{padding:40px 0 64px}
.checkout>h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:20px}
.checkout-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:28px;align-items:start}
.checkout-form{background:var(--smoke);border:1px solid rgba(201,151,58,.2);border-radius:14px;padding:24px;display:flex;flex-direction:column;gap:14px}
.checkout-form h2{font-size:1.1rem;color:var(--gold);margin-top:6px}
.pay-opt{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #444;border-radius:8px}
.pay-opt.disabled{opacity:.5}
.order-summary{background:var(--smoke);border:1px solid rgba(201,151,58,.2);border-radius:14px;padding:24px}
/* Right column = order summary + payment, stacked & sticky so the total and the
   "Place Order & Pay" button stay in view while the customer fills the form. */
.checkout-right{display:flex;flex-direction:column;gap:20px;position:sticky;top:84px;align-self:start}
.order-summary h2{font-size:1.1rem;color:var(--gold);margin-bottom:14px}
.summary-items{list-style:none;display:flex;flex-direction:column;gap:8px;margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid rgba(255,255,255,.1)}
.summary-items li{display:flex;justify-content:space-between;gap:12px;color:var(--ash)}
.summary-row{display:flex;justify-content:space-between;margin:6px 0;color:var(--ash)}
.summary-row.total{margin-top:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1);color:#fff;font-size:1.2rem;font-weight:700}
/* Checkout "special instructions" box (in the order summary, above coupons) */
.instructions-box{margin:12px 0}
.instr-label{display:block;font-size:.92rem;color:var(--ash);margin-bottom:6px;font-weight:600}
.instr-opt{color:var(--ash);opacity:.55;font-weight:400}
.instructions-box textarea{width:100%;padding:10px 12px;border-radius:8px;background:#1f1f1f;
  border:1px solid rgba(255,255,255,.15);color:var(--white);font-family:inherit;font-size:.95rem;resize:vertical}
.instructions-box textarea:focus{outline:none;border-color:var(--gold)}
.instructions-box textarea::placeholder{color:#8a847c}
.instr-hint{color:var(--ash);opacity:.6;font-size:.82rem;margin-top:5px}

/* Order success + my orders */
.order-success{padding:48px 0 64px;text-align:center}
.order-success h1{font-family:'Alverata',Georgia,serif;color:var(--gold)}
.order-meta{color:var(--ash);margin:10px 0 24px}
.order-card{background:var(--smoke);border:1px solid rgba(201,151,58,.2);border-radius:14px;padding:24px;text-align:left;max-width:520px;margin:0 auto}
.order-card h2{font-size:1.05rem;color:var(--gold);margin:16px 0 8px}
.order-actions{margin-top:24px;display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.my-orders{padding:40px 0 64px}
.my-orders h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:20px}
.order-row{display:grid;grid-template-columns:70px 1fr auto auto;gap:14px;align-items:center;
  background:var(--smoke);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:14px 18px;margin-bottom:10px;color:#fff}
.order-row:hover{border-color:var(--gold)}
.status-pill{background:var(--gold);color:var(--charcoal);border-radius:999px;padding:3px 12px;font-size:.8rem;font-weight:700}

@media (max-width:768px){
  .checkout-grid{grid-template-columns:1fr}
  .checkout-right{position:static}
}

/* Payment is its own card stacked directly under the order summary inside the
   right column (.checkout-right) — on both desktop and mobile. */
.checkout-pay{background:var(--smoke);border:1px solid rgba(201,151,58,.2);
  border-radius:14px;padding:24px}
.checkout-pay h2{font-size:1.1rem;color:var(--gold);margin-bottom:8px}
.checkout-pay .btn{margin-top:6px}

/* Mobile-portrait helpers for the app pages (phones held upright ONLY).
   .m-only shows only here · .m-hide hides only here. Desktop/laptop/tablet/
   landscape are unaffected. */
.m-only{display:none}
@media (max-width:600px) and (orientation:portrait){
  .m-only{display:block}
  .m-hide{display:none}
}

/* Checkout map + distance-based delivery fee */
#map{height:300px;border-radius:12px;margin:10px 0;z-index:0}
.loc-status{color:var(--ash);font-size:.88rem;margin:4px 0 6px}
#locate-btn{margin-top:6px}
.fee-label{display:inline-flex;align-items:center}
.info-ic{position:relative;display:inline-grid;place-items:center;width:16px;height:16px;margin-left:6px;
  border-radius:50%;background:var(--gold);color:var(--charcoal);font-size:.72rem;font-weight:700;
  font-style:normal;cursor:help}
.info-ic .tip{display:none;position:absolute;bottom:135%;left:50%;transform:translateX(-50%);
  white-space:nowrap;background:#000;color:#fff;padding:6px 10px;border-radius:6px;font-size:.78rem;
  font-weight:400;box-shadow:0 4px 14px rgba(0,0,0,.5);z-index:6}
.info-ic .tip::after{content:"";position:absolute;top:100%;left:50%;transform:translateX(-50%);
  border:5px solid transparent;border-top-color:#000}
.info-ic:hover .tip,.info-ic:focus .tip{display:block}

/* ===== Single cart + checkout page ===== */
.checkout-left{display:flex;flex-direction:column;gap:18px}
.checkout-right{position:static}   /* the items list lives here now — don't pin it */
.acct-card{display:flex;align-items:center;gap:12px;background:var(--smoke);
  border:1px solid rgba(201,151,58,.2);border-radius:14px;padding:14px 16px}
.acct-ic{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:50%;
  background:var(--gold);color:#1c1c1c;font-weight:700;font-size:18px;flex:0 0 auto}
.acct-name{font-weight:700;color:#fff}
.acct-phone{font-size:.9rem}
.addr-block,.recipient-block{background:var(--smoke);border:1px solid rgba(201,151,58,.2);
  border-radius:14px;padding:18px}
.addr-block h2{font-size:1.1rem;color:var(--gold);margin:0 0 12px}
.addr-cards{display:flex;flex-direction:column;gap:10px}
.addr-pick{display:flex;flex-direction:column;gap:3px;text-align:left;width:100%;cursor:pointer;
  background:var(--charcoal);border:1.5px solid #3a3a3a;border-radius:12px;padding:12px 14px;
  color:#e8e8e8;font:inherit}
.addr-pick:hover{border-color:var(--gold)}
.addr-pick.selected{border-color:var(--gold);background:rgba(201,151,58,.10);
  box-shadow:0 0 0 1px var(--gold) inset}
.addr-pick__label{font-weight:700;color:#fff}
.addr-pick__text{font-size:.9rem}
.addr-pick__who{font-size:.82rem}
.addr-pick__nopin{color:#ffb454;font-size:.8rem;margin-top:2px}
.addr-add-btn{margin-top:12px}
.addr-add-panel{margin-top:14px;border-top:1px dashed rgba(201,151,58,.4);padding-top:14px}
.addr-add-panel h3{color:var(--gold);font-size:1rem;margin:0 0 10px}
.order-loc{margin-top:14px;border-top:1px dashed rgba(201,151,58,.4);padding-top:14px}
.order-loc h3{color:var(--gold);font-size:1rem;margin:0 0 6px}
.addr-add-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

/* Editable item rows */
.co-items{list-style:none;margin:0 0 14px;padding:0 0 14px;
  border-bottom:1px solid rgba(255,255,255,.1);display:flex;flex-direction:column;gap:12px}
.co-item{display:grid;grid-template-columns:1fr auto auto auto;align-items:center;gap:10px}
.co-item__name{color:#fff;font-size:.95rem;min-width:0;overflow-wrap:anywhere}
.co-item__sub{color:var(--ash);white-space:nowrap;min-width:62px;text-align:right}
.co-step{display:inline-flex;align-items:center;border:1.5px solid var(--gold);border-radius:8px;overflow:hidden}
.co-step button{width:30px;height:30px;border:none;background:var(--charcoal);color:var(--gold);
  font-size:1.15rem;line-height:1;cursor:pointer}
.co-step button:hover{background:var(--gold);color:#1c1c1c}
.co-qty{min-width:26px;text-align:center;color:#fff;font-weight:700}
.co-remove{background:none;border:none;color:var(--ash);cursor:pointer;font-size:1.05rem;line-height:1;padding:4px}
.co-remove:hover{color:var(--red)}
@media (max-width:600px) and (orientation:portrait){
  .co-item{grid-template-columns:auto 1fr auto;
    grid-template-areas:"name name name" "step sub rem";row-gap:8px}
  .co-item__name{grid-area:name}
  .co-step{grid-area:step}
  .co-item__sub{grid-area:sub}
  .co-remove{grid-area:rem}
}

/* Restaurant (kitchen) dashboard */
.rdash{padding:30px 0 64px}
.rdash-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}
.rdash-head h1{font-family:'Alverata',Georgia,serif;color:var(--gold)}
.rdash-head form{display:flex;align-items:center;gap:12px}
.open-state{font-weight:700;font-size:.9rem}
.open-state.open{color:#46c46a}
.open-state.closed{color:var(--red)}
.order-cards{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));margin-top:18px}
.rcard{background:var(--smoke);border:1px solid rgba(255,255,255,.08);border-left:4px solid var(--gold);
  border-radius:12px;padding:16px}
.rcard.status-placed{border-left-color:var(--red)}
.rcard.status-accepted{border-left-color:#e0a800}
.rcard.status-preparing{border-left-color:#33b3a6}
.rcard.status-ready{border-left-color:#46c46a}
.rcard-top{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.rcard-time{margin-left:auto;color:var(--ash);opacity:.7;font-size:.85rem}
.rcard-items{list-style:none;margin:8px 0;color:#fff}
.rcard-items li{padding:2px 0}
.rcard-note{margin:8px 0;padding:9px 11px;background:rgba(201,151,58,.14);border:1px solid var(--gold);
  border-radius:8px;color:#ffe6bf;font-size:.92rem;line-height:1.45;white-space:pre-wrap;word-break:break-word}
.rcard-note-h{display:block;font-weight:700;color:var(--gold);font-size:.72rem;letter-spacing:.05em;
  text-transform:uppercase;margin-bottom:3px}
.rcard-cust{color:var(--ash);font-size:.84rem;margin:8px 0;line-height:1.5}
.rcard-pay{font-size:.85rem;margin-bottom:12px;color:var(--ash)}
.rcard-pay .paid{color:#46c46a;font-weight:700}
.rcard-pay .unpaid{color:var(--red);font-weight:700}
.rcard-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.rcard-actions .btn{padding:8px 14px;font-size:.85rem}
.ready-tag{color:#46c46a;font-weight:700;font-size:.85rem}
.rdash-empty{margin-top:14px;color:var(--ash);text-align:center;padding:32px;
  border:2px dashed rgba(255,255,255,.1);border-radius:12px}
.dsec{font-family:'Alverata',Georgia,serif;color:var(--gold);margin:26px 0 6px;font-size:1.25rem}
.rcard.status-out_for_delivery{border-left-color:#3b82f6}
.collect{font-size:.9rem;margin-bottom:12px}
.collect .cod{color:var(--red);font-weight:700}
.collect .paid{color:#46c46a;font-weight:700}

/* Order tracking timeline */
.track-page{padding:40px 0 64px}
.track-page h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:6px}
.tracker{list-style:none;margin:24px 0;padding:0}
.track-step{position:relative;display:flex;align-items:center;gap:14px;padding:0 0 24px 0}
.track-step:last-child{padding-bottom:0}
.track-step:not(:last-child)::before{content:"";position:absolute;left:18px;top:38px;bottom:-2px;
  width:2px;background:#3a3a3a;transition:background .4s ease}
.track-step.done:not(:last-child)::before{background:var(--gold)}
.track-step .ts-ic{position:relative;z-index:1;flex:0 0 auto;width:38px;height:38px;border-radius:50%;
  display:grid;place-items:center;font-size:1.05rem;line-height:1;background:#262626;
  border:2px solid #3a3a3a;filter:grayscale(1);opacity:.55;transition:all .35s ease}
.track-step .lbl{color:var(--ash);opacity:.6;transition:all .35s ease}
.track-step.done .ts-ic{background:rgba(201,151,58,.18);border-color:var(--gold);filter:none;opacity:1}
.track-step.done .lbl{color:#fff;opacity:1}
.track-step.current .ts-ic{background:rgba(212,43,43,.20);border-color:var(--red);filter:none;opacity:1;
  animation:ts-pulse 1.7s ease-in-out infinite}
.track-step.current .lbl{color:#fff;font-weight:700;opacity:1}
@keyframes ts-pulse{0%,100%{box-shadow:0 0 0 0 rgba(212,43,43,.45)}50%{box-shadow:0 0 0 9px rgba(212,43,43,0)}}
@media (prefers-reduced-motion:reduce){.track-step.current .ts-ic{animation:none}}
.map-placeholder{margin:24px 0;padding:28px;border:2px dashed rgba(201,151,58,.4);border-radius:14px;
  text-align:center;color:var(--ash);background:rgba(0,0,0,.2)}
#track-map{height:300px;border-radius:12px;margin:16px 0;z-index:0}
.eta{text-align:center;color:var(--gold);font-weight:700;font-size:1rem}
/* Prominent live-ETA banner on the order tracker */
.eta-banner{background:linear-gradient(135deg,rgba(201,151,58,.18),rgba(212,43,43,.12));
  border:1px solid var(--gold);border-radius:14px;padding:15px 18px;text-align:center;
  margin:10px 0 18px;color:#fff;font-size:1.1rem;line-height:1.45}
.eta-banner b{color:var(--gold);font-size:1.4rem}
.eta-banner .eta-sub{color:var(--ash);font-size:.9rem;opacity:.9}
/* Cancelled order: apologetic amber tone, not the celebratory gold/red. */
.eta-banner.cancelled{background:rgba(255,180,84,.10);border-color:#ffb454}
.eta-banner.cancelled b{color:#ffb454;font-size:1.12rem}

/* Free-delivery progress bar (cart + checkout): fills red -> green toward Rs 499 */
.free-del-bar{margin:12px 0;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.09)}
.free-del-bar .fdb-msg{font-size:.95rem;color:#ffe9b8;margin-bottom:8px;line-height:1.4}
.free-del-bar .fdb-msg strong{color:#fff}
.free-del-bar.unlocked .fdb-msg{color:#bdf0cb}
.free-del-bar.unlocked .fdb-msg strong{color:#46c46a}
.fdb-tick{display:inline-block;background:#46c46a;color:#0e2410;border-radius:50%;width:18px;height:18px;line-height:18px;text-align:center;font-weight:800;font-size:.78rem;margin-right:4px;vertical-align:middle}
.fdb-track{position:relative;height:10px;border-radius:999px;overflow:hidden;background:linear-gradient(90deg,#D42B2B,#e8a33d,#46c46a)}
.fdb-mask{position:absolute;right:0;top:0;height:100%;background:#2b2b2b;transition:width .6s ease}
.free-del-bar .fdb-sub{margin-top:6px;font-size:.8rem;color:var(--ash);opacity:.85}
.free-del-bar.unlocked .fdb-sub{display:none}

/* ============================================================================
   MOTION & MICRO-INTERACTIONS — ordering-flow pages (menu / cart / checkout /
   my-orders / dashboards). The marketing home page has its own rich animation;
   these add lightweight, TOUCH-FRIENDLY motion to the app pages, whose only
   feedback was :hover — which barely fires on a phone, so they felt static.
   Everything here is additive, GPU-friendly (transform/opacity only), changes
   no layout or behaviour, and is fully disabled under prefers-reduced-motion.
   ========================================================================== */
html{-webkit-tap-highlight-color:transparent}      /* kill the grey tap flash (app feel) */
.nav-links a,.brand,.profile-avatar,.logout-btn,.btn,.cart-bar,.addr-pick,.coupon-pick,
.link-btn,.co-plus,.co-minus,.co-remove,.qty-btn,.add-btn,.order-cta,.status-pill{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
a:focus:not(:focus-visible),button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible){outline:none;box-shadow:none}

/* Gentle page entrance. Pure CSS with `both` so content ALWAYS ends visible —
   no dependency on a JS "loaded" class that could leave the page blank if JS
   fails. */
@keyframes fofFadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
main{animation:fofFadeIn .45s ease both}

/* Press feedback for touch: a quick scale-down on tap (works where :hover does
   not). Kept subtle so it reads as "responsive", not bouncy. */
.btn:active,.add-btn:active,.qty-btn:active,.login-link:active,
.order-cta:active,.status-pill:active{transform:scale(.96)}
.stepper .step:active{transform:scale(.88)}
.btn,.add-btn,.qty-btn,.login-link,.stepper .step{will-change:transform}

/* Menu cards rise/fade in, and lift on tap (mobile) as well as hover (desktop). */
@keyframes fofCardIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.dish-card{animation:fofCardIn .4s ease both}
.dish-card:active{transform:translateY(-2px)}

/* Lazy menu images: an animated shimmer fills the (already aspect-ratio-fixed)
   photo box until the picture paints in. Progressive enhancement — if the
   shimmer/JS never runs the image still shows; we only ADD a placeholder. The
   `.is-loaded` class (added by menu.html when the <img> loads) stops the
   animation and fades the photo in. */
@keyframes fofShimmer{from{background-position:200% 0}to{background-position:-200% 0}}
@keyframes fofImgIn{from{opacity:0}to{opacity:1}}
.dish-photo{background:linear-gradient(100deg,#1c1c1c 28%,#272727 50%,#1c1c1c 72%);
  background-size:200% 100%;animation:fofShimmer 1.3s linear infinite}
.dish-photo.is-loaded{animation:none;background:#000}
.dish-photo.is-loaded img{animation:fofImgIn .4s ease}

/* Cart badge "bump" when the count changes (class toggled by cart.js). */
@keyframes fofBump{0%{transform:scale(1)}30%{transform:scale(1.35)}60%{transform:scale(.9)}100%{transform:scale(1)}}
.cart-badge.bump{animation:fofBump .35s ease}

@media (prefers-reduced-motion:reduce){
  main,.dish-card,.dish-photo,.dish-photo.is-loaded img,.cart-badge.bump{animation:none!important}
  .btn:active,.add-btn:active,.qty-btn:active,.login-link:active,.order-cta:active,
  .status-pill:active,.stepper .step:active,.dish-card:active{transform:none!important}
  .dish-photo{background:#000}
}

/* ============================================================================
   SMOOTH PAGE TRANSITIONS (Tier 1a) — cross-document View Transitions.
   Opting in makes same-origin navigations (Menu -> Cart -> Checkout -> Orders)
   CROSSFADE instead of white-flashing. Progressive enhancement: WebViews/
   browsers without support simply ignore the at-rule (normal full load). The
   page entrance animation above (fofFadeIn) still covers non-supporting engines.
   ========================================================================== */
@view-transition{navigation:auto}
::view-transition-old(root){animation:fofVtOut .18s ease both}
::view-transition-new(root){animation:fofVtIn .26s ease both}
@keyframes fofVtOut{to{opacity:0}}
@keyframes fofVtIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
/* When a View Transition is driving the entrance, don't also run fofFadeIn. */
@media (prefers-reduced-motion:reduce){
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}

/* ============================================================================
   "ORDER PLACED" CELEBRATION (order_success page) — premium success animation,
   pure SVG + CSS (no library, no slowdown). A gold ring draws on, a white tick
   draws in, and a soft burst radiates out. Fully static under reduced-motion.
   ========================================================================== */
.placed-celebrate{display:flex;justify-content:center;margin:4px 0 16px;position:relative}
.placed-check{overflow:visible}
.placed-check .pc-ring{fill:none;stroke:var(--gold);stroke-width:6;stroke-linecap:round;
  stroke-dasharray:327;stroke-dashoffset:327;animation:pcRing 1s ease forwards}
.placed-check .pc-tick{fill:none;stroke:#fff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:80;stroke-dashoffset:80;animation:pcTick .5s .9s ease forwards}
.placed-celebrate::after{content:"";position:absolute;top:50%;left:50%;width:104px;height:104px;
  margin:-52px 0 0 -52px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(201,151,58,.45),transparent 60%);
  transform:scale(.2);opacity:0;animation:pcBurst .7s .45s ease-out forwards}
@keyframes pcRing{to{stroke-dashoffset:0}}
@keyframes pcTick{to{stroke-dashoffset:0}}
@keyframes pcBurst{0%{transform:scale(.2);opacity:0}40%{opacity:.8}100%{transform:scale(1.6);opacity:0}}
@media (prefers-reduced-motion:reduce){
  .placed-check .pc-ring,.placed-check .pc-tick{animation:none;stroke-dashoffset:0}
  .placed-celebrate::after{display:none}
}

/* --- Center-to-top "Order placed!" celebration (one-time, ?placed=1) ---------
   A full-screen backdrop with a centered checkmark + title holds briefly, then
   GLIDES up toward the top and fades out, handing off to the inline checkmark
   and revealing the order details + actions (.pr-hide) beneath. The overlay is
   pointer-events:none the whole time, so no control is ever blocked. */
/* A SOLID, fully opaque panel (never see-through) holds the centred checkmark +
   title, then the whole panel LIFTS up and off the screen - revealing the order
   page beneath like a curtain. No transparency, no ghosting. The page's own
   header checkmark sits at the top as the resting state once the panel clears. */
.placed-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;
  background:var(--charcoal);pointer-events:none;will-change:transform;
  animation:poLift 4.2s cubic-bezier(.66,0,.2,1) forwards}
/* draw + a deliberate centred HOLD (~2.5s), then a slow, smooth lift to the top */
@keyframes poLift{0%{transform:translateY(0)}60%{transform:translateY(0)}100%{transform:translateY(-100%)}}
.placed-overlay .po-inner{display:flex;flex-direction:column;align-items:center;gap:16px}
.placed-overlay .po-title{font-family:'Alverata',Georgia,serif;color:var(--gold);font-size:1.9rem;
  margin:0;opacity:0;animation:poTitle .7s .65s ease forwards}
@keyframes poTitle{to{opacity:1}}
@media (prefers-reduced-motion:reduce){
  .placed-overlay{animation:poLift 1.3s .9s ease forwards}
  .placed-overlay .po-title{animation:none;opacity:1}
}

/* ============================================================================
   FLOATING CART BAR (Swiggy-style) + FLY-TO-CART.
   A high-contrast brand-red bar fixed to the bottom that slides up when the cart
   has items (the top-nav cart button is removed). On the menu, adding a dish
   flies a clone of THAT dish's photo down into this bar. GPU-only transforms,
   reduced-motion safe, app + web. No backend round-trip blocks the animation.
   ========================================================================== */
.cart-bar{position:fixed;left:50%;bottom:0;transform:translateX(-50%);z-index:900;
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  width:min(760px,calc(100% - 20px));
  background:linear-gradient(135deg,#e8443a,#c0271c);color:#fff;
  padding:13px 18px;border-radius:14px 14px 0 0;text-decoration:none;
  box-shadow:0 -6px 26px rgba(0,0,0,.5);
  transition:transform .35s cubic-bezier(.2,.8,.2,1),opacity .25s ease}
.cart-bar--hidden{transform:translate(-50%,140%);opacity:0;pointer-events:none}
.cart-bar__info{display:flex;align-items:center;gap:11px;min-width:0}
.cart-bar__ic{font-size:1.4rem;line-height:1;display:inline-block}
.cart-bar__ic.bump{animation:cartIcBump .4s ease}
@keyframes cartIcBump{0%{transform:scale(1)}35%{transform:scale(1.4)}70%{transform:scale(.9)}100%{transform:scale(1)}}
.cart-bar__text{font-size:1rem;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-bar__text b{font-size:1.06rem}
.cart-bar__cta{font-weight:800;letter-spacing:.02em;white-space:nowrap;
  background:rgba(255,255,255,.18);padding:8px 14px;border-radius:9px}
/* In the app, lift above the phone's bottom gesture/safe area. */
html.fof-native .cart-bar{bottom:env(safe-area-inset-bottom)}

/* The flying clone of the dish photo (a copy of .dish-photo from the tapped card). */
.fly-clone{position:fixed;left:0;top:0;z-index:1000;overflow:hidden;border-radius:12px;
  background:#222;pointer-events:none;box-shadow:0 10px 28px rgba(0,0,0,.5);will-change:transform,opacity}
.fly-clone img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

@media (prefers-reduced-motion:reduce){
  .cart-bar{transition:opacity .2s ease}
  .cart-bar--hidden{transform:translateX(-50%);opacity:0}
  .cart-bar__ic.bump{animation:none}
}

/* ============================================================================
   DELIVERY-PARTNER CONTACT CARD (tracking page) — shown once OUT FOR DELIVERY so
   the customer can call the assigned rider directly. Rider-blue to match the map
   marker and stand apart from the red cart bar / gold accents.
   ========================================================================== */
.rider-contact{display:flex;align-items:center;gap:12px;margin:14px 0;padding:12px 14px;
  background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(59,130,246,.06));
  border:1px solid #3b82f6;border-radius:14px}
.rider-contact[hidden]{display:none}
.rider-contact .rc-ic{font-size:1.7rem;line-height:1}
.rider-contact .rc-info{display:flex;flex-direction:column;min-width:0;flex:1}
.rider-contact .rc-label{font-size:.74rem;letter-spacing:.05em;text-transform:uppercase;color:#9ecbff;font-weight:700}
.rider-contact .rc-line{font-size:1.05rem;color:#fff;line-height:1.35}
.rider-contact .rc-phone{color:var(--ash);font-variant-numeric:tabular-nums}
.rider-contact .rc-call{flex:0 0 auto;background:#3b82f6;color:#fff;font-weight:800;
  text-decoration:none;padding:9px 16px;border-radius:10px;white-space:nowrap;
  transition:transform .12s ease,filter .15s ease}
.rider-contact .rc-call:hover{filter:brightness(1.08)}
.rider-contact .rc-call:active{transform:scale(.96)}

/* ============================================================================
   WISHLIST — the menu heart (corner box on each dish photo), the nav link +
   badge, the wishlist page, and the small "Added to wishlist" toast.
   ========================================================================== */
/* Smooth, rounded heart outline (matches the wishlist icon shape). */
.wh-ic{stroke-linejoin:round;stroke-linecap:round}
/* Heart box: a small rounded panel in the TOP-RIGHT of the dish photo (the
   veg-dot sits top-left, so they never overlap). Blank outline at rest; on save
   it glows and the heart fills red. */
.wish-heart{position:absolute;top:8px;right:8px;z-index:2;display:inline-grid;place-items:center;
  width:30px;height:30px;padding:0;border:none;border-radius:9px;cursor:pointer;
  background:rgba(20,12,12,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
  box-shadow:0 1px 4px rgba(0,0,0,.35);transition:transform .12s ease,background .15s ease}
.wish-heart:hover{background:rgba(212,43,43,.32)}
.wish-heart:active{transform:scale(.88)}
.wish-heart .wh-ic{width:18px;height:18px;fill:transparent;stroke:#fff;stroke-width:2;
  transition:fill .18s ease,stroke .18s ease,filter .18s ease}
.wish-heart.active{background:rgba(212,43,43,.16)}
.wish-heart.active .wh-ic{fill:#e23b3b;stroke:#e23b3b;
  filter:drop-shadow(0 0 5px rgba(226,59,59,.85))}
/* a little pop when it becomes active */
.wish-heart.active .wh-ic{animation:wishPop .28s ease}
@keyframes wishPop{0%{transform:scale(.6)}55%{transform:scale(1.25)}100%{transform:scale(1)}}

/* Nav link + count badge */
.nav-wishlist{display:inline-flex;align-items:center;gap:6px}
.nav-wishlist .wh-ic{width:18px;height:18px;fill:transparent;stroke:currentColor;stroke-width:2;vertical-align:middle}
.nav-wishlist:hover{color:var(--gold)}
.wl-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;
  border-radius:999px;background:#e23b3b;color:#fff;font-size:.72rem;font-weight:800;line-height:1}

/* Wishlist page (reuses .dish-grid / .dish-card from the menu) */
.wishlist-page{padding:28px 16px 80px}
.wishlist-page h1{font-family:'Alverata',Georgia,serif;color:var(--gold);margin-bottom:6px}
.wishlist-page .wl-sub{color:var(--ash);opacity:.85;margin-bottom:22px}
.wishlist-page .dish-card[hidden]{display:none}

/* "Added to wishlist" toast — small, top-centre */
.wl-toast{position:fixed;top:18px;left:50%;transform:translate(-50%,-14px);z-index:1200;
  background:rgba(20,12,12,.92);color:#fff;border:1px solid var(--gold);border-radius:999px;
  padding:9px 18px;font-size:.92rem;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.4);
  opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease}
.wl-toast.show{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:reduce){.wl-toast{transition:opacity .2s ease}}
