/* ============================================================
   MENU.CSS — Cruste&Co dedicated styles for menu.html
   Self-contained: explicit colour values alongside CSS variables
   so this page is styled even if style.css fails to parse fully.
   ============================================================ */

/* ---------- PAGE FOUNDATION ---------- */
body {
  background-color: #F5E7D3; /* --color-secondary */
}

/* ---------- ACTIVE NAV LINK ---------- */
.nav-links .nav-link-active {
  color: #CDA875 !important; /* --color-accent */
}

.nav-links .nav-link-active::after {
  width: 100% !important;
  background: #CDA875 !important;
}

/* ---------- PAGE HEADER ---------- */
.menu-page-header {
  text-align: center;
  padding: 180px 24px 56px;
  background-color: #F5E7D3; /* --color-secondary */
}

.menu-page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 400;
  color: #583A16; /* --color-dark */
  margin-bottom: 16px;
  line-height: 1.15;
}

.menu-page-subtitle {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.05rem;
  color: #583A16; /* --color-text-light */
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ---------- LAYOUT GRID ---------- */
.menu-page-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.menu-sidebar {
  position: sticky;
  top: 140px;
  height: fit-content;
  padding: 48px 24px 48px 0;
  border-right: 1px solid #CDA875; /* --color-border */
  background-color: transparent;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav li {
  list-style: none;
}

.sidebar-link {
  display: block;
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #583A16; /* --color-text-light */
  padding: 10px 14px;
  border-radius: 8px; /* --radius-md */
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease;
  line-height: 1.4;
}

.sidebar-link:hover {
  color: #583A16; /* --color-primary */
  background-color: rgba(88, 58, 22, 0.06);
}

.sidebar-link.active {
  color: #583A16; /* --color-primary */
  background-color: rgba(205, 168, 117, 0.14);
  font-weight: 700;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.menu-content {
  padding: 48px 0 96px 52px;
  min-width: 0; /* prevent grid blowout */
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.menu-search-wrapper {
  position: relative;
  margin-bottom: 56px;
}

.menu-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #583A16;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.menu-search {
  width: 100%;
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.95rem;
  padding: 15px 24px 15px 52px;
  border: 1.5px solid #CDA875;
  border-radius: 100px;
  background-color: #F5E7D3; /* --color-white */
  color: #583A16; /* --color-text */
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 2px 8px rgba(88, 58, 22, 0.04);
}

.menu-search:focus {
  border-color: #CDA875;
  box-shadow: 0 0 0 3px rgba(205, 168, 117, 0.15);
}

.menu-search::placeholder {
  color: #583A16;
  opacity: 0.75;
}

/* Clear button default styling on search inputs */
.menu-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  width: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6A5A' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
  margin-right: 8px;
  opacity: 0.6;
}

/* ============================================================
   NO RESULTS
   ============================================================ */
.menu-no-results {
  display: none;
  text-align: center;
  padding: 56px 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-style: italic;
  color: #583A16;
}

.menu-no-results.visible {
  display: block;
}

/* ============================================================
   CATEGORY SECTIONS
   ============================================================ */
.menu-category {
  padding-bottom: 72px;
  margin-bottom: 72px;
  border-bottom: 1px solid #CDA875;
}

.menu-category:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.category-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 500;
  color: #583A16; /* --color-primary */
  margin-bottom: 40px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ============================================================
   SUB-CATEGORIES
   ============================================================ */
.menu-subcategory {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(205, 168, 117, 0.6);
}

.menu-subcategory:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.subcategory-label {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #CDA875; /* --color-accent */
  margin-bottom: 20px;
  margin-top: 0;
}

/* ============================================================
   ITEM LISTS
   ============================================================ */
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 3;
  column-gap: 36px;
}

.menu-item {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.94rem;
  color: #583A16; /* --color-dark */
  line-height: 1.65;
  padding: 6px 0;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transition: color 0.2s ease;
  cursor: default;
}

.menu-item:hover {
  color: #CDA875; /* --color-accent */
}

/* ============================================================
   PRICED ITEM ROWS (name + description + price)
   ============================================================ */
.item-list--priced {
  columns: 1;
}

.menu-item--priced {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(205, 168, 117, 0.2);
  cursor: default;
}

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

.menu-item--priced:hover .menu-item-name {
  color: #CDA875;
}

.menu-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-item-name {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.94rem;
  font-weight: 500;
  color: #583A16;
  transition: color 0.2s ease;
}

.menu-item-desc {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: #583A16;
  opacity: 0.6;
  line-height: 1.45;
}

.menu-item-price {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: #CDA875;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   DRINKS ADD-ONS FOOTNOTE
   ============================================================ */
.drinks-addons {
  display: block;
  margin-top: 32px;
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.82rem;
  font-style: italic;
  color: #583A16;
  padding: 13px 20px;
  background-color: rgba(205, 168, 117, 0.07);
  border-left: 2px solid #CDA875;
  border-radius: 0 4px 4px 0;
  line-height: 1.7;
}

/* ============================================================
   SANDWICH INTRO LINE
   ============================================================ */
.menu-category-intro {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #583A16;
  opacity: 0.65;
  margin-bottom: 24px;
}

/* ============================================================
   ALLERGEN NOTE
   ============================================================ */
.menu-allergen-note {
  text-align: center;
  padding: 32px 24px;
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-style: italic;
  color: #583A16;
  opacity: 0.5;
  border-top: 1px solid rgba(205, 168, 117, 0.3);
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .menu-page-wrapper {
    grid-template-columns: 180px 1fr;
  }

  .item-list {
    columns: 2;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  .menu-page-header {
    padding: 120px 24px 40px;
  }

  .menu-page-wrapper {
    display: block; /* stack sidebar above content */
    padding: 0;
  }

  /* ---- MOBILE: Sidebar becomes a pinned horizontal tab bar ---- */
  .menu-sidebar {
    position: sticky;
    top: 96px; /* sits flush below collapsed navbar */
    z-index: 100;
    background-color: #F5E7D3; /* --color-cream */
    border-right: none;
    border-bottom: 1px solid #CDA875;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* subtle shadow so it reads as a pinned bar */
    box-shadow: 0 2px 12px rgba(88, 58, 22, 0.06);
  }

  .menu-sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 10px 16px;
    width: max-content; /* allow scrolling past viewport */
  }

  .sidebar-link {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 7px 14px;
    border-radius: 100px;
    border: 1.5px solid #CDA875;
    background: transparent;
  }

  .sidebar-link:hover {
    background: rgba(88, 58, 22, 0.06);
    border-color: #583A16;
  }

  .sidebar-link.active {
    background-color: #583A16;
    color: #FFFFFF;
    border-color: #583A16;
    font-weight: 600;
  }

  /* ---- MOBILE: Content ---- */
  .menu-content {
    padding: 32px 24px 72px;
  }

  .menu-search-wrapper {
    margin-bottom: 40px;
  }

  .menu-category {
    padding-bottom: 48px;
    margin-bottom: 48px;
  }

  .item-list {
    columns: 1;
  }

  .category-title {
    margin-bottom: 28px;
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .menu-page-title {
    font-size: 2.2rem;
  }

  .menu-content {
    padding: 28px 20px 64px;
  }
}
