/* ========================================
       ESTILOS COMUNES PARA TODAS LAS PLANTILLAS
       ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 80px;
  /* Espacio para barra inferior fija */
}

/* Header / Cabecera */
.menu-header {
  position: relative;
  width: 100%;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
}

.menu-header.no-image {
  background: var(--header-bg, #f3f4f6);
}

.menu-header::before {
  content: none;
}

.header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
  width: 90%;
}

.header-logo {
  max-height: 150px;
  min-height: 120px;
  max-width: 270px;
  min-width: 150px;
  object-fit: contain;
  border-radius: 8px;
  border: none;
  padding: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  background: white;
  margin: 0 auto 1rem;
}

.header-title {
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.15;
  font-family: var(--heading-font, inherit);
  color: var(--header-text-color, white);
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* =============================================
   TARJETA DE CONTACTO + REDES (estilo Landing QR)
   ============================================= */
.contact-card {
  background: white;
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.5rem;
  max-width: 1000px;
  margin: -20px auto 30px auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  position: relative;
  z-index: 10;
}

.contact-card__address {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #4b5563;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.4;
}

/* Chips de acción (teléfono, email, web, whatsapp) */
.contact-card__chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .contact-card__chips {
    grid-template-columns: repeat(auto-fill, minmax(4, 1fr));
  }
}

