/* ============================================================
   styles.css — Menú Digital Rincón de la Sierra
   ============================================================
   Variables de color definidas en :root para facilitar cambios
   de paleta sin tocar el resto del archivo.
   ============================================================ */

/* ── Variables globales ──────────────────────────────────── */
:root {
  --color-dorado:      #ceae58;
  --color-dorado-dark: #b0922e;
  --color-verde:       #345b37;
  --color-verde-dark:  #254228;
  --color-fondo:       #fdf8f0;
  --color-texto:       #1a1a1a;
  --color-texto-suave: #6b5e4e;
  --color-borde:       #e8dfc8;
  --color-card:        #ffffff;
  --color-skeleton:    #e9e3d6;
  --radius-card:       12px;
  --sombra-card:       0 2px 12px rgba(0,0,0,.08);
  --sombra-card-hover: 0 6px 24px rgba(0,0,0,.14);
  --fuente-titulo:     'Montserrat', sans-serif;
  --fuente-cuerpo:     'Montserrat', sans-serif;
  --transition:        0.25s ease;
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  background-color: var(--color-fondo);
  color: var(--color-texto);
  font-family: var(--fuente-cuerpo);
  margin: 0;
  min-height: 100vh;
}

/* ── HERO CARRUSEL ───────────────────────────────────────── */
#carrusel-hero {
  /* Se posiciona justo debajo del header sticky (82px) */
  width: 100%;
  overflow: hidden;
  background: var(--color-verde-dark);
}

/* Imagen: cubre el contenedor, altura fija por breakpoint */
.hero-img {
  width: 100%;
  height: 330px;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Overlay verde semitransparente sobre cada foto */
  filter: brightness(.82);
}

@media (min-width: 576px)  { .hero-img { height: 340px; } }
@media (min-width: 768px)  { .hero-img { height: 420px; } }
@media (min-width: 1200px) { .hero-img { height: 500px; } }

/* Indicadores: color dorado de marca */
#carrusel-hero .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.5);
  border: none;
  transition: background-color var(--transition), transform var(--transition);
}

#carrusel-hero .carousel-indicators .active {
  background-color: var(--color-dorado);
  transform: scale(1.25);
}

/* Controles: flechas con tono verde para coherencia de marca */
#carrusel-hero .carousel-control-prev,
#carrusel-hero .carousel-control-next {
  width: 48px;
  opacity: .7;
  transition: opacity var(--transition);
}

#carrusel-hero .carousel-control-prev:hover,
#carrusel-hero .carousel-control-next:hover {
  opacity: 1;
}

#carrusel-hero .carousel-control-prev-icon,
#carrusel-hero .carousel-control-next-icon {
  width: 28px;
  height: 28px;
  background-color: rgba(52,91,55,.65);
  border-radius: 50%;
  background-size: 55%;
  padding: 4px;
}

/* ── OVERLAY DE BIENVENIDA (permanente sobre el carrusel) ── */
.hero-welcome-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Degradado oscuro centrado para que el texto sea legible
     sin tapar completamente las fotos en los bordes */
  background: radial-gradient(
    ellipse at center,
    rgba(20,40,22,.72) 0%,
    rgba(20,40,22,.35) 55%,
    transparent 100%
  );
  pointer-events: none; /* las flechas y controles siguen siendo clickeables */
}

.hero-welcome-overlay .hero-cta {
  pointer-events: auto; /* solo el botón es interactivo */
}

