/* --- PHẦN 1: TỐI ƯU GIAO DIỆN BỘ LỌC SIDEBAR THEO STYLE ẢNH MỚI --- */
.rt-filter-container {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    max-width: 300px;
    font-family: inherit; /* Ăn theo font chuẩn của hệ thống */
}

.rt-filter-group {
    margin-bottom: 28px;
    padding-bottom: 24px;
}

.rt-filter-group:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

.rt-filter-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

/* Tiêu đề nhóm bộ lọc: To, đậm, rõ ràng */
.rt-filter-heading h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #111827 !important;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #f3f4f6;
}

.rt-clear-group {
    font-size: 14px;
    color: #4da43a;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.rt-clear-group:hover {
    text-decoration: underline;
}

/* Font chữ các danh mục lựa chọn (Checkbox) to và rõ hơn */
.rt-filter-group label {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    font-size: 19px !important; /* Tăng font chữ danh mục to lên như ảnh */
    color: #1f2937 !important; /* Màu đen xám đậm nét */
    cursor: pointer;
    font-weight: 500 !important;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.rt-filter-group label:hover {
    color: #111827 !important;
}

/* Căn lề checkbox vuông vắn */
.rt-filter-group label input[type="checkbox"] {
    margin: 0 12px 0 0 !important;
    cursor: pointer;
    width: 16px !important;
    height: 16px !important;
}

/* --- FIX DỨT ĐIỂM: ĐƯA 3 NÚT TRẠNG THÁI CHỮ THƯỜNG LÊN CÙNG 1 DÒNG --- */
.rt-status-tags {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important; /* Tuyệt đối chặn rớt hàng */
    gap: 8px !important; /* Khoảng cách vừa vặn giữa các nút */
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rt-status-tags button.rt-tag {
    flex: 1 !important; /* Chia đều không gian 3 nút bằng nhau */
    width: auto !important;
    max-width: 33.33% !important;
    background: #ffffff !important;
    border: 1px solid #9ca3af !important; /* Màu viền xám mảnh chuẩn như ảnh */
    border-radius: 8px !important; /* Bo góc tròn nhẹ hiện đại */
    padding: 10px 0 !important; /* Padding dọc thoáng, bỏ hoàn toàn padding ngang */
    font-size: 14px !important; /* Font chữ nút to rõ ràng */
    font-weight: 500 !important; /* Chữ đậm vừa phải */
    color: #1f2937 !important;
    text-align: center !important;
    cursor: pointer !important;
    white-space: nowrap !important; /* Không cho chữ bên trong tự bẻ hàng */
    text-transform: none !important; /* Giữ nguyên chữ thường (Nổi bật, Giảm giá...) không chuyển IN HOA */
    letter-spacing: 0px !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
}

.rt-status-tags button.rt-tag:hover {
    border-color: #4b5563 !important;
    background-color: #f9fafb !important;
    color: #111827 !important;
}

/* Giao diện khi nút được kích hoạt chọn */
.rt-status-tags button.rt-tag.active {
    background: #111827 !important;
    color: #ffffff !important;
    border-color: #111827 !important;
    font-weight: 600 !important;
}

/* Nút Đặt lại ở chân bộ lọc */
.rt-btn-reset {
    width: 100%;
    background: #111827;
    color: #ffffff;
    padding: 14px 0;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s ease;
}

.rt-btn-reset:hover {
    background: #374151;
}

/* --- PHẦN 2: HIỆU ỨNG MỜ OVERLAY LÚC ĐANG TẢI --- */
.rt-filter-overlay {
    display: none;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.65);
    z-index: 99;
}
.rt-spinner {
    position: sticky;
    top: 35vh;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #111827;
    border-radius: 50%;
    animation: rt_spin 0.8s linear infinite;
}
@keyframes rt_spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- PHẦN 3: TRIỆT TIÊU TUYỆT ĐỐI NÚT XEM THÊM CŨ VÀ PHÂN TRANG CỦA FLATSOME --- */
body.rt-filter-active-state .load-more-html,
body.rt-filter-active-state .woocommerce-pagination,
body.rt-filter-active-state .rt-ajax-pagination,
body.rt-filter-active-state [class*="pagination"],
body.rt-filter-active-state .navigation,
body.rt-filter-active-state .products-footer,
body.rt-filter-active-state .pagination-parent,
body.rt-filter-active-state #wrapper + .load-more-html {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* --- PHẦN 4: GIAO DIỆN NÚT MỚI GIẢ LẬP ĐỒNG BỘ 100% NÚT FLATSOME CŨ --- */
.rt-custom-loadmore-container {
    text-align: center !important;
    margin: 40px 0 30px 0 !important;
    width: 100% !important;
    clear: both !important;
    display: block !important;
}

.rt-custom-loadmore-container button#rt-load-more-btn {
    display: inline-block !important;
    background-color: #f05252 !important; /* Màu đỏ cam chuẩn thương hiệu Flatsome */
    color: #ffffff !important; /* Chữ trắng tinh nổi bật */
    border: none !important; /* Không viền */
    padding: 12px 38px !important; /* Khoảng cách đệm tạo form ovan dài */
    font-size: 16px !important;
    font-weight: 700 !important; /* Chữ in đậm chuẩn như hình */
    text-transform: none !important; /* Giữ nguyên kiểu chữ "Xem thêm sản phẩm" chỉ viết hoa chữ đầu */
    letter-spacing: 0.5px !important;
    border-radius: 99px !important; /* Bo tròn tuyệt đối thành hình ovan */
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important; /* Đổ bóng nhẹ tự nhiên */
    transition: all 0.25s ease-in-out !important;
    outline: none !important;
}

/* Hiệu ứng khi người dùng di chuột vào (Hover) */
.rt-custom-loadmore-container button#rt-load-more-btn:hover {
    background-color: #d94141 !important; /* Đậm hơn một chút khi hover để tạo cảm giác phản hồi tốt */
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Hiệu ứng khi người dùng click chuột vào (Active) */
.rt-custom-loadmore-container button#rt-load-more-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}