/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f4f4f1;
  --surface:   #ffffff;
  --primary:   #999;
  --primary-h: #888;
  --text:      #1a1a1a;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --radius:    12px;
  --shadow:    0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.06);
  --font:      'Segoe UI', system-ui, -apple-system, sans-serif;
  --header-height: 64px;
  --header-text-color: #fff;
  --btn-text-color:    #fff;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ─── Theme transition: 2s fade from grey defaults to real colors ────────── */
.theme-fade .site-header,
.theme-fade .tab-btn,
.theme-fade .tab-btn.active,
.theme-fade .subcategory-heading,
.theme-fade .extras-panel-heading,
.theme-fade .menu-item-price,
.theme-fade .print-category-heading,
.theme-fade .header-nav-link,
.theme-fade .contact-info-item a {
  transition: background-color 2s ease, color 2s ease, border-color 2s ease;
}

/* ─── Skeleton loading placeholders ──────────────────────────────────────── */
.skeleton-block {
  background: linear-gradient(90deg, #e8e8e4 25%, #f0f0ec 50%, #e8e8e4 75%);
  background-size: 800px 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-tab {
  display: inline-block;
  width: 80px;
  height: 32px;
  border-radius: 20px;
  background: #e5e5e0;
}
.skeleton-line {
  height: 14px;
  background: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 8px;
}
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
.skeleton-line.w40 { width: 40%; }
@keyframes skeleton-shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position: 800px 0; }
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: var(--header-text-color, #fff);
  height: var(--header-height);
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.04);
}
.header-inner { max-width: 1280px; margin: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 1.6rem; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.brand-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 16px;
  text-align: center;
}
.header-nav-link {
  color: var(--nav-link-color, #fff); text-decoration: none; font-size: .875rem; font-weight: 600;
  padding: 7px 18px; border: 2px solid var(--nav-link-border, rgba(255,255,255,.5)); border-radius: 100px;
  transition: background .18s cubic-bezier(.4,0,.2,1), border-color .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap; letter-spacing: .1px; display: inline-block;
}
.header-nav-link:hover { background: var(--nav-link-hover-bg, rgba(255,255,255,.18)); border-color: var(--nav-link-color, #fff); }

/* ─── Contact Info Bar ───────────────────────────────────────────────────── */
.contact-info-bar {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 20px; display: flex; flex-direction: column; gap: 8px;
  font-size: .9rem;
}
.contact-info-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.contact-info-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.contact-info-item a:hover { text-decoration: underline; }

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px 64px; }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 14px 20px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s, border-color .15s;
  white-space: nowrap;
  flex-shrink: 0;
  margin-bottom: -1px;
  line-height: 1;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Sticky tab wrapper for menu page */
.menu-tab-sticky {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  margin-bottom: 24px;
}

/* ─── Menu Display ───────────────────────────────────────────────────────── */
.menu-display {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ─── Subcategory Sections ───────────────────────────────────────────────── */
.subcategory-section {
  margin-top: 28px;
}
.subcategory-section:first-child {
  margin-top: 0;
}
.subcategory-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* ─── Two-Column Layout (extras + items) ─────────────────────────────────── */
.subcategory-columns {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* ─── Extras Panel (sidebar) ─────────────────────────────────────────────── */
.extras-panel {
  flex: 0 0 200px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.extras-panel-heading {
  font-size: .95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--border);
}
.extras-list {
  list-style: none;
}
.extras-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 5px 0;
  font-size: .88rem;
  border-bottom: 1px dotted var(--border);
}
.extras-list-item:last-child {
  border-bottom: none;
}
.extras-item-name {
  color: var(--text);
  font-weight: 500;
}
.extras-item-price {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  margin-left: 8px;
}

/* ─── Menu Item List ─────────────────────────────────────────────────────── */
.menu-item-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ─── Two-Column Item Layout ─────────────────────────────────────────────── */
.menu-item-list--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 24px;
}
@media (max-width: 600px) {
  .menu-item-list--two-col {
    grid-template-columns: 1fr;
  }
}

.menu-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--border);
  align-items: flex-start;
}
.menu-item:last-child {
  border-bottom: none;
}

.menu-item-img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.menu-item-info {
  flex: 1;
  min-width: 0;
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.menu-item-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.menu-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: .95rem;
  white-space: nowrap;
}

.menu-item-prices {
  display: flex;
  gap: 12px;
}

.menu-item-desc {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
  margin-right: 40px;
}

.menu-item-options {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.menu-item-option {
  font-size: .8rem;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── Placeholder / Error ────────────────────────────────────────────────── */
.placeholder-text {
  color: var(--muted);
  font-style: italic;
  font-size: .9rem;
  padding: 12px 0;
}
.error-text {
  color: #c0392b;
  font-size: .9rem;
  padding: 12px 0;
}
.tab-placeholder {
  color: var(--muted);
  font-style: italic;
  font-size: .9rem;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Print Category Heading (all-categories mode) ───────────────────────── */
.print-category-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}
.print-category-heading:first-child {
  margin-top: 0;
}

/* ─── Print Styles ───────────────────────────────────────────────────────── */
@media print {
  body { background: #fff; }
  .site-header, .lang-switcher, .header-nav-link, #contactInfoBar { display: none !important; }
  .brand-bar { padding: 0; margin-bottom: 16px; }
  .brand { font-size: 1.5rem; color: #000; }
  .container { margin: 0 auto; padding: 0 16px; max-width: 100%; }
  .menu-display { box-shadow: none; border: none; padding: 0; }
  .print-category-heading { page-break-after: avoid; }
  .subcategory-section { page-break-inside: avoid; }
  .menu-item { page-break-inside: avoid; }
  .menu-item-img { width: 80px; height: 80px; }
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .menu-display { padding: 20px 16px; }
  .subcategory-columns {
    flex-direction: column;
    gap: 16px;
  }
  .extras-panel {
    flex: none;
    width: 100%;
  }
  .menu-item-img {
    width: 96px;
    height: 96px;
  }
  .menu-item-desc {
    margin-right: 0;
  }
}
