/* ── Design tokens — logo colors: red #CD2D2C · green #80A475 · cream #F5F0E8 ── */
:root {
  --bg: #F5F0E8;
  --surface: #FFFFFF;
  --surface2: #EDE8DF;
  --border: rgba(0,0,0,0.08);
  --text: #1a1a1a;
  --muted: #6a8564;
  --primary: #CD2D2C;
  --primary-dim: rgba(205,45,44,0.1);
  --primary-dark: #a82220;
  --green: #80A475;
  --green-dim: rgba(128,164,117,0.15);
  --wa: #25D366;
  --radius: 16px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Loader ── */
#loader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 48px;
}

#loaderLogoWrap {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  opacity: 0;
}

#loaderLogo {
  width: 180px; height: 90px; object-fit: contain;
  background: #1a1a1a; border-radius: 12px; padding: 8px 16px;
}

.loader-tagline {
  font-size: 0.8rem; letter-spacing: 0.15em; color: var(--green);
  text-transform: uppercase;
}

#loaderChoice { opacity: 0; text-align: center; }

.choice-label {
  font-size: 0.85rem; color: var(--muted); margin-bottom: 20px;
  text-transform: uppercase; letter-spacing: 0.1em;
}

.choice-btns { display: flex; gap: 16px; }

.choice-btn {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: inherit; font-size: 0.9rem; font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
  min-width: 130px;
}

.choice-btn i { font-size: 1.6rem; }
.choice-btn:hover { border-color: rgba(0,0,0,0.15); background: var(--surface2); }
.choice-btn.primary { border-color: var(--primary); background: var(--primary-dim); color: var(--primary); }
.choice-btn.primary:hover { background: var(--primary); color: #fff; }

/* ── Header ── */
#header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(245,240,232,0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  height: 100%; display: flex; align-items: center; gap: 16px;
}

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; background: none; border: none;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.header-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0.1em;
}
.header-logo img {
  width: 110px; height: 44px; object-fit: contain;
  background: #1a1a1a; border-radius: 8px; padding: 4px 10px;
}

.desktop-nav {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.desktop-nav a {
  padding: 6px 12px; border-radius: 8px;
  font-size: 0.82rem; font-weight: 500; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.desktop-nav a:hover { color: var(--text); background: var(--surface2); }

.cart-btn {
  position: relative; margin-left: 8px;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background 0.2s;
}
.cart-btn:hover { background: var(--surface); }

.cart-badge {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Nav Drawer ── */
.nav-overlay {
  position: fixed; inset: 0; z-index: 199;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.nav-overlay.open { opacity: 1; pointer-events: all; }

.nav-drawer {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; z-index: 200;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex; flex-direction: column;
}
.nav-drawer.open { transform: translateX(0); }

.nav-drawer-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.drawer-logo { width: 40px; height: 40px; object-fit: contain; }
.drawer-name { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; flex: 1; }
.nav-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.1rem; }

.drawer-nav { padding: 12px 0; flex: 1; }
.drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: var(--muted);
  font-size: 0.9rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.drawer-link i { width: 18px; text-align: center; }
.drawer-link:hover { color: var(--text); background: var(--surface2); }

.drawer-footer {
  padding: 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.drawer-cart-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--wa); color: #fff;
  font-size: 0.85rem; font-weight: 600;
}
.drawer-social {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface2); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.drawer-social:hover { color: var(--text); background: var(--border); }

/* ── Hero ── */
.hero {
  position: relative; height: 90vh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?w=1600&q=80') center/cover no-repeat;
}

.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.7) 100%);
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center; padding: 0 24px;
  max-width: 700px;
}

.hero-sub {
  font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--green); font-weight: 600; margin-bottom: 16px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700; line-height: 1.1; margin-bottom: 20px;
}
.hero-title span {
  display: block; font-style: italic;
  background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1rem; color: rgba(255,255,255,0.75); margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 12px;
  background: rgba(255,255,255,0.1); color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
}
.btn-secondary:hover { background: rgba(255,255,255,0.18); }

.btn-wa {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 12px;
  background: var(--wa); color: #fff;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  transition: opacity 0.2s;
}
.btn-wa:hover { opacity: 0.9; }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.4); font-size: 0.9rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ── Branches Strip ── */
.branches-strip {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 20px;
}

.branch-card {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
}

.branch-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--primary-dim); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}

.branch-info { flex: 1; }
.branch-name { font-weight: 600; font-size: 0.9rem; }
.branch-address { font-size: 0.78rem; color: var(--muted); }

.branch-map {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px;
  background: var(--surface2); color: var(--muted);
  font-size: 0.8rem; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.branch-map:hover { color: var(--text); background: var(--border); }

/* ── Menu ── */
.menu-main { max-width: 1200px; margin: 0 auto; padding: 40px 20px 60px; }

.menu-section { margin-bottom: 64px; }

.section-header { margin-bottom: 28px; }

.section-title-wrap {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}

.section-emoji { font-size: 1.6rem; }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; font-weight: 700;
}

.section-line {
  height: 2px; background: linear-gradient(90deg, var(--primary) 0%, transparent 60%);
  border-radius: 2px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.menu-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  opacity: 0;
}
.menu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,0,0,0.12);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.card-img-wrap {
  aspect-ratio: 1; overflow: hidden; background: var(--surface2);
  position: relative;
}
.card-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.menu-card:hover .card-img-wrap img { transform: scale(1.06); }

.card-body { padding: 14px 14px 12px; }

