/* VARIABLES DE COLOR - ESTILO MADERA Y NEÓN ROJO (Único tema) */
:root {
    --bg-color: #111111;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --primary-color: #ff073a; /* Rojo Neón */
    --primary-glow: 0 0 5px #ff073a, 0 0 10px #ff073a, 0 0 20px #ff073a;
    --nav-bg: rgba(15, 15, 15, 0.85); /* Fondo semitransparente para ver la madera */
    --card-bg: rgba(20, 20, 20, 0.8);
    --border-color: rgba(255, 7, 58, 0.4);
    --wood-bg: url('assets/fondo-madera.png'); /* 👈 Asegúrate de guardar tu imagen con este nombre en la carpeta assets */
}

/* Estilos Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Mantiene el eje central fijo independientemente del contenido */
html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 75px; 
}

/* Capa de fondo estática (solución para móviles) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: var(--wood-bg);
    background-size: cover;
    background-position: center;
    z-index: -10; /* La enviamos al fondo del todo */
    pointer-events: none; /* Evita que bloquee los clics en la web */
}

/* Encabezado */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px; 
    background-color: var(--nav-bg);
    box-shadow: 0 2px 15px rgba(255, 7, 58, 0.15); /* Sombra rojiza */
    border-bottom: 1px solid var(--border-color);
    position: relative; 
}

header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* Contenedor de la marca (Logo + Texto) */
.brand-container {
    display: flex;
    align-items: center;
    gap: 12px; 
}

.logo {
    height: 40px; 
    width: auto;
    object-fit: contain; 
}

header h1 {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: var(--primary-glow); /* Efecto Neón en el título */
    font-weight: 800;
    letter-spacing: 1px;
}

/* Vistas (Para ocultar/mostrar secciones) */
.view {
    display: none;
    padding: 20px;
    animation: fadeIn 0.4s ease-out;
}

.view h2 {
    color: #fff;
    text-shadow: var(--primary-glow);
    margin-bottom: 15px;
    text-align: center;
}

.view-p {
    margin-top: 1rem;
    margin-bottom: 1rem;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.view.active {
    display: block;
}

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

/* Carrusel y fotos */
.carousel {
    position: relative; /* AGREGADO: Necesario para apilar imágenes dentro */
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5), 0 0 5px var(--border-color); 
    border: 1px solid var(--primary-color);
}

/* Nueva clase para AMBAS imágenes dentro del carrusel */
.carousel .carousel-img {
    position: absolute; /* AGREGADO: Para que se apilen una sobre otra */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* QUITADO: Hemos quitado la transición global de aquí */
}

/* Imagen Superior: Es la que manejaremos con opacidad */
#carousel-fg {
    z-index: 2; /* Encima */
    opacity: 1;
    /* Transición suave solo en la opacidad */
    transition: opacity 1s ease-in-out; /* 1 segundo de fundido */
}

/* Imagen Inferior: Espera debajo siempre visible */
#carousel-bg {
    z-index: 1; /* Debajo */
    opacity: 1;
}

