:root {
  --primary: #C8502A;
  --secondary: #2D6A2D;
  --accent: #F5C842;
  --bg: #FAFAF7;
  --card-bg: #FFFFFF;
  --text: #1A1A1A;
  --muted: #666;
  --border: #E5E5E5;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); }

/* ─── HEADER ──────────────────────────────────────────────────────────────── */
#site-header { background: var(--primary); color: white; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
#client-logo { height: 44px; width: auto; border-radius: 6px; flex-shrink: 0; }
.brand-text { min-width: 0; }
#client-name { font-size: 1.2rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#client-tagline { font-size: 0.75rem; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── TAB NAV ──────────────────────────────────────────────────────────────── */
.tab-nav { display: flex; gap: 4px; flex-shrink: 0; }
.tab-icon { display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; transition: all 0.2s; min-width: 60px; }
.tab-icon svg { width: 22px; height: 22px; }
.tab-icon:hover { background: rgba(255,255,255,0.22); color: white; }
.tab-icon.active { background: white; color: var(--primary); border-color: white; }
.cart-icon-wrap { position: relative; display: inline-flex; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #000; font-size: 0.65rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.tab-icon.active .cart-badge { background: var(--primary); color: white; }

/* ─── PROMOTIONS BAR ──────────────────────────────────────────────────────── */
#promotions-bar { display: flex; gap: 12px; padding: 12px 20px; overflow-x: auto; justify-content: center; background: linear-gradient(135deg, var(--primary) 0%, #a03d1f 100%); scrollbar-width: none; }
#promotions-bar::-webkit-scrollbar { display: none; }
.promo-card { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); border-radius: 12px; padding: 10px 16px; min-width: 210px; flex-shrink: 0; }
.promo-emoji { font-size: 1.4rem; line-height: 1; }
.promo-title { color: white; font-weight: 700; font-size: 0.88rem; }
.promo-sub { color: rgba(255,255,255,0.85); font-size: 0.76rem; margin-top: 1px; }

/* ─── CATEGORY NAV ────────────────────────────────────────────────────────── */
#category-nav { background: white; border-bottom: 1px solid var(--border); position: sticky; top: 64px; z-index: 90; overflow-x: auto; white-space: nowrap; padding: 0 20px; scrollbar-width: none; }
#category-nav::-webkit-scrollbar { display: none; }
#category-nav a { display: inline-block; padding: 11px 15px; text-decoration: none; color: var(--muted); font-size: 0.88rem; font-weight: 500; border-bottom: 3px solid transparent; transition: all 0.2s; }
#category-nav a:hover, #category-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── MAIN ────────────────────────────────────────────────────────────────── */
#view-menu main { max-width: 1100px; margin: 0 auto; padding: 20px; }
.loading { text-align: center; padding: 60px; color: var(--muted); font-size: 1.1rem; }
.section-heading { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }

/* ─── FAN FAVORITES ──────────────────────────────────────────────────────── */
#fan-favorites-section { margin-bottom: 36px; }
#fan-favorites-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.fav-card { flex-shrink: 0; width: 155px; background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer; overflow: hidden; transition: transform 0.15s, box-shadow 0.15s; }
.fav-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }
.fav-img-wrap { width: 100%; height: 105px; overflow: hidden; background: var(--bg); }
.fav-img { width: 100%; height: 100%; object-fit: cover; }
.fav-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; font-size: 2.5rem; font-weight: 700; }
.fav-name { font-weight: 600; font-size: 0.8rem; padding: 8px 10px 2px; line-height: 1.3; }
.fav-price { font-size: 0.79rem; color: var(--primary); font-weight: 700; padding: 0 10px 8px; }

/* ─── CATEGORY SECTION ───────────────────────────────────────────────────── */
.category-section { margin-bottom: 40px; }
.category-title { font-size: 1.35rem; font-weight: 700; color: var(--secondary); padding-bottom: 10px; border-bottom: 2px solid var(--accent); margin-bottom: 16px; }

