/* --------------------------------- */
/* 1. TIPOGRAFÍA Y ESTILOS GLOBALES */
/* --------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --color-primary: #A00000;      
    --color-secondary: #FFB703;    
    --color-background: #F5F5F5;   
    --color-content-bg: #FFFFFF;   
    --color-text: #333333;         
    --color-light-text: #777;      
    --font-primary: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--color-background); 
    color: var(--color-text);
    line-height: 1.6;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px; 
    background-color: var(--color-content-bg); 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
}

header {
    text-align: center;
    padding: 30px 20px;
    background-color: var(--color-background);
    border-bottom: 5px solid var(--color-primary); 
    margin-bottom: 20px;
}

/* TÍTULOS */
h1, h2 {
    color: var(--color-primary); 
    text-transform: uppercase;
    font-weight: 900;
    margin-top: 0;
} 
h1 { font-size: 2.5em; }
h2 { font-size: 1.8em;
    margin-top: 20px;
    text-align: center; /* 💡 LÍNEA AÑADIDA */
}

h3 {
    border-bottom: 3px solid var(--color-secondary); 
    padding-bottom: 8px;
    margin-top: 40px;
    color: var(--color-primary);
    text-align: center; 
    font-weight: 700;
    font-size: 1.5em;
}

.subtitulo {
    font-size: 1em;
    font-weight: 500;
    color: var(--color-light-text);
    margin-top: -15px; 
    margin-bottom: 20px;
}

.logo {
    max-width: 250px; 
    height: auto;
    margin-bottom: 15px;
}


/* --------------------------------- */
/* 2. ESTILOS DEL MENÚ HORIZONTAL (TABS) */
/* --------------------------------- */
#category-nav {
    display: flex;
    flex-wrap: wrap; 
    background-color: var(--color-text); 
    border-bottom: 3px solid var(--color-secondary);
    padding: 0; 
    justify-content: center; 
    border-radius: 5px;
    overflow: hidden; 
    
    /* 📌 Navegación Fija (Sticky Tabs) */
    position: sticky;
    top: 0; 
    z-index: 100; 
}

.nav-item {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.1); 
    transition: background-color 0.3s;
    flex-grow: 1; 
    text-align: center;
    text-transform: uppercase;
    font-size: 0.9em;
}

.nav-item:hover {
    background-color: var(--color-primary);
}

.nav-item.active {
    background-color: var(--color-primary);
    color: var(--color-secondary); 
    border-bottom: 3px solid var(--color-secondary) !important;
}

/* Lógica de Visibilidad de Menú */
#menu-content {
    padding: 0 20px; 
}

.categoria {
    display: none; 
    animation: fadeIn 0.5s;
}

.categoria.active-menu {
    display: block; 
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos de las Listas de Menú */
.categoria ul {
    list-style: none;
    padding: 0;
}

.categoria li {
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; 
    align-items: flex-start;
    transition: background-color 0.2s; /* Micro-interacción */
}

.categoria li:hover {
    background-color: #FFFBEA; 
}

.item-nombre {
    font-weight: 700;
    flex-grow: 1; 
    margin-right: 15px; 
    color: var(--color-text);
    font-size: 1.1em;
}

.item-precio {
    color: var(--color-secondary); 
    font-weight: 900;
    white-space: nowrap; 
    text-align: right;
    font-size: 1.2em;
}

.item-descripcion, .item-tamaño {
    font-size: 0.9em;
    color: var(--color-light-text);
    flex-basis: 100%; 
    margin-top: 5px;
    font-weight: 400;
}


/* --------------------------------- */
/* 4. ESTILOS DEL CARRUSEL */
/* --------------------------------- */

#carousel-container {
    max-width: 90%; 
    height: 350px;
    margin: 40px auto;
    overflow: hidden; 
    position: relative; 
}

#image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d; 
    perspective: 1000px;
}

.carousel-item {
    width: 100%;
    height: 100%;
    position: absolute; 
    top: 0;
    left: 0;
    object-fit: cover; 
    opacity: 0; 
    transition: opacity 0.5s, transform 0.5s, box-shadow 0.5s;
    border: 3px solid transparent;
    border-radius: 8px;
    transform: translateX(0) scale(1) translateZ(-100px); 
}