.hero-welcome-inner {
  text-align: center;
  padding: 1rem 2rem;
  animation: heroFadeIn 1s ease both;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* "Bienvenidos a" — eyebrow */
.hero-eyebrow {
  font-size: clamp(.65rem, 2vw, .85rem);
  font-weight: 500;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--color-dorado);
  margin: 0 0 .4rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

/* Nombre principal del restaurante */
.hero-nombre {
  font-size: clamp(1.6rem, 6vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: .04em;
  margin: 0 0 .6rem;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
}

/* Línea decorativa dorada con diamante central */
.hero-linea-dorada {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 auto .6rem;
  max-width: 260px;
}

.hero-linea-izq,
.hero-linea-der {
  flex: 1;
  height: 1px;
  background: var(--color-dorado);
  opacity: .8;
}

.hero-diamante {
  color: var(--color-dorado);
  font-size: .6rem;
  line-height: 1;
}

/* "Restaurante & Bar" */
.hero-subtitulo {
  font-size: clamp(.75rem, 2.5vw, 1rem);
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
  margin: 0 0 1.4rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

/* Botón CTA */
.hero-cta {
  display: inline-block;
  background: transparent;
  border: 1.5px solid var(--color-dorado);
  color: var(--color-dorado);
  font-size: clamp(.75rem, 2vw, .88rem);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .55rem 1.8rem;
  border-radius: 50px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  backdrop-filter: blur(4px);
}

.hero-cta:hover {
  background: var(--color-dorado);
  color: var(--color-verde-dark);
  transform: translateY(-2px);
}

/* ── BANDA DEL MENÚ ACTIVO ───────────────────────────────── */
.menu-titulo-section {
  background: var(--color-verde);
  padding: .9rem 1.25rem;
  border-bottom: 3px solid var(--color-dorado);
  overflow: hidden; /* evita scroll-x por desbordamiento */
}

.menu-banda-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  max-width: 1400px;
  margin: 0 auto;
  min-width: 0; /* permite que los hijos se compriman */
}

.menu-banda-linea {
  flex: 0 0 24px; /* ancho fijo pequeño en móvil, no crece */
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(206,174,88,.5));
  min-width: 0;
}

@media (min-width: 576px) {
  .menu-banda-linea { flex: 1; } /* recupera comportamiento fluido en tablet+ */
}

.menu-banda-linea:first-child {
  background: linear-gradient(to left, transparent, rgba(206,174,88,.5));
}

.menu-banda-texto {
  text-align: center;
  flex: 1 1 auto; /* puede crecer y encogerse */
  min-width: 0;
}

.menu-banda-label {
  display: block;
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--color-dorado);
  opacity: .85;
  line-height: 1;
  margin-bottom: .15rem;
}

.menu-banda-nombre {
  font-size: clamp(.75rem, 2.2vw, 1rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  margin: 0;
  letter-spacing: .04em;
}

/* ── HEADER — Opción A: transparente flotante sobre carrusel ─ */

/* El header es fixed: flota sobre el carrusel.
   Empieza totalmente transparente y se vuelve sólido al hacer scroll. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: .75rem 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
  /* Fix iOS Safari: evita que el header desaparezca al hacer scroll */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: background;
}

/* Clase que JS añade al hacer scroll: fondo sólido */
.site-header.header-scrolled {
  background: var(--color-verde);
  border-bottom-color: var(--color-dorado);
  box-shadow: 0 3px 16px rgba(0,0,0,.3);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Logo + nombre */
.header-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: inherit;
}

.header-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  transition: transform var(--transition);
}

.header-logo:hover { transform: scale(1.06); }

.header-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

/* En estado transparente el nombre es blanco con sombra para legibilidad sobre la foto */
.header-name .restaurante {
  font-size: clamp(.95rem, 2.5vw, 1.15rem);
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
  transition: color .4s ease, text-shadow .4s ease;
}

.header-name .subtitulo {
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
  transition: color .4s ease, text-shadow .4s ease;
}

/* Al hacer scroll: quitar sombra de texto (ya hay fondo) */
.site-header.header-scrolled .header-name .restaurante {
  color: var(--color-dorado);
  text-shadow: none;
}

.site-header.header-scrolled .header-name .subtitulo {
  color: rgba(255,255,255,.75);
  text-shadow: none;
}

/* Selector de menú */
.menu-selector-wrap {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.menu-selector-wrap label {
  font-size: .75rem;
  opacity: .8;
  white-space: nowrap;
  color: #fff;
}

#menu-selector {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 6px;
  padding: .3rem .6rem;
  font-size: .8rem;
  font-family: var(--fuente-cuerpo);
  cursor: pointer;
  max-width: 160px;
  transition: background var(--transition), border-color var(--transition);
}

