/**
 * STW Infinite Scroll - Frontend Styles
 *
 * @version 1.0.0
 */

/* Load Previous Container */
.stw-infinite-scroll-loadprev {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 50px;
}

/* Load Previous Button */
.stw-load-previous-btn {
    z-index: 10;
}

/* Loaders */
.stw-loader {
    text-align: center;
    padding: 1rem;
}

.stw-loader img {
    max-width: 50px;
    height: auto;
}

/* Previous Loader - positioned absolute to not affect layout */
#stw-prev-loader {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Next Loader */
.stw-next-loader {
    position: relative;
    margin-top: -50px;
    margin-bottom: 2rem;
}

/* Page Indicator */
.stw-page-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.stw-page-indicator.visible {
    opacity: 1;
}

.stw-page-indicator-text {
    white-space: nowrap;
}

/* Products container spacing to accommodate next loader */
.woocommerce-shop.woocommerce-page #woocommerce-wrapper .row.products,
.woocommerce.archive #woocommerce-wrapper .row.products {
    padding-bottom: 110px;
}

/* Ensure shop page has relative positioning */
.woocommerce-shop.woocommerce-page {
    position: relative;
}

/* Product fade-in animation for newly loaded products */
@keyframes stwFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stw-product-loaded {
    animation: stwFadeIn 0.3s ease-out forwards;
}

/* Page Separator - light grey line between pages */
.stw-page-separator {
    flex-basis: 100%;
    width: 100%;
    height: 1px;
    background-color: #ddd;
    margin: 1.5rem 0;
    border: none;
}

/*
 * WooCommerce pagination remains visible
 * Acts as visual indicator of more content and fallback navigation
 */
