/* Mac's Asados al Barril — menu.html */
:root {
  /* Fallback until menu.js measures the real sticky-head height and overrides this. */
  --sticky-stack-h: calc(var(--header-h) + 210px);
}

.menu-hero {
  background: var(--color-black);
  background-image: linear-gradient(180deg, rgba(20,16,13,0.85), rgba(20,16,13,0.94)), url('../img/fondo.jpg');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: var(--space-9) 0 var(--space-8);
  text-align: center;
}
.menu-hero .section-eyebrow { justify-content: center; }
.menu-hero .section-eyebrow::before { display: none; }
.menu-hero h1 { font-family: var(--font-script); font-weight: 400; font-size: var(--fs-3xl); margin-bottom: var(--space-3); text-transform: none; }
.menu-hero p { color: rgba(251, 243, 230, 0.78); max-width: 56ch; margin: 0 auto; }

/* ---------- Sede selector ---------- */
.sede-selector { padding: var(--space-8) 0 var(--space-9); }
.sede-selector-head { text-align: center; max-width: 620px; margin: 0 auto var(--space-7); }
.sede-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 860px) { .sede-grid { grid-template-columns: 1fr; max-width: 460px; } }

.sede-card {
  background: var(--color-white);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}
.sede-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.sede-card-photo { aspect-ratio: 4 / 3; overflow: hidden; display: block; position: relative; }
.sede-card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-base); }
.sede-card:hover .sede-card-photo img { transform: scale(1.06); }
.sede-card-body { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.sede-card-name { font-family: var(--font-script); font-weight: 400; font-size: var(--fs-2xl); color: var(--color-orange-deep); }
.sede-card-address { font-size: var(--fs-xs); color: var(--color-text-muted); }
.sede-card-hours { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); color: var(--color-text-muted); }
.sede-card-hours svg { width: 14px; height: 14px; flex-shrink: 0; }
.sede-card-badge { display: inline-flex; align-items: center; gap: var(--space-2); width: fit-content; font-size: var(--fs-xs); font-weight: 700; color: var(--color-success); background: rgba(63, 165, 100, 0.12); padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.sede-card-badge svg { width: 13px; height: 13px; }
.sede-card-cta { margin-top: auto; align-self: flex-start; }

/* ---------- Active sede menu ---------- */
.sede-menu-head {
  position: sticky; top: var(--header-h); z-index: 60;
  background: var(--color-cream);
  transition: top var(--transition-base);
}
/* Cuando el header se oculta al bajar, este bloque (tabs, buscador,
   categorías) sube a ocupar el espacio libre en vez de dejar un hueco. */
.site-header.is-hidden ~ main .sede-menu-head { top: 0; }
.sede-menu-head .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding-top: var(--space-4); padding-bottom: var(--space-4); }
.sede-menu-title { display: flex; align-items: center; gap: var(--space-4); }
.sede-menu-title h2 { font-family: var(--font-script); font-weight: 400; font-size: var(--fs-2xl); color: var(--color-orange-deep); }
.change-sede-btn { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); background: none; border: 1px solid rgba(122, 107, 91, 0.35); border-radius: var(--radius-pill); padding: 0.5rem 1rem; }
.change-sede-btn:hover { border-color: var(--color-orange); color: var(--color-orange-deep); }
.change-sede-btn svg { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .sede-menu-title { flex-direction: column; align-items: flex-start; gap: var(--space-2); width: 100%; }
  .change-sede-btn { white-space: nowrap; }
  .sede-menu-title h2 { font-size: var(--fs-xl); }
  .menu-toolbar { width: 100%; }
  .menu-search { flex: 1; }
  .menu-search input { min-width: 0; width: 100%; }
}

.menu-toolbar { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.menu-search { position: relative; }
.menu-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--color-text-muted); }
.menu-search input { padding-left: 40px; border-radius: var(--radius-pill); min-width: 220px; }
.menu-tabs { display: flex; gap: var(--space-2); background: rgba(122, 107, 91, 0.12); padding: 4px; border-radius: var(--radius-pill); }
.menu-tab { background: none; border: none; padding: 0.5rem 1rem; border-radius: var(--radius-pill); font-family: var(--font-voice); font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.menu-tab.is-active { background: var(--color-white); color: var(--color-orange-deep); box-shadow: var(--shadow-sm); }

.category-nav {
  background: var(--color-cream);
  border-top: 1px solid rgba(122, 107, 91, 0.18);
  border-bottom: 1px solid rgba(122, 107, 91, 0.18);
  display: flex; gap: var(--space-5); overflow-x: auto;
  padding: var(--space-3) var(--space-5);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  white-space: nowrap; font-size: var(--fs-sm); font-weight: 700; color: var(--color-text-muted);
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
.category-nav a:hover { color: var(--color-orange-deep); border-color: var(--color-orange); }

/* ---------- Sections ---------- */
.menu-section { padding: var(--space-8) 0; scroll-margin-top: calc(var(--sticky-stack-h) + var(--space-4)); }
.menu-section.is-tab-hidden, .menu-section.is-search-empty { display: none; }
.menu-section .section-wrap { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-7); align-items: start; }
.menu-section .container > .section-wrap,
.menu-section .section-wrap { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-5); }
.section-media { position: sticky; top: calc(var(--sticky-stack-h) + var(--space-4)); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4; box-shadow: var(--shadow-md); }
.section-media img { width: 100%; height: 100%; object-fit: cover; }

.menu-section--full { padding: var(--space-9) 0; color: var(--color-white); }
.menu-section--full .section-wrap { grid-template-columns: 1fr; max-width: 800px; }
.menu-section--full .section-content { position: relative; z-index: 2; }
/* Categorías sin foto propia (ej. adiciones como "Nuestras Papas"): sin columna
   de imagen, la lista ocupa todo el ancho en vez de dejar un recuadro vacío. */
