/* Infinite Scroll Loading Styles */
.products-content.loading-more {
    position: relative;
}

.products-content.loading-more::after {
    content: "Loading more products...";
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 9999;
    animation: fadeInOut 1.5s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hide pagination when infinite scroll is enabled */
.infinite-scroll-enabled .woocommerce-pagination,
.infinite-scroll-enabled .pagination-filter {
    display: none !important;
}

/* Smooth transition for new products */
.products .product {
    opacity: 0;
    animation: fadeInProduct 0.5s ease-in-out forwards;
}

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

/* Loading indicator for initial load */
.products-content.loading {
    position: relative;
    min-height: 200px;
}

.products-content.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 100;
}

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

/* End of products indicator */
.infinite-scroll-end {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

.infinite-scroll-end::before {
    content: "No more products to load";
}