/* Products Page Animations */

/* Fade In Animation for Products */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }

/* Hover Effects */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Image Zoom Effect */
.product-image {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover .product-image {
    transform: scale(1.15);
}

/* Badge Animation */
.product-badge {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Overlay Animation */
.product-overlay {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.overlay-actions {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-overlay:hover .overlay-actions {
    transform: translateY(0) scale(1.1);
}

/* Button Hover Effects */
.product-actions .btn {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.product-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.product-actions .btn:hover::before {
    left: 100%;
}

.product-actions .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Category Filter Animation */
.category-item {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-item:hover {
    transform: translateX(-8px) scale(1.02);
}

.category-item.active {
    animation: categoryActive 0.5s ease-out;
}

@keyframes categoryActive {
    0% {
        transform: scale(0.95);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Price Range Slider */
.form-range {
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb {
    transition: all 0.3s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* View Toggle Animation */
.view-toggle {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.view-toggle:hover {
    transform: scale(1.1);
}

.view-toggle.active {
    animation: toggleActive 0.3s ease-out;
}

@keyframes toggleActive {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Pagination Animation */
.pagination .page-link {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pagination .page-link:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State Animation */
.empty-state {
    animation: fadeInUp 0.8s ease-out;
}

.empty-state-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hero Section Animation */
.hero-title {
    animation: slideInDown 1s ease-out;
}

.hero-subtitle {
    animation: slideInUp 1s ease-out 0.3s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Card Animation */
.filter-card {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Products Grid Animation */
.products-grid {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Star Rating Animation */
.star {
    transition: all 0.3s ease;
}

.star.filled {
    animation: starFill 0.5s ease-out;
}

@keyframes starFill {
    0% {
        transform: scale(0.8);
        color: #ddd;
    }
    50% {
        transform: scale(1.2);
        color: #ffd700;
    }
    100% {
        transform: scale(1);
        color: #ffd700;
    }
}

/* Price Animation */
.price-current {
    animation: priceGlow 2s ease-in-out infinite alternate;
}

@keyframes priceGlow {
    from {
        text-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
    }
    to {
        text-shadow: 0 0 15px rgba(102, 126, 234, 0.6);
    }
}

/* Stock Status Animation */
.stock-available {
    animation: stockPulse 2s ease-in-out infinite;
}

@keyframes stockPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Responsive Animations */
@media (max-width: 768px) {
    .product-card {
        animation-delay: 0.1s !important;
    }
    
    .category-item:hover {
        transform: translateX(-5px) scale(1.01);
    }
    
    .product-card:hover {
        transform: translateY(-10px) scale(1.01);
    }
}

@media (max-width: 576px) {
    .product-card {
        animation: none;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
    }
} 