/* =====================================================
   🎨 MEJORAS ESTÉTICAS PREMIUM - LOWKEY
   Animaciones, efectos y mejoras visuales
   ===================================================== */

/* =====================================================
   1. SCROLL SUAVE ENTRE SECCIONES
   ===================================================== */
html {
    scroll-behavior: smooth;
}

/* =====================================================
   2. FOOTER LINKS CON UNDERLINE ANIMADO
   ===================================================== */
.footer a {
    position: relative;
    transition: color 0.3s ease;
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--neon, #00ff9c);
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}

/* =====================================================
   3. PARTÍCULAS FLOTANTES EN BACKGROUND
   ===================================================== */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(0,255,156,0.15), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(0,255,156,0.1), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(0,255,156,0.2), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(0,255,156,0.12), transparent),
        radial-gradient(2px 2px at 30% 80%, rgba(0,255,156,0.08), transparent);
    background-size: 200px 200px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px;
    animation: particles 25s linear infinite;
    opacity: 0.4;
    pointer-events: none;
    z-index: 1;
}

@keyframes particles {
    0% { 
        background-position: 0 0, 40px 60px, 130px 270px, 70px 100px, 150px 50px;
    }
    100% { 
        background-position: 50px 50px, 90px 110px, 180px 320px, 120px 150px, 200px 100px;
    }
}

/* Asegurar que el contenido del hero esté sobre las partículas */
.hero-text,
.hero-image {
    position: relative;
    z-index: 2;
}

/* =====================================================
   4. HERO CAROUSEL - MÚLTIPLES IMÁGENES ROTANDO
   ===================================================== */
.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4));
}

/* Indicadores del carousel (dots) */
.hero-carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-carousel-indicator.active {
    background: var(--neon, #00ff9c);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 10px rgba(0, 255, 156, 0.6);
}

.hero-carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* =====================================================
   5. PARALLAX SUTIL EN HERO IMAGE
   ===================================================== */
.hero-image.parallax {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* =====================================================
   6. ANIMACIONES FADEINUP EN PRODUCT CARDS
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-premium {
    animation: fadeInUp 0.6s ease backwards;
}

/* Delay escalonado para cada card */
.product-card-premium:nth-child(1) { animation-delay: 0.1s; }
.product-card-premium:nth-child(2) { animation-delay: 0.2s; }
.product-card-premium:nth-child(3) { animation-delay: 0.3s; }
.product-card-premium:nth-child(4) { animation-delay: 0.4s; }
.product-card-premium:nth-child(5) { animation-delay: 0.5s; }
.product-card-premium:nth-child(6) { animation-delay: 0.6s; }
.product-card-premium:nth-child(7) { animation-delay: 0.7s; }
.product-card-premium:nth-child(8) { animation-delay: 0.8s; }

/* Si hay más de 8, resetear delay */
.product-card-premium:nth-child(n+9) { animation-delay: 0.1s; }

/* Evitar animación al cambiar filtros (opcional) */
.products-grid.no-animation .product-card-premium {
    animation: none;
}

/* =====================================================
   7. SECCIÓN LEGAL/PRODUCTO RESPONSABLE MEJORADA
   ===================================================== */
.legal-section {
    background: linear-gradient(180deg, #0b0b0b 0%, #141414 50%, #0b0b0b 100%);
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

/* Efecto de profundidad con líneas */
.legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 156, 0.3) 50%,
        transparent 100%
    );
}

.legal-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 255, 156, 0.3) 50%,
        transparent 100%
    );
}

.legal-box {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.8), rgba(10, 10, 10, 0.9));
    border: 1px solid rgba(0, 255, 156, 0.15);
    border-radius: 20px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Glow sutil en esquinas */
.legal-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(0, 255, 156, 0.05) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.legal-box h4 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

/* Línea decorativa bajo el título */
.legal-box h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--neon, #00ff9c), transparent);
    border-radius: 2px;
}

.legal-box p {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-align: center;
}

.legal-box p:last-child {
    margin-bottom: 0;
}

/* Icono decorativo */
.legal-box::after {
    content: '⚖️';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    opacity: 0.1;
}

/* =====================================================
   8. HERO BUTTON CON RIPPLE EFFECT
   ===================================================== */
.hero-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.hero-btn:hover::before {
    width: 300%;
    height: 300%;
}

.hero-btn:active::before {
    width: 0;
    height: 0;
    transition: 0s;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .legal-box {
        padding: 40px 30px;
    }
    
    .legal-box h4 {
        font-size: 1.6rem;
    }
    
    .legal-box p {
        font-size: 0.95rem;
    }
    
    .hero-carousel-indicators {
        bottom: 10px;
    }
    
    .hero-carousel-indicator {
        width: 8px;
        height: 8px;
    }
    
    .hero-carousel-indicator.active {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .legal-section {
        padding: 60px 15px;
    }
    
    .legal-box {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .legal-box h4 {
        font-size: 1.4rem;
    }
    
    .legal-box p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* =====================================================
   OPTIMIZACIONES DE PERFORMANCE
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Force GPU acceleration para animaciones suaves */
.hero-carousel-slide,
.product-card-premium,
.hero-image.parallax {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
