/* ============================================================
   pages.css — menu, order, nav styles
   Extends theme.css tokens. Does NOT redefine :root.
   ============================================================ */

/* ---- NAV ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
  background: rgba(26, 18, 9, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: .88rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color .2s;
}
.nav-link:hover, .nav-link.active { color: var(--fg); }

.nav-cta {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  padding: .5rem 1.2rem;
  border-radius: 50px;
  transition: background .2s, transform .15s;
}
.nav-cta:hover { background: var(--accent-glow); transform: translateY(-1px); }
.nav-cta.active { background: var(--gold); }

/* ---- PAGE HERO (menu page) ---- */
.page-hero {
  position: relative;
  padding: 5rem 2rem 4rem;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(232,101,42,.12) 0%, transparent 65%),
    var(--bg);
}

.page-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: .75rem;
}

/* ---- MENU PAGE ---- */
.menu-page { padding-bottom: 0; }

.menu-section { padding: 4rem 2rem; background: var(--bg); }
.menu-section.alt { background: var(--bg-warm); }

.menu-section-inner { max-width: 1080px; margin: 0 auto; }

.menu-section-header { margin-bottom: 2.5rem; }

.section-note {
  font-size: .82rem;
  color: var(--fg-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: .35rem;
  font-weight: 500;
}

/* Mains grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--card-border);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.menu-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  transition: background .2s;
  overflow: hidden;
}
.menu-card:hover { background: #321e10; }

/* Photo at top of main card */
.menu-card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.menu-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.menu-card:hover .menu-card-photo img { transform: scale(1.04); }

/* Text row below photo */
.menu-card-content {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.menu-card-num {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--accent-glow);
  opacity: .5;
  line-height: 1;
  min-width: 2rem;
  margin-top: .1rem;
}

.menu-card-body { flex: 1; }
.menu-card-body h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: .3rem;
}
.menu-card-body p { font-size: .88rem; color: var(--fg-muted); line-height: 1.5; }

.menu-card-price {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
  white-space: nowrap;
}

/* Sides/drinks two-col */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.col-block .menu-section-header { margin-bottom: 1.5rem; }

.list-menu { display: flex; flex-direction: column; gap: 0; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--card-border);
}
.list-item:last-child { border-bottom: none; }

/* Small square thumbnail for sides/drinks list */
.list-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-border);
}
.list-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.list-item:hover .list-item-thumb img { transform: scale(1.08); }

.list-item-info { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-width: 0; }
.list-item-name { font-weight: 500; font-size: .95rem; }
.list-item-desc { font-size: .8rem; color: var(--fg-muted); }
.list-item-price { font-size: .85rem; color: var(--gold); font-weight: 600; white-space: nowrap; }

/* Desserts grid */
.dessert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.dessert-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.dessert-card:hover { border-color: var(--gold); transform: translateY(-2px); }

/* Photo at top of dessert card */
.dessert-card-photo {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.dessert-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.dessert-card:hover .dessert-card-photo img { transform: scale(1.05); }

.dessert-card-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}

.dessert-card h4 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1rem;
}
.dessert-card p { font-size: .83rem; color: var(--fg-muted); }
.dessert-price { font-size: .9rem; color: var(--gold); font-weight: 600; margin-top: .25rem; }

/* Order CTA band */
.order-cta-band {
  padding: 5rem 2rem;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(232,101,42,.12) 0%, transparent 65%),
    var(--bg);
}
.order-cta-inner { max-width: 480px; margin: 0 auto; }
.order-cta-band h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: .75rem;
}
.order-cta-band p { color: var(--fg-muted); margin-bottom: 2rem; }

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: .9rem 2.5rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232,101,42,.35);
}
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; text-align: center; }

.btn-secondary {
  display: inline-block;
  padding: .8rem 2rem;
  background: transparent;
  color: var(--fg);
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--card-border);
  border-radius: 50px;
  transition: border-color .2s, color .2s;
}
.btn-secondary:hover { border-color: var(--fg); }

/* ---- ORDER PAGE ---- */
.order-page {
  min-height: calc(100vh - 60px);
  background: var(--bg);
}

.order-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

/* Picker (left) */
.order-picker {
  padding: 2.5rem 2rem 4rem;
  overflow-y: auto;
  border-right: 1px solid var(--card-border);
}

.order-picker-header { margin-bottom: 2.5rem; }
.order-picker-header h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: .4rem;
}
.order-sub { color: var(--fg-muted); font-size: .9rem; }

.picker-section { margin-bottom: 2.5rem; }
.picker-section-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  display: flex;
  align-items: baseline;
  gap: .75rem;
}
.picker-note {
  font-size: .68rem;
  color: var(--fg-muted);
  font-weight: 400;
  letter-spacing: .1em;
}

.picker-items { display: flex; flex-direction: column; gap: .4rem; }

.picker-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .9rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, transform .15s;
  width: 100%;
}
.picker-item:hover { border-color: var(--accent); background: #2d1e11; transform: translateX(2px); }
.picker-item.in-cart { border-color: var(--accent); background: rgba(232,101,42,.1); }

/* Small photo thumbnail inside picker buttons */
.picker-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-border);
}
.picker-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
  pointer-events: none;
}
.picker-item:hover .picker-item-thumb img { transform: scale(1.1); }

.picker-item-name { flex: 1; font-size: .9rem; font-weight: 400; }
.picker-item-price { font-size: .85rem; color: var(--gold); font-weight: 600; }
.picker-item-add {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
  font-family: monospace;
}
.picker-item.in-cart .picker-item-add { background: var(--gold); color: var(--bg); }