.menu-section--no-media .section-wrap { grid-template-columns: 1fr; max-width: 760px; }
.section-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: var(--color-black); }
.section-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,13,0.78), rgba(20,16,13,0.93)); }
.menu-section--full .section-eyebrow, .menu-section--full .section-note { color: rgba(251, 243, 230, 0.8); }
.menu-section--full .section-eyebrow { color: var(--color-orange-light); text-shadow: 0 0 10px rgba(245,166,35,0.5); }
.menu-section--full .section-title { color: var(--color-white); }

@media (max-width: 860px) {
  .menu-section .section-wrap { grid-template-columns: 1fr; }
  .section-media { position: static; aspect-ratio: 16/9; }
}

.dish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); margin-top: var(--space-6); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5) var(--space-6); margin-top: var(--space-6); }
@media (max-width: 620px) { .dish-grid, .two-col { grid-template-columns: 1fr; } }

.dish {
  display: flex; gap: var(--space-4); background: rgba(255,255,255,0.04);
  cursor: pointer; border-radius: var(--radius-md); padding: var(--space-2);
  margin: calc(var(--space-2) * -1);
  transition: background var(--transition-fast);
}
.dish:hover, .dish:focus-visible { background: rgba(255,255,255,0.08); }
.dish:focus-visible { outline: 2px solid var(--color-orange); outline-offset: 2px; }
.menu-section:not(.menu-section--full) .dish:hover,
.menu-section:not(.menu-section--full) .dish:focus-visible { background: rgba(245,166,35,0.08); }
.menu-section:not(.menu-section--full) .dish { background: none; }
.dish-photo { position: relative; width: 96px; height: 96px; flex-shrink: 0; border-radius: var(--radius-md); overflow: hidden; border: none; padding: 0; display: block; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.dish-quick-add {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-orange); color: var(--color-black);
  border: 2px solid var(--color-white);
  display: flex; align-items: center; justify-content: center;
}
.dish-quick-add svg { width: 14px; height: 14px; }
.dish-quick-add:hover { background: var(--color-orange-light); }
.dish-info { flex: 1; text-align: left; }
.dish-head { display: flex; justify-content: space-between; gap: var(--space-3); width: 100%; text-align: left; }
.dish-name { font-weight: 700; font-size: var(--fs-md); }
.menu-section--full .dish-name { color: var(--color-white); }
.dish-price { font-weight: 800; color: var(--color-orange-deep); white-space: nowrap; }
.menu-section--full .dish-price { color: var(--color-orange-light); }
.dish-price--ask, b.dish-price--ask { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted) !important; font-weight: 700; }
.dish-desc { margin-top: var(--space-2); font-size: var(--fs-sm); line-height: 1.5; color: var(--color-text-muted); }
.menu-section--full .dish-desc { color: rgba(251,243,230,0.72); }
.dish-badges { margin-top: var(--space-2); display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* ---------- Selector de variante/tier (ej. "Chicharrón o pulled pork" / "Mixto") ---------- */
.dish-tiers-hint { margin-top: var(--space-3); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.menu-section--full .dish-tiers-hint { color: rgba(251,243,230,0.6); }
.dish-tiers { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* ---------- Etiqueta + selector de adición (ej. papas en las burgers) ---------- */
.dish-addon-note { margin-top: var(--space-3); font-size: var(--fs-xs); font-style: italic; color: var(--color-text-muted); }
.menu-section--full .dish-addon-note { color: rgba(251,243,230,0.6); }
.tier-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(122, 107, 91, 0.35);
  background: var(--color-white);
  font-family: var(--font-voice);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--color-text-muted);
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.tier-pill:hover { border-color: var(--color-orange); color: var(--color-orange-deep); }
.tier-pill.is-active { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-black); }
.menu-section--full .tier-pill { background: rgba(255,255,255,0.06); border-color: rgba(251,243,230,0.3); color: rgba(251,243,230,0.8); }
.menu-section--full .tier-pill:hover { border-color: var(--color-orange-light); color: var(--color-orange-light); }
.menu-section--full .tier-pill.is-active { background: var(--color-orange); border-color: var(--color-orange); color: var(--color-black); }
.dish.is-search-hidden, .dish.is-sede-hidden { display: none; }

.dish-rows { margin-top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); }
.dish-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px dashed rgba(122,107,91,0.3); font-weight: 600; }
.menu-section--full .dish-row { border-color: rgba(251,243,230,0.2); }
.dish-row span:first-child { flex: 1; }
.dish-row b { color: var(--color-orange-deep); }
.menu-section--full .dish-row b { color: var(--color-orange-light); }
.dish-row.is-search-hidden, .dish-row.is-sede-hidden { display: none; }
.dish-row-add {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-orange);
  color: var(--color-black);
  border: none;
  display: flex; align-items: center; justify-content: center;
}
.dish-row-add svg { width: 14px; height: 14px; }
.dish-row-add:hover { background: var(--color-orange-light); }

/* ---------- Final CTA ---------- */
.menu-final-cta { background: var(--color-black); background-image: linear-gradient(180deg, rgba(20,16,13,0.9), rgba(20,16,13,0.96)), url('../img/fondo.jpg'); background-size: cover; background-position: center; color: var(--color-white); padding: var(--space-9) 0; text-align: center; }
.menu-final-cta h2 { font-family: var(--font-script); font-weight: 400; font-size: var(--fs-2xl); margin-bottom: var(--space-3); }
.menu-final-cta p { color: rgba(251,243,230,0.78); margin-bottom: var(--space-6); }
.menu-final-cta .cta-actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }
