// header

.header {

    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--colors-white);

    .header-top {
        transition: 0.23s;
        padding: 15px 0;

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

        &__main {
            display: flex;
            align-items: center;
            gap: 40px;
        }

        @include desktop {
            .header-logo {
                img {
                    max-width: 180px;
                }
            }

            &__main {
                gap: 15px;
            }
        }

        @include tablet {
            padding: 10px 0;
            position: relative;

            .header-logo{
                position: absolute;
                left: 0;
                right: 0;
                width: 180px;
                margin: 0 auto;
            }

            &__main{
                flex-direction: row-reverse;
                gap: 10px;
            }
        }
    }

    .mobile-menu-btn{
        display: none;


        @include tablet{
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            div{
                display: flex;
                flex-direction: column;
            }
            span{
                display: flex;
                height: 2px;
                width: 14px;
                background-color: var(--colors-primary);
                position: relative;

                &::before,
                &:after{
                    display: block;
                    position: absolute;
                    left: 0;
                    content: '';
                    height: 2px;
                    width: 20px;
                    background-color: var(--colors-primary);
                }

                &::before{
                    top: -7px;
                }
                &::after{
                    bottom: -7px;
                    width: 16px;
                }
            }
        }

        @media (max-width: 350px) {
            i{
                display: none;
            }
        }
    }


    .header-menu {

        &__mobiletitle{
            display: none;
        }

        &__close{
            display: none;
        }

        ul {
            display: flex;
            gap: 22px;
        }

        li {
            display: flex;
            align-items: center;
            position: relative;

            &:after {
                background-color: var(--colors-grey-light-1);
                position: absolute;
                right: -11px;
                content: '';
                display: block;
                width: 1px;
                height: 15px;
            }

            &:last-child {
                &::after {
                    display: none;
                }
            }

            a {
                font-family: var(--font-family);
                font-weight: 400;
                font-size: 16px;
                line-height: 125%;
                letter-spacing: 0.01em;
                color: var(--colors-default);
                padding: 2.5px 15px;
                transition: 0.23s;

                &:hover {
                    color: var(--colors-primary);
                }
            }

            .menu-discount {
                color: var(--colors-accent);
            }
        }

        @include desktop {
            ul {
                gap: 12px;
            }

            li {
                &:after {
                    right: -5px;
                }

                a {
                    padding: 2.5px 10px;
                }
            }
        }

        @include tablet {
            &__mobiletitle{
                display: flex;
                font-size: 20px;
                color: #fff;
                margin-bottom: 24px;
            }

            &__close{
                display: block;
                position: absolute;
                top: 20px;
                right: 15px;
            }

            position: fixed;
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
            background: var(--colors-primary2);
            z-index: 50;
            padding-top: 50px;
            display: none;
            flex-direction: column;
            padding: 24px 15px 70px 15px;

            &.active{
                display: flex;
            }

            ul{
                // width: 100%;
                flex-direction: column;
                gap: 15px;
                
                overflow: scroll;

                scrollbar-width: none;  
                -ms-overflow-style: none;
    
                &::-webkit-scrollbar {
                    display: none;
                }
            }

            li{
                background-color: #fff;
                width: 100%;
                &::after{
                    display: none;
                }

                a{
                    display: flex;
                    padding: 15px 10px;
                    width: 100%;
                }
            }
        }

    }


    // header-bottom


    .header-bottom {
        background: var(--colors-default);

        .container {
            display: flex;
            gap: 20px;

            @include tablet{
                gap: 10px;
            }
        }
    }
}

