/* =========================================================
   DekoKZ Catalog Toolbar v4.1
========================================================= */


/* =========================================================
   Основная панель
========================================================= */

.dkz-catalog-toolbar{
    width:100%;

    margin:0 0 10px;
    padding:16px 20px;

    background:#ffffff;

    border:1px solid #e7e4ed;
    border-radius:18px;

    box-shadow:0 8px 24px rgba(35,24,42,.05);

    box-sizing:border-box;
}

.dkz-catalog-toolbar__row{
    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:20px;
}

.dkz-catalog-toolbar__left{
    display:flex;
    align-items:center;

    gap:4px;

    min-width:0;
}


/* =========================================================
   Кнопка «Фильтры»
   Без капсулы
========================================================= */

.dkz-catalog-toolbar__toggle{
    appearance:none !important;
    -webkit-appearance:none !important;

    display:inline-flex !important;
    align-items:center !important;

    gap:8px !important;

    min-height:36px !important;

    margin:0 !important;
    padding:6px 8px !important;

    color:#302b34 !important;

    font-family:inherit !important;
    font-size:15px !important;
    font-weight:650 !important;
    line-height:1 !important;

    text-transform:none !important;

    background:transparent !important;
    background-image:none !important;

    border:0 !important;
    border-radius:9px !important;

    box-shadow:none !important;

    cursor:pointer !important;

    transition:
        color .18s ease,
        background-color .18s ease;
}

.dkz-catalog-toolbar__toggle:hover{
    color:#675fd4 !important;
    background:#f7f5ff !important;
}

.dkz-catalog-toolbar__toggle:focus-visible{
    outline:3px solid rgba(123,116,223,.16);
    outline-offset:2px;
}


/* =========================================================
   Иконка — три полоски
========================================================= */

.dkz-catalog-toolbar__menu-icon{
    display:inline-flex;
    flex-direction:column;
    justify-content:center;

    gap:3px;

    width:17px;
    height:17px;

    flex:0 0 17px;
}

.dkz-catalog-toolbar__menu-icon span{
    display:block;

    width:17px;
    height:1.5px;

    background:currentColor;

    border-radius:999px;
}


/* =========================================================
   Круглый счётчик активных фильтров
========================================================= */

.dkz-catalog-toolbar__active-count{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-width:22px;
    height:22px;

    padding:0 6px;

    margin-left:2px;

    color:#ffffff;

    font-size:12px;
    font-weight:800;
    line-height:1;

    background:#7b74df;

    border-radius:999px;

    box-sizing:border-box;

    box-shadow:0 3px 8px rgba(87,77,184,.18);
}

.dkz-catalog-toolbar__active-count[hidden]{
    display:none !important;
}


/* =========================================================
   Стрелка
========================================================= */

.dkz-catalog-toolbar__caret{
    display:block;

    width:7px;
    height:7px;

    margin-left:2px;

    border-right:1.5px solid currentColor;
    border-bottom:1.5px solid currentColor;

    transform:rotate(45deg) translateY(-2px);

    transform-origin:center;

    transition:transform .18s ease;
}

.dkz-catalog-toolbar__toggle[aria-expanded="true"]
.dkz-catalog-toolbar__caret{
    transform:rotate(225deg) translate(-1px,-1px);
}


/* =========================================================
   Общий сброс
========================================================= */

.dkz-catalog-toolbar__clear{
    appearance:none;
    -webkit-appearance:none;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:28px;
    height:28px;

    margin:0;
    padding:0;

    color:#8a858f;

    font-family:inherit;
    font-size:12px;
    font-weight:700;
    line-height:1;

    background:transparent;

    border:0;
    border-radius:50%;

    cursor:pointer;

    transition:
        color .18s ease,
        background-color .18s ease,
        transform .18s ease;
}

.dkz-catalog-toolbar__clear:hover{
    color:#675fd4;

    background:#f3f1ff;

    transform:scale(1.06);
}

.dkz-catalog-toolbar__clear[hidden]{
    display:none !important;
}


/* =========================================================
   Сортировка
   Без капсулы
========================================================= */

.dkz-catalog-toolbar__sorting{
    display:flex;
    align-items:center;

    margin-left:auto;
}

.dkz-catalog-toolbar__sorting .category-sort{
    display:flex;
    align-items:center;

    margin:0 !important;
    padding:0 !important;
}

