
#mfilter-content-container .refine-categories .swiper-pagination{
    padding: 0px;
    margin-top: -20px;
} 



/* ===========================================================
   PRODUCTS FILTER + SORTING (CLEAN VERSION)
=========================================================== */

.products-filter{
    display:flex;
    align-items:center;
    gap:15px;
    justify-content:space-between;
    margin-top: 20px;
    margin-bottom:20px;
    position:relative;
}

/* ===========================================================
   GRID / LIST / COMPARE
=========================================================== */

.grid-list{
    display:flex;
    align-items:center;
    gap:10px;
}

.view-btn{
    width:38px;
    height:38px;
    border:1px solid #ddd;
    background:#fff;
    cursor:pointer;
    border-radius:4px;
}

.view-btn.active{
    border-color:#9b294f;
}

.compare-btn{
    padding:8px 12px;
    border:1px solid #ddd;
    border-radius:4px;
    font-size:13px;
}

/* ===========================================================
   DESKTOP SORT GROUP (FULL JOURNAL STYLE)
=========================================================== */

.select-group{
    display:flex;
    align-items:center;
    gap:0;
    margin-left:auto;
}

.select-group .input-group-addon{
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    color: #555;
    text-align: center;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.select-group select{
    max-width: 200px !important;
    height:42px;
    border:1px solid #ddd;
    border-radius:4px;
    padding:0 10px;
    background:#fff;
    font-size: 12px !important;
}

/* ===========================================================
   MOBILE BUTTONS ROW (3 BUTTONS)
=========================================================== */

.sorting-cat{
    display:none;
    gap:10px;
    width:100%;
}
.mobile .sorting-cat{
    display:flex;
    justify-content: space-between;
}
.mobile .sorting-cat .sort-limit-holder{
    display: flex;
    gap: 10px;
}

.filter-trigger,
.sort-trigger,
.limit-trigger{
    height: 43px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: #ffffff;
    border: none;
    color: #000;
    border-radius: 4px;
    padding: 5px 15px;
    cursor: pointer;
    border: 1px solid #cbcbcb;
}
.filter-trigger{
    padding: 5px 15px 5px 10px;
}

.filter-trigger svg  {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display:block;
}
.sort-trigger svg  {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display:block;
}
.sorting-cat .text{
    font-weight:600;
    font-size:13px;
}

.sorting-cat .small{
    font-size:11px;
    opacity:.8;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

/* ===========================================================
   OLD FILTER BUTTON (DISABLED — we now use 3 buttons)
=========================================================== */

.products-filter .filter-trigger{
    display:none;
}

/* ===========================================================
   SORT OVERLAY
=========================================================== */

.sort-overlay,
.limit-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.4);
    opacity:0;
    visibility:hidden;
    transition:.25s ease;
    z-index:99998;
}

body.sort-open .sort-overlay,
body.limit-open .limit-overlay{
    opacity:1;
    visibility:visible;
}

/* ===========================================================
   SORT PANEL (OFF CANVAS)
=========================================================== */

.sort-panel,
.limit-panel{
    position:fixed;
    top:0;
    right:0;

    width:100%;
    height:100vh;

    background:#fff;
    z-index:99999;

    display:flex;
    flex-direction:column;

    transform:translateX(100%);
    transition:transform .3s ease;
    will-change:transform;
}

body.sort-open .sort-panel,
body.limit-open .limit-panel{
    transform:translateX(0);
}
.sort-header,
.limit-header{
    padding:16px 20px;
    font-size:18px;
    font-weight:600;
    text-align: center;
    background: #ededed;
    border-bottom: 1px solid #ccc;
}

.sort-close{
    border:0;
    background:none;
    font-size:26px;
    cursor:pointer;
}

.sort-body,
.limit-body{
    flex:1;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    /* max-height: calc(100% - 56px); */
    max-height: calc(100% - 112px);
}

.sort-option,
.limit-option{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:16px 20px;
    border-bottom:1px solid #eee;

    background:#fff;
    cursor:pointer;
    font-size:14px;
}

.sort-option.active,
.limit-option.active{
    color:#9b294f;
    font-weight:600;
}

.sort-option:hover{
    background:#f7f7f7;
}