.scrolled{
    .header-top {
        padding: 4px 0;
    }
    .header-cart{
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .h-cart{
        position: absolute;
        top: calc(100% + 4px);

        @include mobile {
            position: fixed;
            top: 0;
        }
    }
}


// headet-top

.header-cart {
    padding: 22.5px 21px;
    transition: 0.23s;
    position: relative;

    &:hover {
        cursor: pointer;
    }

    @include desktop {
        padding: 22.5px 10px;
    }

    @include mobile {
        padding: 10px 4px;
    }


}

.cart-btn {
    display: flex;
    align-items: center;
    gap: 12px;

    font-family: var(--font-family);
    font-weight: 600;
    font-size: 18px;
    line-height: 111%;
    letter-spacing: 0.01em;
    color: var(--colors-default);

    .header-cart-icon {
        width: 25px;
        height: 25px;
        background-image: url(../img/icons/shopping.svg);
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        position: relative;
    }

    &__count {
        position: absolute;
        right: -8px;
        top: -6.5px;
        width: 18px;
        height: 18px;
        background: var(--colors-accent);
        border-radius: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: var(--font-family);
        font-weight: 700;
        font-size: 12px;
        letter-spacing: 0.02em;
        color: var(--colors-white);
    }

    @include desktop {
        font-size: 16px;
    }

    @include sm-mobile {
        span{
            display: none;
        }
    }
}


.h-cart{
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 579px;
    z-index: 20;
    cursor: default;

    display: none;

    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.25);
    background: var(--colors-white);

    &.active{
        display: block;
    }

    &__close{
        position: absolute;
        top: 23px;
        right: 28px;
        cursor: pointer;
    }

    &__title{
        font-weight: 700;
        font-size: 36px;
        line-height: 111%;
        letter-spacing: 0.01em;
        text-align: center;
        color: var(--colors-white);
    }

    &__top{
        background: var(--colors-primary);
        padding: 40px 48px 40px 40px;
    }

    &__main{
        padding: 40px;
        background: rgba(18, 120, 237, 0.2);
    }

    &__prodlist{
        display: grid;
        gap: 8px;
    }

    &__pricebox{
        width: 100%;
        padding: 10px 0;
        display: flex;
        justify-content: flex-end;
    }

    &__addons{
        padding: 10px 0;
        display: grid;
        gap: 10px;
        margin-top: 8px;
    }

    &__price{
        font-family: var(--font-family);
        font-weight: 700;
        font-size: 36px;
        line-height: 111%;
        letter-spacing: 0.01em;
        text-align: right;
        color: var(--colors-default);
    }

    &__bottom{
        padding: 20px 0;
    }

    .btn-primary{
        padding: 15px;
    }

    @include mobile {
        position: fixed;
        top: 0;
        left: 0 ;
        right: 0;
        width: 100vw;
        height: 100vh;

        &__main{
            height: 100%;
            overflow: auto;
            padding-bottom: 200px;
        }


        min-width: 100%;
    
        &__close{
            top: 15px;
            right: 15px;
        }
    
        &__title{
            font-size: 24px;
        }
    
        &__top{
            padding: 20px 15px 20px 15px;
        }
    
        &__main{
            padding: 40px 15px;
            padding-bottom: 120px;
        }
    
        &__pricebox{
            padding: 10px 0;
        }
    
        &__addons{
            padding: 10px 0;
            gap: 10px;
            margin-top: 8px;
        }
    
        &__price{
            font-size: 24px;
        }
    
        &__bottom{
            padding: 20px 0;
        }
    }

}

.prod-item{
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--colors-white);

    &__image{
        img{
            width: 100px;
        }
    }

    &__main{
        display:flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        width: 100%;
        gap: 8px;
    }

    &__top{
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
    }   

    &__title{
        font-family: var(--font-family);
        font-weight: 600;
        font-size: 20px;
        line-height: 140%;
        color: #1f1f22;
    }

    &__remove{
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--colors-default);
        min-width: 35px;
        max-width: 35px;
        min-height: 35px;        
        max-height: 35px;
        border: none;    
    }

    &__bottom{
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }

    @include mobile{
        padding: 15px;
        gap: 10px;
        align-items: flex-start;
    
        &__image{
            img{
                width: 70px;
            }
        }
    
        &__main{
            gap: 8px;
        }
    
        &__top{
            gap: 4px;
        }   
    
        &__title{
            font-size: 16px;
        }
    
        &__remove{
            min-width: 30px;
            max-width: 30px;
            min-height: 30px;        
            max-height: 30px;  
            svg{
                width: 20px;
                height: 20px;
            }      
        }
    }

}

.prod-item-price{
    display: flex;
    align-items: center;
    gap: 4px 20px;
    flex-wrap: wrap;

    &__old{
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 143%;
        text-decoration: line-through;
        color: var(--colors-primary2);
    }

    &__current{
        font-family: var(--font-family);
        font-weight: 600;
        font-size: 18px;
        line-height: 156%;
        color: var(--colors-default);
    }

    @include mobile {
        gap: 2px 10px;

        &__old{
            font-size: 12px;
        }
    
        &__current{
            font-size: 16px;
        }
    
    }
}

