/* ============================================================
   INTENDO — Menu & Ordering Page Styles (menu.html)
   A cart-style ordering experience: browse → add to cart →
   adjust quantities → checkout on WhatsApp.
   Depends on: css/style.css (loaded first — brand colours,
   fonts, nav, footer all come from there).
   ============================================================ */

/* ────────────────────────────────────────
   PAGE HEADER
──────────────────────────────────────── */
.menu-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3.5rem 2rem 2rem;
  text-align: center;
}
.menu-hero .section-sub { margin: 0 auto; }

/* ────────────────────────────────────────
   FILTER BAR — category pills + veg toggle
──────────────────────────────────────── */
.filter-bar {
  position: sticky;
  top: 72px;                 /* sits just below the sticky nav */
  z-index: 50;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 2rem;
}
.filter-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.filter-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Veg / Non-veg segmented toggle */
.veg-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  flex-shrink: 0;
}
.veg-toggle button {
  background: white;
  border: none;
  padding: 0.45rem 1rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-light);
  transition: all 0.15s;
  white-space: nowrap;
}
.veg-toggle button + button { border-left: 1.5px solid var(--border); }
.veg-toggle button.active[data-veg="all"]     { background: var(--text); color: white; }
.veg-toggle button.active[data-veg="veg"]     { background: var(--green); color: white; }
.veg-toggle button.active[data-veg="non-veg"] { background: var(--red);   color: white; }

/* ────────────────────────────────────────
   ORDER GRID & ITEM CARDS
──────────────────────────────────────── */
.order-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 2rem 6rem;   /* extra bottom padding so the sticky
                                cart bar never covers the last row */
}
.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}
.order-empty {
  text-align: center;
  color: var(--muted);
  padding: 3rem 1rem;
  font-size: 0.95rem;
}

/* Card reuses the homepage .menu-card look, plus a cart footer */
.order-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.order-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.order-card-img {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--off-white);
}
.order-card-img img { width: 100%; height: 100%; object-fit: cover; }
.order-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--red);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 100px;
}

.order-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;                    /* pushes the footer to the card bottom */
}
.order-card-name { font-family: var(--font-head); font-weight: 700; font-size: 0.98rem; margin-bottom: 0.25rem; color: var(--red); }
.order-card-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.75rem; flex: 1; }
.order-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.order-price { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; color: var(--red); }

/* "Add" button ↔ quantity stepper (JS swaps between the two) */
.add-btn {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.add-btn:hover { background: var(--red-dark); }

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--red);
  border-radius: 8px;
  overflow: hidden;
}
.qty-stepper button {
  background: var(--red-light);
  color: var(--red);
  border: none;
  width: 32px; height: 34px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}
.qty-stepper button:hover { background: var(--red); color: white; }
.qty-stepper .qty-num {
  min-width: 34px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--red);
}

/* ────────────────────────────────────────
   STICKY CART BAR (appears when cart has items)
──────────────────────────────────────── */
.cart-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  background: var(--red);
  color: white;
  padding: 0.85rem 1.5rem;
  display: none;                /* JS shows it when the cart is not empty */
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
}
.cart-bar.show { display: flex; }
.cart-bar-summary { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; }
.cart-bar-summary small { display: block; font-weight: 500; font-size: 0.75rem; opacity: 0.85; }
.cart-bar-open {
  background: white;
  color: var(--red);
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

/* ────────────────────────────────────────
   CART DRAWER (slide-in panel)
──────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: white;
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.cart-head h3 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; color: var(--red); }
.cart-close {
  background: var(--off-white);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}
.cart-close:hover { background: var(--light-gray); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty-msg { text-align: center; color: var(--muted); padding: 3rem 1rem; font-size: 0.9rem; }

.cart-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--off-white);
}
.cart-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.cart-row-info { flex: 1; min-width: 0; }
.cart-row-name { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; }
.cart-row-price { font-size: 0.78rem; color: var(--muted); }
.cart-row-total { font-family: var(--font-head); font-weight: 800; font-size: 0.88rem; color: var(--red); white-space: nowrap; }
/* Smaller stepper inside the drawer */
.cart-row .qty-stepper button { width: 26px; height: 28px; font-size: 0.95rem; }
.cart-row .qty-stepper .qty-num { min-width: 26px; font-size: 0.82rem; }

.cart-foot {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  background: var(--off-white);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}
.cart-total-row .cart-total-amt { color: var(--red); }
.cart-note { font-size: 0.72rem; color: var(--muted); margin-bottom: 1rem; }

.cart-checkout-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--wa-green);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.9rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-bottom: 0.6rem;
}
.cart-checkout-wa:hover { opacity: 0.92; }
.cart-checkout-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  background: var(--red);
  color: white;
  border-radius: 10px;
  padding: 0.8rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  transition: background 0.2s;
}
.cart-checkout-call:hover { background: var(--red-dark); }
.cart-clear {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  margin-top: 0.75rem;
  cursor: pointer;
  text-decoration: underline;
}

/* Nav cart button (menu.html only) */
.nav-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--red-light);
  color: var(--red);
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-cart-btn:hover { background: var(--red); color: white; }
.nav-cart-count {
  background: var(--red);
  color: white;
  border-radius: 100px;
  font-size: 0.7rem;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-cart-btn:hover .nav-cart-count { background: white; color: var(--red); }

/* ────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────── */
@media (max-width: 768px) {
  .filter-bar { top: 64px; padding: 0.75rem 1.25rem; }
  .filter-bar-inner { justify-content: flex-start; }
  .order-section { padding: 1.5rem 1.25rem 7rem; }
  .menu-hero { padding: 2.5rem 1.25rem 1.5rem; }
}

/* Lift the WhatsApp float above the sticky cart bar on this page */
.wa-float { bottom: 6.5rem; }

/* ── v2: size-variant rows on order cards ── */
.variant-rows { display:flex; flex-direction:column; gap:.45rem; }
.variant-row {
  display:flex; align-items:center; gap:.6rem;
  padding-top:.45rem; border-top:1px dashed rgba(0,0,0,.08);
}
.variant-row:first-child { border-top:none; padding-top:0; }
.variant-label { flex:1; font-size:.88rem; font-weight:600; color:#444; }
.cart-row-size { font-weight:500; color:#777; font-size:.85em; }
.size-hint {
  font-size:.72rem; font-weight:600; color:#888;
  background:rgba(0,0,0,.05); padding:.15rem .5rem; border-radius:999px;
}
