/**
 * Brand by Aya - Custom Styles
 * This file contains custom styles that were moved from inline CSS for better performance
 */

/* ===========================
   Loading Spinner / Overlay
   =========================== */

/* Global page loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner animation */
.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 70px;
    height: 70px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading span,
.btn-loading i {
    visibility: hidden;
}

/* Inline spinner for text */
.spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}

/* Card/section loading overlay */
.card-loading {
    position: relative;
}

.card-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

/* ===========================
   Slider Section
   =========================== */
#slider-section {
    height: 350px;
}

#slider-section .swiper,
#slider-section .wrap-slider {
    height: 100%;
}

/* Wishlist Button Active State */
.wishlist-btn.active > * {
    display: inherit !important;
}

/* Wishlist Button Loading State */
.wishlist-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.wishlist-btn.loading .icon {
    animation: spin 0.8s linear infinite;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    #slider-section {
        height: 250px;
    }

    .tf-categories-container {
        gap: 30px 20px;
        justify-content: center;
    }

    .collection-image.img-style {
        width: 55px !important;
        height: 55px !important;
    }

    .collection-item-circle.hover-img {
        min-width: fit-content;
    }

    .collection-content.text-center {
        width: 55px;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}