.prod-item-count{
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 113px;
    width: 113px;
    gap: 4px;
    padding: 5px 4px;
    border: 1px solid var(--colors-grey-light-1);


    &__btn{
        display: flex;
        justify-content: center;
        align-items: center;
        border: none;
        background-color: transparent;
        width: 30px;
        height: 30px;

        transition: 0.23s;

        &:hover{
            background-color: rgba(18, 120, 237, 0.2);
        }
    }

    input{
        width: 100%;
        text-align: center;
        border: none;
        background-color: transparent;
    }

    @include mobile {
        min-width: 90px;
        width: 90px;
        gap: 2px;
        padding: 4px 3px;
    
        &__btn{
            width: 25px;
            height: 25px;
        }
    }
    
}


input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}





.prod-addon{
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    padding: 10px 13px 10px 20px;
    background: var(--colors-white);
    border: 1px solid var(--colors-primary);

    &__main{
        display: grid;
        gap: 12px;
    }

    &__title{
        font-family: var(--second-family);
        font-weight: 600;
        font-size: 16px;
        line-height: 120%;
        letter-spacing: 0.01em;
        color: var(--colors-default);
    }

    &__price{
        font-family: var(--font-family);
        font-weight: 500;
        font-size: 14px;
        letter-spacing: 0.01em;
        color: var(--colors-primary);
    }

    @include mobile {
        gap: 8px;
        padding: 10px 10px 10px 13px;
    
        &__main{
            gap: 12px;
        }
    
        &__title{
            font-size: 14px;
        }
    
        &__price{
            font-size: 12px;
        }
    }

}

.addon-btn{
    display: flex;
    padding: 0px;
    border: none;
    background-color: transparent;

    &.active{
        svg{
            fill: var(--colors-primary);
            transition: 0.23s;
        }
        path{
            transition: 0.23s;
            &:nth-child(3){
                stroke: #fff;
            }
            &:nth-child(2){
                opacity: 0;
                visibility: hidden;
            }
        }

        &:hover{
            svg{
                fill: #0c67cf;
            }
        }
    }
    @include mobile{
        svg{
            width: 35px;
            height: 35px;
        }
    }
}



// header-bottom


.h-katalog,
.h-marki {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    min-width: 280px;
    max-width: 280px;

    background: var(--colors-grey);

    transition: 0.23s;

    &:after {
        position: absolute;
        content: '';
        width: 25px;
        height: 25px;
        background-image: url(../img/icons/arr-down.svg);
        right: 30px;
    }

    &.active{
        background: var(--colors-primary);
    }
    &:not(.active):hover {
        background: rgba(51, 51, 51, 0.5);
      }

    @include desktop{
        min-width: 230px;
        max-width: 230px;
    }

    @include tablet {
        min-width: 25%;
        max-width: 25%;

        &:after {
            width: 25px;
            height: 25px;
            right: 10px;
        }
    }

    @include mobile {
        min-width: calc(50% - 35px);
        max-width: calc(50% - 35px);
    }

    @include sm-mobile {
        &:after {
            width: 20px;
            height: 20px;
            right: 7px;
            background-size: cover;
        }
    }
}

.h-btn-mn {
    padding: 22.5px 30px;
    padding-left: 67px;

    font-family: var(--font-family);
    font-weight: 600;
    font-size: 18px;
    line-height: 111%;
    letter-spacing: 0.01em;
    color: var(--colors-white);
    background-position: center left 30px;

    @include tablet {   
        padding: 18px 15px;
        padding-left: 45px;
        background-size: 20px;
        background-position: center left 15px;  
        font-size: 16px;
    }

    @include sm-mobile {
        padding: 14px 15px;
        padding-left: 34px;
        background-size: 18px;
        background-position: center left 10px;  
        font-size: 14px;
    }
}

