/* --- Preloader Styles --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #FFFFFF; /* White background (matches user preference) */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it covers everything */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.expanding-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #000000; /* Black outline */
    border-radius: 50%;
    animation: pulse-ring 1.5s infinite ease-in-out;
}

.site-branding {
    color: #000000;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    letter-spacing: 2px;
    opacity: 0;
    animation: fade-in-text 1.5s 0.3s forwards; /* Delayed fade in */
}

/* Keyframe Animations */
@keyframes pulse-ring {
    0% {
        transform: scale(0.1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1);
        opacity: 0.2;
    }
    100% {
        transform: scale(0.1);
        opacity: 0.8;
    }
}

@keyframes fade-in-text {
    to {
        opacity: 1;
    }
}

/* ================= ORDER PROCESSING LOADER ================= */

#order-loader {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.98);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

#order-loader.active {
    display: flex;
}

.order-loader-box {
    text-align: center;
}

.order-spinner {
    width: 70px;
    height: 70px;
    border: 3px solid #e0e0e0;
    border-top: 3px solid #000;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 20px;
}

.order-loader-box p {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.order-loader-box small {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 0.85rem;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
