/* ========================================
   PREMIUM INTERACTIONS - VISUAL ENHANCEMENTS
   ======================================== */

/* --- 1. SCROLL PROGRESS BAR --- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #ffd700 0%, #ffb800 50%, #ffd700 100%);
    background-size: 200% 100%;
    z-index: 9999;
    transition: width 0.1s ease-out;
    animation: progressShimmer 3s linear infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

@keyframes progressShimmer {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* --- 2. CUSTOM CURSOR --- */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.15s ease;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    position: fixed;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

.custom-cursor.hover {
    transform: scale(1.8);
    background: rgba(255, 215, 0, 0.1);
}

.custom-cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.6;
}

/* --- 3. MAGNETIC HOVER EFFECT --- */
.product-card {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.product-card.magnetic-active {
    transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) scale(1.02);
}

.product-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: -1;
}

.product-card:hover::before {
    opacity: 1;
    animation: rotateGlow 3s linear infinite;
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- 4. RIPPLE EFFECT ON BUTTONS --- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* --- 5. SMOOTH SECTION REVEALS --- */
.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- 6. ENHANCED MICRO-INTERACTIONS --- */
.btn-hero-primary,
.btn-hero-secondary,
.btn-add-to-cart,
.category-btn {
    position: relative;
    overflow: hidden;
}

/* Glow on hover for interactive elements */
.interactive-glow {
    transition: box-shadow 0.3s ease;
}

.interactive-glow:hover {
    box-shadow:
        0 0 20px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2);
}

/* Icon animations */
.animated-icon {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animated-icon:hover {
    transform: scale(1.2) rotate(5deg);
}

/* --- 7. PARTICLES CONTAINER --- */
#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* --- 8. LOADING TRANSITIONS --- */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger delays for multiple elements */
.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

.fade-in-up:nth-child(5) {
    animation-delay: 0.5s;
}

/* --- 9. ENHANCED SCROLL BEHAVIOR --- */
html {
    scroll-behavior: smooth;
}

/* Custom cursor deshabilitado: mantener cursor nativo */
body.custom-cursor-enabled {
    cursor: auto;
}

body.custom-cursor-enabled a,
body.custom-cursor-enabled button,
body.custom-cursor-enabled .product-card {
    cursor: auto;
}

/* --- 10. PERFORMANCE OPTIMIZATIONS --- */
.product-card,
.category-card,
.brand-card {
    will-change: transform;
}

.custom-cursor,
.custom-cursor-dot {
    will-change: transform;
}