/* mob/header.css
   Mobile header + burger + drawer menu
*/
@media (max-width: 1024px){
  .m-burger{
    appearance:none;
    border:1px solid rgba(0,0,0,.12);
    background:#fff;
    border-radius:999px;
    width:56px;
    height:56px;
    padding:0;
    line-height:1;
    font-size:30px;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);

    position:fixed;
    top:12px;
    right:12px;
    z-index:2147483646;

    display:flex;
    align-items:center;
    justify-content:center;
  }

  .m-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.38);
    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
    z-index:2147483644;
  }

  .m-drawer{
    position:fixed;
    top:0;
    right:0;
    height:100dvh;
    width:min(88vw, 380px);
    background:#fff;
    transform:translateX(110%);
    transition:transform .22s ease;
    z-index:2147483645;
    overflow:auto;
    padding:16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
  }

  .m-drawer__top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
  }
  .m-drawer__title{ font-size:18px; font-weight:700; }
  .m-drawer__close{
    appearance:none;
    border:0;
    background:transparent;
    font-size:28px;
    line-height:1;
    padding:6px 10px;
    border-radius:10px;
  }

  .m-nav-open .m-overlay{ opacity:1; pointer-events:auto; }
  .m-nav-open .m-drawer{ transform:translateX(0); }

  /* Drawer menu: always 1 item per row */
  .m-drawer ul, .m-drawer li{
    display:block !important;
    float:none !important;
    width:100% !important;
    list-style:none;
    margin:0;
    padding:0;
  }
  .m-drawer li{ border-bottom:1px solid rgba(0,0,0,.08); }
  .m-drawer a{
    display:block !important;
    width:100% !important;
    padding:14px 12px !important;
    font-size:16px;
    color:#111 !important;
    text-decoration:none !important;
  }

  /* Submenus: collapsed by default */
  .m-drawer li ul{ display:none !important; padding-left:14px !important; }
  .m-drawer li.m-sub-open > ul{ display:block !important; }
  .m-drawer li.m-has-sub > a{ position:relative; padding-right:38px !important; }
  .m-drawer li.m-has-sub > a:after{
    content:"▾";
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    opacity:.6;
    font-size:14px;
  }
  .m-drawer li.m-sub-open > a:after{ content:"▴"; }
}

/* Mobile header compact, show address but hide “Свяжитесь с нами” column */
@media (max-width: 767px) and (orientation: portrait){
  .pi-section-w.header .pi-section.pi-row-lg{
    padding-top:10px !important;
    padding-bottom:10px !important;
  }

  .pi-row-block-logo img{
    max-height:56px !important;
    width:auto !important;
  }

  /* Force show block (theme hides it with pi-hidden-2xs) */
  .header .contact_info.pi-hidden-2xs{ display:block !important; }

  .header .contact_info table,
  .header .contact_info tbody,
  .header .contact_info tr,
  .header .contact_info td{
    display:block !important;
    width:100% !important;
  }

  /* Show only address (first td) */
  .header .contact_info td:first-child{ display:block !important; }
  .header .contact_info td:last-child{ display:none !important; }

  .header .contact_info p{
    margin:0 0 4px 0 !important;
    font-size:14px !important;
    line-height:1.25 !important;
  }

  /* Keep only main phone, hide the second line */
  .header .phone_block.pi-hidden-xs{ display:block !important; float:none !important; text-align:left !important; margin-top:6px !important; }
  .header .phone_block h2{ margin:0 !important; font-size:18px !important; line-height:1.2 !important; }
  .header .phone_block p{ display:none !important; }
}

/* Hide desktop top menu bar on mobile (it overlaps header contacts) */
@media (max-width: 1024px){
  .pi-header.pi-section-w.pi-section-base.menu{ display:none !important; }
}
