/* ============================================================
   BOB BURGER — Design tokens
   A smash-burger joint that plates itself like fine dining.
   Signature element: the cart renders as a torn kitchen order
   ticket — the same object the kitchen and the courier will
   actually hold, not a generic "shopping cart" widget.
   ============================================================ */

:root {
  --char:        #1c130d;   /* flat-top grill char, page background */
  --char-2:      #251a12;   /* slightly lifted panel background */
  --cream:       #f6efe0;   /* ticket paper / light text */
  --cream-dim:   #d8c9ac;
  --brand-orange:#c85a30;   /* from logo */
  --brand-brown: #3a2415;   /* from logo */
  --gold:        #d9a441;   /* "gilded / prestige" accent */
  --green:       #5c6b3e;   /* pickle, used sparingly */
  --line:        rgba(246, 239, 224, 0.14);
  --shadow:      0 18px 40px rgba(0,0,0,0.45);

  --font-display: "Alfa Slab One", "Georgia", serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
  --font-mono: "Courier Prime", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--char);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  letter-spacing: 0.5px;
}
.nav-brand img {height: 60px;width: auto;}
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  color: var(--brand-brown);
}
.nav-links a { text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--gold); }
.nav-cart-btn {
  background: var(--brand-orange);
  color: var(--cream);
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, background 0.15s;
}
.nav-cart-btn:hover { background: #b04d27; transform: translateY(-1px); }
.cart-count {
  background: var(--char);
  color: var(--gold);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 72px 24px 56px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(200,90,48,0.25), transparent 60%),
    repeating-linear-gradient(180deg, rgba(255,255,255,0.02) 0 2px, transparent 2px 26px);
}
.hero-logo { width: 132px; margin: 0 auto 18px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  color: var(--cream);
  margin: 0 0 10px;
  line-height: 1.05;
  text-shadow: 0 4px 0 rgba(0,0,0,0.3);
}
.hero h1 span { color: var(--brand-orange); }
.hero p.tagline {
  color: var(--cream-dim);
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.98rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-orange); color: var(--cream); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--brand-brown); }
.btn-outline { background: transparent; border-color: var(--cream-dim); color: var(--cream); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

/* stamped badge under hero */
.hero-badge {
  margin: 34px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--cream-dim);
  border: 1px dashed var(--cream-dim);
  padding: 8px 16px;
  border-radius: 999px;
}
.hero-badge b { color: var(--gold); }

/* ---------------- Menu ---------------- */
.menu-section { padding: 40px 0 100px; }
.menu-heading {
  text-align: center;
  margin-bottom: 34px;
}
.menu-heading .eyebrow {
  font-family: var(--font-mono);
  color: var(--gold);
  letter-spacing: 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
}
.menu-heading h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 6px 0 0;
}

.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
  padding: 0 4px;
}
.cat-tab {
  background: var(--char-2);
  border: 1px solid var(--line);
  color: var(--cream-dim);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-tab:hover { color: var(--cream); border-color: var(--gold); }
.cat-tab.active {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--cream);
  font-weight: 700;
}

.cat-block { margin-bottom: 52px; scroll-margin-top: 90px; }
.cat-block-title {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.3rem;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.item-card {
  background: var(--char-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, border-color 0.15s;
}
.item-card:hover { transform: translateY(-3px); border-color: rgba(217,164,65,0.5); }
.item-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #2a1c12, #1c130d);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream-dim);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow: hidden;
}
.item-photo { position: relative; }
.item-photo img { width: 100%; height: 100%; object-fit: cover; }
.sold-out-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-brown);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246,239,224,0.35);
}
.item-card.is-sold-out { opacity: 0.6; }
.item-card.is-sold-out .item-photo { filter: grayscale(0.6); }
.item-add:disabled {
  border-color: var(--cream-dim);
  color: var(--cream-dim);
  cursor: not-allowed;
  background: transparent;
}
.item-add:disabled:hover { background: transparent; color: var(--cream-dim); }
.item-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.item-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.item-name { font-weight: 700; font-size: 1.02rem; }
.item-price { font-family: var(--font-mono); color: var(--gold); white-space: nowrap; }
.item-desc { color: var(--cream-dim); font-size: 0.88rem; flex: 1; }
.item-add {
  align-self: flex-start;
  margin-top: 4px;
  background: transparent;
  border: 1.5px solid var(--brand-orange);
  color: var(--brand-orange);
  padding: 8px 16px;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.item-add:hover { background: var(--brand-orange); color: var(--cream); }
.item-add.added { background: var(--green); border-color: var(--green); color: var(--cream); }

.qty-stepper {
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--char);
  border: 1.5px solid var(--brand-orange);
  border-radius: 7px;
  padding: 4px 6px;
}
.qty-stepper.show { display: inline-flex; }
.qty-stepper button {
  background: none;
  border: none;
  color: var(--brand-orange);
  font-size: 1.1rem;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
}
.qty-stepper span { min-width: 18px; text-align: center; font-family: var(--font-mono); }

