/* =============================================
   SINGLE RESTAURANT / MENU PAGE
   ============================================= */

.restaurant-hero {
  position: relative;
  height: 300px;
  background: var(--color-bg-3);
  overflow: hidden;
}

@media (max-width: 767px) {
  .restaurant-hero {
    height: 220px;
  }
}

.restaurant-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restaurant-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

.restaurant-hero-content {
  position: absolute;
  bottom: var(--space-6);
  left: var(--space-6);
  right: var(--space-6);
  color: white;
}

.restaurant-hero-name {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-2);
}

@media (max-width: 767px) {
  .restaurant-hero-name {
    font-size: var(--text-2xl);
  }
}

.restaurant-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.restaurant-info-bar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}

.restaurant-info-grid {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.restaurant-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-2);
}

.restaurant-info-item strong {
  color: var(--color-text);
}

/* Sticky Category Tabs */
.menu-sticky-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 90;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.menu-tabs-scroll {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.menu-tabs-scroll::-webkit-scrollbar { display: none; }

.menu-tab {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: block;
  min-height: 48px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}

.menu-tab:hover,
.menu-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

/* Menu Layout */
.menu-page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-8);
  align-items: start;
  padding-block: var(--space-8);
}

@media (max-width: 991px) {
  .menu-page-layout {
    grid-template-columns: 1fr;
  }

  .menu-sidebar {
    display: none;
  }
}

/* Menu Sections (Accordion) */
.menu-section {
  margin-bottom: var(--space-8);
  scroll-margin-top: calc(var(--header-height) + 60px);
}

.menu-section-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}

.menu-item-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.menu-item-card:last-child {
  border-bottom: none;
}

.menu-item-info {
  flex: 1;
}

.menu-item-name {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

.menu-item-desc {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.5;
}

/* Accordion for long descriptions */
.menu-item-desc.accordion {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-item-desc.accordion.expanded {
  display: block;
}

.accordion-toggle {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 4px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}

.menu-item-price {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
  margin-right: var(--space-3);
}

.menu-item-add {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  cursor: pointer;
  border: none;
}

.menu-item-add:hover {
  background: var(--color-primary-dark);
  transform: scale(1.1);
}

.menu-item-add:active {
  transform: scale(.95);
}

/* Sidebar on menu page */
.menu-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 60px + var(--space-4));
}

.menu-sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.sidebar-card-title {
  font-weight: 700;
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

/* =============================================
   TFF MENU TABLE (real <table> markup for SEO,
   styled to look like cards — see tff_get_menu_by_tab)
   ============================================= */

.tff-menu-type-tabs { margin-bottom: var(--space-5); }

.tff-menu-table,
.tff-menu-table tbody { display: block; width: 100%; }

.tff-menu-table tr.menu-item-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.tff-menu-table tr.menu-item-card:last-child { border-bottom: none; }
.tff-menu-table td { display: block; }

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

.tff-popular-flag {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-accent-dark);
  margin-left: var(--space-2);
}

.menu-item-tags { display: flex; gap: var(--space-2); margin-top: var(--space-2); flex-wrap: wrap; }
.tff-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-3);
  color: var(--color-text-2);
  text-transform: capitalize;
}

.menu-item-cal { font-size: var(--text-xs); color: var(--color-text-3); margin-top: var(--space-1); }

.menu-item-action { flex-shrink: 0; }
