/**
 * wsd--wc--cat.css
 */

.sort-tool-sort-btn {
    position: relative;
    overflow: visible !important;
}

.woocommerce-ordering select.customizable-select.orderby {
    display: none !important;
}

.custom-select-wrapper {
    display: inline-block;
    cursor: pointer;
    font-family: sans-serif;
}

.custom-select-trigger {
    padding: 10px 30px 10px 15px;
    background: var(--container-bg-color);
    color: var(--style-color-main);
    border: none;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: none;
    outline: none;
}

.custom-select-trigger:focus {
    outline: none;
}

.custom-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 320px;
    display: none;
    background: var(--container-bg-color);
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    margin: 0;
    padding: 16px;
    flex-direction: column;
    gap: 16px;
}

body.dark .custom-options {
    border: 1px solid #DC35FF40;
    box-shadow: 0 4px 15px #DC35FF40;
}

.custom-select-wrapper.open .custom-options {
    display: flex !important;
}

.custom-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-color-main);
    margin: 0;
    outline: none;
}

.custom-option:hover {
    background: var(--container-hover-bg, rgba(0, 0, 0, 0.05));
    border-radius: 8px;
}

body.dark .custom-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Чекбокс-контейнер — 22×22px */
.option-checkbox {
    width: 22px;
    height: 22px;
    border: 1px solid var(--style-color-main);
    border-radius: 8px;
    margin-right: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    flex-shrink: 0;
}

/* Тёмная тема — только неактивные */
body.dark .option-checkbox:not(.checked) {
    border: none;
    background: var(--container-odd-bg-color);
}

/* Активный — системный цвет */
.option-checkbox.checked {
    background-color: var(--style-color-main);
    border-color: var(--style-color-main);
}

/* SVG-галочка — 17×13px */
.checkbox-check-icon {
    width: 17px;
    height: 13px;
    flex-shrink: 0;
    transform: translate(-0.5px, 1px);
}

/* Стрелка */
.custom-select-arrow {
    margin-left: 10px;
    transition: transform 0.2s ease;
    transform: rotate(90deg);
    flex-shrink: 0;
}

.stroke-style {
    stroke: var(--style-color-main) !important;
    stroke-width: 2;
    fill: none;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(-90deg);
}

/* Адаптив */
@media (max-width: 740px) {
    .cat-sort-label {
        display: none !important;
    }

    .custom-options {
        width: 230px;
        padding: 12px;
        gap: 12px;
    }

    .custom-option {
        font-size: 12px;
    }

    body.dark .option-checkbox:not(.checked) {
        border: none;
        background: var(--container-odd-bg-color);
    }
}
@media (max-width: 1000px) {
    .option-checkbox .checkbox-check-icon {
        width: 17px;
        height: 13px;
        display: block;
        margin: 0;
        padding: 0;
        flex-shrink: 0;
        /* Сдвиг вверх на 1px и влево на 0.5px — компенсация пустоты */
        transform: translate(-0.5px, 2px);
        /* Или: */
        /* transform: translateY(-1px); */
    }
}

.product-list-rows .text-cut-lines-\[2\] {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


/*
******************************
*/

/* === Фильтры: общая обёртка === */
.wsd-auto-filters {
    /* margin: 0 -15px; */
}

.wsd-filter-block {
    padding: 0 15px;
    margin-bottom: 24px;
}

.wsd-filter-block h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--text-color-main);
}

/* === Список фильтров === */
.wsd-auto-filters .woocommerce-widget-layered-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wsd-auto-filters .woocommerce-widget-layered-nav-list li {
    margin: 0 0 8px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* === Чекбоксы и ссылки === */
.wsd-auto-filters .woocommerce-widget-layered-nav-list a,
.wsd-auto-filters .woocommerce-widget-layered-nav-list span {
    display: flex;
    align-items: center;
    color: var(--text-color-main);
    text-decoration: none;
    padding: 6px 0;
    position: relative;
}

/* Чекбокс — заменяем на твой стиль */
.wsd-auto-filters .woocommerce-widget-layered-nav-list
    .woocommerce-widget-layered-nav-list__item--chosen a::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid var(--style-color-main);
    border-radius: 2px;
    margin-right: 10px;
    background: var(--style-color-main);
}

.wsd-auto-filters .woocommerce-widget-layered-nav-list a::before {
    content: '';
    display: inline-block;
    min-width: 16px;
    width: 16px;
    height: 16px;
    border: 0.5px solid var(--style-color-main);
    border-radius: 2px;
    margin-right: 10px;
    background: var(--text-color-main-12);
}

/* Состояние "выбрано" — галочка или цвет */
/* .wsd-auto-filters .woocommerce-widget-layered-nav-list
.woocommerce-widget-layered-nav-list__item--chosen a::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    margin-left: 4px;
    margin-top: 0px;
} */
.wsd-auto-filters .woocommerce-widget-layered-nav-list
.woocommerce-widget-layered-nav-list__item--chosen a svg {
    position: absolute;
    color: white;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
    display: block;
    border-radius: 2px;


    /* font-size: 12px;
    margin-left: 4px;
    margin-top: 0px; */
}

/*
.wc-block-product-filter-checkbox-list__items {
    width: 100%;
    .wc-block-product-filter-checkbox-list__item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .wc-block-product-filter-checkbox-list__label {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .wc-block-product-filter-checkbox-list__text-wrapper {
            flex-grow: 1;
            width: 100%;
            display: flex;
            align-items: center;

        }
        .wc-block-product-filter-checkbox-list__text {
            flex-grow: 1;
        }
    }
}
*/

/* Убираем стандартные стили WooCommerce */
.wsd-auto-filters .woocommerce-widget-layered-nav-list a:hover {
    background: transparent;
    /* color: var(--style-color-main); */
}