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

:root {
  --bg:        #f5f5f0;
  --surface:   #ffffff;
  --primary:   #999;
  --primary-h: #888;
  --text:      #1a1a1a;
  --muted:     #666;
  --border:    #e0e0e0;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,.08);
  --font:      'Segoe UI', system-ui, sans-serif;
}

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, #e0e0e0 25%, #ebebeb 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-tab {
  display: inline-block;
  width: 80px;
  height: 36px;
  border-radius: 20px;
  background: #e0e0e0;
}
.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: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.header-inner { max-width: 900px; margin: auto; display: flex; align-items: center; justify-content: flex-end; }
.brand { font-size: 1.3rem; font-weight: 700; letter-spacing: .5px; color: var(--text); }
.brand-bar {
  max-width: 900px; margin: 0 auto; padding: 14px 24px 0;
  text-align: center;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-nav-link {
  color: #fff; text-decoration: none; font-size: .95rem; font-weight: 600;
  padding: 6px 14px; border: 2px solid rgba(255,255,255,.6); border-radius: 6px;
  transition: background .2s, border-color .2s; white-space: nowrap;
}
.header-nav-link:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* ─── Language Switcher ──────────────────────────────────────────────────── */
.lang-switcher { display: flex; gap: 6px; }
.lang-btn {
  background: transparent; border: 2px solid transparent; border-radius: 6px;
  font-size: 1.5rem; cursor: pointer; padding: 2px 6px; line-height: 1;
  transition: border-color .2s, opacity .2s; opacity: .6;
  display: inline-flex; align-items: center; justify-content: center;
}
.lang-btn img { display: block; border-radius: 2px; }
.lang-btn.active { border-color: #fff; opacity: 1; }
.lang-btn:hover { opacity: 1; }

/* ─── 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: 900px; margin: 32px auto; padding: 0 16px 64px; }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.tab-btn {
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s;
}
.tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── 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;
  }
}
