
.filters-block {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    align-items: center;
}

.filters-block.mobile {
    display: none;
}

#filters-popup {
    display: none;
}

.custom-dropdown {
    position: relative;
    
    cursor: pointer;
    user-select: none;
}
.dropdown-selected {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    background: #F5F5F7;
    border-radius: 8px;
}


.dropdown-options {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 382px;
    border-top: none;
    padding: 20px;
    z-index: 1000;
    background: #FFFFFF;
    box-shadow: 0px 0px 6.9px rgba(115, 115, 123, 0.35);
    border-radius: 8px;
    }
.custom-dropdown.active .dropdown-options {
    display: block;

}

.options-list::-webkit-scrollbar {
    width: 6px;
}

.options-list::-webkit-scrollbar-track {
 
}

.options-list::-webkit-scrollbar-thumb {
    background: var(--light-grey); /* Цвет ползунка */
    border-radius: 5px;
}

.options-list::-webkit-scrollbar-thumb:hover {
    background: var(--light-grey); 
}

.custom-dropdown .options-list{
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 360px;
    overflow-y: auto;
}

.custom-dropdown.active .dropdown-selected:after{
    transform: rotate(180deg);
    margin-bottom: -7px;
}
.dropdown-options label {
    display: flex;
    gap: 16px;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}
.dropdown-options label:hover {
    background: #f1f1f1;
}

/* Стилизация чекбоксов и радио */
.dropdown-options input {
    margin-right: 8px;
}

.filter.sort .dropdown-selected:before{
    content: url(../icons/sort.svg);
    display: block;  
    height: 16px;
}

.filter.type-filter .dropdown-selected:before{
    content: url(../icons/type.svg);
    display: block;  
    height: 16px;
}

.filter .dropdown-selected:after{
    content: url(../icons/arrow.svg);
    display: block;  
    margin-top: -2px;
}

.filters-block .line {
    width: 1px;
    background: var(--very-light-grey);
    margin: 0 8px;
    height: 33px;
}



.custom-checkbox input,
.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-checkbox .checkmark,
.custom-radio .checkmark {
    display: block;
    width: 27px;
    height: 27px;
    margin: 3px;
    border: 2px solid var(--light-grey);
    border-radius: 3px;
    position: relative;
    transition: 0.3s;
}

/* Чекбоксы: отмеченное состояние */
.custom-checkbox input:checked + .checkmark {
    background: var(--accent-1);
    border-color: var(--accent-1);
}
.custom-checkbox input:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 4px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Кастомные радиокнопки */
.custom-radio .checkmark {
    border-radius: 50%;
}
.custom-radio input:checked + .checkmark {
    background: var(--white);
    border-color: var(--accent-1);
}
.custom-radio input:checked + .checkmark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 13px;
    background: var(--accent-1);
    border-radius: 50%;
    transform: translate(-51%, -51%);
}

.filter-btn {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-btn .accept-filter{
    background: var(--accent-1);
    color: var(--white);
    width: 100%;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
}

.filter-btn .accept-filter:hover{
    background: var(--accent-2);
}

.filter-btn .clear-filter{
    border:1px solid var(--accent-1);
    color: var(--accent-1);
    width: 100%;
    padding: 14px;
    text-align: center;
    border-radius: 8px;
    display: none;
}

.filter-btn .clear-filter:hover{
    border:1px solid  var(--accent-2);
    color: var(--accent-2);
}

.dropdown-selected.active {
    background: #FFDED3;
    color: var(--accent-2);
}


.dropdown-selected.active::after{
    display: none;
}

.dropdown-selected .clear-filter{
    height: 20px;
    display: none;
}

.dropdown-selected.active .clear-filter {
    display: block;
    position: relative;
    padding-left: 10px;
}

.dropdown-selected.active .clear-filter::before{
    content: '';
    display: block;
    height: 17px;
    width: 1px;
    background: var(--accent-2);
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}






.custom-switch .switch {
  

   
}

.custom-switch .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.custom-switch .switch-slider {
    position: absolute;
    cursor: pointer;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    background-color: var(--light-grey);
    transition: .4s;
    border-radius: 24px;
    width: 36px;
    height: 20px;
}

.custom-switch .switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--white);
    transition: .4s;
    border-radius: 50%;
}

.custom-switch input:checked + .switch-slider {
    background-color: var(--accent-1);
}

.custom-switch input:checked + .switch-slider:before {
    transform: translateX(16px);
}

.custom-switch {
    padding: 9px 16px;
    border-radius: 8px;
    background: #F5F5F7;
    width: 165px;
    position: relative;
}

.video-content .type-filter, .images-content .type-filter, 
.video-content .transparent-filter, .images-content .fps-filter,
.video-filter .transparent-filter, .images-filter .fps-filter{
    display: none;
}

.video-content label[data-value="jpeg"], .video-content label[data-value="png"], .video-content label[data-value="square"],
.video-filter label[data-value="jpeg"], .video-filter label[data-value="png"], .video-filter label[data-value="square"] {
    display: none;
}

