@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.4s ease both;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.04s; }
.product-card:nth-child(3) { animation-delay: 0.08s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.16s; }
.product-card:nth-child(6) { animation-delay: 0.2s; }
.product-card:nth-child(7) { animation-delay: 0.24s; }
.product-card:nth-child(8) { animation-delay: 0.28s; }
.product-card:nth-child(n+9) { animation-delay: 0.3s; }

.product-detail__card {
    animation: fadeInUp 0.4s ease both;
}

.breadcrumbs {
    animation: fadeInUp 0.3s ease both;
}

.htmx-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
    animation: htmxProgress 1.5s ease-in-out infinite;
}

.htmx-request .htmx-indicator,
.htmx-indicator.htmx-request {
    opacity: 1;
}

@keyframes htmxProgress {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    50.1% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}

@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-detail__card,
    .breadcrumbs {
        animation: none;
    }

    .htmx-indicator {
        animation: none;
    }
}
