/* базово прячем мобильную шапку на больших экранах */
.bw-mobile-header-wrap,
.bw-mobile-menu-overlay {
    display: none;
}

/* на мобилке делаем наоборот */
@media (max-width: 768px) {

    /* показать мобилку */
    .bw-mobile-header-wrap {
        display: block;
        background:#fff;
        font-family: "Noto Sans Armenian", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    }

    /* скрыть десктоп */
    .bw-middle-header {
        display: none;
    }

    /* верхняя линия контакта */
    .bw-mobile-topline{
        display:flex;
        justify-content:space-between;
        align-items:flex-start;
        padding:6px 10px;
        border-bottom:1px solid rgba(0,0,0,.06);
        font-size:12px;
        line-height:1.3;
        color:#000;
        background:#fff;
    }

    .bw-mobile-topline-left{
        display:flex;
        flex-direction:column;
        gap:4px;
        flex:1 1 auto;
        min-width:0;
    }

    .bw-mobile-topline-link{
        display:flex;
        align-items:center;
        gap:4px;
        text-decoration:none;
        color:#000;
        font-size:12px;
        line-height:1.3;
        word-break:break-word;
    }

    .bw-mobile-icon svg{
        width:16px;
        height:16px;
        stroke:#000;
        fill:none;
    }
    .bw-mobile-icon svg path,
    .bw-mobile-icon svg rect,
    .bw-mobile-icon svg circle,
    .bw-mobile-icon svg line {
        stroke:#000;
        fill:none;
    }

    .bw-mobile-topline-right{
        flex-shrink:0;
        display:flex;
        align-items:center;
        justify-content:flex-end;
        min-width:80px;
    }
    .bw-mobile-logo img{
        max-width:70px;
        height:auto;
        display:block;
    }
    .bw-mobile-logo-fallback{
        font-weight:700;
        font-size:14px;
        color:#000;
    }

    /* синяя навигация */
    .bw-mobile-navbar{
        display:flex;
        justify-content:space-between;
        align-items:stretch;
        background:#1947C4;
        color:#fff;
        padding:6px 4px;
        border-bottom:1px solid rgba(0,0,0,.15);
        box-shadow:0 4px 10px rgba(0,0,0,.15);
    }

    .bw-mobile-navbtn,
    .bw-mobile-navbtn:focus,
    .bw-mobile-navbtn:active,
    .bw-mobile-navbtn:hover,
    .bw-mobile-navbar a.bw-mobile-navbtn {
        appearance:none;
        background:none;
        border:0;
        color:#fff;
        padding:4px 2px;
        flex:1 1 20%;
        min-width:0;
        text-align:center;
        text-decoration:none;
        display:flex;
        flex-direction:column;
        align-items:center;
        font-size:11px;
        line-height:1.2;
    }

    .bw-mobile-navbtn-icon{
        display:block;
        position:relative;
        width:24px;
        height:24px;
        margin-bottom:2px;
    }
    .bw-mobile-navbtn-icon svg{
        width:24px;
        height:24px;
        stroke:#fff;
        fill:none;
    }
    .bw-mobile-navbtn-icon svg path,
    .bw-mobile-navbtn-icon svg rect,
    .bw-mobile-navbtn-icon svg circle,
    .bw-mobile-navbtn-icon svg line {
        stroke:#fff;
        fill:none;
    }

    .bw-mobile-navbtn-icon--cart .bw-mobile-cart-badge{
        position:absolute;
        top:-4px;
        right:-6px;
        min-width:16px;
        height:16px;
        background:#ff3b30;
        color:#fff;
        font-size:10px;
        line-height:16px;
        font-weight:600;
        border-radius:999px;
        text-align:center;
        padding:0 4px;
    }

    .bw-mobile-navbtn-label{
        color:#fff;
        font-size:11px;
        line-height:1.2;
        white-space:nowrap;
    }

    /* выпадающий поиск */
    .bw-mobile-searchwrap{
        display:none;
        background:#fff;
        border-bottom:1px solid rgba(0,0,0,.06);
        box-shadow:0 6px 20px rgba(0,0,0,.12);
        padding:8px 10px;
    }
    body.bw-mobile-search-open .bw-mobile-searchwrap{
        display:block;
    }

    .bw-mobile-searchform{
        display:flex;
        align-items:center;
        gap:6px;
    }
    .bw-mobile-searchform input[type="search"]{
        flex:1 1 auto;
        min-width:0;
        height:36px;
        border:1px solid #ccc;
        border-radius:6px;
        padding:0 10px;
        font-size:14px;
    }
    .bw-mobile-searchform button{
        flex-shrink:0;
        height:36px;
        border:0;
        border-radius:6px;
        background:#1947C4;
        color:#fff;
        padding:0 12px;
        font-size:14px;
        font-weight:600;
    }

    /* live dropdown (reuse классы) */
    #bw-live-search-dropdown-mobile{
        background:#fff;
        border:1px solid rgba(0,0,0,.08);
        border-radius:8px;
        margin-top:8px;
        box-shadow:0 20px 40px rgba(0,0,0,.16);
        max-height:60vh;
        overflow:auto;
    }

    /* offcanvas меню */
    .bw-mobile-menu-overlay{
        display:none;
        position:fixed;
        inset:0;
        background:rgba(0,0,0,.5);
        z-index:999999;
    }
    .bw-mobile-menu-overlay.is-open{
        display:block;
    }

    .bw-mobile-menu-panel{
        position:absolute;
        top:0;
        bottom:0;
        left:0;
        width:80%;
        max-width:320px;
        background:#fff;
        color:#000;
        display:flex;
        flex-direction:column;
        box-shadow:4px 0 20px rgba(0,0,0,.4);
    }

    .bw-mobile-menu-header{
        display:flex;
        align-items:center;
        justify-content:space-between;
        padding:12px 16px;
        font-size:16px;
        font-weight:600;
        border-bottom:1px solid rgba(0,0,0,.06);
    }
    .bw-mobile-menu-closebtn{
        background:none;
        border:0;
        font-size:24px;
        line-height:1;
    }

    .bw-mobile-menu-scroll{
        flex:1 1 auto;
        overflow-y:auto;
        -webkit-overflow-scrolling:touch;
    }

    .bw-mobile-menu-list{
        list-style:none;
        margin:0;
        padding:0;
    }

    .bw-mobile-menu-item{
        border-bottom:1px solid rgba(0,0,0,.05);
    }

    .bw-mobile-menu-link{
        display:flex;
        align-items:center;
        justify-content:space-between;
        text-decoration:none;
        color:#000;
        padding:12px 16px;
        font-size:15px;
        line-height:1.3;
    }

    .bw-mobile-menu-left{
        display:flex;
        align-items:center;
        gap:10px;
        min-width:0;
        flex:1 1 auto;
    }

    .bw-mobile-menu-icon svg,
    .bw-mobile-menu-icon img{
        width:24px;
        height:24px;
        object-fit:contain;
        display:block;
        stroke:#000;
        fill:none;
    }
    .bw-mobile-menu-icon svg path,
    .bw-mobile-menu-icon svg rect,
    .bw-mobile-menu-icon svg circle,
    .bw-mobile-menu-icon svg line {
        stroke:#000;
        fill:none;
    }

    .bw-mobile-menu-text{
        font-size:15px;
        line-height:1.3;
        color:#000;
        font-weight:500;
        white-space:nowrap;
    }

    .bw-mobile-menu-right-arrow{
        font-size:18px;
        line-height:1;
        color:#888;
        margin-left:8px;
        flex-shrink:0;
    }

    .bw-mobile-menu-footer{
        border-top:1px solid rgba(0,0,0,.06);
        padding:12px 16px;
        font-size:14px;
        line-height:1.4;
        background:#fafafa;
    }

    .bw-contact-row{
        display:flex;
        align-items:center;
        gap:8px;
        font-size:14px;
        line-height:1.4;
        color:#000;
        text-decoration:none;
        margin-bottom:10px;
        word-break:break-word;
    }

    .bw-mobile-footer-text{
        font-size:14px;
        line-height:1.4;
        color:#000;
    }
}

/* мелкие телефоны (старые андроиды ~360px ширина) */
@media (max-width: 380px){
    .bw-mobile-navbar{
        padding:6px 2px;
    }
    .bw-mobile-navbtn-label{
        font-size:10px;
    }
    .bw-mobile-navbtn-icon{
        width:22px;
        height:22px;
    }
    .bw-mobile-navbtn-icon svg{
        width:22px;
        height:22px;
    }
    .bw-mobile-logo img{
        max-width:60px;
    }
}