#menu-selector:focus { outline: none; border-color: var(--color-dorado); }
#menu-selector option { color: var(--color-texto); background: #fff; }

/* Botón encuesta: outline blanco transparente → dorado al scrollear */
.btn-encuesta-header {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 50px;
  padding: .4rem 1rem;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--fuente-cuerpo);
  letter-spacing: .06em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn-encuesta-header:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  transform: translateY(-1px);
}

/* Al hacer scroll: botón dorado */
.site-header.header-scrolled .btn-encuesta-header {
  color: var(--color-dorado);
  border-color: var(--color-dorado);
}

.site-header.header-scrolled .btn-encuesta-header:hover {
  background: var(--color-dorado);
  color: var(--color-verde-dark);
}


/* ── BARRA DE CATEGORÍAS ─────────────────────────────────── */
.categorias-bar {
  background: #fff;
  border-bottom: 2px solid var(--color-borde);
  position: sticky;
  top: 76px; /* altura del header fixed */
  z-index: 90;
}

.categorias-inner {
  display: flex;
    justify-content: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 1400px;
  margin: 0 auto;
}

.categorias-inner::-webkit-scrollbar { display: none; }

/* Botón de categoría */
.btn-cat {
  flex-shrink: 0;
  background: transparent;
  border: 1.5px solid var(--color-borde);
  color: var(--color-texto-suave);
  border-radius: 50px;
  padding: .38rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  font-family: var(--fuente-cuerpo);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-cat:hover {
  border-color: var(--color-dorado);
  color: var(--color-dorado-dark);
}

.btn-cat.active {
  background: var(--color-dorado);
  border-color: var(--color-dorado);
  color: #fff;
  box-shadow: 0 2px 8px rgba(206,174,88,.4);
}

/* ── CONTENIDO PRINCIPAL ─────────────────────────────────── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem;
}

/* ── SECCIÓN DE CATEGORÍA ────────────────────────────────── */
.categoria-section {
  margin-bottom: 2.5rem;
  animation: fadeInUp .35s ease both;
}

.categoria-section.hidden { display: none; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Encabezado de categoría */
.categoria-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.categoria-header h2 {
  font-family: var(--fuente-titulo);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--color-verde);
  margin: 0;
}

.categoria-divider {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--color-dorado), transparent);
  border: none;
}

/* ── GRID DE PLATILLOS ───────────────────────────────────── */
.opciones-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 576px) {
  .opciones-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .opciones-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .opciones-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── TARJETA DE PLATILLO ─────────────────────────────────── */
.opcion-card {
  background: var(--color-card);
  border: 1px solid var(--color-borde);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  box-shadow: var(--sombra-card);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.opcion-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-dorado);
  border-radius: var(--radius-card) 0 0 var(--radius-card);
}

.opcion-card:hover {
  box-shadow: var(--sombra-card-hover);
  transform: translateY(-2px);
}

/* Platillo no disponible */
.opcion-card.no-disponible {
  opacity: .55;
}

.opcion-card.no-disponible::before {
  background: #aaa;
}

/* Nombre del platillo */
.opcion-nombre {
  font-family: var(--fuente-titulo);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-texto);
  line-height: 1.3;
  margin: 0;
}

/* Descripción */
.opcion-descripcion {
  font-size: .82rem;
  color: var(--color-texto-suave);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* Fila inferior: precio + badge */
.opcion-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: .5rem;
}

.opcion-precio {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-verde);
  letter-spacing: .01em;
}

