.top_nav {
    max-width: 1140px;
    margin: 0 auto;
}

.top_nav.withmargintop {
    margin-top: 60px;
}

.bumazhnaya_produkciya, .paperova_produkcіya {
    width: 14px;
    height: 18px;
}

.kanctovary, .kanctovari {
    width: 12px;
    height: 18px;
}

.hoztovary, .gosptovari,
.ofisnaya_kuhnya, .ofіsna_kuhnya,
.tovary_dlya_ofisa, .tovari_dlya_ofіsu {
    width: 20px;
    height: 18px;
}

.tovary_dlya_shkoly_i_tvorchestva, .shkola_i_tvorchestvo, .shkola_і_tvorchіst,
.podarki_i_suveniry, .podarunki_і_suvenіri {
    width: 18px;
    height: 18px;
}

.sonic_catalog {
    display: flex;
    box-sizing: border-box;
    position: relative;
    list-style: none;
    color: #FFF;
    background: var(--blue);
    padding: 0 3px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.sonic_catalog.active {
    z-index: 1115;
}

.sonic_catalog_link {
    display: flex;
    align-items: center;
    height: 40px;
    font-size: 15px;
    text-decoration: none;
    color: #FFF;
    transition: var(--qtrans);
    padding: 0 7px;
    border-radius: 4px 4px 0 0;
}

.sonic_catalog_link:hover {
    color: var(--yellow);
}

.sonic_catalog li:first-child .sonic_catalog_link {
    border-radius: 0 4px 0 0;
}

.sonic_catalog li:last-child .sonic_catalog_link {
    border-radius: 4px 0 0 0;
}

.sonic_catalog>li.active .sonic_catalog_link {
    color: var(--blue);
    background: #FFF;
    cursor: default;
}

.sc_link_title {
    display: inline-block;
    position: relative;
    white-space: nowrap;
}

.sc_link_title:after {
    content: '';
    position: absolute;
    left: 0;
    width: 0;
    bottom: 0;
    height: 1px;
    background: var(--yellow);
    transition: var(--qtrans);
}

.sonic_catalog_link:hover .sc_link_title:after {
    width: 100%;
}

.sonic_catalog>li.active .sc_link_title:after {
    display: none;
}

.sc_icon {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: var(--qtrans);
    top: -2px;
    margin: 0 5px 0 0;
}

.sonic_catalog_second {
    list-style: none;
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    background: #FFF;
    border: 3px solid var(--blue);
    border-top: 0 none;
    z-index: 100;
    display: none;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 15px;
    max-height: calc(100vh - 158px);
    overflow-y: auto;
}

.sonic_catalog>li.active .sonic_catalog_second {
    display: flex;
}

.sonic_catalog_second a {
    text-decoration: none;
    color: #000;
    border-bottom: 0 none;
}

.sonic_catalog_second_link {
    text-decoration: none;
    margin: 2px 0;
    height: 48px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    font-size: 17px;
}

.sonic_catalog_second_link:hover {
    color: var(--blue);
}

.scc_icon {
    display: block;
    width: 48px;
    height: 48px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin: 0 7px 0 0;
    flex-shrink: 0;
}

.scc_title {
    color: #3D73A9;
    align-self: center;
    font-weight: bold;
}

.sonic_catalog_third {
    list-style: none;
    font-size: 14px;
    line-height: 18px;
}

.sonic_catalog_third li {
    padding: 4px 0;
}

.sonic_catalog_third a {
    display: block;
}

.sonic_catalog_third a:hover {
    color: var(--blue);
}

.sonic_catalog_third a::first-letter {
    font-weight: bold;
}

.sonic_menus_overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,.85);
    z-index: 1110;
    transition: var(--qtrans);
    cursor: pointer;
    display: none;
    opacity: 0;
}

.sonic_menus_overlay.active {
    display: block;
    opacity: 1;
}

.sonic_menus_overlay::before, .sonic_menus_overlay::after {
    content: '';
    position: fixed;
    top: 5px;
    right: 14px;
    width: 2px;
    height: 21px;
    background: #FFF;
    transform: rotate(45deg);
    z-index: 1120;
}

.sonic_menus_overlay::after {
    transform: rotate(-45deg);
}

.sonic_catalog_button {
    display: none;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    line-height: 37px;
    text-align: center;
    background: var(--blue);
    border: 0 none;
    color: #FFF;
    text-transform: uppercase;
    padding: 3px 0 0 0;
    cursor: pointer;
    font-size: 15px;
}

.sonic_catalog_button::before {
    content: '';
    position: relative;
    top: -2px;
    left: -1px;
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin: 0 5px 0 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.sonic_catalog_fixed_button {
    position: fixed;
    top: 40px;
    left: 0;
    width:40px;
    height: 40px;
    background-color: var(--blue);
    border: 0 none;
    z-index: 1000;
    transition: var(--qtrans);
    transform: scale(0);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    cursor: pointer;
    display: none;
}

.sonic_catalog_fixed_button.active {
    transform: scale(1);
}

@media screen and (max-width: 1020px) {
    .sonic_catalog_button, .sonic_catalog_fixed_button {
        display: block;
    }

    .sonic_catalog {
        position: fixed;
        top: 0;
        left: 0;
        width: calc(100% - 40px);
        max-height: 100vh;
        max-width: 400px;
        overflow-y: auto;
        display: block;
        padding: 10px 5px;
        z-index: 1115;
        transform: translateX(calc(-100%)) translateY(0);
        transition: var(--qtrans);
    }

    .sonic_catalog.active {
        z-index: 2200;
        transform: translateX(0) translateY(0);
    }

    .sonic_catalog_second {
        position: relative;
        display: block;
        top: -1px;
        left: auto;
        right: auto;
        border: 0 none;
        padding: 0 10px;
        max-height: 0;
        overflow: scroll;
        transition: unset;
    }

    .sonic_catalog_third {
        margin-left: 18px;
    }

    .sonic_catalog_third li {
        padding: 3px 0;
    }

    .sonic_catalog>li.active .sonic_catalog_second {
        max-height: fit-content;
    }

    .sonic_catalog_link {
        position: relative;
        font-size: 20px;
        line-height: 47px;
        font-weight: bold;
        letter-spacing: .025em;
        transition: unset;
        border: none;
    }

    .sonic_catalog_link:hover {
        color: unset;
    }

    .sc_link_title:after {
        display: none;
    }

    .sonic_catalog_link::after {
        content: '';
        position: absolute;
        top: 10px;
        right: 12px;
        width: 11px;
        height: 11px;
        border-bottom: 1px solid #FFF;
        border-right: 1px solid #FFF;
        border-color: rgba(255,255,255,.5);
        transform: rotate(45deg);
    }

    .sonic_catalog>li.active .sonic_catalog_link::after {
        border-color: var(--blue);
    }

    .sc_icon {
        margin-right: 7px;
    }

    .sonic_catalog_second_link {
        height: auto;
    }

    .scc_icon {
        width: 16px;
        height: 16px;
        margin: 1px 7px 0 -5px;
    }
}

@media screen and (max-width: 600px) {
    .sonic_catalog_fixed_button {
        top: 80px;
    }
}