.contact-chip {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: 12px;
  border: 1.5px solid var(--chip-color, var(--primary-color, #D86425));
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, color 0.15s;
  overflow: hidden;
}

.contact-chip:hover {
  background: var(--chip-color, var(--primary-color, #D86425));
  color: white;
}

.contact-chip__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip-color, var(--primary-color, #D86425)) 12%, white);
  color: var(--chip-color, var(--primary-color, #D86425));
  flex-shrink: 0;
  font-size: 0.875rem;
  transition: background 0.15s, color 0.15s;
}

.contact-chip:hover .contact-chip__icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.contact-chip__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-chip__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: #9ca3af;
  line-height: 1;
  transition: color 0.15s;
}

.contact-chip:hover .contact-chip__label {
  color: rgba(255, 255, 255, 0.75);
}

.contact-chip__value {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  transition: color 0.15s;
}

.contact-chip:hover .contact-chip__value {
  color: white;
}

/* Fila de iconos de redes sociales */
.contact-card__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
  justify-content: center;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 50%;
  border: 1.5px solid var(--chip-color, var(--primary-color, #D86425));
  color: var(--chip-color, var(--primary-color, #D86425));
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.social-pill:hover {
  background: var(--chip-color, var(--primary-color, #D86425));
  color: white;
  transform: scale(1.08);
}

/* Categorías del menú */
.category-section {
  margin-bottom: 1.2rem;
}

.category-header {
  font-size: 1rem;
  font-weight: bold;
  color: var(--secondary-color, #333);
  padding: 0.89rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color, #333);
}

/* Items del menú */
.menu-item {
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  background: white;
  border-radius: 8px;
  position: relative;
}

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.item-name {
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3rem;
  color: var(--secondary-color, #333);
  letter-spacing: 0.2px;
  margin-bottom: 0.25rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.item-description {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.5;
}

.item-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.item-price {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color, #333);
  white-space: nowrap;
}

.item-half-price {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.half-portion-label {
  font-weight: 500;
}

.half-portion-price {
  font-weight: 600;
  color: var(--primary-color, #333);
}

/* Badge de destacado */
.highlighted-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  width: 26px;
  height: 26px;
  background: var(--primary-color, #333);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.highlighted-badge i {
  font-size: 0.78rem;
}

/* Estructura del item con imagen */
.item-content-wrapper {
  display: flex;
  gap: 1rem;
}

.item-image-container {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s;
}

.item-image-container:hover {
  transform: scale(1.05);
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  color: white;
  font-size: 1.25rem;
}

.item-image-container:hover .image-overlay {
  opacity: 1;
}

.item-content {
  flex: 1;
  min-width: 0;
}

.item-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
}

.item-info {
  flex: 1;
  min-width: 0;
}

/* Información adicional */
.item-additional-info {
  font-size: 0.85rem;
  color: #574a4a;
  background: var(--primary-color-light, #faf9d1);
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Alérgenos */
.item-allergens {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.allergens-label {
  font-size: 0.85rem;
  color: #6b7280;
  margin-right: 0.25rem;
}

/* Alérgenos */
.allergen-icon {
  display: inline-block;
  border: 0;
}

/* Barra de navegación inferior */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--secondary-color, #333);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.bottom-nav-container {
  display: flex;
  max-width: 100%;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  color: rgba(255, 255, 255, 1);
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.bottom-nav-item:active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.bottom-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.bottom-nav-item span {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

/* Footer */
.menu-footer {
  background: var(--secondary-color, #1f2937);
  color: var(--footer-color, white);
  padding: 1.5rem;
  text-align: center;
}

.menu-footer p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Utilidades */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Lightbox para imágenes */
.lightbox-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #333;
  transition: background 0.2s;
  z-index: 1;
}

.lightbox-close:hover {
  background: #f3f4f6;
}

.lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  background: white;
  padding: 1.1rem 1.5rem 0.5rem;
  border-radius: 8px 8px 0 0;
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  width: 100%;
  box-sizing: border-box;
}

.lightbox-desc {
  background: white;
  padding: 0 1.5rem 0.875rem;
  border-radius: 0 0 8px 8px;
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
}

.lightbox-caption:has(+ .lightbox-desc[style*="display: none"]),
.lightbox-caption:only-child {
  border-radius: 8px;
  padding: 1rem 1.5rem;
}

@media (max-width: 768px) {

  /* Header */
  .menu-header {
    height: 250px;
  }

  .header-logo {
    min-height: 70px;
    max-height: 110px;
    min-width: 90px;
  }

  .header-title {
    font-size: 1.5rem;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
  }

  /* Tarjeta de contacto responsive */
  .contact-card {
    margin-top: -30px;
    margin-left: 12px;
    margin-right: 12px;
    padding: 1rem;
  }

  .contact-card__chips {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-chip__value {
    max-width: 110px;
  }

  /* Precios en móvil - ajustar tamaño */
  .item-price {
    font-size: 1.1rem;
  }

  .item-half-price {
    font-size: 0.8rem;
  }

  /* Barra inferior - safe area iOS */
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
  }

  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

/* Alpine.js - x-cloak */
[x-cloak] {
  display: none !important;
}

/* =============================================
   SELECTOR DE IDIOMA FLOTANTE (FAB)
   ============================================= */
.lang-fab-wrapper {
  position: fixed;
  top: calc(52px + 0.5rem);
  right: 1rem;
  z-index: 1050;
}

.lang-fab {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  padding: 0;
}

.lang-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.lang-fab__flag-icon {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50%;
  background-size: cover !important;
  background-position: center !important;
  display: block;
  flex-shrink: 0;
}

.lang-fab__dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  min-width: 160px;
  transform-origin: top right;
}

.lang-fab__option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition: background 0.12s;
  text-align: left;
}

.lang-fab__option:hover {
  background: #fef3e8;
}

.lang-fab__option--active {
  font-weight: 600;
  color: var(--primary-color, #D86425);
  background: #fef3e8;
}

.lang-fab__option-flag-img {
  width: 24px !important;
  height: 18px !important;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}

.lang-fab__option-name {
  flex: 1;
  white-space: nowrap;
}

/* =============================================
   SECCIÓN PLATOS DESTACADOS
   ============================================= */
.featured-dishes {
  max-width: 1000px;
  margin: -25px auto 1rem auto;
  padding: 1rem;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  position: relative;
  z-index: 2;
  background: #fff;
}

.featured-dishes__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--secondary-color, #333);
  margin-bottom: 1rem;
}

.featured-dishes__title i {
  color: var(--primary-color);
}

/* ── Carrusel mobile/tablet, grid desktop ── */
.featured-dishes__grid {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-left: 1rem;
  padding-bottom: 0.5rem;
  /* ocultar scrollbar */
  scrollbar-width: none;
}

.featured-dishes__grid::-webkit-scrollbar {
  display: none;
}

/* Mobile: ver 1 card + borde del siguiente */
.featured-dishes__grid .featured-dish-card {
  flex: 0 0 calc(82% - 0.75rem);
  max-width: calc(82% - 0.75rem);
  scroll-snap-align: start;
}

/* Tablet: ver ~3 cards + borde del siguiente */
@media (min-width: 640px) {
  .featured-dishes__grid .featured-dish-card {
    flex: 0 0 calc(30% - 0.5rem);
    max-width: calc(30% - 0.5rem);
  }
}

/* Desktop: carrusel 4.5 cards visibles */
@media (min-width: 1024px) {
  .featured-dishes__grid {
    gap: 1rem;
  }

  .featured-dishes__grid .featured-dish-card {
    flex: 0 0 calc(22% - 0.75rem);
    max-width: calc(22% - 0.75rem);
  }
}

.featured-dish-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.featured-dish-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.featured-dish-card__img-wrap {
  position: relative;
  aspect-ratio: 4 / 2;
  overflow: hidden;
}

.featured-dish-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.featured-dish-card:hover .featured-dish-card__img {
  transform: scale(1.05);
}

.featured-dish-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--primary-color-light, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.featured-dish-card__badge {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  background: var(--primary-color);
  color: white;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.featured-dish-card__body {
  padding: 0.625rem;
}

.featured-dish-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-dish-card__desc {
  font-size: 1rem;
  line-height: 1.1rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-dish-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-color);
}