/* --- VARIABLES Y RESET --- */
:root {
    --primary: #00AEEF;
    --secondary: #EC008C;
    --accent: #FFF200;
    --dark: #1a1a1a;
    --gray: #f4f4f4;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   HEADER & NAV
   ========================================= */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%;
    z-index: 1000; /* Header en 1000 */
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.4s ease; padding: 15px 0;
}
.main-header.transparent { background: transparent; box-shadow: none; padding: 25px 0; }

.header-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.logo img { height: 50px; transition: 0.3s; }

/* --- PC --- */
@media (min-width: 992px) {
    .menu-toggle { display: none !important; }
    .header-actions-mobile { display: none !important; }
    .nav-principal { display: block !important; position: relative !important; top: auto !important; left: auto !important; background: transparent !important; box-shadow: none !important; width: auto !important; }
    
    .nav-principal ul {
        display: flex !important; flex-direction: row !important; gap: 30px; align-items: center;
    }

    .nav-principal a {
        color: var(--dark); font-weight: 600; text-transform: uppercase; font-size: 0.9rem; position: relative;
    }
    .main-header.transparent .nav-principal a { color: var(--white); text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
    
    .nav-principal a::after {
        content: ''; width: 0; height: 2px; background: var(--secondary);
        position: absolute; bottom: -5px; left: 0; transition: 0.3s;
    }
    .nav-principal a:hover::after { width: 100%; }
}

/* --- MÓVIL --- */
@media (max-width: 991px) {
    .menu-toggle {
        display: flex !important; align-items: center; justify-content: center;
        font-size: 1.8rem; cursor: pointer; color: var(--dark);
        z-index: 10010; width: 44px; height: 44px;
    }
    .main-header.transparent .menu-toggle { color: white; }
    .header-actions-mobile { display: flex; align-items: center; gap: 15px; }

    .nav-principal {
        position: absolute !important;
        top: 100% !important; left: 0 !important; width: 100% !important;
        background: white !important;
        flex-direction: column !important;
        padding: 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        border-top: 1px solid #eee;
        z-index: 10000;
        display: none !important; 
    }

    .nav-principal.active {
        display: flex !important; animation: slideDown 0.3s ease;
    }

    .nav-principal ul {
        flex-direction: column !important; width: 100% !important; gap: 0 !important; display: flex !important;
    }

    .nav-principal li { width: 100%; border-bottom: 1px solid #f9f9f9; text-align: center; }
    
    .nav-principal a {
        display: block !important; padding: 20px !important;
        color: var(--dark) !important; font-size: 1.1rem;
    }
    .nav-principal a:hover { background-color: #f0f0f0; color: var(--primary) !important; }
    .d-lg-block { display: none !important; }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* --- HERO & GENERAL --- */
.hero-slider { width: 100%; height: 100vh; position: relative; }
.swiper-slide { overflow: hidden; position: relative; }
.slide-bg { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 8s ease; }
.swiper-slide-active .slide-bg { transform: scale(1.15); }
.overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3)); z-index: 1; }
.hero-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; text-align: center; color: white; width: 90%; max-width: 800px; }
.hero-content h1 { font-size: 3.5rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-bottom: 20px; letter-spacing: 2px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; font-weight: 300; }
.btn-primary { display: inline-block; padding: 15px 40px; background: var(--white); color: var(--secondary); font-weight: 700; border-radius: 50px; text-transform: uppercase; box-shadow: 0 5px 20px rgba(0,0,0,0.3); border: 2px solid white; }
.btn-primary:hover { background: transparent; color: white; }

.section-container { padding: 80px 0; }
.bg-light { background-color: var(--gray); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
h2.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; position: relative; padding-bottom: 15px; }
h2.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background: var(--gradient); border-radius: 2px; }

/* --- TARJETAS --- */
.producto-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); transition: 0.3s; position: relative; margin: 15px; }
.producto-card:hover { transform: translateY(-10px); }
.img-container { height: 250px; overflow: hidden; position: relative; }
.img-container img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.producto-card:hover .img-container img { transform: scale(1.1); }
.card-body { padding: 20px; text-align: center; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 5px; }

.btn-secondary { display: inline-block; margin-top: 10px; padding: 8px 25px; border: 2px solid var(--primary); color: var(--primary); font-weight: 600; border-radius: 50px; background: transparent; cursor: pointer; }
.btn-secondary:hover { background: var(--primary); color: white; }
.swiper-button-next, .swiper-button-prev { color: var(--primary) !important; }
.hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { color: white !important; }

/* --- CONTACTO --- */
.cta-section { display: flex; flex-wrap: wrap; background: var(--dark); }
.cta-content, .cta-form { flex: 1; padding: 80px; min-width: 350px; }
.cta-content { background: linear-gradient(135deg, #111, #222); color: white; display: flex; flex-direction: column; justify-content: center; }
.cta-content h2 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.cta-content span { color: var(--primary); }
.btn-whatsapp { background: #25D366; color: white; padding: 15px 30px; border-radius: 50px; font-weight: 700; margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-size: 1.1rem; }
.cta-form { background: var(--white); }
.cta-form form input, .cta-form form textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; font-family: inherit; }
.cta-form button { width: 100%; padding: 15px; background: var(--gradient); border: none; color: white; font-weight: 700; font-size: 1rem; border-radius: 8px; cursor: pointer; }

/* --- MODAL (FIXED Z-INDEX) --- */
.modal { 
    display: none; position: fixed; 
    z-index: 100000 !important; /* SUPERA AL HEADER (1000) */
    left: 0; top: 0; width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.85); backdrop-filter: blur(5px); 
    justify-content: center; align-items: center; 
}
.modal-content { background: white; width: 90%; max-width: 900px; border-radius: 20px; display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; position: relative; animation: modalPop 0.4s ease; }
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-img { height: 100%; background: #eee; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-details { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.modal-details h3 { font-size: 2rem; margin-bottom: 15px; color: var(--dark); }
.modal-details p { color: #666; margin-bottom: 20px; line-height: 1.6; }
.precio-tag { font-size: 1.5rem; color: var(--secondary); font-weight: 700; margin-bottom: 30px; display: block; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: #333; cursor: pointer; z-index: 10; }

/* --- FOOTER & RESTO --- */
.main-footer { background: #111; color: #888; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; padding-bottom: 40px; }
.footer-col h4 { color: white; margin-bottom: 20px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: #888; }
.footer-col a:hover { color: var(--primary); }
.copyright { border-top: 1px solid #222; text-align: center; padding: 20px; font-size: 0.9rem; }

/* FIXES & NUEVOS ESTILOS PARA PRODUCTOS */
/* 1. Precio visible en Tarjeta */
.card-price {
    display: block;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 800;
    margin: 5px 0 10px 0;
}
.text-consulta { color: #999; font-weight: 600; font-size: 0.95rem; }

/* 2. Badges de Stock */
.badge-nuevo { position: absolute; top: 15px; right: 15px; background: var(--accent); color: var(--dark); padding: 5px 12px; font-size: 0.8rem; font-weight: 800; border-radius: 20px; z-index: 10; }

/* Nueva badge a la izquierda para el Stock/Variable */
.badge-stock {
    position: absolute;
    top: 15px; left: 15px; /* Izquierda */
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 10;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.bg-variable { background-color: var(--primary); }
.bg-agotado { background-color: #dc3545; }

/* Medias generales */
@media (max-width: 992px) {
    .cta-content, .cta-form { padding: 40px; }
    .hero-content h1 { font-size: 2.5rem; }
    .modal-content { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto; }
    .modal-img { height: 250px; }
}