/* ===== CSS VARIABLES — LIGHT MODE (default) ===== */
:root {
  /* Brand (same in both modes) */
  --terracotta: #c0522a;
  --rust: #a8441f;
  --gold: #d4a847;

  /* Surfaces */
  --cream: #faf7f2;
  --off-white: #f5f0e8;
  --card-bg: #ffffff;
  --card-bg-alt: #ffffff;

  /* Nav / drawer */
  --nav-bg: var(--cream);
  --drawer-bg: var(--cream);

  /* Text */
  --text-dark: #2c1a0e;
  --text-mid: #5a3e2b;
  --text-light: #8c6e55;

  /* Borders & shadows */
  --border: #e0d5c5;
  --shadow: rgba(61, 35, 20, 0.08);

  /* Section heading color */
  --heading: #3d2314;

  /* Hover row */
  --row-hover: #fdf9f4;

  /* Input bg */
  --input-bg: #faf7f2;

  /* Menu app body */
  --menu-body-bg: #f2ede6;
  --back-bar-bg: #ffffff;

  /* Misc */
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --cream: #141010;
  --off-white: #1e1815;
  --card-bg: #1e1815;
  --card-bg-alt: #251d1a;

  --text-dark: #f0e8df;
  --text-mid: #c4a98c;
  --text-light: #8c7a6b;

  --border: #3a2e28;
  --shadow: rgba(0, 0, 0, 0.35);

  --heading: #f0e8df;

  --row-hover: #2a2018;

  --input-bg: #2a2018;

  --menu-body-bg: #141010;
  --back-bar-bg: #1e1815;

  --nav-bg: var(--cream);
  --drawer-bg: var(--cream);
}

/* Remove old --brown used as page bg (nav always uses --nav-bg) */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  transition: background 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }


/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--nav-bg); padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
body { padding-top: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; color: var(--text-dark); }
.nav-brand .logo-text { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.5px; }
.nav-brand .tagline-text { font-size: 0.7rem; color: var(--gold); letter-spacing: 1px; text-transform: uppercase; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-mid); font-size: 0.9rem; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; transition: var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--terracotta); border-bottom-color: var(--terracotta); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-dark); margin: 5px 0; border-radius: 2px; }

/* ── Dark mode toggle ── */
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gold);
  transition: all 0.2s ease;
  padding: 0;
}
.theme-btn:hover { background: rgba(212, 168, 71, 0.1); }
[data-theme="dark"] .theme-btn {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
[data-theme="dark"] .theme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.theme-toggle-icon { display: flex; align-items: center; justify-content: center; }

/* nav right cluster */
.nav-right { display: flex; align-items: center; gap: 1rem; }

/* ── Drawer ── */
.drawer-overlay { display: none; position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,0.55); backdrop-filter: blur(2px); }
.drawer-overlay.open { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200;
  width: min(75vw, 300px); background: var(--drawer-bg);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -6px 0 32px rgba(0,0,0,0.4);
}
.drawer.open { transform: translateX(0); }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.drawer-close { background: transparent; border: none; border-radius: 50%; width: 32px; height: 32px; color: var(--text-dark); font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.drawer-close:hover { background: var(--row-hover); }
.drawer-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.drawer-link { display: flex; align-items: center; gap: 14px; padding: 14px 20px; color: var(--text-mid); font-size: 1rem; font-weight: 500; text-decoration: none; border-left: 3px solid transparent; transition: background 0.15s, color 0.15s; }
.drawer-link:hover { background: var(--row-hover); color: var(--terracotta); }
.drawer-link.active { color: var(--terracotta); border-left-color: var(--terracotta); background: var(--row-hover); }
.drawer-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.drawer-footer p { color: var(--text-light); font-size: 0.78rem; margin-bottom: 2px; }

/* ===== FOOTER ===== */
.footer { background: var(--nav-bg); color: var(--text-dark); padding: 3rem 2rem 1.5rem; margin-top: 0; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.footer h4 { color: var(--terracotta); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 1rem; }
.footer p, .footer a { font-size: 0.9rem; color: var(--text-mid); line-height: 1.8; }
.footer a:hover { color: var(--gold); }
.footer-bottom { max-width: 1200px; margin: 1.5rem auto 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text-light); flex-wrap: wrap; gap: 0.5rem; }

/* ===== BUTTONS ===== */
.btn-primary { display: inline-block; padding: 14px 36px; background: var(--terracotta); color: #fff; border-radius: 50px; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.5px; transition: var(--transition); border: 2px solid var(--terracotta); }
.btn-primary:hover { background: var(--rust); border-color: var(--rust); transform: translateY(-1px); }
.btn-outline { display: inline-block; padding: 12px 30px; background: transparent; color: var(--terracotta); border: 2px solid var(--terracotta); border-radius: 50px; font-weight: 600; font-size: 0.9rem; transition: var(--transition); }
.btn-outline:hover { background: var(--terracotta); color: #fff; }

/* ===== SECTIONS ===== */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 800; color: var(--heading); margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-light); font-size: 0.95rem; margin-bottom: 2.5rem; }
.section-divider { width: 50px; height: 3px; background: var(--terracotta); border-radius: 2px; margin: 0.75rem 0 2rem; }

/* ===== CARDS ===== */
.concepts-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 1.5rem; margin-top: 2rem; }
.concept-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; border: 1px solid var(--border); box-shadow: 0 2px 12px var(--shadow); transition: var(--transition); }
.concept-card:hover { transform: translateY(-3px); box-shadow: 0 6px 24px var(--shadow); }
.concept-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.concept-card h3 { font-size: 0.85rem; font-weight: 700; color: var(--heading); }

