:root {
    --bg-color: #080808;
    --card-bg: #121212;
    --text-color: #f0f0f0;
    --primary-neon: #00ff9d; /* Verde FX */
    --secondary-neon: #8a2be2; /* Violeta FX */
    --font-main: 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
}

/* Header & Nav */
header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 15px 5%;
    background: rgba(0,0,0,0.8); /* Un poco más oscuro para legibilidad */
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    z-index: 1000; 
    border-bottom: 2px solid rgba(255,255,255,0.08);
}

.logo { font-size: 1.8rem; font-weight: 800; letter-spacing: 1px; color: #fff; }
.highlight { color: var(--primary-neon); }

nav ul { display: flex; list-style: none; gap: 25px; }
nav a { text-decoration: none; color: #fff; font-weight: 500; font-size: 0.9rem; transition: 0.3s; }
nav a:hover { color: var(--primary-neon); text-shadow: 0 0 8px var(--primary-neon); }

.header-actions { display: flex; align-items: center; gap: 20px; }
.cart-icon { position: relative; cursor: pointer; font-size: 1.4rem; color: #fff; transition: 0.3s; }
.cart-icon:hover { color: var(--primary-neon); }

#cart-count {
    position: absolute; top: -8px; right: -8px;
    background: var(--secondary-neon); font-size: 0.7rem; padding: 3px 6px; border-radius: 50%;
}

.menu-toggle { display: none; font-size: 1.5rem; cursor: pointer; }

/* SLIDER */
.hero-slider { 
    position: relative; 
    height: 100vh; 
    min-height: 550px;
    overflow: hidden; 
}

.slide {
    position: absolute; /* Cambiado a absolute para que se superpongan correctamente */
    top: 0; left: 0;
    width: 100%; 
    height: 100%;
    opacity: 0; 
    transition: opacity 1s ease-in-out;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    background: #000;
}

.slide.active { opacity: 1; z-index: 2; }

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    opacity: 0.6; /* Oscurece un poco la imagen para que se lea el texto */
    z-index: 1;
}

.hero-content { 
    position: relative; 
    z-index: 10; 
    padding: 20px; 
    margin-top: 0; /* Ya no es necesario el margen mágico al usar flex center */
}

.hero-content h1 { font-size: 4rem; text-transform: uppercase; font-weight: 900; line-height: 1.1; }
.neon-text { color: #fff; text-shadow: 0 0 15px var(--secondary-neon); }
.hero-content p { font-size: 1.5rem; margin-top: 15px; color: #ddd; font-weight: 500; text-shadow: 2px 2px 4px #000; }

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); border: none; color: white;
    font-size: 2rem; padding: 10px 15px; cursor: pointer; z-index: 20;
    border-radius: 5px;
}
.prev { left: 10px; } 
.next { right: 10px; }
.slider-btn:hover { background: var(--primary-neon); color: #000; }

/* SECCIONES GENERALES */
.section-padding { padding: 60px 10%; text-align: center; }
.bg-darker { background-color: #050505; border-top: 1px solid #222; border-bottom: 1px solid #222; }
h2 { font-size: 2.5rem; margin-bottom: 40px; color: var(--primary-neon); text-transform: uppercase; letter-spacing: 2px; }

.container-text { max-width: 800px; margin: 0 auto; line-height: 1.6; font-size: 1.1rem; color: #ccc; }

/* CLIENTES GRID */
.grid-clients { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
.client-card {
    background: var(--card-bg); padding: 30px; border-radius: 10px;
    border: 1px solid #333; transition: 0.3s;
}
.client-card:hover { transform: translateY(-5px); border-color: var(--secondary-neon); box-shadow: 0 5px 20px rgba(138, 43, 226, 0.2); }
.client-icon { font-size: 3rem; color: var(--secondary-neon); margin-bottom: 20px; }
.client-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.client-card p { font-size: 0.9rem; color: #aaa; }

/* PRODUCTOS */
.filters { margin-bottom: 40px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.filter-btn {
    background: transparent; border: 1px solid var(--primary-neon);
    color: #fff; padding: 8px 20px; cursor: pointer; font-size: 1rem; transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary-neon); color: #000; font-weight: bold; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.product-card {
    background: var(--card-bg); padding: 15px; border-radius: 8px; border: 1px solid #222; text-align: center; transition: 0.3s;
}
.product-card img { width: 100%; height: 220px; object-fit: cover; border-radius: 5px; margin-bottom: 15px; }
.product-card h3 { font-size: 1.1rem; margin-bottom: 10px; min-height: 50px; color: #fff;}
.price { display: block; font-size: 1.4rem; color: var(--primary-neon); font-weight: bold; margin-bottom: 15px; }
.btn-add {
    width: 100%; padding: 10px; background: transparent; border: 1px solid #fff; color: #fff; cursor: pointer; transition: 0.3s; font-weight: bold;
}
.btn-add:hover { background: #fff; color: #000; }

/* 1. Primero preparamos la tarjeta del producto */
.product-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    /* AGREGAR ESTO: Un borde inicial invisible para que no "salte" al aparecer */
    border: 2px solid transparent; 
    /* AGREGAR ESTO: Transición suave para que el efecto no sea brusco */
    transition: all 0.3s ease; 
    cursor: pointer;
}

/* 2. El efecto de Hover (lo que pediste) */
.product-card:hover {
    /* Cambia el borde a violeta neón */
    border-color: var(--secondary-neon); 
    
    /* Crea el resplandor violeta (Glow) */
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.6); 
    
    /* Efecto de elevación (igual que en clientes) */
    transform: translateY(-10px); 
}

/* 3. Opcional: Si quieres que la IMAGEN también resalte */
.product-card:hover img {
    filter: brightness(1.1);
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* MAPA */

.map-section {
    display: flex;             /* Activa el modo flexible */
    flex-direction: column;    /* Pone los elementos en columna */
    align-items: center;       /* ESTO es lo que centra el mapa horizontalmente */
    justify-content: center;   
    width: 100%;
    padding: 20px 0;           /* Un poco de aire arriba y abajo */
}

/* Opcional: Para que el mapa no sea gigante */
.map-section iframe {
    width: 80%;                /* Ocupa el 80% de la pantalla */
    max-width: 1000px;         /* Pero que no pase de 1000px en PC */
    border-radius: 10px;       /* Borde redondeado queda elegante */
    box-shadow: 0 4px 15px rgba(0,255,157, 0.2); /* Sombra estilo neón suave */
}

/* FOOTER */
footer { background: #000; padding-top: 50px; border-top: 1px solid #333; }
.footer-container { display: flex; justify-content: space-around; flex-wrap: wrap; padding-bottom: 40px; gap: 30px; text-align: center; }
.footer-col h3 { color: #fff; margin-bottom: 20px; font-size: 1.2rem; border-bottom: 2px solid var(--primary-neon); display: inline-block; padding-bottom: 5px; }
.social-icons a { font-size: 1.5rem; color: #fff; margin: 0 10px; transition: 0.3s; }
.social-icons a:hover { color: var(--primary-neon); }
.whatsapp-btn-footer {
    display: inline-block; background: #25D366; color: white; padding: 10px 20px;
    border-radius: 50px; text-decoration: none; font-weight: bold; margin-bottom: 10px; font-size: 1.1rem;
}

.copyright-bar { background: #111; padding: 20px; text-align: center; font-size: 0.9rem; color: #666; border-top: 1px solid #222; }
.storepro-link { color: #888; text-decoration: none; transition: 0.3s; }
.storepro-link:hover { color: var(--primary-neon); font-weight: bold; text-shadow: 0 0 5px var(--primary-neon); }

/* CARRITO MODAL */
.cart-modal {
    position: fixed; top: 0; right: -100%; width: 100%; max-width: 400px;
    height: 100vh; background: #151515; z-index: 2000; transition: 0.4s;
    box-shadow: -5px 0 30px rgba(0,0,0,0.8); border-left: 1px solid #333;
    padding: 20px; display: flex; flex-direction: column;
}
.cart-modal.active { right: 0; }
.cart-content { height: 100%; display: flex; flex-direction: column; }
#cart-items { flex-grow: 1; overflow-y: auto; margin-top: 20px; }
.cart-item { display: flex; justify-content: space-between; border-bottom: 1px solid #333; padding: 10px 0; font-size: 0.9rem; }
.cart-total { font-size: 1.5rem; text-align: center; padding: 20px 0; border-top: 1px solid #333; font-weight: bold; color: var(--primary-neon); }
.btn-whatsapp-checkout {
    width: 100%; padding: 15px; background: #25D366; border: none;
    color: white; font-weight: bold; font-size: 1rem; cursor: pointer; margin-bottom: 20px;
}
.close-btn { font-size: 2rem; align-self: flex-end; cursor: pointer; color: #fff; }

/* MODAL DETALLE */
.detail-modal {
    display: none; position: fixed; z-index: 3000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9); backdrop-filter: blur(5px);
}
.detail-content {
    background: #111; margin: 5% auto; padding: 30px;
    width: 90%; max-width: 800px; border-radius: 15px;
    border: 1px solid var(--primary-neon); position: relative;
}
.close-detail {
    position: absolute; top: 15px; right: 20px;
    font-size: 2rem; color: #aaa; cursor: pointer;
    transition: 0.3s;
}
.close-detail:hover { color: #fff; }

.detail-body { display: flex; gap: 30px; flex-wrap: wrap; align-items: center; }
.detail-img-container { flex: 1; min-width: 250px; }
.detail-img-container img { width: 100%; border-radius: 10px; border: 1px solid #333; }

.detail-text { flex: 1; min-width: 250px; }
.detail-text h2 { margin-bottom: 15px; font-size: 2rem; }
.detail-text p { color: #ccc; line-height: 1.6; margin-bottom: 25px; }

.modal-price-row { display: flex; align-items: center; gap: 20px; }
#modal-price { font-size: 2rem; color: var(--primary-neon); font-weight: bold; }
.btn-cta {
    padding: 12px 25px; background: var(--primary-neon); border: none;
    color: #000; font-weight: bold; cursor: pointer; border-radius: 5px;
    font-size: 1rem; transition: 0.3s;
}
.btn-cta:hover { background: #fff; box-shadow: 0 0 15px var(--primary-neon); }

/* RESPONSIVE */
@media (max-width: 768px) {
    nav ul { 
        display: none; 
        flex-direction: column; 
        position: fixed; 
        top: 60px; 
        left: 0; 
        width: 100%; 
        background: #000; 
        text-align: center; 
        padding: 20px; 
        border-bottom: 1px solid #333;
    }
    nav ul.show { display: flex; }
    .menu-toggle { display: block; }
    .hero-content h1 { font-size: 2.5rem; }
    .detail-body { flex-direction: column; }
    .modal-price-row { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ================= PRE-LOADER UPDATE ================= */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #000; /* Negro puro para resaltar el neon */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.loader-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Círculo central estático */
.loader {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--primary-neon); /* Solo VERDE */
    box-shadow: 0 0 15px var(--primary-neon), inset 0 0 15px var(--primary-neon);
    animation: pulseCore 1.5s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

/* Ondas expansivas (Efecto FX) */
.loader::before, .loader::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-neon);
    animation: ripple 2s infinite linear;
    z-index: 1;
}

.loader::after {
    animation-delay: 1s; /* Retraso para generar onda continua */
}

.loader-text {
    margin-top: 30px;
    font-size: 1.2rem;
    letter-spacing: 5px;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    animation: textFlicker 3s infinite;
}

/* Animaciones */
@keyframes pulseCore {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1); opacity: 0.8; box-shadow: 0 0 30px var(--primary-neon); }
    100% { transform: scale(0.9); opacity: 1; }
}

@keyframes ripple {
    0% { width: 80px; height: 80px; opacity: 1; border-width: 2px; }
    100% { width: 200px; height: 200px; opacity: 0; border-width: 0px; }
}

@keyframes textFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; text-shadow: 0 0 10px var(--primary-neon); }
}

.loaded {
    opacity: 0;
    visibility: hidden;
}

.whatsapp-btn-footer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #128C7E, #25D366); /* Degradado oficial WA */
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Brillo al pasar el mouse */
.whatsapp-btn-footer:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.7);
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
}

/* Ícono un poco más grande */
.whatsapp-btn-footer i {
    font-size: 1.4rem;
}