/* ---------------- Order Ticket (cart) ---------------- */
.ticket-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 4, 0.6);
  z-index: 90;
  display: none;
}
.ticket-overlay.open { display: block; }

.ticket-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--cream);
  color: #2a1c12;
  z-index: 95;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 50px rgba(0,0,0,0.5);
}
.ticket-panel.open { transform: translateX(0); }

.ticket-header {
  padding: 20px 20px 14px;
  border-bottom: 2px dashed #c9b98f;
  font-family: var(--font-mono);
}
.ticket-header .t-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brand-brown);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ticket-header .t-sub { font-size: 0.78rem; color: #7a6a4d; margin-top: 4px; }
.ticket-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--brand-brown); }

.ticket-body { flex: 1; overflow-y: auto; padding: 14px 20px; font-family: var(--font-mono); font-size: 0.9rem; }
.ticket-empty { color: #8a7a5c; text-align: center; padding: 40px 10px; }
.ticket-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px dotted #cbb98f;
}
.ticket-line .l-name { flex: 1; }
.ticket-line .l-qty-ctrl { display: flex; align-items: center; gap: 6px; }
.ticket-line .l-qty-ctrl button {
  background: #eee0c4; border: none; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; font-weight: 700;
}
.ticket-line .l-price { min-width: 62px; text-align: right; }
.ticket-line .l-remove { background: none; border: none; color: #b04d27; cursor: pointer; font-size: 0.8rem; margin-left: 4px; }

.ticket-footer {
  border-top: 2px dashed #c9b98f;
  padding: 14px 20px 20px;
  font-family: var(--font-mono);
}
.ticket-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.88rem; }
.ticket-row.total { font-size: 1.05rem; font-weight: 700; border-top: 1px solid #c9b98f; margin-top: 6px; padding-top: 10px; }
.ticket-checkout-btn {
  width: 100%;
  margin-top: 14px;
  background: var(--brand-orange);
  color: var(--cream);
  border: none;
  padding: 13px;
  border-radius: 7px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}
.ticket-checkout-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------- Checkout Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(10,6,4,0.7);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--cream);
  color: #2a1c12;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
}
.modal-box h3 {
  font-family: var(--font-display);
  color: var(--brand-brown);
  margin: 0 0 4px;
}
.modal-box .m-sub { color: #7a6a4d; font-size: 0.88rem; margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 5px; color: #4a3520; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d9c9a6;
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fffdf8;
  color: #2a1c12;
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row { display: flex; gap: 10px; }
.form-row .form-group { flex: 1; }
.cod-note {
  background: #f0e6cc;
  border: 1px dashed #c9b98f;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #5a4a2f;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.form-error {
  background: #f6d9cf; color: #8a2f10; border-radius: 7px; padding: 9px 12px;
  font-size: 0.85rem; margin-bottom: 12px; display: none;
}
.form-error.show { display: block; }
.modal-submit-btn {
  width: 100%;
  background: var(--brand-orange);
  color: var(--cream);
  border: none;
  padding: 13px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 6px;
}
.modal-submit-btn:disabled { opacity: 0.6; cursor: wait; }
.modal-cancel { background: none; border: none; color: #7a6a4d; text-align: center; width: 100%; margin-top: 10px; cursor: pointer; font-size: 0.85rem; }

/* success state */
.success-box { text-align: center; padding: 10px 6px; }
.success-box .big-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--green); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 16px;
}
.success-box h3 { color: var(--brand-brown); }
.order-id-chip {
  display: inline-block; font-family: var(--font-mono);
  background: #eee0c4; padding: 6px 14px; border-radius: 999px; margin: 10px 0 18px;
}

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 24px 30px;
  background: var(--cream);
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); margin-bottom: 10px; }
.footer-brand img { height: 36px; }
.footer h4 { font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); margin: 0 0 10px; }
.footer p, .footer a {color: var(--brand-brown);font-size: 0.92rem;text-decoration: none;margin: 0 0 6px;display: block;}
.footer a:hover { color: var(--cream); }
.whatsapp-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: #2a3d1f; color: #d7f0c3 !important; padding: 9px 16px; border-radius: 8px; margin-top: 6px;
}
.footer-bottom {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  color: var(--brand-brown);
}

@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .form-row { flex-direction: column; gap: 0; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
