/*
Theme Name: Beurre Patisserie
Template: bite
Description: Custom Beurre Patisserie Child Theme
Author: GNDN
Version: 2.3.1
Text Domain: bite
*/

/* =Menu list ============================================================ */
.beurre-menu-list {
  column-count: 1;
  column-gap: 2.5rem;
}

/* Section headings */
.beurre-section-title {
  font-weight: 700;
  line-height: 1.2;
  margin: 2rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #222;
  text-transform: uppercase;
  break-after: avoid;
  -webkit-column-break-after: avoid;
  page-break-after: avoid;
}
.beurre-section-title.depth-0 {
  border-bottom: 2px solid #222;
}
.beurre-section-title.depth-1 {
  color: #777;
  font-weight: 400;
  border-bottom: 1px solid #777;
}
.beurre-section-title.depth-2 {
  color: #aaa;
  font-weight: 400;
  font-size: 1rem;
  border-bottom: 1px solid #aaa;
}

/* Optional term description under headings */
.beurre-section-desc {
  margin: 0.25rem 0 1rem;
  opacity: 0.85;
  text-transform: uppercase;
}

/* Items and lists */
.beurre-menu-sublist {
  break-inside: avoid;
}

/* FIXED: Menu item structure with proper clearing */
.menu-item {
  break-inside: avoid;
  margin: 0 0 1.2rem;
  clear: both;
  display: block;
}
.menu-item::after {
  content: "";
  display: table;
  clear: both;
}

.menu-item-title {
  margin: 0 0 0.15rem;
  font-weight: 600;
  text-transform: uppercase;
  display: block;
}

/* FIXED: Description must be block-level and clear floats */
.menu-item-desc {
  margin: 0 0 0.25rem;
  opacity: 0.85;
  text-transform: uppercase;
  display: block;
  clear: both;
  width: 100%;
}

/* Depth-2 items (smaller titles for sub-subcategories) */
.depth-2 .menu-item-title {
  font-size: 0.95rem;
  font-weight: 600;
}

/* Column break logic */
.beurre-term.depthwrap-0 {
  break-before: column;
  -webkit-column-break-before: always;
  page-break-before: always;
}

.beurre-term.depthwrap-1 {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.beurre-term.depthwrap-1 > .beurre-section-title {
  break-after: avoid;
  -webkit-column-break-after: avoid;
  page-break-after: avoid;
}

.beurre-term.depthwrap-2,
.beurre-term.depthwrap-3 {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.beurre-menu-sublist {
  break-before: avoid;
  -webkit-column-break-before: avoid;
  page-break-before: avoid;
}


/* ======================================================================= */
/* ✅ FIX: ALLERGEN POSITIONING                                            */
/* ======================================================================= */

.menu-item-allergens {
  clear: both !important;
  display: block !important;
  float: none !important;
  margin-top: 0.35rem;
  width: 100%;
  position: relative;
}

.menu-item-allergens .allergen-label {
  display: inline-block;
  font-weight: 600;
  color: #8f8f8f;
  margin-right: 4px;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.menu-item-allergens .allergen-link {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  text-decoration: none;
}

.menu-item-allergens .beurre-allergen {
  display: inline-block;
  line-height: 1;
}

.menu-item-allergens .beurre-allergen svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ======================================================================= */
/* END FIX                                                                 */
/* ======================================================================= */


/* Spotlight variant (featured menu list) */
.beurre-spotlight {
  text-align: center;
}
.beurre-spotlight .menu-item-title {
  color: #fff;
}
.beurre-spotlight .menu-item-desc {
  color: #fff;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .beurre-spotlight {
    padding: 0 1rem;
  }
}

body.home .beurre-spotlight .beurre-section-title {
  display: none;
}

/* Allergen matrix styles */
.beurre-allergen-matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.beurre-allergen-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}
.beurre-allergen-matrix th,
.beurre-allergen-matrix td {
  border-bottom: 1px solid #e9e4db;
  border-right: 1px solid #e9e4db;
  padding: 0.65rem 0.6rem;
  vertical-align: middle;
}
.beurre-allergen-matrix th:first-child,
.beurre-allergen-matrix td:first-child {
  border-left: 1px solid #e9e4db;
}
.beurre-allergen-matrix tr:nth-child(even) td {
  background: #f7f5ef;
}
.beurre-allergen-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #231a15;
  color: #fff;
}
.beurre-allergen-matrix .dish-head {
  min-width: 16rem;
}
.beurre-allergen-matrix .head-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.beurre-allergen-matrix .head-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
}
.beurre-allergen-matrix .head-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}
.beurre-allergen-matrix .dish-cell {
  font-weight: 600;
  background: #fbfaf7;
  color: #222 !important;
}
.beurre-allergen-matrix .tick-cell {
  text-align: center;
  color: #9a8f82;
  font-weight: 600;
}

/* Utility: Allergen icon wrapper */
.beurre-allergen {
  display: inline-flex;
  line-height: 1;
}

@media (min-width: 769px) {
  .beurre-allergen-matrix-wrap {
    overflow-x: visible;
  }
  .beurre-allergen-matrix .dish-head,
  .beurre-allergen-matrix .dish-cell {
    position: static;
    z-index: auto;
  }
  .beurre-menu-list {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .beurre-allergen-matrix .dish-head,
  .beurre-allergen-matrix .dish-cell {
    position: sticky;
    left: 0;
    z-index: 15;
    background: #fbfaf7;
    min-width: 8rem;
    max-width: 8rem;
    white-space: normal;
    font-size: 0.9rem;
  }
  .beurre-allergen-matrix .head-label {
    font-size: 0.7rem;
    line-height: 1.1;
  }
  .beurre-allergen-matrix .head-icon svg {
    width: 1.2rem;
    height: 1.2rem;
  }

