/* =================== Product Carousel Custom Enhancements =================== */

/* Enhanced animations for better performance */
.product-card,
.latest-product-card,
.showcase-card {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Loading states */
.owl-carousel .owl-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.owl-carousel .owl-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom scrollbar for carousel if needed */
.owl-carousel::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Enhanced hover effects */
.product-card:hover .product-image {
    transform: scale(1.05) rotate(1deg);
}

.latest-product-card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Pulse animation for featured elements */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(18, 115, 235, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(18, 115, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(18, 115, 235, 0); }
}

.product-card.featured {
    animation: pulse 2s infinite;
}

/* Improved loading animation */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Touch-friendly navigation on mobile */
@media (max-width: 768px) {
    .owl-carousel .owl-nav button {
        font-size: 18px !important;
        padding: 15px !important;
        margin: 5px !important;
    }
    
    .owl-carousel .owl-dots .owl-dot {
        margin: 0 8px !important;
    }
    
    .owl-carousel .owl-dots .owl-dot span {
        width: 15px !important;
        height: 15px !important;
    }
}

/* Accessibility improvements */
.owl-carousel .owl-nav button:focus,
.owl-carousel .owl-dots .owl-dot:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .owl-carousel,
    .carousel-navigation {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .product-card,
    .latest-product-card,
    .showcase-card {
        border: 2px solid #000;
    }
    
    .tag,
    .mini-tag,
    .feature-tag {
        border: 1px solid #000;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .latest-product-card,
    .showcase-card,
    .main-product-img,
    .glow-ring,
    .particle {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .section-title .main-title {
        color: #fff;
    }
    
    .section-title .sub-title {
        color: #ccc;
    }
    
    .product-card {
        background: #2c3e50;
        color: #fff;
    }
}
