.w_header{
    width: 100%;

    height: var(--header_heigth);

    background: #ebf0ef;

    position: sticky;
    top: 0;
    z-index: 100;

    .desktop{
        /* padding: 0 var(--wrapper_margin, 10px); */

        display: grid;
        grid-template-columns: 220px calc(100% - 470px) 220px;

        gap: 15px;

        .w_header_part{
            width: 100%;
            padding: 10px 0 0 0;

            &:has(.logo){
                padding: 0;
                display: flex;
                align-items: center;
                width: fit-content;
            }
            &.right_part{
                display: flex;
                align-items: center;
                gap: var(--gap, 15px);
                justify-content: right;
                box-sizing: content-box;
                height: 36px;
            }
        }

        .logo{
            height: 64px;
            display: block;

            transition: 0.3s ease all;
        }

        .login, .login img{
            display: block;
            width: 25px;
            height: 25px;
            filter: var(--login_filter,
                    brightness(0) saturate(100%) invert(33%) sepia(11%) saturate(0%) hue-rotate(222deg) brightness(101%) contrast(83%));
        }

        form[name="search_form"]{
            .field_container[data-name="search_text"] {
                position: relative;
                input{padding: 10px;border-radius: 3px 0 0 3px;}
                img{
                    height: 34px;
                    width: 22px;
                    padding: 0;
                    cursor: pointer;
                }
                .field_container_enter_data_cont{
                    grid-template-columns: auto 32px;
                }

                .autocomplete_container{
                    display: none;

                    position: absolute;
                    margin-top: 5px;

                    width: 100%;
                    background: #fff;
                    z-index: 100;
                    border: 1px solid #d4dad9;
                    border-top: none;

                    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
                    border-radius: 0 0 5px 5px;

                    .autocomplete_item{
                        padding: 10px;
                        border-bottom: 1px solid #eee;
                        cursor: pointer;

                        font-size: 12px;
                        color: #333333;

                        &:hover{
                            background: #eee;
                        }
                        &:last-of-type{
                            border-bottom: none;
                        }
                    }

                    &.open{display: block;}
                }
            }

            .middle_header_line{
                display: flex;
                justify-content: space-between;
                margin-top: 5px;

                .transliteration_control{display: none;}
            }
            .recently_searched{
                display: flex;
                flex-wrap: wrap;
                gap: 2px;
                align-items: center;
                width: 100%;
                height: 14px;
                overflow: hidden;

                font-size: 12px;

                a{
                    color: #6a6a6a;
                    font-weight: normal;
                    text-decoration: none;
                    transition: 0.3s all ease;
                    &:hover{color: var(--hovered_text_color);}
                }
            }

            .bottom_line{
                display: grid;
                grid-template-columns: calc(100% - 285px) 275px;
                gap: 10px;
                margin-top: 10px;

                height: 36px;

                .publication_type_tabs{
                    height: inherit;
                    width: 100%;
                    display: flex;

                    .publication_type_tab{
                        --bg: #8b9796;

                        font-size: 16px;
                        line-height: 20px;
                        padding: 8px 12px;
                        background: var(--bg);
                        cursor: pointer;
                        flex-grow: 1;
                        color: #fff;
                        text-align: center;

                        transition: 0.3s all ease;
                        &.active{
                            --bg: #008ac4;
                        }
                    }
                }
            }
            .transliteration_control{
                background: #e1e6e5;
                padding: 8px 14px;
                height: inherit;
                display: flex;
                justify-content: space-between;
                align-items: center;

                font-size: 12px;
                --select_text_color: #6a6a6a;
                --select_font_size: 12px;

                .w_select{width: 140px;}
            }
        }
    }

    .mobile{
        display: none;
        padding: 15px 0;
        transition: 0.3s ease all;

        .header_row.inf{
            display: grid;
            align-items: start;
            grid-template-columns: 30px calc(100% - 140px) 80px 30px;
        }

        .header_aside{
            position: relative;

            &.inf{
                .hamburger{transform: scaleX(-1);}
                .header_aside_body{
                    left: unset;
                    right: -100%;
                }
                &.open{
                    .header_aside_body{
                        right: 0;
                        left: unset;
                    }
                }
            }
            .hamburger{
                width: 30px;
                height: 25px;

                .central_line{
                    display: block;

                    position: absolute;
                    top: 10px;
                    left: 0;

                    width: 100%;
                    height: 4px;
                    background: #000;
                    border-radius: 4px;

                    transition: 0.1s ease all;
                }
            }
            .hamburger::after{
                content: '';
                display: block;

                position: absolute;
                top: 20px;
                left: 0;

                width: 100%;
                height: 4px;
                background: #000;
                border-radius: 4px;

                transition: 0.1s ease all;
            }

            .hamburger::before{
                content: '';
                display: block;

                position: absolute;
                top: 0;
                left: 0;

                width: 100%;
                height: 4px;
                background: #000;
                border-radius: 4px;

                transition: 0.1s ease all;
            }

            .header_aside_body{
                position: fixed;
                z-index: 10000;
                left: -100%;
                overflow: auto;
                top: var(--header_heigth);

                padding: 20px;

                width: 350px;
                height: calc(100svh - var(--header_heigth));
                background: #fff;
                box-shadow: 5px 9px 10px 0 rgba(0, 0, 0, .75);

                .b_products_filters{display: block;overflow: hidden;max-height: unset;position: unset;}
                .b_user_inf_aside{display: block;overflow: hidden;max-height: unset;position: unset;}
                .b_nav_by_founded_publications{display: block;overflow: hidden;max-height: unset;position: unset;}
                .b_left_user_profile_aside{display: block;overflow: hidden;max-height: unset;position: unset;}
                transition: 0.3s ease all;
            }

            .overlay{
                display: none;

                position: fixed;
                top: var(--header_heigth);
                left: 0;
                width: 100%;
                height: calc(100% - var(--header_heigth));
                background: #ffffffcf;
                z-index: 1000;
            }

            &.open{
                .hamburger::before{
                    top: 4px;
                    left: -2px;
                    width: 85%;
                    rotate: -34deg;
                }
                .hamburger::after{
                    top: 16px;
                    left: -2px;
                    width: 85%;
                    rotate: 35deg;
                }

                .overlay{display: block;}
                .header_aside_body{
                    left: 0;
                }
            }
        }

        .logo{
            display: flex;
            justify-content: center;

            text-decoration: none;
            color: #000;

            /* width: 100%;
            img{width: 97px;display: block;transition: 0.2s ease all;} */

            width: calc(100% - 80px);
            margin-left: 80px;

            img{width: 55px;display: block;transition: 0.2s ease all;}
        }

        .order__favor_inf{
            display: flex;
            gap: 10px;
            align-items: center;

            .inf_cont{
                position: relative;

                display: flex;
                align-items: center;
                gap: 2px;

                img{height: 23px;display: block;filter: var(--hovered_icon_filter);}
                .inf_cont_count{
                    position: absolute;
                    top: -6px;
                    right: -4px;

                    padding: 0px 4px;
                    background: #ebf0ef;
                    border-radius: 100%;

                    font-size: 12px;
                    color: #000;

                    &.updated{
                        /* animation: var(--duration, 2s) var(--cubic, cubic-bezier(0.280, 0.840, 0.420, 1)) BounceAnim var(--after-anim-mode, forwards); */
                        animation: 1s ease-in-out 1 UpdateCountElementsInMobileHeaderCart__Favor;
                    }
                }
            }
        }

        .header_row.search{
            margin-top: 20px;
        }
        form[name="search_form_mobile"], form[name="search_form_mobile_aside"]{
            &[name="search_form_mobile_aside"]{margin-bottom: 20px;}
            .transliteration_control{
                background: #e1e6e5;
                padding: 8px 14px;
                height: inherit;
                display: flex;
                justify-content: space-between;
                align-items: center;

                font-size: 12px;
                --select_text_color: #6a6a6a;
                --select_font_size: 12px;

                .w_select{width: 140px;}

                .select_body{z-index: 1000;}

                margin-bottom: 10px;
            }
            .field_container[data-name="search_text"] {
                position: relative;
                input{padding: 10px;border-radius: 3px 0 0 3px;}
                img{
                    height: 34px;
                    width: 22px;
                    padding: 0;
                    cursor: pointer;
                }
                .field_container_enter_data_cont{
                    grid-template-columns: auto 32px;
                }

                .autocomplete_container{
                    display: none;

                    position: absolute;
                    margin-top: 5px;

                    width: 100%;
                    background: #fff;
                    z-index: 100;
                    border: 1px solid #d4dad9;
                    border-top: none;

                    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
                    border-radius: 0 0 5px 5px;

                    .autocomplete_item{
                        padding: 10px;
                        border-bottom: 1px solid #eee;
                        cursor: pointer;

                        font-size: 12px;
                        color: #333333;

                        &:hover{
                            background: #eee;
                        }
                        &:last-of-type{
                            border-bottom: none;
                        }
                    }

                    &.open{display: block;}
                }
            }

            .recently_searched{
                display: flex;
                flex-wrap: wrap;
                gap: 2px;
                align-items: center;
                width: 100%;
                height: 14px;
                overflow: hidden;

                margin-top: 5px;

                font-size: 12px;

                a{
                    color: #6a6a6a;
                    font-weight: normal;
                    text-decoration: none;
                    transition: 0.3s all ease;
                    &:hover{color: var(--hovered_text_color);}
                }
            }
        }
    }

    &.minimized .desktop{
        .logo{height: 50px;}
        & form[name="search_form"] {
            .middle_header_line{
                gap: 10px;
                .recently_searched{width: calc(100% - 285px);height: 30px;overflow: hidden;}
                .transliteration_control{display: flex;width: 275px;}
            }

            .bottom_line{display: none;}
        }
    }

    &.minimized .mobile, &.aside_minimized .mobile{
        padding: 5px 0;
        .header_row.inf{align-items: center;}
        .logo img{width: 55px;transition: 0.3s ease all;}
        .header_row.search {display: none;}
    }



    @media(max-width: 1024px){
        &.minimized, &.aside_minimized{
            box-shadow: 0 1px 2px #999999;
        }
        /* transition: 0.3s ease all; */
        .desktop{display: none;}
        .mobile{display: block;}
    }
}

@keyframes UpdateCountElementsInMobileHeaderCart__Favor {
    0% {
        scale: 1;
        color: #0096cd;
    }
    50% {
        scale: 2;
    }
    99%{color: #0096cd;}
    100%{
        color: inherit;
        scale: 1;
    }
}
