/* Выезжающее меню на телефоне (2026-11-19). Разметка - header.php (#mobile-menu), скрипт - js/m2.js m2NavDrawer().
   На телефоне (до 767px) #mobile-menu - белая панель справа поверх затемнения, пункты - плашки как карточки
   «Типы насосов» (светлый фон, синяя стрелка). На планшете и компьютере - прежняя синяя полоса меню. */

.m2-drawer_head,.m2-drawer_overlay{display: none;}

@media (max-width:767px){
    html.m2-nav-open,html.m2-nav-open body{overflow: hidden;}
    html.m2-nav-open #header{z-index: 10000;}

    #header #mobile-menu{
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: 86%;
        max-width: 360px;
        height: 100%;
        display: flex !important;
        flex-direction: column;
        background: #fff;
        z-index: 2;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        box-shadow: -12px 0 40px rgba(18,40,78,.18);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility 0s linear .3s;
    }
    #header #mobile-menu.is-open{transform: none;visibility: visible;transition: transform .3s ease;}

    .m2-drawer_overlay{
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1;
        background: rgba(18,33,58,.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility 0s linear .3s;
    }
    html.m2-nav-open .m2-drawer_overlay{opacity: 1;visibility: visible;transition: opacity .3s ease;}

    .m2-drawer_head{
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex: none;
        padding: 12px 12px 12px 20px;
        border-bottom: 3px solid #e6e7ee;
    }
    .m2-drawer_logo{display: block;line-height: 0;}
    .m2-drawer_close{
        width: 46px;
        height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: #326ab6;
        background-color: #f7f8fb;
        border: 2px solid #f0f2f6;
        border-radius: 8px;
    }
    .m2-drawer_close:hover,.m2-drawer_close:focus-visible{color: #fff;background-color: #3d7ace;border-color: #326ab6;}

    #header #mobile-menu .m-wrap{padding: 20px 16px 28px;}
    #header #mobile-menu .flex{flex-direction: column;align-items: stretch;}

    /* поиск - первым, сразу под шапкой панели */
    #header #mobile-menu .flex > .mob-show{order: -1;padding: 0;margin-bottom: 20px;}
    #mobile-menu .searchbox_form .ico-field .button{background-color: #3d7ace;border-color: #3d7ace;}

    #header #mobile-menu nav{width: 100%;}
    #header #mobile-menu .line-menu li{float: none;}
    #header #mobile-menu .menu li a{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 16px 16px 18px;
        margin-bottom: 8px;
        background-color: #f5f7f9;
        border: 1px solid #e9edf3;
        border-radius: 10px;
        color: #1e1e1e;
        font-size: 17px;
        font-weight: bold;
        line-height: 1.2;
    }
    /* стрелка - как в img/arrow3.svg, но без светлой подложки; цвет - background-color */
    #header #mobile-menu .menu li a:after{
        content: '';
        flex: none;
        width: 16px;
        height: 18px;
        margin-left: 12px;
        background-color: #657da1;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M4.75 9h10.4M9.4 .9l5.85 8.1-5.85 8.1' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 18'%3E%3Cpath d='M4.75 9h10.4M9.4 .9l5.85 8.1-5.85 8.1' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    #header #mobile-menu .menu li a:hover,#header #mobile-menu .menu li a:focus-visible{background-color: #eaf1fb;border-color: #c9d8ee;color: #326ab6;}
    #header #mobile-menu .menu li a:hover:after{background-color: #326ab6;}
    #header #mobile-menu .menu .current-menu-item > a{background-color: #3d7ace;border-color: #3d7ace;color: #fff;}
    #header #mobile-menu .menu .current-menu-item > a:after{background-color: #fff;}
}

@media (max-width:767px) and (prefers-reduced-motion: reduce){
    #header #mobile-menu,#header #mobile-menu.is-open,.m2-drawer_overlay,html.m2-nav-open .m2-drawer_overlay{transition: none;}
}
