
/* Page Configuration - Cafe Menu Page */
:root {
  /* Header Settings (same for all Bigalow pages) */
  --header-height: 112px;
  --header-height-mobile: 112px;

  /* Cafe Menu Hero Settings - Dramatic for menu impact */
  --hero-padding-top: 210px;  /* Extra space for dramatic effect */
  --hero-min-height: 65vh;    /* Tall hero for visual impact */

  /* Sticky Navigation Settings - For menu categories */
  --sticky-nav-offset: 112px;    /* Nav sticks below header */
  --sticky-scroll-margin: 172px; /* 112px header + 60px nav */
}

/* Apply the configuration to hero */
.custom-hero-section {
  padding-top: var(--hero-padding-top);
  min-height: var(--hero-min-height);
  margin-top: calc(var(--header-height) * -1); /* Pull up for header overlay */
}

/* Apply sticky nav configuration */
.custom-floating-nav {
  top: var(--sticky-nav-offset);
}

/* Scroll margin for sections */
section[id] {
  scroll-margin-top: var(--sticky-scroll-margin);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .custom-hero-section {
    margin-top: 0;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .custom-hero-content {
    padding-top: var(--header-height-mobile);
    padding-bottom: 2rem;
  }
}


  /* Universal Menu Styles - Symmetric Cards with Optional Images */

  /* Global Image Reset - Prevents images from breaking layout */
  #custom-menu-page img {
    max-width: 100%;
    height: auto;
  }

  #custom-menu-page {
    min-height: 100vh;
    background: var(--white);
    /* Removed overflow-x: hidden as it can break sticky positioning */
  }

  /* Hero Section */
  .custom-menu-hero {
    position: relative;
    height: var(--hero-min-height);
    min-height: 300px;
    padding-top: var(--hero-padding-top);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: calc(var(--header-height) * -1);
  }

  .custom-menu-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .custom-menu-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: 100%;
    display: block;
  }

  .custom-menu-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
      var(--brand-primary, #F36F21) 0%,
      var(--brand-dark, #D85A1A) 100%);
  }

  .custom-menu-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
  }

  .custom-menu-hero-title {
    font-size: 3rem; /* Slightly smaller for better proportion */
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--white);
  }

  .custom-menu-hero-subtitle {
    font-size: 1.15rem; /* Slightly smaller for better hierarchy */
    opacity: 0.95;
  }

  /* Sticky Navigation - NO UNDERLINES */
  .custom-menu-nav {
    background: var(--white);
    border-bottom: 2px solid var(--gray-light);
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 112px; /* Direct value to ensure it works */
    z-index: 10; /* Reduced from 100 to stay below header dropdowns */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 60px;
    width: 100%;
    overflow-x: auto; /* Enable horizontal scrolling on the nav itself */
    scrollbar-width: thin; /* Show thin scrollbar for better UX */
    -ms-overflow-style: auto;
    display: flex;
    justify-content: center; /* Center the inner container */
  }

  /* Optional: Style the scrollbar */
  .custom-menu-nav::-webkit-scrollbar {
    height: 4px;
  }

  .custom-menu-nav::-webkit-scrollbar-track {
    background: var(--gray-light);
  }

  .custom-menu-nav::-webkit-scrollbar-thumb {
    background: var(--brand-primary);
    border-radius: 2px;
  }

  .custom-menu-nav-inner {
    display: flex;
    gap: 0;
    padding: 0 1rem; /* Add some padding on the sides */
    align-items: center;
    height: 100%;
    max-width: 1200px; /* Limit max width */
    margin: 0 auto; /* Center within the nav */
    justify-content: center; /* Center items when they don't fill width */
  }

  .custom-menu-nav-item {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-dark);
    text-decoration: none !important; /* No underlines */
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem; /* Slightly larger for better readability */
  }

  .custom-menu-nav-item:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    text-decoration: none !important; /* No underlines on hover */
  }

  .custom-menu-nav-item.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
    background: var(--brand-light);
    text-decoration: none !important; /* No underlines when active */
  }

  .custom-menu-nav-item i {
    font-size: 1.1rem;
  }

  /* Menu Container */
  .custom-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
  }

  /* Menu Sections */
  .custom-menu-section {
    margin-bottom: 4rem;
    scroll-margin-top: var(--sticky-scroll-margin);
  }

  .custom-menu-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
  }

  .custom-menu-section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
  }

  .custom-menu-section-desc {
    font-size: 1.1rem;
    color: var(--gray-medium);
  }

  /* Menu Grid - Symmetric Cards */
  .custom-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  /* Menu Items - Card Style */
  .custom-menu-item {
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards are same height */
  }

  .custom-menu-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-4px);
  }

  /* Featured Item */
  .custom-menu-item.featured {
    border-color: var(--brand-primary);
    border-width: 2px;
  }

  /* No Image Placeholder */
  .custom-menu-item-no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
    color: var(--brand-primary);
    font-size: 3rem;
  }

  /* Badge */
  .custom-menu-item-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--brand-primary);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* Content Section */
  .custom-menu-item-content {
    padding: 1.25rem;
    flex: 1; /* Takes remaining space */
    display: flex;
    flex-direction: column;
  }

  .custom-menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    gap: 1rem;
  }

  .custom-menu-item-name {
    font-size: 1.125rem !important; /* Larger - 18px */
    font-weight: 600;
    color: var(--gray-dark);
    flex: 1;
    margin: 0 !important;
    min-height: 2.5em; /* Reserves space for 2 lines of text */
    line-height: 1.4;
    display: flex;
    align-items: flex-start; /* Aligns text to top of reserved space */
  }

  /* Specifically target h3 elements inside menu items */
  h3.custom-menu-item-name {
    font-size: 1.125rem !important; /* Override h3 default size - 18px */
    margin: 0 !important;
    font-weight: 600 !important;
  }

  .custom-menu-item-price {
    font-size: 1.05rem !important; /* Good size - 16.8px */
    font-weight: 700;
    color: var(--brand-primary);
    white-space: nowrap;
  }

  .custom-menu-item-desc {
    color: var(--gray-medium);
    font-size: 0.9rem !important; /* Better readability - 14.4px */
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1; /* Pushes tags to bottom */
  }

  /* Menu Tags */
  .custom-menu-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto; /* Pushes to bottom of card */
  }

  .custom-menu-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--gray-light);
    color: var(--gray-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .custom-menu-tag.vegetarian {
    background: #e8f5e9;
    color: #2e7d32;
  }

  .custom-menu-tag.gluten-free {
    background: #fff3e0;
    color: #e65100;
  }

  .custom-menu-tag.vegan {
    background: #f3e5f5;
    color: #6a1b9a;
  }

  /* Custom Options for Bigalow Menu */
  .custom-menu-item-options {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
  }

  .custom-options-label,
  .custom-add-on-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
  }

  .custom-flavor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.25rem;
  }

  .custom-menu-add-ons {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-light);
  }

  .custom-add-on-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .custom-add-on-item {
    background: var(--accent, #FFA500);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
  }

  /* Menu Footer */
  .custom-menu-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    border-top: 2px solid var(--gray-light);
    text-align: center;
  }

  .custom-menu-footer-text {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1rem;
  }

  .custom-menu-legend {
    color: var(--gray-dark);
  }

  .custom-menu-footer-note {
    color: var(--gray-medium);
    font-size: 0.9rem;
    font-style: italic;
  }

  /* Scroll Indicators for Navigation */
  /* Note: We removed position: relative from .custom-menu-nav to keep sticky working */

  /* Add gradient fade on edges to indicate scrollable content */
  .custom-menu-nav::before,
  .custom-menu-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 4px; /* Account for scrollbar */
    width: 20px;
    pointer-events: none;
    z-index: 10;
  }

  .custom-menu-nav::before {
    left: 0;
    background: linear-gradient(to right, var(--white), transparent);
  }

  .custom-menu-nav::after {
    right: 0;
    background: linear-gradient(to left, var(--white), transparent);
  }

  /* Mobile Responsive */
  @media (max-width: 768px) {
    .custom-menu-hero {
      margin-top: 0;
      padding-top: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .custom-menu-hero-content {
      padding-top: var(--header-height-mobile);
      padding-bottom: 2rem;
    }

    .custom-menu-hero-title {
      font-size: 2.5rem;
    }

    .custom-menu-hero-subtitle {
      font-size: 1rem;
    }

    .custom-menu-nav {
      top: 112px; /* Direct value for mobile */
      scrollbar-width: none; /* Hide scrollbar on mobile for cleaner look */
    }

    .custom-menu-nav::-webkit-scrollbar {
      display: none; /* Hide scrollbar on mobile */
    }

    .custom-menu-nav-item {
      padding: 0.875rem 1rem;
      font-size: 0.9rem;
    }

    .custom-menu-section {
      scroll-margin-top: var(--sticky-scroll-margin);
    }

    .custom-menu-section-title {
      font-size: 2rem;
    }

    .custom-menu-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

    .custom-menu-item-name {
      font-size: 1.05rem !important; /* Better size on mobile - 16.8px */
      min-height: 2.2em; /* Slightly smaller on mobile but still reserves space */
    }

    h3.custom-menu-item-name {
      font-size: 1.05rem !important; /* Override h3 on mobile - 16.8px */
    }

    .custom-menu-item-price {
      font-size: 1rem !important; /* Good size on mobile - 16px */
    }
  }

  /* Print Styles */
  @media print {
    .custom-menu-hero,
    .custom-menu-nav {
      display: none;
    }

    .custom-menu-section {
      page-break-inside: avoid;
    }

    .custom-menu-item {
      break-inside: avoid;
    }
  }