.offers-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1.25rem; }
.offer-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; border-left: 4px solid var(--terracotta); box-shadow: 0 2px 12px var(--shadow); transition: var(--transition); }
.offer-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px var(--shadow); }
.offer-card h3 { font-size: 1rem; font-weight: 700; color: var(--heading); margin-bottom: 0.4rem; }
.offer-card p { font-size: 0.88rem; color: var(--text-mid); }

/* ===== MENU ===== */
.menu-layout { display: flex; gap: 2rem; max-width: 1400px; margin: 0 auto; padding: 2rem; }
.menu-sidebar { width: 230px; flex-shrink: 0; position: sticky; top: 80px; height: calc(100vh - 84px); overflow-y: auto; background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 1rem 0; }
.menu-sidebar::-webkit-scrollbar { width: 4px; }
.menu-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-cat { display: block; padding: 8px 18px; font-size: 0.88rem; color: var(--text-mid); cursor: pointer; transition: var(--transition); border-left: 3px solid transparent; text-decoration: none; }
.sidebar-cat:hover, .sidebar-cat.active { color: var(--terracotta); background: var(--off-white); border-left-color: var(--terracotta); }
.menu-content { flex: 1; min-width: 0; }
.menu-filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; background: var(--card-bg); border-radius: var(--radius); padding: 1rem 1.25rem; border: 1px solid var(--border); margin-bottom: 2rem; position: sticky; top: 68px; z-index: 50; box-shadow: 0 2px 8px var(--shadow); }
.search-input { flex: 1; min-width: 200px; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-dark); font-size: 0.9rem; outline: none; }
.search-input:focus { border-color: var(--terracotta); }
.veg-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-mid); cursor: pointer; user-select: none; }
.veg-toggle input { accent-color: #4caf50; width: 16px; height: 16px; cursor: pointer; }

.cat-section { margin-bottom: 3.5rem; scroll-margin-top: 180px; }
.cat-section h2 { font-size: 1.3rem; font-weight: 800; color: var(--heading); padding-bottom: 0.5rem; border-bottom: 2px solid var(--border); margin-bottom: 1rem; display: flex; align-items: center; gap: 10px; }
.cat-count { font-size: 0.75rem; color: var(--text-light); font-weight: 400; }
.menu-items-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 1rem; }
.menu-item-card { background: var(--card-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: var(--transition); display: flex; flex-direction: column; }
.menu-item-card:hover { box-shadow: 0 4px 20px var(--shadow); transform: translateY(-2px); }
.menu-item-card.unavailable { opacity: 0.55; }
.item-image { height: 160px; background: var(--off-white); position: relative; overflow: hidden; }
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--border); }
.item-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 0.3rem; }
.item-name { font-size: 0.95rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.badge-veg { flex-shrink: 0; background: #1a3d1e; color: #7dcc85; border: 1px solid #2a5c30; border-radius: 4px; font-size: 0.65rem; font-weight: 700; padding: 2px 6px; letter-spacing: 0.5px; }
[data-theme="dark"] .badge-veg { background: #1a3d1e; color: #7dcc85; border-color: #2a5c30; }
.item-desc { font-size: 0.82rem; color: var(--text-light); margin-bottom: 0.75rem; line-height: 1.5; flex: 1; }
.item-price { font-size: 0.9rem; font-weight: 700; color: var(--terracotta); }
.price-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.price-entry { display: flex; flex-direction: column; }
.price-label { font-size: 0.7rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.price-val { font-size: 0.95rem; font-weight: 700; color: var(--terracotta); }
.unavailable-tag { margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-light); background: var(--off-white); border-radius: 4px; padding: 3px 8px; display: inline-block; }

/* ===== VIEW TOGGLE ===== */
.view-toggle { display: flex; gap: 2px; background: var(--off-white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px; margin-left: auto; }
.view-btn { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border: none; background: none; border-radius: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text-light); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.view-btn:hover { color: var(--text-dark); background: rgba(128,64,0,0.07); }
.view-btn.active { background: var(--card-bg); color: var(--terracotta); box-shadow: 0 1px 4px var(--shadow); }
.view-btn svg { flex-shrink: 0; }

/* ===== LIST VIEW ===== */
.menu-items-list { display: flex; flex-direction: column; }
.menu-item-row { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--card-bg); border-bottom: 1px solid var(--border); transition: var(--transition); }
.menu-item-row:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.menu-item-row:last-child  { border-bottom: none; border-radius: 0 0 var(--radius) var(--radius); }
.menu-item-row:only-child  { border-radius: var(--radius); }
.menu-item-row:hover { background: var(--row-hover); }
.menu-item-row.unavailable { opacity: 0.55; }
.row-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--off-white); }
.row-img-placeholder { width: 56px; height: 56px; border-radius: 8px; background: var(--off-white); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.row-info { flex: 1; min-width: 0; }
.row-name { font-size: 0.92rem; font-weight: 700; color: var(--heading); line-height: 1.3; }
.row-desc { font-size: 0.78rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.row-price { text-align: right; flex-shrink: 0; }
.row-price .price-val { font-size: 0.9rem; font-weight: 700; color: var(--terracotta); }
.row-price .price-label { font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; }
.row-price .price-row { flex-direction: column; align-items: flex-end; gap: 2px; }
.row-badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }

/* ===== COMPACT VIEW ===== */
.menu-items-compact { display: flex; flex-direction: column; }
.compact-item { display: flex; align-items: baseline; justify-content: space-between; padding: 7px 12px; background: var(--card-bg); border-bottom: 1px solid var(--border); gap: 0.75rem; transition: var(--transition); }
.compact-item:first-child { border-radius: var(--radius) var(--radius) 0 0; background: var(--off-white); }
.compact-item:last-child { border-bottom: none; border-radius: 0 0 var(--radius) var(--radius); }
.compact-item:only-child { border-radius: var(--radius); }
.compact-item:hover { background: var(--row-hover); }
.compact-item.unavailable { opacity: 0.5; }
.compact-left { display: flex; align-items: baseline; gap: 7px; min-width: 0; flex: 1; }
.compact-name { font-size: 0.88rem; font-weight: 600; color: var(--heading); }
.compact-desc { font-size: 0.75rem; color: var(--text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.compact-dots { flex: 1; border-bottom: 1px dotted var(--border); min-width: 20px; margin: 0 6px 3px; }
.compact-price { font-size: 0.85rem; font-weight: 700; color: var(--terracotta); white-space: nowrap; flex-shrink: 0; }
.badge-unavail-sm { font-size: 0.65rem; color: var(--text-light); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); margin-bottom: 0.4rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--input-bg); color: var(--text-dark); font-size: 0.9rem; outline: none; transition: border-color var(--transition); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--terracotta); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-success { display: none; background: #1a3d1e; color: #7dcc85; border-radius: var(--radius-sm); padding: 1rem; font-size: 0.9rem; margin-top: 1rem; }

/* ===== MISC COMPONENTS ===== */
.cat-dropdown-wrap { display: none; margin-bottom: 1.5rem; }
.cat-dropdown { width: 100%; padding: 10px 14px; background: var(--card-bg); color: var(--text-dark); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.9rem; outline: none; }
.milestone { background: var(--card-bg); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; border: 1px solid var(--border); box-shadow: 0 2px 12px var(--shadow); }
.milestone .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.milestone strong { display: block; font-size: 1.5rem; color: var(--terracotta); margin-bottom: 0.25rem; }
.milestone span { font-size: 0.85rem; color: var(--text-light); }
.branch-card { background: var(--card-bg); border-radius: var(--radius); padding: 1.75rem; border: 1px solid var(--border); box-shadow: 0 2px 12px var(--shadow); }
.branch-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--heading); margin-bottom: 0.3rem; }
.branch-card .address { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0.75rem; }
.branch-card .phone { font-size: 0.95rem; font-weight: 600; color: var(--terracotta); margin-bottom: 1rem; }
.btn-directions { display: inline-block; padding: 8px 18px; background: var(--off-white); color: var(--text-dark); border-radius: 50px; font-size: 0.82rem; font-weight: 600; border: 1px solid var(--border); transition: var(--transition); }
.btn-directions:hover { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.contact-form-wrap { max-width: 600px; background: var(--card-bg); border-radius: var(--radius); padding: 2rem; border: 1px solid var(--border); box-shadow: 0 2px 12px var(--shadow); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: 1.5rem; margin-bottom: 3rem; }

/* ===== LOADER ===== */
.loading { display: flex; align-items: center; justify-content: center; padding: 3rem; color: var(--text-light); font-size: 0.9rem; gap: 10px; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--terracotta); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.no-results { text-align: center; padding: 3rem; color: var(--text-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .menu-sidebar { display: none; }
  .cat-dropdown-wrap { display: block; }
  .menu-layout { padding: 1rem; }
  .menu-items-grid { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .menu-items-grid { grid-template-columns: 1fr; }
  .section { padding: 3rem 1rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .view-btn { padding: 5px 8px; font-size: 0.75rem; }
  .view-toggle { margin-left: 0; }
  .menu-filters { flex-wrap: wrap; }
  .row-desc { max-width: 160px; }
  .compact-desc { max-width: 120px; }
}