.carousel-item.active {
    opacity: 1;
    z-index: 10;
    transform: translateX(0) scale(1.05) translateZ(1px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border: 3px solid var(--color-primary); 
}

.carousel-item.prev {
    opacity: 0.7;
    z-index: 5;
    transform: translateX(-30%) scale(0.85) translateZ(-10px); 
}

.carousel-item.next {
    opacity: 0.7;
    z-index: 5;
    transform: translateX(30%) scale(0.85) translateZ(-10px); 
}

/* Botones del carrusel */
#prev-btn, #next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(160, 0, 0, 0.7); 
    color: white;
    border: none;
    padding: 15px 20px; 
    cursor: pointer;
    font-size: 2rem;
    z-index: 20; 
    border-radius: 50%;
    line-height: 1;
    transition: background-color 0.3s;
}

#prev-btn { left: 0; }
#next-btn { right: 0; }

#prev-btn:hover, #next-btn:hover {
    background-color: var(--color-primary); 
}


/* --------------------------------- */
/* 5. ESTILOS DE MAPA Y CONTACTO FLOTANTE */
/* --------------------------------- */

/* Mapa */
.map-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.map-title {
    color: var(--color-primary);
    margin-bottom: 15px;
}

.map-container iframe {
    display: block;
    width: 100%;
    border: 5px solid var(--color-secondary) !important; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out; /* Interacción con el mapa */
}

.map-container iframe:hover {
    transform: scale(1.01); 
}

.map-address {
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 15px;
    font-size: 1.1em;
}

/* 📞 Floating CTA (WhatsApp) */
.floating-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366; /* Verde de WhatsApp */

    /* 💡 Cambios para hacerlo un círculo más pequeño */
    width: 60px; /* Tamaño del círculo */
    height: 60px; /* Tamaño del círculo */
    padding: 0; /* Quitar padding */

    display: flex; /* Para centrar la imagen */
    justify-content: center;
    align-items: center;

    border-radius: 50%; /* Hacerlo un círculo perfecto */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: pulse 2s infinite; 
    transition: background-color 0.3s;
}

.floating-cta:hover {
    background-color: #128C7E; 
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); } 
    100% { transform: scale(1); }
}

.cta-icon-img {
    width: 65%; /* La imagen ocupará el 65% del botón flotante (aprox 40px) */
    height: auto;
}

/* --------------------------------- */
/* 6. ESTILOS DE FOOTER Y REDES SOCIALES */
/* --------------------------------- */

footer {
    background-color: var(--color-text); 
    color: white;
    padding: 30px 20px;
    text-align: center;
    font-size: 0.9em;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    margin: 8px 0;
}

.phone-number {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--color-secondary);
    margin: 15px 0;
}

.phone-number a {
    color: var(--color-secondary);
    text-decoration: none;
}
.phone-number a:hover {
    text-decoration: underline;
}

/* Sección Síguenos (Social) */
.social-section {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.social-title {
    color: var(--color-secondary);
    font-size: 1.2em;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

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

.social-icons .social-link {
    display: inline-block;
    transition: transform 0.2s, opacity 0.2s;
}

.social-icons .social-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.social-icon {
    width: 40px; 
    height: 40px;
    border-radius: 5px;
}


/* ------------------------------ */
/* 7. MEDIA QUERY PARA MÓVILES */
/* ------------------------------ */
@media (max-width: 600px) {
    
    main {
        padding: 0;
        margin: 0;
        box-shadow: none; 
    }

    header {
        padding: 20px 10px;
    }
    
    h1 { font-size: 2em; }

    #menu-content { padding: 0 10px; }

    #category-nav {
        padding: 0;
        border-radius: 0;
    }
    
    .nav-item {
        flex-basis: calc(33.333% - 1px); 
        box-sizing: border-box;
        font-size: 0.8em;
        padding: 10px 5px;
        border-right: 1px solid rgba(255, 255, 255, 0.1); 
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-item:nth-child(3n) { border-right: none; }
    
    #carousel-container {
        height: 250px; 
        max-width: 95%;
    }

    #prev-btn, #next-btn {
        padding: 8px 10px;
        font-size: 1.2rem;
    }

    .carousel-item.prev {
        transform: translateX(-40%) scale(0.7) translateZ(-50px); 
    }
    .carousel-item.next {
        transform: translateX(40%) scale(0.7) translateZ(-50px); 
    }
    
    .categoria li { padding: 10px 0; }
    .item-nombre { font-size: 1em; margin-right: 10px; }
    .item-precio { font-size: 1.1em; }
    
    .floating-cta {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 0.9em;
    }

    .social-icon {
        width: 35px;
        height: 35px;
    }
}
