/* ========================================
   Product Details Animations
   ======================================== */

/* Pulse Animation - Used for discount badge */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Slide Down Animation - Used for embroidery fields */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation - Used for lightbox modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Zoom In Animation - Used for lightbox content */
@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Smooth Slide Animation - For image transitions */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Bounce Animation - For interactive elements */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Glow Animation - For hover effects */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }
}

/* Rotate Animation - For loading indicators */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Animation Utilities
   ======================================== */

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-slideDown {
    animation: slideDown 0.3s ease;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease;
}

.animate-zoomIn {
    animation: zoomIn 0.3s ease;
}

.animate-slideInLeft {
    animation: slideInLeft 0.3s ease;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease;
}

.animate-bounce {
    animation: bounce 0.6s infinite;
}

.animate-glow {
    animation: glow 1.5s infinite;
}

.animate-rotate {
    animation: rotate 1s linear infinite;
}

/* ========================================
   Responsive Animations
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   Performance Optimizations
   ======================================== */

.will-animate {
    will-change: transform, opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
