/**
 * WooCommerce Dynamic Filter CSS
 * FINAL – Category & Brand Swipers Unified
 */

/* ==============================
   MAIN FILTER CONTAINER
============================== */
.dynamic-filters-container {
    margin: 0 0 2rem 0;
    padding: 1.5rem;
    background: #fff !important;
}

/* ==============================
   FILTER BUTTONS CONTAINER
============================== */
.filter-buttons-container {
    position: relative;
}

.filter-buttons {
    display: flex;
    align-items: center;
    animation: fadeInUp 0.3s ease;
}

/* ==============================
   SHARED FILTER BUTTON BASE
============================== */
.filter-btn {
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ==============================
   CATEGORY BUTTONS
============================== */
.filter-btn.category-btn {
    background: #F3F6FB;
    color: #000;
    padding: 10px 18px;
}

.filter-btn.category-btn:hover,
.filter-btn.category-btn.active {
    background: linear-gradient(135deg, #FF223B, #FFC629);
    color: #000;
}

.category-btn img.category-thumb {
    margin-right: 8px;
    border-radius: 2px;
    background: #fff;
}

/* ==============================
   BRAND BUTTONS (MATCH CATEGORY)
============================== */
.brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-radius: 999px;

    /* MATCH CATEGORY BUTTONS */
    padding: 10px 18px;
    margin: 0 4px;

    font-weight: 600;
    white-space: nowrap;

    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.brand-swiper .swiper-slide {
    margin-right: 0 !important;
}


.brand-btn:hover,
.brand-btn.active {
    background: linear-gradient(135deg, #FF223B, #FFC629);
    color: #000;
}

.brand-btn img.brand-thumb {
    margin-right: 8px;
    border-radius: 2px;
    background: #fff;
}

/* ==============================
   CATEGORY SWIPER
============================== */
.category-swiper .swiper-wrapper {
    height: 80px;
    align-items: center;
}

.category-swiper .swiper-slide {
    width: auto !important;
    min-width: 120px;
    max-width: 200px;
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-swiper .swiper-scrollbar {
    margin-top: 12px;
    margin-bottom: 4px;
    height: 5.5px;
}

/* ==============================
   BRAND SWIPER (MATCH CATEGORY)
============================== */
.brand-swiper .swiper-wrapper {
    height: 80px;
    align-items: center;
}

.brand-swiper .swiper-slide {
    width: auto !important;
    min-width: 120px;
    max-width: 200px;
    margin-right: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-swiper .swiper-scrollbar {
    margin-top: 12px;
    margin-bottom: 4px;
    height: 5.5px;
}

/* ==============================
   SCROLLBAR DRAG
============================== */
.swiper-scrollbar-drag {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

/* ==============================
   LOADING STATES
============================== */
.filter-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==============================
   ANIMATIONS
============================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================
   RESPONSIVE TWEAKS
============================== */
@media (max-width: 1024px) {
    .filter-btn {
        padding: 8px 14px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .dynamic-filters-container {
        padding: 0.75rem;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .category-btn img.category-thumb,
    .brand-btn img.brand-thumb {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
}

/* ==============================
   WOOCOMMERCE SAFETY
============================== */
.woocommerce .filter-btn:hover {
    color: #000;
}


/* ==============================
   LOAD MORE BUTTON
============================== */
.load-more-wrapper {
    text-align: center;
    margin: 20px 0 40px;
}

.load-more-products {
    background: linear-gradient(135deg, #FF223B, #FFC629);
    color: #000;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.load-more-products:hover {
    opacity: 0.9;
}

.load-more-products:active {
    transform: scale(0.97);
}

.load-more-products:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.load-more-products.loading::before {
    content: "⟳ ";
    display: inline-block;
    animation: spin 1s linear infinite;
}

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


ul.products.loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}


/* Hide default WooCommerce pagination */
.woocommerce-pagination {
    display: none !important;
}