.h-katalog {
    .h-btn-mn {
        background-image: url(../img/icons/katalog.svg);
    }

    &__box {
        position: absolute;
        z-index: 50;
        top: 100%;
        left: 0;
        width: calc(100vw - 60px);
        max-width: 1228px;
        padding: 24px 24px 86px 24px;

        box-shadow: 0 3px 20px 0 rgba(0, 0, 0, 0.25);
        background: var(--colors-primary2);
        display: none;
        gap: 35px;

        cursor: default;

        &.active {
            display: grid;
        }

        @include tablet {
            width: calc(100vw - 30px);

        }

        @include mobile {
            position: fixed;
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;
        }
    }

    &__close{
        cursor: pointer;
    }

    .main-category-item {
        cursor: pointer;

        &__title {
            transition: 0.23s;
        }

        &:hover {
            .main-category-item__title {
                color: var(--colors-primary) !important;
            }
        }
    }

    &__top {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    &__list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;

        max-height: 300px;
        overflow-y: scroll;
        scrollbar-width: none;
        -ms-overflow-style: none; 
        &::-webkit-scrollbar {
          display: none; 
        }

        @include desktop{
            grid-template-columns: repeat(3, 1fr);
        }

        @include tablet{
            grid-template-columns: repeat(2, 1fr);
        }

        @include mobile {
            max-height: calc(100vh - 200px);
            grid-template-columns: 100%;
            gap: 8px;
        }
    }

}

.h-marki {
    .h-btn-mn {
        background-image: url(../img/icons/tag.svg);
    }

    &__box {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 3px 20px 0 rgba(0, 0, 0, 0.25);
        background: var(--colors-white);
        z-index: 50;
        padding: 24px;
        cursor: default;
        display: none;
        gap: 35px;

        &.active {
            display: grid;
        }

        @media (min-width: 768px) {
            min-width: 240px;
        }

        @include mobile {
            position: fixed;
            width: 100vw;
            height: 100vh;
            top: 0;
            left: 0;

            overflow: auto;
        }

    }

    &__top {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    &__title {
        font-family: var(--second-family);
        font-weight: 700;
        font-size: 24px;
        line-height: 150%;
        letter-spacing: 0.01em;
        color: var(--colors-default);
    }

    &__close {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: 0.23s;

        &:hover {
            opacity: 0.8;
        }
    }
}

.btn-apply {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    width: 100%;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 125%;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--colors-white);
    background: var(--colors-primary);
    padding: 15px;
    transition: 0.23s;

    &:hover {
        background: var(--colors-primary2);
    }
}


.filter-group {
    display: grid;
    gap: 11px;

    &__title{
        font-family: var(--font-family);
        font-weight: 400;
        font-size: 16px;
        line-height: 125%;
        letter-spacing: 0.01em;
        color: var(--colors-default);
    }
}

.header{
    .filter-list{
        max-height: 280px;
        overflow: auto;

        overflow-y: scroll;
        scrollbar-width: none;
        -ms-overflow-style: none; 
        &::-webkit-scrollbar {
          display: none; 
        }
    }
}


.filter-list {
    display: grid;
    gap: 11px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: none;
    transition: max-height 0.3s ease;
}

.filter-list.collapsed .filter-group-item:nth-child(n + 9) {
    display: none;
}