.card-name {
  font-weight: 600; font-size: 0.9rem;
  margin-bottom: 4px; line-height: 1.3;
}

.card-desc {
  font-size: 0.75rem; color: var(--muted);
  line-height: 1.4; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}

.card-price {
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
}

.card-add-btn {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; transition: background 0.2s, transform 0.15s;
}
.card-add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

.card-qty {
  display: flex; align-items: center; gap: 8px;
}
.card-qty button {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; transition: background 0.2s;
}
.card-qty button:hover { background: var(--border); }
.card-qty span { font-size: 0.9rem; font-weight: 600; min-width: 16px; text-align: center; }

/* ── CTA Section ── */
.cta-section {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 80px 20px; text-align: center;
}

.cta-inner { max-width: 500px; margin: 0 auto; }
.cta-section h2 { font-family: 'Playfair Display', serif; font-size: 2rem; margin-bottom: 12px; }
.cta-section p { color: var(--muted); margin-bottom: 28px; }
.cta-section .btn-primary { margin-right: 12px; margin-bottom: 12px; }

/* ── Footer ── */
.footer {
  background: var(--surface2); padding: 48px 20px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center;
}

.footer-logo { width: 80px; height: 40px; object-fit: contain; margin: 0 auto 8px; background: #1a1a1a; border-radius: 8px; padding: 4px 10px; }
.footer-name { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; letter-spacing: 0.1em; }
.footer-tagline { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

.footer-links { display: flex; gap: 12px; }
.footer-social {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: transform 0.2s;
}
.footer-social:hover { transform: scale(1.1); }
.footer-social.wa { background: var(--wa); color: #fff; }
.footer-social.ig { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); color: #fff; }

.footer-copy { font-size: 0.75rem; color: var(--muted); }
.footer-powered { font-size: 0.72rem; color: var(--muted); }
.footer-powered a { color: var(--primary); font-weight: 600; }
.footer-powered a:hover { color: var(--primary-dark); }

/* ── Item Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.7);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.item-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 301; width: min(90vw, 460px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.item-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }

.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background 0.2s;
}
.modal-close:hover { background: rgba(0,0,0,0.7); }

.modal-img-wrap { aspect-ratio: 4/3; background: var(--surface2); overflow: hidden; }
.modal-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.modal-body { padding: 20px; }
.modal-category { font-size: 0.72rem; color: var(--green); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.modal-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.modal-price-row { margin-bottom: 20px; }
.modal-price { font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn-primary { flex: 1; justify-content: center; }
.modal-wa { background: var(--wa) !important; }
.modal-wa:hover { background: #1da851 !important; }

/* ── Cart Drawer ── */
.cart-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw); z-index: 401;
  background: var(--surface); border-left: 1px solid var(--border);
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.cart-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.1rem; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px; }

.cart-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 60px 0; color: var(--muted); text-align: center;
}
.cart-empty i { font-size: 2.5rem; }

.cart-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 52px; height: 52px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  background: var(--surface2);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; margin-bottom: 2px; }
.cart-item-price { font-size: 0.8rem; color: var(--primary); }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.cart-item-controls button {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--surface2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: background 0.2s;
}
.cart-item-controls button:hover { background: var(--border); }
.cart-item-controls span { font-size: 0.85rem; font-weight: 600; min-width: 20px; text-align: center; }

.cart-footer { padding: 16px 20px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-weight: 600; }
#cartTotal { color: var(--primary); font-size: 1.1rem; }
.full-width { width: 100%; justify-content: center; }

/* ── Branch Modal ── */
.branch-modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.branch-modal-overlay.open { opacity: 1; pointer-events: all; }

.branch-modal {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 501;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 24px;
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.branch-modal.open { transform: translateY(0); }

.branch-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.branch-modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.branch-modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

.branch-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px; border-radius: 14px;
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border); margin-bottom: 10px;
  transition: border-color 0.2s, background 0.2s;
  font-family: inherit;
}
.branch-option:hover { border-color: var(--wa); background: rgba(37,211,102,0.06); }
.branch-option i { font-size: 1.4rem; color: var(--wa); margin-left: auto; }
.branch-option-info { flex: 1; text-align: left; }
.branch-option-name { font-weight: 600; font-size: 0.9rem; }
.branch-option-addr { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ── Dine-in mode ── */
body.dine-in .cart-btn,
body.dine-in .drawer-cart-btn,
body.dine-in .card-add-btn,
body.dine-in .card-qty,
body.dine-in #modalAddToCart,
body.dine-in #heroCartBtn,
body.dine-in #ctaCartBtn,
body.dine-in .cart-drawer,
body.dine-in .cart-overlay { display: none !important; }
body.dine-in #modalDineInOrder { display: flex !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .desktop-nav { display: none; }
  .header-logo { margin: 0 auto; }
  .cart-btn { margin-left: 0; }

  .hero { height: 80vh; }
  .hero-title { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .menu-section { margin-bottom: 48px; }

  .cta-section { padding: 56px 20px; }

  .item-modal { width: 100vw; border-radius: 20px 20px 0 0; top: auto; bottom: 0; left: 0; transform: translateY(20px); }
  .item-modal.open { transform: translateY(0); }

  .modal-img-wrap { aspect-ratio: 16/9; }
}

@media (max-width: 400px) {
  .cards-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card-body { padding: 10px 10px 8px; }
  .card-name { font-size: 0.8rem; }
  .choice-btns { flex-direction: column; }
}
