/* Amazon-Style Product Carousel Animations - Compact Version */

/* Keyframe animations for carousel */
@keyframes spin {
    to { 
        transform: translate(-50%, -50%) rotate(360deg); 
    }
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Carousel transition animations - faster for compact view */
.carousel-transition {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-fade {
    transition: opacity 0.2s ease-in-out;
}

/* Button hover animations - subtle for compact view */
.amazon-btn-primary,
.amazon-btn-secondary {
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* .amazon-btn-primary:hover {
    animation: pulse 0.2s ease-in-out;
} */

/* Loading spinner animation - smaller */
.loading-spinner {
    animation: spin 0.8s linear infinite;
}

/* Progressive image loading - faster for compact view */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Compact hover effects */
.amazon-product-card {
    transition: all 0.2s ease;
}

.amazon-product-card:hover {
    animation: fadeIn 0.2s ease forwards;
}

/* Micro animations for better UX in compact view */
.carousel-btn {
    transition: all 0.15s ease;
}

.indicator {
    transition: all 0.15s ease;
}

.product-main-image {
    transition: transform 0.2s ease;
}

/* Responsive animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile specific animations - even faster */
@media (max-width: 767px) {
    .carousel-transition {
        transition: transform 0.2s ease;
    }
    
    .amazon-btn-primary:hover,
    .amazon-btn-secondary:hover {
        animation: none;
        transform: none;
    }
    
    .amazon-product-card:hover .product-main-image {
        transform: scale(1.01);
    }
}