/*
  Maido Customs Pure PHP Rebuild - Stage 3U
  Robust mobile hamburger open/close fix after Stage 3T.
  Keeps the confirmed correct mobile hero image and header icons.
*/

@media (max-width: 980px) {
  html body.has-hero-header .site-header--hero {
    z-index: 300 !important;
  }

  html body.has-hero-header .site-header--hero .menu-toggle,
  html body .menu-toggle[data-menu-toggle] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 7px !important;
    width: 54px !important;
    height: 54px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 420 !important;
    pointer-events: auto !important;
    appearance: none !important;
    -webkit-appearance: none !important;
  }

  html body.has-hero-header .site-header--hero .menu-toggle span,
  html body .menu-toggle[data-menu-toggle] span {
    display: block !important;
    width: 40px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: #050505 !important;
    opacity: 1 !important;
    transform: none !important;
  }

  html body.has-hero-header .site-header--hero .menu-toggle[aria-expanded="true"] span:nth-child(1),
  html body.maido-mobile-menu-open .site-header--hero .menu-toggle span:nth-child(1) {
    transform: translateY(12px) rotate(45deg) !important;
  }

  html body.has-hero-header .site-header--hero .menu-toggle[aria-expanded="true"] span:nth-child(2),
  html body.maido-mobile-menu-open .site-header--hero .menu-toggle span:nth-child(2) {
    opacity: 0 !important;
  }

  html body.has-hero-header .site-header--hero .menu-toggle[aria-expanded="true"] span:nth-child(3),
  html body.maido-mobile-menu-open .site-header--hero .menu-toggle span:nth-child(3) {
    transform: translateY(-12px) rotate(-45deg) !important;
  }

  /* Force a reliable closed/open mobile menu state. */
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] {
    display: none !important;
    position: absolute !important;
    top: 92px !important;
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 8px 0 !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 10px 24px rgba(0,0,0,.18) !important;
    z-index: 410 !important;
    overflow: visible !important;
  }

  html body.maido-mobile-menu-open.has-hero-header .site-header--hero .main-nav[data-main-nav],
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav].is-open,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav][data-maido-mobile-open="true"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .nav-item,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] > .nav-link,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3r-mobile-contact {
    width: 100% !important;
    position: relative !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .nav-link,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] > .nav-link,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3r-mobile-contact {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    font-family: var(--font-menu, Impact, Haettenschweiler, 'Arial Narrow', sans-serif) !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: -.01em !important;
    line-height: 1 !important;
    color: #050505 !important;
    text-decoration: none !important;
    background: transparent !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .nav-caret {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: .82em !important;
    line-height: 1 !important;
    margin-left: 5px !important;
    color: #565656 !important;
    transform: none !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .nav-item.is-mobile-expanded > .nav-link .nav-caret {
    transform: rotate(180deg) !important;
  }

  /* Hide category mega panels inside the mobile menu until a parent is tapped. */
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-menu-panel {
    display: none !important;
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .nav-item.is-mobile-expanded > .maido-stage3k-menu-panel {
    display: block !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-tree,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-tree ul {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    position: static !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-row,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-view-all {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-top: 1px solid rgba(0,0,0,.06) !important;
  }

  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-category-link,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-view-all,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] .maido-stage3k-menu-panel span {
    font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    letter-spacing: -.02em !important;
    color: #111 !important;
    text-decoration: none !important;
  }
}

@media (max-width: 560px) {
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] {
    top: 92px !important;
    left: 14px !important;
    right: 14px !important;
  }
}