.badge-no-disponible {
  background: #e0e0e0;
  color: #888;
  font-size: .68rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── SKELETON LOADER ─────────────────────────────────────── */
.skeleton-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

.skeleton-cat-bar {
  display: flex;
  gap: .6rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.skeleton-pill {
  height: 32px;
  border-radius: 50px;
  flex-shrink: 0;
}

.skeleton-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 2rem;
}

.skeleton-card {
  border-radius: var(--radius-card);
  height: 110px;
}

.skeleton-title {
  height: 26px;
  border-radius: 6px;
  width: 35%;
  margin-bottom: 1.25rem;
}

/* Animación pulso */
.skeleton-pill,
.skeleton-card,
.skeleton-title {
  background: var(--color-skeleton);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .45; }
}

/* ── ESTADO VACÍO / ERROR ────────────────────────────────── */
.estado-mensaje {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-texto-suave);
}

.estado-mensaje .icono {
  font-size: 3rem;
  margin-bottom: .75rem;
  display: block;
}

.estado-mensaje h3 {
  font-family: var(--fuente-titulo);
  color: var(--color-verde);
  margin-bottom: .5rem;
}

/* ── BOTÓN FLOTANTE (FAB) ENCUESTA ───────────────────────── */
.fab-encuesta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  /* Fix iOS Safari: fuerza composición GPU para que no desaparezca al hacer scroll */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .4rem;
}

.fab-tooltip {
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .72rem;
  padding: .3rem .7rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
}

.fab-encuesta:hover .fab-tooltip,
.fab-encuesta:focus-within .fab-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-verde);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 16px rgba(52,91,55,.45);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.fab-btn:hover {
  background: var(--color-verde-dark);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(52,91,55,.55);
  color: #fff;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-verde-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 1.75rem 1.25rem 1.5rem;
  font-size: .78rem;
  letter-spacing: .04em;
  border-top: 2px solid var(--color-dorado);
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

/* Nombre + año */
.footer-marca {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: .35rem;
  font-size: .8rem;
}

.footer-marca strong {
  color: var(--color-dorado);
  font-weight: 700;
  letter-spacing: .05em;
}

.footer-year::before { content: '© '; }

/* Línea divisora dorada */
.footer-divider-dorado {
  width: 60px;
  height: 1px;
  background: rgba(206,174,88,.45);
}

/* Dirección y horarios */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.footer-direccion,
.footer-horarios {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .35rem;
  line-height: 1.5;
}

.footer-direccion i,
.footer-horarios i {
  color: var(--color-dorado);
  font-size: .85rem;
  flex-shrink: 0;
}

.footer-horarios {
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .03em;
}

.footer-grupo {
  margin: 0;
  font-size: .72rem;
  color: rgba(255,255,255,.45);
  letter-spacing: .04em;
}

.footer-link-grupo {
  color: var(--color-dorado);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.footer-link-grupo:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-sep {
  color: var(--color-dorado);
  opacity: .6;
}


/* ── RESPONSIVE AJUSTES ──────────────────────────────────── */
@media (max-width: 575px) {
  .header-logo { width: 46px; height: 46px; }
  .menu-selector-wrap label { display: none; }

  /* En móvil el header siempre es sólido: la transparencia flotante
     no se aprecia bien en pantallas pequeñas y deja los botones invisibles */
  .site-header {
    background: var(--color-verde) !important;
    border-bottom-color: var(--color-dorado) !important;
    box-shadow: 0 3px 16px rgba(0,0,0,.3) !important;
  }

  .site-header .header-name .restaurante {
    color: var(--color-dorado) !important;
    text-shadow: none !important;
  }

  .site-header .header-name .subtitulo {
    color: rgba(255,255,255,.75) !important;
    text-shadow: none !important;
  }

  /* Botón encuesta: solo icono, dorado visible sobre verde */
  .btn-encuesta-header span { display: none; }
  .btn-encuesta-header {
    padding: .4rem .6rem;
    border-radius: 50%;
    color: var(--color-dorado) !important;
    border-color: var(--color-dorado) !important;
  }

  .categorias-bar { top: 66px; }

  /* FAB: separado de la barra de navegación del navegador */
  .fab-encuesta { bottom: 2rem; right: 1.25rem; }
  .fab-btn { width: 52px; height: 52px; }
}