/* Cart (right) */
.order-cart-wrap {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg-warm);
}

.order-cart { padding: 2rem 1.75rem; min-height: 100%; display: flex; flex-direction: column; }

.cart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--card-border);
}
.cart-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.cart-count { font-size: .8rem; color: var(--fg-muted); }

.cart-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
}
.cart-empty p { color: var(--fg-muted); font-size: .9rem; line-height: 1.7; }

.cart-items { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1rem; }

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .9rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.cart-item-info { flex: 1; }
.cart-item-name { display: block; font-size: .88rem; font-weight: 500; }
.cart-item-sub { display: block; font-size: .78rem; color: var(--fg-muted); margin-top: .15rem; }

.cart-item-controls { display: flex; align-items: center; gap: .5rem; }
.cart-item-line { font-size: .85rem; color: var(--gold); font-weight: 600; }
.cart-remove {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--card-border);
  background: transparent; color: var(--fg-muted);
  font-size: .9rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s;
}
.cart-remove:hover { border-color: var(--accent); color: var(--accent); }

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--card-border);
  margin-top: .5rem;
  font-size: .88rem;
  color: var(--fg-muted);
}
#cart-total-price { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold); font-weight: 700; }

/* Checkout form */
.checkout-form { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--card-border); }
.checkout-form h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: .4rem;
}
.optional { font-weight: 400; letter-spacing: 0; text-transform: none; }

.form-field input,
.form-field textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--fg);
  font-family: 'Outfit', sans-serif;
  font-size: .9rem;
  transition: border-color .2s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--fg-muted); opacity: .6; }

.form-note {
  text-align: center;
  font-size: .78rem;
  color: var(--fg-muted);
  margin-top: .75rem;
}

/* Success overlay */
.success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,18,9,.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}

.success-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
}
.success-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.success-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: .75rem;
}
.success-card p { color: var(--fg-muted); margin-bottom: 2rem; }
.success-card strong { color: var(--gold); }

/* ---- HERO ORDER NOW button ---- */
.hero-order-btn {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.8rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.hero-order-btn:hover {
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(232,101,42,.4);
}

/* ---- GUIDED ORDER FLOW ---- */

/* Step progress bar */
.step-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.step-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  opacity: .35;
  transition: opacity .25s;
}
.step-item.active { opacity: 1; }
.step-item.done   { opacity: .6; }

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--card-border);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  transition: background .2s, border-color .2s, color .2s;
}
.step-item.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-item.done   .step-num { background: var(--gold); border-color: var(--gold); color: var(--bg); font-size: .65rem; }
.step-item.done   .step-num::after { content: '✓'; }
.step-item.done   .step-num span   { display: none; }

.step-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--fg); }

.step-connector {
  flex: 1;
  height: 1px;
  background: var(--card-border);
  margin: 0 .75rem;
  min-width: 16px;
}

/* Step panels */
.step-panel.hidden { display: none; }

/* Back row above step headings */
.step-back-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}

.step-back-btn {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: color .2s;
}
.step-back-btn:hover { color: var(--accent); }

.selected-main-label {
  font-size: .78rem;
  color: var(--gold);
  font-weight: 500;
}

/* Sides counter badge */
.sides-counter-wrap { margin-top: .5rem; }

.sides-counter {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(232,101,42,.12);
  border: 1px solid rgba(232,101,42,.3);
  border-radius: 50px;
  padding: .3rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .4rem;
  transition: background .2s, border-color .2s, color .2s;
}
.sides-counter.counter-full {
  background: rgba(212,175,55,.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* Per-side qty controls (inside side button) */
.side-btn {
  /* Override the default cursor: prevent the whole button from being the target */
  cursor: default;
  align-items: center;
}

.side-qty-control {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-left: .5rem;
  flex-shrink: 0;
}

.side-qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--fg);
  font-size: .9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  line-height: 1;
  flex-shrink: 0;
}
.side-qty-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(232,101,42,.15);
  color: var(--accent);
}
.side-qty-btn:disabled {
  opacity: .25;
  cursor: not-allowed;
}
.side-qty-num {
  min-width: 18px;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
}

/* Proceed / skip buttons row */
.sides-proceed-wrap {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--card-border);
}

/* Ghost button (skip action) */
.btn-ghost {
  display: inline-block;
  padding: .7rem 2rem;
  background: transparent;
  color: var(--fg-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: .85rem;
  letter-spacing: .04em;
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 50px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--fg-muted); color: var(--fg); }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .order-layout { grid-template-columns: 1fr; }
  .order-picker { border-right: none; border-bottom: 1px solid var(--card-border); }
  .order-cart-wrap { position: static; height: auto; }

  .menu-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .dessert-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .site-nav { padding: 0 1rem; }
  .nav-links { gap: .75rem; }
  .page-hero { padding: 3.5rem 1.25rem 2.5rem; }
  .menu-section, .order-picker { padding-left: 1.25rem; padding-right: 1.25rem; }
  .dessert-grid { grid-template-columns: 1fr; }

  /* Compact card text row on small screens */
  .menu-card-content { padding: 1rem 1rem; gap: .75rem; }

  /* Smaller thumbnails on mobile */
  .list-item-thumb { width: 44px; height: 44px; }
  .picker-item-thumb { width: 40px; height: 40px; }

  .order-cart { padding: 1.5rem 1.25rem; }
}
