/* Maido Stage 4E - Responsive breakpoint cleanup
   Purpose: stop the half-desktop / half-mobile header between desktop and phone widths.
   Mobile drawer is used on phone/tablet/reduced desktop widths. Full desktop uses the full nav header. */

/* Full desktop and up: force the proper desktop header/menu, not the mobile drawer. */
@media (min-width: 1181px) {
  html body .site-header .menu-toggle,
  html body .site-header--hero .menu-toggle,
  html body.has-hero-header .site-header--hero .menu-toggle {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html body .site-header .primary-header,
  html body .site-header--hero .primary-header,
  html body.has-hero-header .site-header--hero .primary-header {
    height: 118px !important;
    min-height: 118px !important;
  }

  html body .site-header .header-grid,
  html body .site-header .header-grid--landing,
  html body.has-hero-header .site-header--hero .header-grid,
  html body.has-hero-header .site-header--hero .header-grid--landing {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
  }

  html body .site-header .main-nav[data-main-nav],
  html body .site-header .main-nav,
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav],
  html body.has-hero-header .site-header--hero .main-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(28px, 3.2vw, 48px) !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    overflow-y: visible !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    z-index: 70 !important;
  }

  html body .site-header .main-nav[data-main-nav] .nav-item,
  html body .site-header .main-nav .nav-item,
  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 .nav-item {
    display: block !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    transform: none !important;
  }

  html body .site-header .main-nav[data-main-nav] .nav-link,
  html body .site-header .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 .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #050505 !important;
    font-family: var(--font-menu, Impact, Haettenschweiler, 'Arial Narrow', sans-serif) !important;
    font-size: clamp(18px, 1.65vw, 25px) !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: -.018em !important;
    text-decoration: none !important;
    text-transform: none !important;
    white-space: nowrap !important;
  }

  html body .site-header .main-nav .nav-link > span:first-child,
  html body.has-hero-header .site-header--hero .main-nav .nav-link > span:first-child {
    text-align: left !important;
    flex: 0 0 auto !important;
  }

  html body .site-header .main-nav .nav-caret,
  html body.has-hero-header .site-header--hero .main-nav .nav-caret {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 14px !important;
    height: 14px !important;
    margin-left: 2px !important;
    color: #5b5b5b !important;
    font-size: 14px !important;
    line-height: 1 !important;
    transform: none !important;
  }

  /* Do not show the mobile contact item inside the desktop menu. */
  html body .main-nav .maido-stage3r-mobile-contact,
  html body .main-nav .maido-mobile-contact {
    display: none !important;
  }

  /* Desktop category dropdowns: compact, centered below the parent, and never full-height. */
  html body .site-header .main-nav .maido-stage3k-menu-panel,
  html body.has-hero-header .site-header--hero .main-nav .maido-stage3k-menu-panel {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 28px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    min-width: 190px !important;
    max-width: min(82vw, 640px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
    border: 0 !important;
    border-radius: 3px !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.14) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) !important;
    z-index: 999 !important;
  }

  html body .site-header .main-nav .nav-item:hover > .maido-stage3k-menu-panel,
  html body .site-header .main-nav .nav-item:focus-within > .maido-stage3k-menu-panel,
  html body.has-hero-header .site-header--hero .main-nav .nav-item:hover > .maido-stage3k-menu-panel,
  html body.has-hero-header .site-header--hero .main-nav .nav-item:focus-within > .maido-stage3k-menu-panel {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  html body .main-nav .maido-stage3k-menu-panel::before {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: -12px !important;
    width: 22px !important;
    height: 22px !important;
    background: #ffffff !important;
    transform: translateX(-50%) rotate(45deg) !important;
    box-shadow: -2px -2px 2px rgba(0,0,0,.03) !important;
    z-index: -1 !important;
  }

  html body .main-nav .maido-stage3k-tree,
  html body .main-nav .maido-stage3k-level-1,
  html body .main-nav .maido-stage3k-level-2,
  html body .main-nav .maido-stage3k-level-3 {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .main-nav .maido-stage3k-level-1 {
    position: relative !important;
    display: block !important;
    width: 100% !important;
  }

  html body .main-nav .maido-stage3k-level-2,
  html body .main-nav .maido-stage3k-level-3 {
    display: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 100% !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: 270px !important;
    background: #ffffff !important;
    box-shadow: 10px 10px 24px rgba(0,0,0,.12) !important;
  }

  html body .main-nav .maido-stage3k-item:hover > .maido-stage3k-level-2,
  html body .main-nav .maido-stage3k-item:focus-within > .maido-stage3k-level-2,
  html body .main-nav .maido-stage3k-item:hover > .maido-stage3k-level-3,
  html body .main-nav .maido-stage3k-item:focus-within > .maido-stage3k-level-3 {
    display: block !important;
  }

  html body .main-nav .maido-stage3k-row,
  html body .main-nav .maido-stage3k-view-all {
    min-height: 46px !important;
    height: auto !important;
    padding: 0 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0,0,0,.06) !important;
    color: #111111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.18 !important;
    letter-spacing: -.025em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  html body .main-nav .maido-stage3k-category-link,
  html body .main-nav .maido-stage3k-view-all span {
    color: #111111 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1.18 !important;
    letter-spacing: -.025em !important;
    text-decoration: none !important;
    white-space: nowrap !important;
  }

  html body .main-nav .maido-stage3k-row:hover,
  html body .main-nav .maido-stage3k-view-all:hover {
    background: #f3f3f3 !important;
  }

  html body .main-nav .maido-stage3k-child-arrow {
    color: #9a9a9a !important;
    font-size: 24px !important;
    font-weight: 400 !important;
  }

  /* Force open mobile state off visually on desktop/tablet even if an old script left classes behind. */
  html body.maido-mobile-menu-open {
    overflow: auto !important;
  }
}

/* Phone and reduced-width screens: keep the drawer, but make it content-height rather than a full white sheet. */
@media (max-width: 1180px) {
  html body .site-header .menu-toggle,
  html body.has-hero-header .site-header--hero .menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  html body .site-header .main-nav[data-main-nav],
  html body.has-hero-header .site-header--hero .main-nav[data-main-nav] {
    top: var(--maido-mobile-header-height, 86px) !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    width: min(88vw, 340px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - var(--maido-mobile-header-height, 86px) - 12px) !important;
    overflow-y: auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    box-shadow: 12px 14px 28px rgba(0,0,0,.18) !important;
  }

  html body .site-header .main-nav[data-main-nav] .nav-link,
  html body .site-header .main-nav[data-main-nav] .maido-stage3r-mobile-contact {
    min-height: 52px !important;
    height: 52px !important;
    font-size: 22px !important;
  }
}
