
:root {
    --brand-color: #D52927;
}

.wpfMainWrapper {
    --f-ink: #111;
    --f-text: #2b2b2b;
    --f-muted: #8a8a8a;
    --f-line: #e5e5e5;
    --f-field: #d4d4d4;
    --f-soft: #f5f5f4;
    --f-red: #D52927;
    --f-r: 3px;

    color: var(--f-text);
}

/* ---------- KHUNG TỪNG NHÓM LỌC ---------- */
.wpfMainWrapper .wpfFilterWrapper {
    margin: 0 !important;
    padding: 20px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--f-line) !important;
    border-radius: 0 !important;
}

.wpfMainWrapper .wpfFilterWrapper:first-child {
    padding-top: 0 !important;
    border-top: 0 !important;
}

/* Tiêu đề nhóm (thêm cho các nhóm đang tắt tiêu đề) */
.wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfSortBy"]::before,
.wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfCategory"]::before,
.wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfPrice"]::before {
    display: block;
    margin: 0 0 14px;
    color: var(--f-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfSortBy"]::before { content: "Sắp xếp"; }
/* .wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfCategory"]::before { content: "Danh mục"; } */
.wpfMainWrapper .wpfFilterWrapper[data-filter-type="wpfPrice"]::before { content: "Khoảng giá"; }

/* Tiêu đề có sẵn của plugin (Thương hiệu) */
.wpfMainWrapper .wpfFilterTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 14px !important;
    padding: 0 !important;
    cursor: pointer;
}

.wpfMainWrapper .wpfFilterTitle .wfpTitle {
    margin: 0;
    color: var(--f-ink) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.wpfMainWrapper .wpfFilterTitle .wpfTitleToggle {
    color: var(--f-muted);
    font-size: 10px !important;
    transition: color .15s ease;
}

.wpfMainWrapper .wpfFilterTitle:hover .wpfTitleToggle {
    color: var(--f-ink);
}

.wpfMainWrapper .wpfFilterContent {
    font-weight: 400;
}

/* ---------- SẮP XẾP ---------- */
.wpfMainWrapper #wpfSortProducts {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 40px 0 14px !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    border: 1px solid var(--f-field) !important;
    border-radius: var(--f-r) !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--f-ink) !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    transition: border-color .15s ease;
}

.wpfMainWrapper #wpfSortProducts:hover,
.wpfMainWrapper #wpfSortProducts:focus {
    border-color: var(--f-ink) !important;
}

/* ---------- DANH SÁCH CHUNG ---------- */
.wpfMainWrapper .wpfCheckbox {
    display: none !important;
}