.dkz-catalog-toolbar__sorting .category-sort__title{
    display:none !important;
}

.dkz-catalog-toolbar__sorting .drop-down-list{
    margin:0 !important;
}

.dkz-catalog-toolbar__sorting .drop-down-list__toggle{
    display:inline-flex !important;
    align-items:center !important;

    gap:8px !important;

    min-width:0 !important;
    min-height:36px !important;

    margin:0 !important;
    padding:6px 8px !important;

    color:#302b34 !important;

    font-size:15px !important;
    font-weight:650 !important;
    line-height:1 !important;

    background:transparent !important;

    border:0 !important;
    border-radius:9px !important;

    box-shadow:none !important;

    transition:
        color .18s ease,
        background-color .18s ease;
}

.dkz-catalog-toolbar__sorting .drop-down-list__toggle:hover{
    color:#675fd4 !important;

    background:#f7f5ff !important;
}

.dkz-catalog-toolbar__sorting .drop-down-list__caret{
    position:static !important;

    top:auto !important;
    right:auto !important;

    margin-left:2px !important;
}


/* =========================================================
   Выпадающее меню сортировки
========================================================= */

.dkz-catalog-toolbar__sorting .drop-down-list__items{
    z-index:200 !important;

    min-width:210px !important;

    margin-top:8px !important;
    padding:8px !important;

    background:#ffffff !important;

    border:1px solid #e7e4ed !important;
    border-radius:14px !important;

    box-shadow:0 16px 40px rgba(35,24,42,.14) !important;
}


/* =========================================================
   Планшет
========================================================= */

@media (max-width:991px){

    .dkz-catalog-toolbar{
        padding:14px 16px;
    }

}


/* =========================================================
   Телефон
========================================================= */

@media (max-width:768px){

    .dkz-catalog-toolbar{
        padding:12px 14px;

        border-radius:15px;
    }

    .dkz-catalog-toolbar__row{
        gap:10px;
    }

    .dkz-catalog-toolbar__toggle,
    .dkz-catalog-toolbar__sorting .drop-down-list__toggle{
        font-size:14px !important;
    }

}


/* =========================================================
   DekoKZ — фикс сортировки
========================================================= */

.dkz-catalog-toolbar__sorting{
    position:relative !important;

    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;

    margin-left:auto !important;

    min-width:0 !important;
}


/* Триггер сортировки */

.dkz-catalog-toolbar__sorting .drop-down-list{
    position:relative !important;

    margin:0 !important;
    padding:0 !important;
}


.dkz-catalog-toolbar__sorting .drop-down-list__toggle{
    position:relative !important;

    display:inline-flex !important;
    align-items:center !important;

    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;

    margin:0 !important;
    padding:8px 10px !important;

    white-space:nowrap !important;

    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}


/* Выпадающий список всегда открываем ВЛЕВО */

.dkz-catalog-toolbar__sorting .drop-down-list__items{
    position:absolute !important;

    top:calc(100% + 8px) !important;

    left:auto !important;
    right:0 !important;

    width:220px !important;
    min-width:220px !important;
    max-width:calc(100vw - 32px) !important;

    margin:0 !important;
    padding:8px !important;

    background:#fff !important;

    border:1px solid #e7e4ed !important;
    border-radius:14px !important;

    box-shadow:0 16px 40px rgba(35,24,42,.14) !important;

    box-sizing:border-box !important;

    z-index:200 !important;
}


/* Пункты */

.dkz-catalog-toolbar__sorting .drop-down-list__item{
    width:100% !important;

    margin:0 !important;
    padding:0 !important;
}


.dkz-catalog-toolbar__sorting .drop-down-list__item a{
    display:block !important;

    width:100% !important;

    padding:9px 11px !important;

    box-sizing:border-box !important;

    white-space:nowrap !important;
}

/* =========================================================
   Mobile / stacking fix for sorting dropdown
========================================================= */

.dkz-catalog-toolbar{
    position:relative;
    z-index:50;
}

.dkz-catalog-toolbar__sorting{
    position:relative;
    z-index:60;
}

.dkz-catalog-toolbar__sorting .drop-down-list{
    position:relative;
    z-index:70;
}

.dkz-catalog-toolbar__sorting .drop-down-list__items{
    position:absolute !important;
    z-index:9999 !important;
}

.dkz-card__badge,
.dkz-product-card__badge,
.product-card__badge{
    z-index:5 !important;
}