/**
 * Infinite Scroll Loading Overlay
 * Dim white screen with spinner for loading more items
 */

#infinite-scroll-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#infinite-scroll-overlay.active {
    opacity: 1;
    visibility: visible;
}

.infinite-scroll-spinner {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.infinite-scroll-spinner p {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Spinner Animation */
.spinner-border {
    display: inline-block;
    width: 3rem;
    height: 3rem;
    border: 0.35em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border-animation 0.75s linear infinite;
    color: #a00b25; /* Your brand color */
}

@keyframes spinner-border-animation {
    to {
        transform: rotate(360deg);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth item fade-in */
.mega-product-box {
    transition: opacity 0.3s ease-in;
}

/* End of items message */
.infinite-scroll-end {
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.infinite-scroll-end-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
}

.infinite-scroll-end-content svg {
    color: #10b981;
    flex-shrink: 0;
}

.infinite-scroll-end-content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

.infinite-scroll-end-content strong {
    color: #111827;
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .infinite-scroll-spinner {
        padding: 20px;
    }
    
    .infinite-scroll-spinner p {
        font-size: 14px;
    }
    
    .spinner-border {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .infinite-scroll-end {
        padding: 30px 15px;
    }
    
    .infinite-scroll-end-content {
        padding: 12px 20px;
        font-size: 14px;
    }
}