.images-content label[data-value="mp4"], .images-content label[data-value="mov"],
.images-filter label[data-value="mp4"], .images-filter label[data-value="mov"]  {
    display: none;
}

.collection .collection-filter{
    display: none;
}

.collection .title-block{
    margin-top: 12px;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 16px;
   
}

.collection .title-block .left-title{
    display: flex;
    align-items: flex-end;
    gap: 20px; 
}
@media (max-width: 1279px) {

    .filters-block.mobile {
        display: flex;
    }

    .filters-block.desktop {
        display: none;
    }
    .filters-btn{
        display: flex;
        gap: 8px;
        align-items: center;
        padding: 10px 16px;
        background: #F5F5F7;
        border-radius: 8px;
    }

    .filters-popup{
        position: fixed;
        left: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        background: #EFEFF4;
        z-index: 100;
        overflow: auto;
    }

    .filters-header{
        background: var(--white);
        padding: 6px 0;
    }

    .filters-header .container{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #filters-reset{
        color: var(--accent-1);
        padding: 14px 0;
    }

    .filters-popup .dropdown-selected{
        background: transparent;
        margin-bottom: 16px;
    }

    .filters-popup .dropdown-selected {
        background: transparent;
        color: inherit;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px;
        margin-top: 32px;
    }

    .filters-popup .filter .dropdown-selected:after {
       display: none;
    }

    .filters-popup .custom-dropdown .dropdown-options {
        display: block !important;
        position: static;
        width: 100%;
        padding: 16px;
        box-shadow: none;
        border-radius: 10px;
    }
    .filters-popup .dropdown-selected .clear-filter{
        padding: 14px 0;
        color: var(--grey);
        display: flex;
        align-items: center;
    }

    .filters-popup .dropdown-selected .clear-filter:before {
        display: none;
    }

    .filters-popup .dropdown-selected.active {
        background: transparent;
        color: inherit;
    }

    .filters-popup .dropdown-selected.active .clear-filter::before{
        display: none;
    }

    .filters-popup .custom-switch{
        background: white;
        width: 100%;
        padding: 20px 16px;
        margin-top: 32px;
        font-weight: 600;
    }

    .accept-wr{
        position: fixed;
        z-index: 1000;
        background: var(--white);
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 20px 40px;
        box-shadow: 0px 0px 6.9px rgba(115, 115, 123, 0.35);
    }

    .accept-wr .accept-filter{
        background: var(--accent-1);
        color: var(--white);
        padding: 16px;
        width: 100%;
        border-radius: 8px;
    }

    .filters-wr.container {
        padding-bottom: 120px;
        padding-top: 32px;
    }
    .filters-popup .type-filter .custom-dropdown .options-list{
        flex-direction: row;
        gap: 12px;
        background: transparent;
        margin-top: 16px;
        padding: 0;
    }
    .filters-popup .type-filter .dropdown-options{
        background: transparent;
        padding: 0;
        padding-bottom: 32px;
        border-bottom: 1px solid var(--light-grey);
        border-radius: 0;
    }
    .filters-popup .type-filter .dropdown-options label{
        background: var(--white);
        padding: 16px;
        border-radius: 10px;
    }

    .filters-popup  .type-filter.custom-radio input:checked + label {
        color: var(--accent-1);
    }

    .filters-popup .type-filter.custom-radio .options-list>div:first-child input:checked + label path{
        fill: var(--accent-1);
    }

    .filters-popup .type-filter.custom-radio .options-list>div:not(:first-child) input:checked + label path{
        stroke: var(--accent-1);
    }

    .filters-popup .type-filter.custom-radio .options-list>div:nth-child(2) input:checked + label path:nth-child(3){
        fill: var(--accent-1);
        stroke: transparent;
    }

    .filters-popup .type-filter.custom-radio .options-list>div:nth-child(2) input:checked + label path:nth-child(2){
        fill: var(--accent-1);
        stroke: transparent;
    }


    #all-collections{
        padding: 14px 10px;
        color: var(--accent-1);
    }

    .filters-popup .custom-dropdown .options-list{
        max-height: max-content;
    }

    .filters-popup .collection-filter .options-list label {
        display: none; 
    }

    .filters-popup .dropdown-options label:hover {
        background: transparent;
    }

    .filters-popup .type-filter .options-list>div{
        position: relative;
    }

    .filters-popup .type-filter .options-list input{
        width: 100%;
        height: 100%;
    }

    .filters-popup .type-filter .dropdown-selected{
        display: none;
    }

    #filters-popup{
        display: none;
    }

    #filters-popup.active {
        display: block;
    }


}

@media (max-width: 577px) {
    .dropdown-options {
        max-width: calc(100vw - 32px);
    }

    .collection .title-block .left-title{
        display: flex;
        align-items: flex-start; 
        flex-direction: column;
        gap: 6px;
    }
}