/* =====================================================================
   DESIGN TOKENS
   ===================================================================== */
:root {
  --ink: #0f0e0c;
  --charcoal: #1b1815;
  --charcoal-2: #23201b;
  --gold: #c9a227;
  --gold-soft: rgba(201, 162, 39, 0.16);
  --cream: #f3ebdd;
  --cream-dim: #b8ae9d;
  --sage: #4e7a52;
  --ember: #8b3a3a;
  --radius: 14px;
  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: 96px; /* room for floating cart bar */
}

a { color: inherit; }

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
  padding: 28px 20px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
  background: linear-gradient(180deg, var(--charcoal-2), var(--ink));
}

.site-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0 0 4px;
  letter-spacing: 0.3px;
}

.site-header .tagline {
  color: var(--cream-dim);
  font-size: 0.85rem;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.table-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--gold-soft);
}

.closed-banner {
  background: var(--ember);
  color: var(--cream);
  text-align: center;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* =====================================================================
   CATEGORY NAV
   ===================================================================== */
.category-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 16px 10px;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: var(--ink);
  z-index: 20;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}
.category-nav::-webkit-scrollbar { display: none; }

.category-pill {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.3);
  color: var(--cream-dim);
  font-size: 0.85rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill.active,
.category-pill:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

/* =====================================================================
   SEARCH
   ===================================================================== */
.search-wrap {
  padding: 4px 16px 12px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.search-input::placeholder { color: var(--cream-dim); }
.search-input:focus { outline: none; border-color: var(--gold); }

/* =====================================================================
   MENU SECTIONS / ITEMS
   ===================================================================== */
.menu-section {
  padding: 22px 16px 4px;
}

.menu-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  color: var(--gold);
}

.item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--charcoal);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--charcoal-2);
  flex: 0 0 64px;
  object-fit: cover;
}

.item-thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  font-size: 1.4rem;
}

.item-info { flex: 1; min-width: 0; }

.item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.veg-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1.5px solid var(--sage);
  flex: 0 0 auto;
  position: relative;
}
.veg-dot::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.veg-dot.non-veg { border-color: var(--ember); }
.veg-dot.non-veg::after { background: var(--ember); border-radius: 1px; }

.item-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.bestseller-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold);
  border-radius: 50px;
  padding: 2px 8px;
}

.item-price {
  font-family: var(--font-mono);
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.item-actions { flex: 0 0 auto; }

.add-btn {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  padding: 7px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.add-btn:hover { background: var(--gold); color: var(--ink); }

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  border-radius: 999px;
  padding: 5px 6px;
}
.qty-stepper button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.qty-stepper span {
  color: var(--ink);
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  font-family: var(--font-mono);
}

.no-results {
  text-align: center;
  color: var(--cream-dim);
  padding: 40px 16px;
  font-size: 0.9rem;
}

/* =====================================================================
   FLOATING CART BAR
   ===================================================================== */
.cart-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 999px;
  padding: 14px 20px;
  display: none;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  cursor: pointer;
  z-index: 30;
  border: none;
  font-family: var(--font-body);
}
.cart-bar.visible { display: flex; }
.cart-bar .count { font-family: var(--font-mono); }

/* =====================================================================
   CART / ORDER TICKET DRAWER
   ===================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 40;
  display: none;
}
.overlay.visible { display: block; }

.ticket-drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 90vh;
  background: var(--charcoal);
  border-radius: 20px 20px 0 0;
  z-index: 50;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  border-top: 2px dashed var(--gold);
}
.ticket-drawer.visible { transform: translateY(0); }

.ticket-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin: 10px auto;
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 12px;
  border-bottom: 1px dashed rgba(201,162,39,0.3);
}
.ticket-header h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--gold);
}
.ticket-close {
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 1.3rem;
  cursor: pointer;
}

.ticket-body {
  overflow-y: auto;
  padding: 14px 20px;
  flex: 1;
}

.ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px dotted rgba(255,255,255,0.1);
}

.ticket-line .line-name { flex: 1; color: var(--cream); }
.ticket-line .line-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 10px;
}
.ticket-line .line-qty-ctrl button {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}
.ticket-line .line-total { color: var(--gold); min-width: 60px; text-align: right; }

.form-group { margin-top: 16px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  color: var(--cream-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(201,162,39,0.25);
  background: var(--charcoal-2);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--gold); }

.ticket-summary {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed rgba(201,162,39,0.3);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}
.ticket-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--cream-dim);
}
.ticket-summary .row.grand {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid rgba(201,162,39,0.2);
}

.prep-time {
  text-align: center;
  color: var(--cream-dim);
  font-size: 0.78rem;
  margin-top: 8px;
}

.ticket-footer {
  padding: 14px 20px 22px;
  border-top: 1px dashed rgba(201,162,39,0.3);
}

.whatsapp-btn {
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  border: none;
  padding: 15px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.whatsapp-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.empty-cart-msg {
  text-align: center;
  color: var(--cream-dim);
  padding: 30px 0;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (min-width: 720px) {
  .menu-section { max-width: 640px; margin: 0 auto; }
  .category-nav { max-width: 640px; margin: 0 auto; position: sticky; }
  .search-wrap { max-width: 640px; margin: 0 auto; }
  .site-header { max-width: 640px; margin: 0 auto; border-radius: 0 0 20px 20px; }
  .cart-bar { max-width: 608px; margin: 0 auto; left: 0; right: 0; }
  .ticket-drawer { max-width: 640px; margin: 0 auto; }
}