.wpfMainWrapper .wpfCheckboxHier ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.wpfMainWrapper .wpfCheckboxHier ul > li,
.wpfMainWrapper li[data-term-id] {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.wpfMainWrapper .wpfLiLabel {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.wpfMainWrapper li.wpfOptionDisabled {
    opacity: .4 !important;
    pointer-events: none;
}

/* Thanh cuộn mảnh cho danh sách dài */
.wpfMainWrapper .wpfFilterVerScroll {
    scrollbar-width: thin;
    scrollbar-color: #c9c9c9 transparent;
}

.wpfMainWrapper .wpfFilterVerScroll::-webkit-scrollbar {
    width: 4px;
}

.wpfMainWrapper .wpfFilterVerScroll::-webkit-scrollbar-thumb {
    background: #c9c9c9;
    border-radius: 4px;
}

/* ---------- DANH MỤC: danh sách có ô tick ---------- */
.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfFilterVerScroll {
    display: flex !important;
    flex-direction: column;
    gap: 2px;
    max-height: 260px !important;
    padding-right: 6px !important;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] li[data-term-id] {
    display: block;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfDisplay {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfValue {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    color: var(--f-text) !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    transition: color .15s ease;
}


/* Ô tick */
.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfValue::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    background: #fff no-repeat center / 10px 8px;
    border: 1px solid #bdbdbd;
    border-radius: 2px;
    transition: background-color .15s ease, border-color .15s ease;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfFilterTaxNameWrapper {
    padding: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfLiLabel:hover .wpfValue {
    background: none !important;
    color: var(--f-red) !important;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfLiLabel:hover .wpfValue::before {
    border-color: var(--f-ink);
}

/* Đang chọn */
.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfLiLabel:has(input:checked) .wpfValue {
    background: none !important;
    color: var(--f-ink) !important;
    font-weight: 700;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfLiLabel:has(input:checked) .wpfValue::before {
    background-color: var(--f-ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 4l2.6 2.6L9 1.2'/%3E%3C/svg%3E");
    border-color: var(--f-ink);
}

/* Số lượng */
.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfCount {
    position: static !important;
    flex-shrink: 0;
    padding: 0 !important;
    background: none !important;
    color: var(--f-muted) !important;
    font-size: 12px !important;
    font-weight: 400;
}

.wpfMainWrapper [data-filter-type="wpfCategory"] .wpfLiLabel:has(input:checked) .wpfCount {
    color: var(--f-ink) !important;
}

/* Danh mục con: thụt vào, có vạch dẫn */
.wpfMainWrapper [data-filter-type="wpfCategory"] li > ul {
    margin: 2px 0 4px 7px !important;
    padding-left: 18px !important;
    border-left: 1px solid var(--f-line);
}

.wpfMainWrapper [data-filter-type="wpfCategory"] li > ul .wpfValue {
    font-size: 13px;
}

/* ---------- THƯƠNG HIỆU: chip nằm ngang, tự xuống dòng ---------- */
.wpfMainWrapper [data-filter-type="wpfTags"] .wpfCheckboxHier,
.wpfMainWrapper [data-filter-type="wpfTags"] .wpfFilterContent {
    display: block !important;
    width: 100% !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] ul.wpfFilterVerScroll {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: flex-start;
    gap: 6px !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] ul.wpfFilterVerScroll > li[data-term-id] {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: 100%;
    float: none !important;
}

/* Mục bị plugin ẩn (không có sản phẩm) vẫn phải ẩn */
.wpfMainWrapper [data-filter-type="wpfTags"] ul.wpfFilterVerScroll > li[data-term-id][style*="display: none"],
.wpfMainWrapper [data-filter-type="wpfTags"] ul.wpfFilterVerScroll > li.wpfOptionDisabled {
    display: none !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfLiLabel,
.wpfMainWrapper [data-filter-type="wpfTags"] .wpfDisplay {
    display: inline-flex !important;
    width: auto !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfValue {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    background: #fff !important;
    border: 1px solid var(--f-field) !important;
    border-radius: var(--f-r);
    color: var(--f-ink) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    white-space: nowrap;
    text-transform: uppercase;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfFilterTaxNameWrapper {
    padding: 0 !important;
    color: inherit !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfCount {
    display: none !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfLiLabel:hover .wpfValue {
    background: #fff !important;
    border-color: var(--f-ink) !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfLiLabel:has(input:checked) .wpfValue {
    background: var(--f-ink) !important;
    border-color: var(--f-ink) !important;
    color: #fff !important;
}

.wpfMainWrapper [data-filter-type="wpfTags"] .wpfLiLabel:has(input:checked) .wpfValue * {
    color: #fff !important;
}
/* ---------- KHOẢNG GIÁ ---------- */
.wpfMainWrapper #wpfSliderRange,
.wpfMainWrapper .wpfPriceFilterRange {
    height: 2px !important;
    margin: 10px 8px 22px !important;
    background: var(--f-line) !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.wpfMainWrapper .wpfPriceFilterRange .ui-slider-range {
    height: 2px !important;
    background: var(--f-ink) !important;
    border: 0 !important;
}

.wpfMainWrapper .wpfPriceFilterRange .ui-slider-handle {
    top: 50% !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 0 0 -8px !important;
    background: #fff !important;
    border: 2px solid var(--f-ink) !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    outline: none !important;
    transform: translateY(-50%);
    cursor: grab;
    transition: transform .15s ease, border-color .15s ease;
}

.wpfMainWrapper .wpfPriceFilterRange .ui-slider-handle:hover,
.wpfMainWrapper .wpfPriceFilterRange .ui-slider-handle:focus,
.wpfMainWrapper .wpfPriceFilterRange .ui-slider-handle.ui-state-active {
    border-color: var(--f-red) !important;
    transform: translateY(-50%) scale(1.15);
}

/* Giá thấp - giá cao: 2 ô nhỏ */
.wpfMainWrapper .wpfPriceInputs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 !important;
    color: var(--f-ink) !important;
    font-size: 13px;
    font-weight: 600;
}

.wpfMainWrapper .wpfPriceInputs .wpfCurrencySymbol {
    display: none;
}

.wpfMainWrapper #wpfMinPriceSpan,
.wpfMainWrapper #wpfMaxPriceSpan {
    flex: 1;
    padding: 8px 10px;
    background: var(--f-soft);
    border-radius: var(--f-r);
    color: var(--f-ink) !important;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.wpfMainWrapper #wpfMinPriceSpan::after,
.wpfMainWrapper #wpfMaxPriceSpan::after {
    content: " VND";
    color: var(--f-muted);
    font-weight: 400;
}

.wpfMainWrapper .wpfPriceInputs .wpfFilterDelimeter {
    color: var(--f-muted) !important;
}

/* ---------- NÚT ---------- */
.wpfMainWrapper .wpfFilterButtons {
    display: flex;
    justify-content: stretch;
    gap: 8px;
    margin: 4px 0 0 !important;
    padding: 20px 0 0 !important;
    border-top: 1px solid var(--f-line);
}

.wpfMainWrapper .wpfFilterButtons .wpfButton {
    flex: 1;
    width: auto !important;
    margin: 0 !important;
}

.wpfMainWrapper .wpfFilterButtons button.wpfFilterButton,
.wpfMainWrapper .wpfFilterButtons button.wpfClearButton {
    height: 44px;
    padding: 0 16px !important;
    background: transparent !important;
    border: 1px solid var(--f-ink) !important;
    border-radius: var(--f-r) !important;
    color: var(--f-ink) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background-color .15s ease, color .15s ease;
}

.wpfMainWrapper .wpfFilterButtons button.wpfFilterButton {
    background: var(--f-ink) !important;
    color: #fff !important;
}

.wpfMainWrapper .wpfFilterButtons button.wpfFilterButton:hover {
    background: var(--f-red) !important;
    border-color: var(--f-red) !important;
}

.wpfMainWrapper .wpfFilterButtons button.wpfClearButton:hover {
    background: var(--f-ink) !important;
    color: #fff !important;
}

/* =========================================================
   BỘ LỌC - BỔ SUNG: collapse + Màu sắc + Size
   ========================================================= */

/* ---------- 1. Nhóm đang đóng: bỏ khoảng trống thừa ---------- */
.wpfMainWrapper .wpfFilterWrapper:has(.wpfTitleToggle.fa-plus) .wpfFilterTitle,
.wpfMainWrapper .wpfFilterWrapper:has(> .wpfFilterContent[style*="display: none"]) .wpfFilterTitle {
    margin-bottom: 0 !important;
}

.wpfMainWrapper .wpfFilterWrapper:has(.wpfTitleToggle.fa-plus),
.wpfMainWrapper .wpfFilterWrapper:has(> .wpfFilterContent[style*="display: none"]) {
    padding-bottom: 18px !important;
}

/* Biểu tượng +/− gọn, căn giữa với tiêu đề */
.wpfMainWrapper .wpfFilterTitle .wpfTitleToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

/* ---------- Reset bố cục nhiều cột + cuộn ngang của plugin ---------- */
.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfCheckboxHier,
.wpfMainWrapper [data-taxonomy="pa_size"] .wpfCheckboxHier {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll,
.wpfMainWrapper [data-taxonomy="pa_size"] ul.wpfFilterVerScroll {
    width: 100% !important;
    overflow-x: hidden !important;
    column-count: 1 !important;
    columns: auto !important;
    white-space: normal !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll > li[data-term-id],
.wpfMainWrapper [data-taxonomy="pa_size"] ul.wpfFilterVerScroll > li[data-term-id] {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mục plugin ẩn (0 sản phẩm) vẫn phải ẩn */
.wpfMainWrapper [data-taxonomy="pa_mau-sac"] li[data-term-id][style*="display: none"],
.wpfMainWrapper [data-taxonomy="pa_size"] li[data-term-id][style*="display: none"],
.wpfMainWrapper [data-taxonomy="pa_mau-sac"] li.wpfOptionDisabled,
.wpfMainWrapper [data-taxonomy="pa_size"] li.wpfOptionDisabled {
    display: none !important;
}

/* ---------- 2a. SIZE: lưới chip đều cột, hiện hết ---------- */
.wpfMainWrapper [data-taxonomy="pa_size"] ul.wpfFilterVerScroll {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px !important;
    max-height: none !important;
    overflow: visible !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] ul.wpfFilterVerScroll > li[data-term-id] {
    display: block !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfLiLabel,
.wpfMainWrapper [data-taxonomy="pa_size"] .wpfDisplay {
    display: block !important;
    width: 100% !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfValue {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 0 4px !important;
    box-sizing: border-box;
    background: #fff !important;
    border: 1px solid var(--f-field) !important;
    border-radius: var(--f-r);
    color: var(--f-ink) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfFilterTaxNameWrapper {
    padding: 0 !important;
    color: inherit !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfCount {
    display: none !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfLiLabel:hover .wpfValue {
    border-color: var(--f-ink) !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfLiLabel:has(input:checked) .wpfValue {
    background: var(--f-ink) !important;
    border-color: var(--f-ink) !important;
    color: #fff !important;
}

.wpfMainWrapper [data-taxonomy="pa_size"] .wpfLiLabel:has(input:checked) .wpfValue * {
    color: #fff !important;
}

/* ---------- 2b. MÀU SẮC: danh sách 1 cột có ô tick ---------- */
.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    max-height: 264px !important;
    overflow-y: auto !important;
    padding-right: 8px !important;
    /* Mờ dần ở đáy để báo còn nội dung bên dưới */
    -webkit-mask-image: linear-gradient(to bottom, #000 85%, transparent);
            mask-image: linear-gradient(to bottom, #000 85%, transparent);
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll > li[data-term-id] {
    display: block !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel {
    display: block !important;
    width: 100% !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfDisplay {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100% !important;
    padding: 7px 0;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfValue {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    color: var(--f-text) !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    transition: color .15s ease;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfValue::before {
    content: "";
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    background: #fff no-repeat center / 10px 8px;
    border: 1px solid #bdbdbd;
    border-radius: 2px;
    transition: background-color .15s ease, border-color .15s ease;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfFilterTaxNameWrapper {
    padding: 0 !important;
    color: inherit !important;
    font-weight: inherit !important;
    overflow-wrap: anywhere;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfCount {
    position: static !important;
    flex-shrink: 0;
    padding: 0 !important;
    background: none !important;
    color: var(--f-muted) !important;
    font-size: 12px !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel:hover .wpfValue {
    background: none !important;
    color: var(--f-red) !important;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel:hover .wpfValue::before {
    border-color: var(--f-ink);
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel:has(input:checked) .wpfValue {
    color: var(--f-ink) !important;
    font-weight: 700;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel:has(input:checked) .wpfValue::before {
    background-color: var(--f-ink);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 4l2.6 2.6L9 1.2'/%3E%3C/svg%3E");
    border-color: var(--f-ink);
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] .wpfLiLabel:has(input:checked) .wpfCount {
    color: var(--f-ink) !important;
}

/* Ô tìm kiếm của plugin (nếu bật) */
.wpfMainWrapper .wpfSearchWrapper {
    margin: 0 0 10px !important;
}

.wpfMainWrapper .wpfSearchWrapper input {
    width: 100%;
    height: 38px;
    padding: 0 12px !important;
    background: #fff;
    border: 1px solid var(--f-field) !important;
    border-radius: var(--f-r) !important;
    box-shadow: none !important;
    font-size: 13px;
}

.wpfMainWrapper .wpfSearchWrapper input:focus {
    border-color: var(--f-ink) !important;
    outline: none;
}

/* ---------- HIỆU ỨNG / TRẠNG THÁI KHÁC (giữ nguyên chức năng) ---------- */
.filter-wrapper {
    opacity: 0;
    animation: fade-in .2s ease-in .5s forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.products-wrapper:has(.product-list .e-loop-nothing-found-message) .filter-wrapper {
    display: none;
}

.reset-button {
    display: block;
    margin: 18px auto;
    padding: 12px 48px !important;
    background: transparent !important;
    border: 1px solid var(--brand-color, #D52927);
    border-color: #111;
    border-radius: 3px !important;
    color: #111 !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: background-color .15s ease, color .15s ease;
}

.reset-button:hover {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

.not-found-message {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

/* =========================================================
   FIX: danh sách cuộn dọc 1 cột (Màu sắc + Danh mục)
   :not(#_):not(#_) = cộng độ ưu tiên ngang 2 ID để thắng
   CSS layout plugin tự sinh theo #wpfBlock_x
   ========================================================= */

.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll,
.wpfMainWrapper:not(#_):not(#_) [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll {
    display: block !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    column-count: 1 !important;
    columns: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    margin: 0 !important;
    padding: 4px 8px 4px 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    white-space: normal !important;
    -webkit-mask-image: none !important;
            mask-image: none !important;
    border-top: 1px solid var(--f-line);
    border-bottom: 1px solid var(--f-line);
    scrollbar-width: thin;
    scrollbar-color: #bdbdbd transparent;
}

.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll > li[data-term-id],
.wpfMainWrapper:not(#_):not(#_) [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll > li[data-term-id] {
    display: block !important;
    float: none !important;
    flex: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    break-inside: avoid;
}

/* Mục plugin ẩn vẫn ẩn */
.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll > li[data-term-id][style*="display: none"],
.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll > li.wpfOptionDisabled,
.wpfMainWrapper:not(#_):not(#_) [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll > li[data-term-id][style*="display: none"] {
    display: none !important;
}

/* Danh mục con */
.wpfMainWrapper:not(#_):not(#_) [data-filter-type="wpfCategory"] li > ul {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
}

.wpfMainWrapper:not(#_):not(#_) [data-filter-type="wpfCategory"] li > ul > li {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Thanh cuộn mảnh */
.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll::-webkit-scrollbar,
.wpfMainWrapper [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll::-webkit-scrollbar {
    width: 4px;
    height: 0;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll::-webkit-scrollbar-thumb,
.wpfMainWrapper [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 4px;
}

.wpfMainWrapper [data-taxonomy="pa_mau-sac"] ul.wpfFilterVerScroll::-webkit-scrollbar-button,
.wpfMainWrapper [data-filter-type="wpfCategory"] ul.wpfFilterVerScroll::-webkit-scrollbar-button {
    display: none;
}

/* Size: lưới 5 cột, cũng cần thắng CSS layout của plugin */
.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_size"] ul.wpfFilterVerScroll {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    column-count: 1 !important;
    gap: 6px !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_size"] ul.wpfFilterVerScroll > li[data-term-id] {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_size"] ul.wpfFilterVerScroll > li[data-term-id][style*="display: none"],
.wpfMainWrapper:not(#_):not(#_) [data-taxonomy="pa_size"] ul.wpfFilterVerScroll > li.wpfOptionDisabled {
    display: none !important;
}

#wpfBlock_3 .wpfFilterContent .wpfLiLabel .wpfValue{
    padding-left: 12px !important;
}
