/* ======== VARIABLES Y ESTILOS GLOBALES ======== */
:root {
    --primary-color: #E53935; 
    --primary-color-dark: #c62828;
    --background-color: #121212; 
    --card-background-color: #1e1e1e; 
    --text-color: #FFFFFF; 
    --text-color-secondary: #b3b3b3; 
    --border-color: #333333;
    --font-family-title: 'Montserrat', sans-serif;
    --font-family-body: 'Roboto', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: var(--font-family-body); 
    background-color: var(--background-color); 
    color: var(--text-color); 
    line-height: 1.6;
    overflow-x: hidden;
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
}
.section-title { 
    font-family: var(--font-family-title); 
    text-align: center; 
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 40px; 
    color: var(--text-color); 
}
.btn { 
    display: inline-block; 
    padding: 12px 24px; 
    background-color: var(--primary-color); 
    color: var(--text-color); 
    text-decoration: none; 
    font-weight: bold; 
    border-radius: 5px; 
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn:hover { 
    background-color: var(--primary-color-dark); 
    transform: translateY(-2px);
}

/* ======== HEADER Y NAVEGACIÓN ======== */
.header { 
    background-color: var(--card-background-color); 
    border-bottom: 1px solid var(--border-color); 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
}
.nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 70px; 
    position: relative;
}
.nav__logo { 
    font-family: var(--font-family-title); 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--text-color); 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    z-index: 1001; 
}
.logo-img { 
    height: 40px; 
    width: auto;
}
.nav__list_desktop { 
    display: flex; 
    list-style: none; 
    gap: 30px; 
}
.nav__link { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: bold; 
    transition: color 0.3s ease; 
    position: relative;
}
.nav__link:hover { 
    color: var(--primary-color); 
}
.nav__toggle { 
    font-size: 1.5rem; 
    cursor: pointer; 
    display: none; 
    z-index: 1001; 
    transition: transform 0.3s ease;
    color: var(--text-color);
}
.nav__toggle:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* ======== MENÚ MÓVIL MODERNO ======== */
.nav__menu_mobile { 
    position: fixed; 
    top: 0; 
    right: -100%; 
    width: 280px; 
    max-width: 85%; 
    height: 100%; 
    background-color: var(--card-background-color); 
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.5); 
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    padding: 80px 25px 40px; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    overflow-y: auto;
    z-index: 1002;
}
.nav__list_mobile { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px; 
    width: 100%;
}
.nav__item_mobile { 
    width: 100%; 
    text-align: center; 
    transform: translateX(20px); 
    opacity: 0; 
    transition: transform 0.3s ease, opacity 0.3s ease; 
}
.nav__link_mobile { 
    text-decoration: none; 
    color: var(--text-color); 
    font-size: 1.1rem; 
    font-weight: bold; 
    transition: all 0.3s ease; 
    display: block; 
    padding: 12px; 
    border-radius: 8px;
}
.nav__link_mobile:hover { 
    color: var(--primary-color); 
    background-color: rgba(255, 255, 255, 0.05);
}
.show-menu { 
    right: 0; 
}
.show-menu .nav__item_mobile { 
    transform: translateX(0); 
    opacity: 1; 
    transition-delay: calc(0.1s * var(--i)); 
}
.nav__close { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    font-size: 1.5rem; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    padding: 8px;
    border-radius: 50%;
    color: var(--text-color);
    background: rgba(255,255,255,0.1);
}
.nav__close:hover { 
    color: var(--primary-color); 
    transform: rotate(90deg); 
    background-color: rgba(255, 255, 255, 0.2);
}
.nav__divider { 
    height: 1px; 
    width: 100%; 
    background-color: var(--border-color); 
    margin: 15px 0; 
}
.nav__title { 
    font-family: var(--font-family-title); 
    color: var(--text-color-secondary); 
    margin-bottom: 8px; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.filter-btn-mobile { 
    background: none; 
    border: none; 
    color: var(--text-color-secondary); 
    font-size: 1rem; 
    cursor: pointer; 
    padding: 10px; 
    width: 100%; 
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
}
.filter-btn-mobile.active,
.filter-btn-mobile:hover { 
    color: var(--primary-color); 
    font-weight: bold; 
    background-color: rgba(255, 255, 255, 0.05);
}

/* ======== SLIDER ======== */
.slider-container { 
    position: relative; 
    width: 100%; 
    height: 90vh; 
    overflow: hidden; 
    margin-top: 70px; 
}
.slider { 
    position: relative; 
    width: 100%; 
    height: 100%; 
}
.slide { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    color: var(--text-color); 
    opacity: 0; 
    transition: opacity 1.2s ease-in-out; 
}
.slide.active { 
    opacity: 1; 
}
.slide::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
}
.slide-content { 
    position: relative; 
    z-index: 2; 
    max-width: 800px; 
    padding: 20px; 
    margin-top: 50px;
}
.slide-content h1 { 
    font-family: var(--font-family-title); 
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 20px; 
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8); 
    line-height: 1.2;
}
.slide-content p { 
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 30px; 
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8); 
    line-height: 1.6;
}
.slider-btn { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background-color: rgba(30,30,30,0.8); 
    border: 1px solid var(--border-color); 
    color: var(--text-color); 
    padding: 12px 16px; 
    cursor: pointer; 
    font-size: 1.2rem; 
    z-index: 100; 
    transition: all 0.3s ease;
    border-radius: 5px;
}
.slider-btn:hover { 
    background-color: var(--primary-color); 
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}
.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }

