/* ================= SKELETON LOADERS ================= */
/* Beautiful loading placeholders for content */

.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Skeleton card for products */
.skeleton-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 51, 51, 0.1);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 24px;
    width: 80%;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 16px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-price {
    height: 28px;
    width: 40%;
    margin-top: 15px;
}

.skeleton-button {
    height: 45px;
    width: 100%;
    margin-top: 15px;
    border-radius: 10px;
}

/* ================= LOADING SPINNER ================= */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

.loading-spinner.red {
    border-color: rgba(255, 51, 51, 0.3);
    border-top-color: #FF3333;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay .loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-loading::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}