.filter-group-item,
.checkbox-item {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  
    input[type='checkbox'] {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
  
    .custom-checkbox {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      cursor: pointer;
      user-select: none;
    }
  
    .checkmark {
      min-width: 24px;
      max-width: 24px;
      min-height: 24px;
      max-height: 24px;
      background: rgba(54, 142, 240, 0.2);
      border: 1px solid var(--colors-primary, #368ef0);
      position: relative;
      transition: background-color 0.2s, border-color 0.2s;
    }
  
    .checkmark::after {
      content: "";
      position: absolute;
      background-image: url("../img/icons/checked.svg");
      background-repeat: no-repeat;
      background-position: center;
      background-size: 14px;
      width: 15px;
      height: 12px;
      top: 5px;
      left: 4px;
      opacity: 0;
      transition: opacity 0.2s;
    }
  
    .label-text {
      font-family: var(--font-family, Arial);
      font-size: 16px;
      line-height: 150%;
      color: #000;
    }
  
    input[type='checkbox']:checked + .custom-checkbox .checkmark {
      background: var(--colors-primary, #368ef0);
    }
  
    input[type='checkbox']:checked + .custom-checkbox .checkmark::after {
      opacity: 1;
    }
  }
  

.filter-more {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background: rgba(54, 142, 240, 0.2);
    padding: 7px 30px;

    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    line-height: 125%;
    letter-spacing: 0.01em;
    color: var(--colors-default);
    transition: 0.23s;
    border: none;

    &::after {
        content: '';
        position: relative;
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-image: url(../img/icons/arr-down-black.svg);
        background-repeat: no-repeat;
        background-position: center;
    }

    &:hover {
        background: rgba(54, 142, 240, 0.4);
    }

    &.active{
        &::after{
            transform: rotate(180deg);
        }
    }

    @include desktop {
        padding-left: 15px;
        padding-right: 15px;
    }
}



.h-search {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 10px 0;

    @include mobile {
        padding: 0;
    }

    &__mobileclose{
        position: absolute;
        top: 15px;
        right: 15px;
        display: none;

        @include mobile {
            display: flex;
        }
    }

    .mob-search-btn{
        display: none;

        @include mobile {
            width: 50px;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--colors-grey);
        }
    }

    &__formgroup{
        display: flex;
        width: 100%;

        @include mobile {
            height: 50px;
        }
    }

    &__form {
        
        width: 100%;
        background-color: #fff;

        @include mobile {

            display: none;

            position: absolute;

            padding: 15px;
            position: fixed;
            width: 100vw;
            height: 100vh;
            left: 0;
            top: 0;
            padding-top: 50px;

            overflow: auto;
        }  

        &.active{
            display: flex;
        }

    }

    &__input {
        display: flex;
        width: 100%;
        background: var(--colors-white);
        border: 1px solid var(--colors-grey);
        padding: 15px 15px 15px 43px;

        background-image: url(../img/icons/search.svg);
        background-repeat: no-repeat;
        background-position: center left 15px;

        font-family: var(--font-family);
        font-weight: 400;
        font-size: 14px;
        line-height: 143%;
        letter-spacing: 0.01em;
        color: var(--colors-grey);

        &::placeholder {
            font-family: var(--font-family);
            font-weight: 400;
            font-size: 14px;
            line-height: 143%;
            letter-spacing: 0.01em;
            color: var(--colors-grey);
        }
    }

    &__button {
        background: var(--colors-primary);
        padding: 15px 43.5px;
        font-family: var(--font-family);
        font-weight: 700;
        font-size: 16px;
        line-height: 125%;
        letter-spacing: 0.01em;
        text-align: center;
        color: var(--colors-white);
        border: none;
        transition: 0.23s;

        &:hover {
            background: #0c67cf;
        }

        @include tablet {
            padding: 15px 20px;
        }
    }

    .h-result {
        position: absolute;
        padding: 40px;
        background: var(--colors-primary2);
        width: 100%;
        min-width: 600px;
        top: 100%;
        right: 0;
        z-index: 50;
        display: grid;
        gap: 8px;

        &__list {
            display: grid;
            gap: 8px;
        }

        &__bottom {
            padding: 20px 0;
        }

        @include mobile {
            // position: relative;
            padding: 24px 12px;
            top: 100px;
            min-width: calc(100% - 30px);
            max-width: calc(100% - 30px);
            left: 0;
            right: 0;
            margin: 0 auto;
            margin-top: 15px;
        }
    }

    .h-result-item {
        display: flex;
        align-items: center;
        gap: 20px;
        background: var(--colors-white);
        padding: 20px;

        &__image {
            img {
                min-width: 100px;
                max-width: 100px;
            }
        }

        &__content {
            display: grid;
            gap: 8px;
        }

        &__name {
            font-family: var(--font-family);
            font-weight: 600;
            font-size: 20px;
            line-height: 140%;
            color: #1f1f22;
            transition: 0.23s;

            &:hover {
                color: var(--colors-primary2);
            }
        }

        &__price {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        &__price_old {
            font-family: var(--font-family);
            font-weight: 400;
            font-size: 14px;
            line-height: 143%;
            text-decoration: line-through;
            color: var(--colors-primary2);
        }

        &__price_new {
            font-family: var(--font-family);
            font-weight: 600;
            font-size: 18px;
            line-height: 156%;
            color: var(--colors-default);
        }

        @include mobile{
            padding: 20px 10px;
            gap: 10px;
            align-items: flex-start;
            &__image {
                img {
                    min-width: 60px;
                    max-width: 60px;
                }
            }
    
            &__content {
                gap: 8px;
            }
    
            &__name {
                font-size: 16px;
            }
    
            &__price {
                gap: 10px;
            }
    
            &__price_old {
                font-size: 14px;
            }
    
            &__price_new {
                font-size: 16px;
            }
    
        }

    }
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 16px;
    line-height: 125%;
    letter-spacing: 0.01em;
    text-align: center;
    color: var(--colors-white);
    padding: 17.5px;
    background: var(--colors-primary);
    transition: 0.23s;

    &:hover {
        background: #0c67cf;
    }
}