/* ======== GALERÍA Y FILTROS ======== */
.menu-section { 
    padding: 80px 20px; 
    min-height: 60vh;
}
.filter-buttons { 
    text-align: center; 
    margin-bottom: 40px; 
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.filter-btn { 
    border: 1px solid var(--border-color); 
    background-color: transparent; 
    color: var(--text-color); 
    padding: 10px 20px; 
    cursor: pointer; 
    border-radius: 25px; 
    font-weight: bold; 
    transition: all 0.3s ease; 
    font-size: 0.9rem;
}
.filter-btn.active, 
.filter-btn:hover { 
    background-color: var(--primary-color); 
    border-color: var(--primary-color); 
    color: var(--text-color); 
    transform: translateY(-2px);
}
.product-gallery { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
}
.product-card { 
    background-color: var(--card-background-color); 
    border-radius: 15px; 
    border: 1px solid var(--border-color); 
    overflow: hidden; 
    text-align: center; 
    transition: all 0.3s ease; 
    cursor: pointer;
    position: relative;
}
.product-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.product-card img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    transition: transform 0.3s ease;
}
.product-card:hover img {
    transform: scale(1.05);
}
.product-card h3 { 
    margin: 15px 0 10px; 
    font-family: var(--font-family-title); 
    color: var(--text-color); 
    font-size: 1.2rem;
    padding: 0 15px;
}
.product-card p { 
    padding: 0 15px; 
    font-size: 0.9rem; 
    color: var(--text-color-secondary); 
    line-height: 1.4;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .price { 
    display: block; 
    font-weight: bold; 
    font-size: 1.3rem; 
    color: var(--primary-color); 
    margin: 15px 0; 
    padding: 0 15px;
}
.product-card.hide { 
    display: none; 
}
.icon-hidden { 
    display: none !important; 
}

/* ======== CONTACTO Y MAPA ======== */
.contact-section { 
    padding: 80px 0; 
    background-color: #000; 
}
.contact-section .section-title { 
    color: var(--text-color); 
}
.contact-content { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: start; 
}
.contact-info p { 
    margin-bottom: 15px; 
    font-size: 1.1rem; 
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.contact-info i { 
    color: var(--primary-color); 
    margin-top: 3px;
    flex-shrink: 0;
}
.contact-info h3 { 
    margin-top: 25px; 
    margin-bottom: 15px; 
    font-family: var(--font-family-title); 
    color: var(--primary-color); 
    font-size: 1.3rem;
}
.map-container { 
    width: 100%;
    border-radius: 10px; 
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.map-container iframe { 
    width: 100%;
    height: 350px;
    border: 0;
    display: block;
}

/* ======== FOOTER ======== */
.footer { 
    background-color: var(--card-background-color); 
    padding: 40px 0; 
    border-top: 1px solid var(--border-color); 
}
.footer-content { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 25px; 
}
.social-icons { 
    display: flex; 
    gap: 25px; 
}
.social-icons a { 
    color: var(--text-color); 
    font-size: 1.5rem; 
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
}
.social-icons a:hover { 
    color: var(--primary-color); 
    transform: translateY(-3px);
    background-color: rgba(255,255,255,0.1);
}
.footer-content p { 
    font-size: 0.9rem; 
    color: var(--text-color-secondary); 
    text-align: center;
}

/* ======== BOTÓN WHATSAPP ======== */
.whatsapp-button { 
    position: fixed; 
    bottom: 25px; 
    right: 25px; 
    background-color: #25D366; 
    color: white; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 1.8rem; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); 
    z-index: 1000; 
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-button:hover { 
    transform: scale(1.1); 
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* ======== ESTILOS DEL MODAL ======== */
.modal { 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.9); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    visibility: hidden; 
    opacity: 0; 
    transition: visibility 0s 0.3s, opacity 0.3s ease; 
    padding: 20px;
}
.modal.active { 
    visibility: visible; 
    opacity: 1; 
    transition: visibility 0s, opacity 0.3s ease; 
}
.modal-content { 
    background-color: var(--card-background-color); 
    padding: 30px; 
    border-radius: 15px; 
    border: 1px solid var(--border-color); 
    text-align: center; 
    max-width: 500px; 
    width: 100%; 
    position: relative; 
    transform: scale(0.9); 
    transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.modal.active .modal-content { 
    transform: scale(1); 
}
.modal-close { 
    position: absolute; 
    top: 15px; 
    right: 20px; 
    color: var(--text-color-secondary); 
    font-size: 2rem; 
    font-weight: bold; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    z-index: 11; 
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover { 
    color: var(--primary-color); 
    background-color: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}
.modal-img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    border-radius: 10px; 
    margin-bottom: 20px; 
}
.modal-title { 
    font-family: var(--font-family-title); 
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 15px; 
    line-height: 1.3;
}
.modal-description { 
    color: var(--text-color-secondary); 
    line-height: 1.6; 
    margin-bottom: 20px; 
    font-size: 1rem;
}
.modal-price { 
    display: block; 
    font-size: 1.8rem; 
    font-weight: bold; 
    color: var(--primary-color); 
    margin-bottom: 30px; 
}

/* ======== NAVEGACIÓN DEL MODAL CORREGIDA ======== */
.modal-nav { 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background-color: rgba(229, 57, 53, 0.9); 
    border: none; 
    color: var(--text-color); 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    font-size: 1.2rem; 
    cursor: pointer; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: all 0.3s ease; 
    z-index: 10; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.modal-nav:hover { 
    background-color: var(--primary-color-dark); 
    transform: translateY(-50%) scale(1.1); 
}
.modal-nav.prev { left: 20px; }
.modal-nav.next { right: 20px; }
.modal-nav.hidden { display: none; }

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color-secondary);
    font-size: 1.1rem;
}

/* ======== RESPONSIVE (MEDIA QUERIES) ======== */
@media (max-width: 768px) {
    .nav__menu_desktop { display: none; }
    .nav__toggle { display: block; }
    .desktop-filters { display: none; }
    
    .header {
        height: 60px;
    }
    
    .nav {
        height: 60px;
    }
    
    .nav__logo {
        font-size: 1.3rem;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .slide-content h1 { 
        font-size: 2.2rem; 
        margin-bottom: 15px;
    }
    
    .slide-content p { 
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .contact-content { 
        grid-template-columns: 1fr; 
        text-align: center; 
        gap: 30px;
    }
    
    /* REPARACIÓN DEL MODAL PARA MÓVILES */
    .modal {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 15px;
    }
    
    .modal-content {
        transform: none;
        margin: 0;
        width: 95%;
        max-width: 400px;
        padding: 25px 20px;
    }
    
    .modal.active .modal-content {
        transform: none;
    }
    
    /* BOTONES DE NAVEGACIÓN DEL MODAL EN MÓVILES */
    .modal-nav {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .modal-nav.prev { 
        left: 15px; 
    }
    
    .modal-nav.next { 
        right: 15px; 
    }
    
    .product-gallery {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .slider-container {
        height: 70vh;
        margin-top: 60px;
    }
    
    .slider-btn {
        padding: 10px 14px;
        font-size: 1.1rem;
    }
}

@media (max-width: 620px) {
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-nav.prev { 
        left: 12px; 
    }
    
    .modal-nav.next { 
        right: 12px; 
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav__menu_mobile {
        width: 260px;
        padding: 70px 20px 30px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .menu-section {
        padding: 60px 15px;
    }
    
    .contact-section {
        padding: 60px 0;
    }
    
    .slide-content {
        padding: 15px;
        margin-top: 30px;
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
        bottom: 20px;
        right: 20px;
    }
    
    /* AJUSTES FINALES DEL MODAL EN MÓVILES PEQUEÑOS */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 320px;
        padding: 20px 15px;
    }
    
    .modal-nav {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    
    .modal-nav.prev { 
        left: 10px; 
    }
    
    .modal-nav.next { 
        right: 10px; 
    }
    
    .modal-img {
        height: 200px;
    }
    
    .modal-title {
        font-size: 1.4rem;
    }
    
    .modal-price {
        font-size: 1.5rem;
    }
    
    /* HEADER MÓVIL MÁS COMPACTO */
    .header {
        height: 55px;
    }
    
    .nav {
        height: 55px;
    }
    
    .nav__logo {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .nav__toggle {
        font-size: 1.3rem;
    }
}

@media (max-width: 360px) {
    .nav__menu_mobile {
        width: 240px;
        padding: 60px 15px 25px;
    }
    
    .nav__link_mobile {
        font-size: 1rem;
        padding: 10px;
    }
    
    .filter-btn-mobile {
        font-size: 0.9rem;
        padding: 8px;
    }
    
    .slide-content h1 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .product-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .modal-nav.prev { 
        left: 8px; 
    }
    
    .modal-nav.next { 
        right: 8px; 
    }
}