.sort-check{
    color:#9b294f;
    font-weight:bold;
    font-size:16px;
}
.filter-trigger .filter-text,
.sort-trigger .sorting-text{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}





/* ===========================================================
   LIMIT OVERLAY
=========================================================== */

.limit-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    transition:.25s ease;
    z-index:99998;
}

body.limit-open .limit-overlay{
    opacity:1;
    visibility:visible;
}

/* ===========================================================
   LIMIT PANEL
=========================================================== */

.limit-panel{
    position:fixed;
    top:0;
    width:100%;
     max-width:none !important;
    height:100vh;
    background:#fff;
    z-index:99999;
    display:flex;
    flex-direction:column;
    transition:.3s ease;
}

.limit-close{
    border:0;
    background:none;
    font-size:26px;
    cursor:pointer;
}

.limit-option:hover{
    background:#f7f7f7;
}

.limit-check{
    color:#9b294f;
    font-weight:bold;
}


.drawer-footer{
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 0;
    background: #fff;
}

.drawer-footer button{
    width: 100%;
    height: 50px;
    background: #9b294f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}




/* ===========================================================
   MOBILE BEHAVIOR
=========================================================== */
    .mobile.tablet .select-group{
        display:block !important;
    }
    .mobile.tablet .sorting-cat {
        display: none;
    }
    .mobile .sort-panel,
    .mobile .sort-overlay{
        display:block;
    }
    .mobile .filter-trigger{
        display:block;
    }
    .mobile .products-filter .filter-trigger,
    .mobile .products-filter .sort-trigger{
        display:flex;
        flex-direction: row;
        gap:10px;
        max-width: 225px;
    }
    .mobile .products-filter{
        display:flex;
        flex-direction:column;
        gap:10px;
    }
    .mobile .grid-list{
        display:none;
    }
    .mobile .select-group{
        display:none !important;
    }

    .mobile:not(.tablet) .mfilter-free-button{
        z-index: 1000;
        display:none !important;
        
    }
    .mobile:not(.tablet) .mfilter-free-container-opened .mfilter-free-button{
        display: none;
    }

    .custom_close_button{
        display: none;
    }
    .mobile:not(.tablet) .custom_close_button{
        /* content: "Затвори"; */
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        width: 100%;
        text-align: center;
        display: block;
        line-height: 50px;
        display: block !important;
        position: fixed;
        bottom: 0;
        left: -1px;
        width: 100%;
        z-index: 99999999;
        margin: 0;
        height: 50px;
        background: #9b294f;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        border: 0 !important;
    }
    .mobile:not(.tablet) .mfilter-price-slider {
        margin-right: 10px !important;
        margin-left: 10px !important;
    }
    .mobile:not(.tablet) .mfilter-option.mfilter-price .mfilter-price-inputs {
        justify-content: center;
        gap: 10px;
    }
    .mobile:not(.tablet) .mfilter-content,
    .mobile:not(.tablet) .mfilter-box{
        position:relative !important;

    }
    .mobile:not(.tablet) .mfilter-free-container{
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 999999;
        transform: translateX(-100%);
        transition: transform .3s ease;
        padding: 0;
    }

    body.filter-open .mfilter-free-container {
        transform: translateX(0) !important;
    }
    .mobile:not(.tablet) .mfilter-free-container {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 999999;

        transform: translateX(-100%);
        transition: transform .3s ease;
    }

    .mobile:not(.tablet) body.filter-open .mfilter-free-container {
        transform: translateX(0) !important;
    }
    .mobile:not(.tablet) .mfilter-content{
        display:flex;
        flex-direction:column;
        padding: 20px;
        background: #fff;
    }
    .mobile:not(.tablet) .mfilter-content ul{
        overflow-y: auto; 
    }

    .mobile:not(.tablet) .mfilter-content .mfilter-heading{
        padding:0;
        font-size:18px;
        font-weight:600;
        text-align:center;
        background:#ededed;
        border-bottom:1px solid #ccc;
    }

    .mobile:not(.tablet) .mfilter-content .mfilter-body{
        flex:1;
        overflow:auto;
    }
    .mobile:not(.tablet) body.filter-open .mfilter-free-container-opened{
        left:0 !important;
        right:auto !important;
        padding: 0;
    }
    .mobile:not(.tablet) .mfilter-box .box-heading {
        display: flex;
        position: fixed;
        top: 0;
        z-index: 999;
        width: 100%;
        text-align: center;
        padding: 16px 30px 16px 15px;
        font-size: 18px;
        font-weight: 600;
        text-align: center;
        background: #ededed;
        border-bottom: 1px solid #ccc;
        margin: 0;
        justify-content: center;
    }

    .mobile:not(.tablet) .box-content.mfilter-content {
        border: none;
        overflow-y: auto;
        /* padding: 59px 20px 52px 20px; */
        padding: 52px 0 0 10px;
        box-sizing: border-box;
        pointer-events:auto;
        position: relative;
        z-index: 20;
    }
    .mobile:not(.tablet) .mfilter-option{
        position:relative;
        z-index:2;
    }

    .mobile:not(.tablet) .mfilter-option label{
        cursor:pointer;
        pointer-events:auto;
    }

    .mobile:not(.tablet) .mfilter-option input{
        pointer-events:auto;
    }

    .mobile:not(.tablet) .mfilter-content,
    .mobile:not(.tablet) .mfilter-option,
    .mobile:not(.tablet) .mfilter-options,
    .mobile:not(.tablet) .mfilter-options-container {
        pointer-events: auto !important;
    }

    .mfilter-button-top .mfilter-button-reset {
        top: 29px !important;
        font-size: 14px;
    }
    .mobile:not(.tablet) .mfilter-button-top .mfilter-button-reset {
        position: fixed;
        right: 20px;
        top: 17px !important;
        font-size: 14px;
    }
    .mobile:not(.tablet) .mfilter-button-top .mfilter-button-reset:focus {
        outline:none
    }

    .mobile:not(.tablet) .mfilter-heading-text > span {
        padding-left: 0;
    }
    .mobile:not(.tablet) .mfilter-heading-text {
        width: auto;
        margin-left: 0;
        text-align: left;
        float: left;
    }
    .mobile:not(.tablet) .products-filter {
        margin-top: 30px !important;
    }

    .mfilter-button-reset{
        display: none;
    }

    body.has-active-filter .mfilter-button-reset {
        display: block !important;
    }


@media (max-width: 1024px) {
    #mfilter-content-container .refine-categories .swiper-pagination {
        margin-top: 0px;
    }
    .products-filter {
        margin-top: 30px !important;
    }
}
@media (max-width: 980px) {
    .mobile .mfilter-box .box-heading {
        line-height: 1.1;
    }
    .mobile:not(.tablet) .box-content.mfilter-content {
        /* padding: 59px 20px 52px 10px; */
        padding: 52px 0 0 10px;
    }
    .mobile:not(.tablet) .mfilter-price-slider {
        margin-left: 0 !important;
    }
    .mobile:not(.tablet) .mfilter-box .box-heading {
        padding: 16px 30px 16px 0;
    }
    .mfilter-button-top .mfilter-button-reset {
        top: 24px !important;
    }
}
@media (max-width:768px){

    .select-group{
        display:none !important;
    }

    .sorting-cat{
        display:flex;
    }
    .grid-list,
    .mobile .grid-list{
        display:none;
    }
    .products-filter{
        display:flex;
        flex-direction:column;
        gap:10px;
    }
    .products-filter .filter-trigger,
    .products-filter .sort-trigger{
        display:flex;
        flex-direction: row;
        gap:10px;
    }



}

@media (min-width:769px){
    .sort-panel,
    .sort-overlay{
        display:none;
    }
    .filter-trigger{
        display:none;
    }
}
@media (max-width:500px){
    .sorting-cat .small {
        max-width: 80px;
    }
}
@media (max-width:400px){
    .mobile .sorting-cat {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
    }
    .mobile .products-filter .filter-trigger, 
    .mobile .products-filter .sort-trigger {
        max-width: 100%;
        justify-content: center;
    }
    .mobile .products-filter .sort-trigger{
        width: 100%;
    }
    .sorting-cat .small {
        max-width: 100%;
    }
}

/* body lock */
body.sort-open,
body.filter-open,
body.limit-open{
    overflow: hidden;
}