/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --accent: #D4382C;
  --accent-dark: #B02E24;
  --gold: #FFAE5D;
  --bg: #f5f3f0;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #777;
  --border: #e8e5e0;
  --radius: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
html { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ===== MENU PAGE HEADER ===== */
.menu-header { position: sticky; top: 0; z-index: 20; background: var(--accent); color: #fff; padding: 14px 16px 0; }
.menu-header-top { display: flex; align-items: center; justify-content: space-between; }
.menu-header h1 { font-size: 28px; font-weight: 700; letter-spacing: 0.5px; }
.menu-header h1 a { color: #fff; }
.menu-header-info { font-size: 16px; opacity: 0.85; }
.menu-header-info a { color: #fff; }
.open-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.open-badge.open { background: #4CAF50; color: #fff; }
.open-badge.closed { background: #f44336; color: #fff; }

/* Group bar */
#group-bar { display: flex; gap: 0; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#group-bar::-webkit-scrollbar { display: none; }
.group-btn { background: none; border: none; color: rgba(255,255,255,0.65); font-size: 20px; font-weight: 600; padding: 10px 20px; white-space: nowrap; border-bottom: 2px solid transparent; transition: all 0.2s; }
.group-btn.active { color: #fff; border-bottom-color: var(--gold); }

/* Category strip */
.cat-bar { position: sticky; top: 105px; z-index: 15; background: var(--bg); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); }
.cat-btn { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 10px 20px; font-size: 20px; font-weight: 500; white-space: nowrap; transition: all 0.2s; }
.cat-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

/* ===== FEATURED CAROUSEL ===== */
.featured-section { padding: 16px 0 8px; }
.featured-title { font-size: 26px; font-weight: 700; padding: 0 16px 10px; color: var(--text); }
.featured-scroll { display: flex; gap: 12px; padding: 0 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.featured-scroll::-webkit-scrollbar { display: none; }
.featured-card { flex: 0 0 260px; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer; transition: transform 0.15s; }
.featured-card:active { transform: scale(0.97); }
.featured-card img { width: 260px; height: 200px; object-fit: cover; }
.featured-card-info { padding: 10px 14px; }
.featured-card-name { font-size: 22px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.featured-card-price { font-size: 22px; font-weight: 700; color: var(--accent); margin-top: 4px; }

/* ===== MENU LIST ===== */
.menu-list { padding: 0 12px 120px; }
.cat-label { font-size: 28px; font-weight: 700; padding: 20px 4px 10px; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.cat-label-cn { font-size: 22px; font-weight: 400; color: var(--muted); margin-left: 8px; }

/* Menu item row */
.menu-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid #f0eeeb; cursor: pointer; transition: background 0.15s; }
.menu-item:active { background: #f0eeeb; }

/* Thumbnail */
.menu-item-thumb { flex: 0 0 100px; width: 100px; height: 100px; border-radius: 10px; overflow: hidden; background: #f0eeeb; }
.menu-item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Item text */
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name { font-size: 24px; font-weight: 600; line-height: 1.3; }
.menu-item-cn { font-size: 20px; color: var(--muted); margin-top: 2px; }
.menu-item-prices { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.menu-item-price { font-size: 24px; font-weight: 700; color: var(--accent); }
.menu-item-price-sm { font-size: 20px; color: var(--muted); }

/* No-photo item — slightly shorter */
.menu-item.no-photo { padding: 8px 4px; }

/* ===== ITEM DETAIL MODAL ===== */
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.45); display: flex; align-items: flex-end; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-body { background: var(--card); border-radius: 16px 16px 0 0; width: 100%; max-width: 500px; max-height: 88vh; overflow-y: auto; padding-bottom: calc(20px + var(--safe-bottom)); }

/* Modal close grab bar */
.modal-grab { display: flex; justify-content: center; padding: 10px 0 4px; }
.modal-grab-bar { width: 36px; height: 4px; border-radius: 2px; background: #ccc; }

/* Modal hero image */
.modal-hero { width: 100%; max-height: 280px; overflow: hidden; }
.modal-hero img { width: 100%; height: 280px; object-fit: cover; }

.modal-content { padding: 0 20px; }
.modal-name { font-size: 20px; font-weight: 700; margin-top: 12px; }
.modal-cn { font-size: 14px; color: var(--muted); margin-top: 2px; }
.modal-price { font-size: 20px; font-weight: 700; color: var(--accent); margin-top: 8px; }

/* Size options */
.size-picks { display: flex; gap: 10px; margin-top: 16px; }
.size-opt { flex: 1; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--border); font-size: 14px; font-weight: 500; background: none; transition: all 0.2s; }
.size-opt.selected { border-color: var(--accent); background: #fef2f1; }
.size-opt-price { font-weight: 700; color: var(--accent); }

/* Modifiers */
.mod-section { margin-top: 20px; }
.mod-section h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.mod-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-chip { padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--card); font-size: 13px; transition: all 0.2s; }
.mod-chip.selected { background: var(--text); color: #fff; border-color: var(--text); }

/* Quantity */
.qty-row { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 20px; }
.qty-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.qty-val { font-size: 20px; font-weight: 700; min-width: 30px; text-align: center; }

.add-cart-btn { display: block; width: 100%; margin-top: 20px; padding: 14px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; }
.add-cart-btn:active { background: var(--accent-dark); }

/* ===== TOAST ===== */
#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px); background: #333; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 14px; opacity: 0; transition: all 0.3s; z-index: 80; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== LANDING PAGE ===== */
.hero { position: relative; height: 420px; background: linear-gradient(135deg, #1a1a1a 0%, #2d1f1f 100%); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero-content { position: relative; z-index: 2; padding: 0 20px; }
.hero-content h1 { font-size: 36px; font-weight: 700; letter-spacing: 1px; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.hero-phone { font-size: 28px; font-weight: 700; margin-top: 12px; }
.hero-phone a { color: #fff; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.hero-btn { display: inline-block; padding: 12px 28px; border-radius: 8px; font-size: 16px; font-weight: 600; border: 2px solid #fff; color: #fff; transition: all 0.2s; }
.hero-btn.primary { background: var(--accent); border-color: var(--accent); }
.hero-btn:hover { transform: translateY(-1px); }

/* Sections */
.section { padding: 48px 16px; max-width: 800px; margin: 0 auto; }
.section h2 { font-size: 24px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.section p { font-size: 15px; line-height: 1.8; color: #555; text-align: center; }

/* Hours */
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 16px; }
.hours-day { background: var(--card); border-radius: 8px; padding: 12px; text-align: center; border: 1px solid var(--border); }
.hours-day-name { font-size: 13px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
.hours-day-time { font-size: 14px; font-weight: 500; margin-top: 4px; }
.hours-day.today { border-color: var(--accent); background: #fef8f7; }
.hours-day.closed .hours-day-time { color: #f44336; }

/* Photo gallery marquee */
.gallery-section { overflow: hidden; }
.gallery-marquee { overflow: hidden; width: 100%; }
.gallery-track { display: flex; gap: 20px; will-change: transform; }
.gallery-card { flex: 0 0 200px; text-align: center; }
.gallery-card img { width: 200px; height: 200px; object-fit: cover; border-radius: var(--radius); }
.gallery-name { font-size: 13px; font-weight: 600; margin-top: 8px; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Map */
.map-container { width: 100%; border-radius: var(--radius); overflow: hidden; margin-top: 16px; }
.map-container iframe { width: 100%; height: 350px; border: 0; }

/* Footer */
.footer { background: #1a1a1a; color: #aaa; padding: 32px 16px; text-align: center; }
.footer a { color: var(--gold); }
.footer-phone { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-address { font-size: 14px; margin-bottom: 16px; }
.footer-copy { font-size: 12px; margin-top: 16px; color: #666; }

/* ===== CART BAR ===== */
#cart-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; padding: 12px 16px calc(12px + var(--safe-bottom)); background: rgba(26,26,26,0.95); backdrop-filter: blur(8px); transform: translateY(100%); transition: transform 0.3s; }
#cart-bar.show { transform: translateY(0); }
.cart-bar-inner { display: flex; align-items: center; justify-content: space-between; background: var(--accent); color: #fff; padding: 14px 20px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px; }
.cart-bar-inner:active { opacity: 0.9; }
.cart-bar-count { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.25); font-size: 13px; font-weight: 700; }
.cart-bar-total { font-size: 16px; font-weight: 700; }

/* ===== CHECKOUT PAGE ===== */
.checkout-header { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--accent); color: #fff; position: sticky; top: 0; z-index: 10; }
.checkout-back { font-size: 24px; color: #fff; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: background 0.15s; }
.checkout-back:hover { background: rgba(255,255,255,0.1); }
.checkout-header h1 { font-size: 18px; font-weight: 700; }

.checkout-wrap { max-width: 500px; margin: 0 auto; padding: 0 16px 40px; }

.checkout-empty { text-align: center; padding: 40px 0; color: var(--muted); }
.checkout-empty a { color: var(--accent); text-decoration: underline; }

/* Cart items */
.checkout-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.checkout-item-name { font-size: 14px; font-weight: 600; }
.checkout-item-size { font-size: 12px; color: var(--muted); }
.checkout-item-mods { font-size: 12px; color: var(--muted); margin-top: 2px; }
.checkout-item-right { display: flex; align-items: center; gap: 16px; }
.checkout-item-qty { display: flex; align-items: center; gap: 8px; }
.checkout-item-qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.checkout-item-qty span { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
.checkout-item-price { font-size: 14px; font-weight: 700; color: var(--accent); min-width: 60px; text-align: right; }

/* Sections */
.checkout-section { padding: 20px 0 0; }
.checkout-section h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); margin-bottom: 10px; }

.checkout-input { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; margin-bottom: 10px; background: var(--card); }
.checkout-input:focus { outline: none; border-color: var(--accent); }

/* Order type */
.order-type-row { display: flex; gap: 10px; }
.order-type-btn { flex: 1; padding: 12px; border: 2px solid var(--border); border-radius: 10px; background: var(--card); font-size: 14px; font-weight: 600; transition: all 0.2s; cursor: pointer; }
.order-type-btn.selected { border-color: var(--accent); background: #fef2f1; color: var(--accent); }

/* Tip */
.tip-row { display: flex; gap: 8px; }
.tip-btn { flex: 1; padding: 10px; border: 2px solid var(--border); border-radius: 10px; background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.tip-btn.selected { border-color: var(--accent); background: #fef2f1; color: var(--accent); }

/* Totals */
.checkout-totals { padding: 16px 0; border-top: 1px solid var(--border); margin-top: 16px; }
.totals-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: var(--muted); }
.totals-row.total { font-size: 16px; font-weight: 700; color: var(--text); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border); }

/* Stripe card element */
.card-element { padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.card-errors { color: #f44336; font-size: 13px; margin-top: 6px; min-height: 18px; }

/* Pay button */
.pay-btn { display: block; width: 100%; margin-top: 24px; padding: 16px; border: none; border-radius: 10px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
.pay-btn:active { background: var(--accent-dark); }
.pay-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== CONFIRMATION PAGE ===== */
.confirm-page { max-width: 400px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.confirm-check { width: 64px; height: 64px; border-radius: 50%; background: #4CAF50; color: #fff; font-size: 32px; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.confirm-page h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.confirm-msg { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }
.confirm-detail { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 24px; }
.confirm-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.confirm-row + .confirm-row { border-top: 1px solid var(--border); }
.confirm-btn { display: inline-block; padding: 14px 32px; background: var(--accent); color: #fff; border-radius: 10px; font-size: 15px; font-weight: 600; }
.confirm-link { display: block; margin-top: 12px; color: var(--muted); font-size: 14px; }

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .menu-list { padding: 0 20px 120px; }
  .menu-item-thumb { flex: 0 0 120px; width: 120px; height: 120px; }
  .featured-card { flex: 0 0 300px; }
  .featured-card img { width: 300px; height: 230px; }
  .hero { height: 500px; }
  .hero-content h1 { font-size: 48px; }
  .gallery-card { flex: 0 0 240px; }
  .gallery-card img { width: 240px; height: 240px; }
}

@media (min-width: 960px) {
  .menu-list { max-width: 700px; margin: 0 auto; }
  .featured-section { max-width: 900px; margin: 0 auto; }
  .modal-body { border-radius: 16px; margin-bottom: 40px; }
  .modal-overlay { align-items: center; }
}
