/**
 * PJAX Product Navigation Styles
 * ONLY loading overlay and spinner - NO design changes to existing sections
 */

/* Loading overlay */
.pjax-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99999;
    display: none;
    backdrop-filter: blur(3px);
}

.pjax-overlay.show {
    display: flex;
}

.pjax-overlay .pjax-spinner-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pjax-overlay .pjax-spinner-wrapper .pjax-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    animation: pjax-spin 0.8s linear infinite;
    box-shadow: 0 4px 15px rgba(0, 115, 170, 0.2);
}

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

/* Loading state for body */
body.pjax-loading {
    cursor: wait;
    overflow: hidden;
}

body.pjax-loading * {
    pointer-events: none;
}

.pjax-card-link {
    cursor: pointer;
}

.pjax-overlay .pjax-spinner-wrapper .spinner-text {
    color: #0073aa;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    .pjax-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pjax-spinner {
        animation: none;
        border-top-color: transparent;
        border-right-color: #0073aa;
    }
    
    .pjax-overlay::after {
        animation: none;
    }
}