/* ─── ITEM GRID ──────────────────────────────────────────────────────────── */
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.item-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; border: 1px solid var(--border); overflow: hidden; }
.item-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.item-img-wrap { width: 100%; height: 155px; overflow: hidden; }
.item-img { width: 100%; height: 100%; object-fit: cover; }
.item-body { padding: 13px; }
.item-name { font-weight: 600; font-size: 0.97rem; margin-bottom: 4px; }
.item-desc { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-footer { display: flex; justify-content: space-between; align-items: center; }
.item-price { font-weight: 700; font-size: 1rem; color: var(--primary); }
.add-btn { background: var(--primary); color: white; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.add-btn:hover { background: var(--secondary); }

/* ─── MODIFIER MODAL ─────────────────────────────────────────────────────── */
#modifier-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; }
#modifier-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 480px; max-width: 95vw; max-height: 85vh; background: white; border-radius: 14px; z-index: 301; overflow-y: auto; padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-header h2 { font-size: 1.2rem; font-weight: 700; }
.close-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.item-desc { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; line-height: 1.5; }
.modifier-group { margin-bottom: 20px; }
.modifier-group-name { font-weight: 700; margin-bottom: 10px; font-size: 0.93rem; }
.modifier-option { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 2px solid var(--border); border-radius: 8px; margin-bottom: 6px; cursor: pointer; transition: border-color 0.15s; }
.modifier-option:hover { border-color: var(--primary); }
.modifier-option.selected { border-color: var(--primary); background: #fff5f2; }
.modifier-option input { accent-color: var(--primary); }
.mod-option-name { font-size: 0.9rem; }
.mod-option-price { font-size: 0.84rem; color: var(--muted); }
.modifier-footer { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.qty-control { display: flex; align-items: center; gap: 12px; }
.qty-control button { background: var(--border); border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.qty-control span { font-weight: 700; font-size: 1.1rem; min-width: 24px; text-align: center; }
.add-to-cart-btn { flex: 1; background: var(--primary); color: white; border: none; padding: 12px; border-radius: var(--radius); font-weight: 700; cursor: pointer; font-size: 0.95rem; }
.add-to-cart-btn:hover { background: var(--secondary); }

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
.cart-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1a1a1a; color: white; padding: 10px 22px; border-radius: 25px; font-size: 0.9rem; font-weight: 500; opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none; z-index: 500; white-space: nowrap; }
.cart-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── INFO TAB ───────────────────────────────────────────────────────────── */
.info-page { max-width: 900px; margin: 0 auto; padding: 24px 20px; }
.info-map-wrap { margin-bottom: 24px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-card { background: var(--card-bg); border-radius: 12px; padding: 18px 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.info-card-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 14px; color: var(--text); padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.info-hours-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 0.88rem; border-bottom: 1px solid var(--border); }
.info-hours-row:last-child { border-bottom: none; }
.info-hours-time { font-weight: 600; color: var(--secondary); white-space: nowrap; margin-left: 8px; }
.info-fee-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.info-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.info-sep { color: var(--muted); }
.info-pm-row { font-size: 0.88rem; padding: 5px 0; color: var(--text); }
.info-contact-row { font-size: 0.9rem; padding: 5px 0; }
.info-contact-row a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ─── CHECKOUT TAB ───────────────────────────────────────────────────────── */
.checkout-page { max-width: 1060px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.checkout-left { display: flex; flex-direction: column; gap: 2px; }
.checkout-right { position: sticky; top: 80px; background: var(--card-bg); border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.checkout-section { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; }
.cs-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 14px; color: var(--text); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.form-group input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.92rem; background: white; }
.form-group input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(200,80,42,0.1); }
.co-textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 0.92rem; resize: vertical; font-family: inherit; }
.co-textarea:focus { outline: none; border-color: var(--primary); }
.order-type-btns { display: flex; gap: 10px; }
.ot-btn { flex: 1; padding: 12px; border: 2px solid var(--border); background: white; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 0.9rem; transition: all 0.2s; }
.ot-btn:hover { border-color: var(--primary); }
.ot-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f2; }
.time-btn { width: 100%; padding: 11px; border: 1px solid var(--border); background: white; border-radius: 8px; cursor: pointer; font-size: 0.9rem; text-align: left; color: var(--text); font-weight: 500; }
#card-container { min-height: 50px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: white; }
#payment-status { margin-top: 8px; font-size: 0.84rem; }
#payment-status.error { color: #dc2626; }
#payment-status.success { color: #16a34a; }
.tip-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tip-btn { padding: 9px 18px; border: 2px solid var(--border); background: white; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.88rem; transition: all 0.2s; }
.tip-btn:hover { border-color: var(--primary); }
.tip-btn.active { border-color: var(--primary); background: #fff5f2; color: var(--primary); }
.tip-amount-label { margin-top: 8px; font-size: 0.84rem; color: var(--secondary); font-weight: 600; }

/* Checkout right panel */
.co-summary-header { background: var(--secondary); color: white; padding: 14px 18px; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.03em; }
#co-items-list { padding: 12px 18px; max-height: 320px; overflow-y: auto; }
.co-empty { text-align: center; padding: 24px 12px; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }
.co-empty a { color: var(--primary); font-weight: 600; text-decoration: none; }
.co-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); gap: 8px; }
.co-item:last-child { border-bottom: none; }
.co-item-left { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.co-qty-ctrl { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.co-qty-ctrl button { background: var(--border); border: none; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }
.co-qty-ctrl span { font-weight: 600; min-width: 18px; text-align: center; font-size: 0.88rem; }
.co-item-name { font-weight: 600; font-size: 0.88rem; line-height: 1.3; }
.co-item-mods { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.co-item-price { font-weight: 600; font-size: 0.88rem; color: var(--primary); white-space: nowrap; }
.co-totals { padding: 12px 18px; border-top: 1px solid var(--border); }
.co-row { display: flex; justify-content: space-between; font-size: 0.88rem; padding: 4px 0; color: var(--text); }
.co-total-row { font-size: 1rem; font-weight: 700; padding-top: 10px; margin-top: 6px; border-top: 2px solid var(--border); }
.pay-btn { display: block; width: calc(100% - 36px); margin: 0 18px 14px; background: var(--secondary); color: white; border: none; padding: 15px; border-radius: var(--radius); font-size: 1rem; font-weight: 700; cursor: pointer; text-align: center; transition: opacity 0.2s; }
.pay-btn:hover { opacity: 0.9; }
.pay-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.co-legal { font-size: 0.72rem; color: var(--muted); text-align: center; padding: 0 18px 16px; line-height: 1.5; }
.co-legal a { color: var(--primary); }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
footer { text-align: center; padding: 24px; color: var(--muted); font-size: 0.78rem; border-top: 1px solid var(--border); margin-top: 20px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  #client-name { font-size: 1rem; }
  #client-tagline { display: none; }
  .tab-icon { padding: 6px 10px; min-width: 50px; font-size: 0.65rem; }
  .tab-icon svg { width: 20px; height: 20px; }
  #promotions-bar { padding: 10px 14px; }
  .items-grid { grid-template-columns: 1fr 1fr; }
  .fav-card { width: 135px; }
  .fav-img-wrap { height: 88px; }
  .info-grid { grid-template-columns: 1fr; }
  .checkout-page { grid-template-columns: 1fr; }
  .checkout-right { position: static; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .items-grid { grid-template-columns: 1fr; }
}
