/**
 * AJAX Taxonomy Filter
 * CSS Styles - Cải tiến
 */
.ajax-taxonomy-filter label{
        font-size: 17px;
    font-weight: normal;
}
.ajax-taxonomy-filter {
    margin-bottom: 20px;
    font-size: 14px;
}

/* Danh sách các term */
.ajax-taxonomy-filter ul.filter-terms {
    list-style-type: none;
    padding: 0;
    margin: 0 0 15px 0;
    max-height: 300px;
    overflow-y: auto;
}

.ajax-taxonomy-filter ul.filter-terms li {
    margin-left: 0px;
    margin-bottom: 8px;
    padding: 3px 0;
}

.ajax-taxonomy-filter ul.filter-terms label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
}

.ajax-taxonomy-filter ul.filter-terms input[type='checkbox'] {
    margin-right: 8px;
        margin-bottom: 4px;
}

.ajax-taxonomy-filter ul.filter-terms .count {
    color: #999;
    font-size: 12px;
    margin-left: 4px;
}

/* Nút xóa tất cả bộ lọc */
.ajax-clear-filters-container {
    margin-top: 15px;
    margin-bottom: 15px;
}

.ajax-clear-filters-container .clear-all-filters {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    margin-bottom: 0px;
}

.ajax-clear-filters-container .clear-all-filters:hover {
    background-color: #e9e9e9;
    color: #000;
}

/* Phân trang */
.atf-pagination {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    clear: both;
}

.atf-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    text-decoration: none;
    border-radius: 3px;
}

.atf-pagination .page-numbers.current {
    background-color: #f1f1f1;
    font-weight: bold;
}

/* Loading overlay */
.products-loading {
    position: relative;
    min-height: 200px;
}

.products-loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1;
}

/* Centered loading image */
.atf-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.atf-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.atf-loading-image {
    max-width: 100px;
    max-height: 100px;
}

/* Thêm hiệu ứng nhấp nháy khi lọc đang xử lý */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.atf-loading-image {
    animation: pulse 1s infinite ease-in-out;
}

/* Hiển thị kết quả lọc */
.atf-filter-results {
    margin-bottom: 20px;
    padding: 8px 12px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 14px;
    color: #555;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ajax-taxonomy-filter ul.filter-terms {
        max-height: 200px;
    }
    
    .atf-loading-overlay .atf-loading-image {
        max-width: 80px;
        max-height: 80px;
    }
}

/* Hiệu ứng hover cho checkbox */
.ajax-taxonomy-filter ul.filter-terms label:hover {
    color: #333;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
    padding-left: 5px;
    margin-left: -5px;
}

/* Hiệu ứng khi checkbox được chọn */
.ajax-taxonomy-filter ul.filter-terms input[type='checkbox']:checked + span {
    font-weight: bold;
}

/* Flatsome theme compatibility */
.widget .ajax-taxonomy-filter ul.filter-terms {
    font-size: 0.9em;
}

.widget .ajax-taxonomy-filter ul.filter-terms li {
    margin-bottom: 5px;
    width: 50%;
    display: inline-flex
;
}
.widget_ajax_taxonomy_filter_widget span.widget-title{
    display: block;
    text-transform: initial !important;
    margin-bottom: 10px !important;
}
.widget_ajax_clear_filters_widget{
    margin-bottom: 0px !important;
}