/* --- REDES SOCIALES --- */
.social-media {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.social-media h3 {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: var(--primary-glow);
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    display: flex; 
    align-items: center;
    justify-content: center;
    gap: 10px; 
    background-color: var(--card-bg);
    color: var(--text-color);
    text-decoration: none;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.social-btn i {
    font-size: 1.5rem; 
}

/* Colores de marca */
.instagram-color { color: #ff306c; text-shadow: 0 0 8px rgba(225, 48, 108, 0.6); }
.facebook-color { color: #3b82f6; text-shadow: 0 0 8px rgba(24, 119, 242, 0.6); }
.tiktok-color { color: #ffffff; text-shadow: 0 0 8px rgba(255, 255, 255, 0.6); }

/* --- INDICADOR CIRCULAR EN BARRA INFERIOR --- */
.nav-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 3px;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease; 
}

.nav-btn.active {
    color: var(--primary-color);
    font-weight: bold;
    transform: scale(1.1); 
    text-shadow: 0 0 5px var(--primary-color); 
}

/* EL CÍRCULO */
.nav-btn.active .icon {
    background-color: var(--bg-color);
    color: var(--primary-color); 
    border: 2px solid var(--primary-color);
    transform: translateY(-15px) scale(1.1); 
    box-shadow: 0 0 15px rgba(255, 7, 58, 0.8), inset 0 0 8px rgba(255, 7, 58, 0.5);
}

/* --- TEXTO DE BIENVENIDA --- */
.welcome-text {
    text-align: center;
    padding: 15px; 
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.welcome-text p {
    color: var(--text-color);
    font-size: 1.05rem;
    letter-spacing: 0.5px; 
    line-height: 1.6; 
    margin-top: 10px; 
}

/* =========================================
   NUEVO SISTEMA DE CARTA (Flexbox)
   ========================================= */
.menu-list {
    list-style: none; 
    margin-top: 15px;
}

.menu-list li {
    background-color: var(--card-bg);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color); 
    border-left: 4px solid var(--primary-color); 
    backdrop-filter: blur(5px);
    transition: transform 0.2s, box-shadow 0.2s;
    
    /* Configuración flex para que imagen y texto convivan */
    display: flex;
    align-items: center;
    gap: 15px; 
}

/* =========================================
    EFECTOS HOVER (Solo para dispositivos con ratón)
========================================= */
@media (hover: hover) {
    .social-btn:hover {
        box-shadow: var(--primary-glow);
        border-color: var(--primary-color);
        transform: translateY(-2px);
    }

    .menu-list li:hover {
        box-shadow: var(--primary-glow);
        transform: translateX(5px);
    }
}

/* =========================================
   TEXTOS LEGALES Y FOOTER
   ========================================= */
.legal-text {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.legal-text p {
    margin-bottom: 15px;
}

.legal-text strong {
    color: #fff;
}

.site-footer {
    text-align: center;
    padding: 20px;
    margin-bottom: 75px; /* Deja espacio para la barra inferior del móvil */
    font-size: 0.85rem;
    color: var(--text-muted);
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.site-footer a:hover {
    color: var(--primary-color);
    text-shadow: var(--primary-glow);
}

.site-footer p {
    margin-top: 10px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* =========================================
   BANNER DE COOKIES
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 85px; /* Por encima de la barra de navegación del móvil */
    left: 10px;
    right: 10px;
    background-color: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 7, 58, 0.3);
    padding: 15px;
    border-radius: 10px;
    z-index: 10000;
    text-align: center;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: bottom 0.5s ease-in-out, opacity 0.5s;
}

.cookie-banner.hidden {
    bottom: -200px;
    opacity: 0;
    pointer-events: none;
}

.cookie-banner p {
    font-size: 0.9rem;
    color: #fff;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cookie-btn.accept {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--primary-glow);
}

.cookie-btn.reject {
    background-color: #333;
    color: #fff;
    border: 1px solid #555;
}

/* Adaptación del footer y cookies para ordenador */
@media (min-width: 768px) {
    .site-footer {
        margin-bottom: 20px; /* En PC no hay barra fija abajo, quitamos el margen enorme */
    }
    
    .cookie-banner {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;
    }
    .cookie-banner.hidden {
        bottom: -200px;
        transform: translateX(-50%);
    }
}

/* Imagen del plato (opcional) */
.menu-img {
    width: 75px;
    height: 75px;
    border-radius: 8px;
    object-fit: cover; /* Para que la imagen no se deforme */
    border: 1px solid var(--border-color);
    box-shadow: 0 0 5px rgba(255, 7, 58, 0.2);
    flex-shrink: 0; /* Impide que la imagen se haga pequeña si hay mucho texto */
}

/* Contenedor del texto (Nombre, precio y descripción) */
.menu-info {
    flex: 1; /* Ocupa el 100% del espacio restante */
    width: 100%;
}

/* Cabecera del plato (Nombre a la izq, precio a la der) */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.menu-list li strong {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Precio del plato (opcional) */
.menu-price {
    color: #ffffff; /* Lo ponemos en blanco para que se lea perfecto */
    font-weight: bold;
    text-shadow: none; /* Eliminamos el efecto neón aquí */
    font-size: 1.15rem; /* Un pelín más grande para que destaque */
    white-space: nowrap; 
}

.menu-list li p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 6px;
    line-height: 1.4;
}

/* =========================================
    MAPA
========================================= */

/* Títulos de las Secciones de la Carta */
.category-title {
    color: #ffffff; /* 👈 Letras blancas por dentro */
    font-weight: 800; /* 👈 Letra más gordita, igual que el h1 */
    text-shadow: var(--primary-glow); /* 👈 Brillo rojo neón por fuera */
    font-size: 1.4rem;
    margin-top: 30px; 
    margin-bottom: 15px;
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.alergenos {
    color: var(--primary-color) !important;
    font-size: 0.85rem !important;
    margin-top: 10px !important;
    font-weight: 500;
}
.alergenos strong {
    color: var(--text-muted);
}

.map-container {
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--primary-glow);
}

.map-placeholder {
    padding: 50px 20px;
    text-align: center;
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.map-placeholder p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================
   BARRA INFERIOR
   ========================================= */
.bottom-nav {
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 15px rgba(255, 7, 58, 0.2);
    border-top: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999; 
}

.nav-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    width: 33%;
}

.nav-btn .label {
    font-size: 0.8rem;
    margin-top: 2px;
}

/* =========================================
   DISEÑO RESPONSIVO (TABLETS Y ORDENADORES)
   ========================================= */

@media (min-width: 768px) {
    body {
        padding-bottom: 0; 
    }

    #app-content {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
        padding-top: 15px; 
    }

    header {
        padding: 15px 50px; 
    }

    .bottom-nav {
        position: absolute !important; 
        left: 50%; 
        top: 50%; 
        transform: translate(-50%, -50%); 
        width: auto;
        background-color: transparent;
        box-shadow: none;
        border: none;
        padding: 0;
        display: flex;
        gap: 30px; 
    }

    .nav-btn {
        flex-direction: row; 
        gap: 8px;
        width: auto;
    }

    .nav-btn .icon {
        width: auto;
        height: auto;
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .nav-btn .label {
        font-size: 1.1rem;
    }

    .nav-btn.active {
        transform: none;
    }
    
    .nav-btn.active .icon {
        background-color: transparent;
        color: var(--primary-color);
        border: none;
        transform: none;
        box-shadow: none;
    }

    .menu-list {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 20px; 
    }

    .menu-list li {
        margin-bottom: 0; 
        height: 100%; 
    }

    .social-icons {
        flex-direction: row;
        justify-content: center;
    }

    .social-btn {
        flex: 1; 
        max-width: 220px;
    }
}