/*
 * Stage43 header/media integrity.
 *
 * The JavaScript-enhanced header keeps its mobile controls inside .brand-row.
 * At desktop widths those controls must participate in the parent header grid
 * instead of sharing the first column as absolutely positioned layers.
 */
@media (max-width: 800px) {
  html body:not(.woocommerce-checkout) .site-header > .main-nav {
    display: none !important;
  }
}

@media (min-width: 801px) and (max-width: 1199px) {
  html body:not(.woocommerce-checkout) .site-header {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 58px !important;
    padding: 0 24px !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row {
    position: static !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 86px !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .menu {
    position: static !important;
    display: grid !important;
    grid-column: 1 !important;
    transform: none !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .logo-link {
    position: absolute !important;
    grid-area: 1 / 1 / 2 / -1 !important;
    left: 50% !important;
    top: 50% !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .tools {
    position: static !important;
    grid-column: 3 !important;
    justify-self: end !important;
    width: 86px !important;
    max-width: 86px !important;
    transform: none !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .main-nav {
    display: none !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .logo-link {
    position: absolute !important;
    left: 50vw !important;
    right: auto !important;
    top: 29px !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }

  html body:not(.woocommerce-checkout) .drawer {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 10002 !important;
    display: flex !important;
    flex-direction: column !important;
    width: min(420px, calc(100vw - 48px)) !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    box-shadow: 18px 0 48px rgb(0 0 0 / 18%) !important;
    visibility: hidden !important;
    transform: translateX(-105%) !important;
    transition:
      transform 220ms ease,
      visibility 0s linear 220ms !important;
  }

  html body:not(.woocommerce-checkout) .drawer.open {
    visibility: visible !important;
    transform: translateX(0) !important;
    transition:
      transform 220ms ease,
      visibility 0s linear 0s !important;
  }

  html body:not(.woocommerce-checkout) .shade {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10001 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    background: rgb(0 0 0 / 42%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition:
      opacity 220ms ease,
      visibility 0s linear 220ms !important;
  }

  html body:not(.woocommerce-checkout) .shade.open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition:
      opacity 220ms ease,
      visibility 0s linear 0s !important;
  }
}

@media (max-width: 800px) {
  html body:not(.woocommerce-checkout) .site-header > .brand-row {
    position: relative !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .logo-link {
    position: absolute !important;
    grid-area: 1 / 1 / 2 / -1 !important;
    left: 50% !important;
    top: 50% !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .logo-link {
    position: absolute !important;
    left: 50vw !important;
    right: auto !important;
    top: 29px !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
  }
}

@media (min-width: 1200px) {
  html body:not(.woocommerce-checkout) .site-header {
    position: sticky !important;
    top: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 66px 48px !important;
    width: 100% !important;
    max-width: none !important;
    height: 114px !important;
    min-height: 114px !important;
    padding: 0 !important;
    background: #fff !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 66px !important;
    margin: 0 !important;
    padding: 0 32px !important;
    overflow: visible !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .menu {
    display: none !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .logo-link {
    position: absolute !important;
    left: 50vw !important;
    top: 50% !important;
    align-self: center !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    transform: translate(-50%, -50%) !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .logo-link .logo {
    display: block !important;
    width: 150px !important;
    max-width: 150px !important;
    max-height: 56px !important;
    object-fit: contain !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .main-nav {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: clamp(12px, 1.5vw, 24px) !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 170px !important;
    border-top: 1px solid #f1f1f1 !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .brand-row > .tools {
    position: absolute !important;
    right: 32px !important;
    top: 50% !important;
    align-self: center !important;
    justify-self: end !important;
    transform: translateY(-50%) !important;
  }
}

@media (max-width: 1199px) {
  html body:not(.woocommerce-checkout) .drawer .drawer-links {
    display: block !important;
    width: 100% !important;
  }

  html body:not(.woocommerce-checkout) .drawer .drawer-group,
  html body:not(.woocommerce-checkout) .drawer .drawer-single {
    width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e8e8e8 !important;
    background: #fff !important;
  }

  html body:not(.woocommerce-checkout) .drawer .drawer-group > summary,
  html body:not(.woocommerce-checkout) .drawer .drawer-single {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 54px !important;
    padding: 0 20px !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    list-style: none !important;
    text-decoration: none !important;
  }

  html body:not(.woocommerce-checkout) .drawer .drawer-group > summary::-webkit-details-marker {
    display: none !important;
  }

  html body:not(.woocommerce-checkout) .drawer .drawer-group .drawer-sub {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
    padding: 4px 20px 14px !important;
    background: #fafafa !important;
  }

  html body:not(.woocommerce-checkout) .drawer .drawer-group .drawer-sub a {
    display: flex !important;
    align-items: center !important;
    min-height: 40px !important;
    padding: 8px 0 !important;
    border: 0 !important;
    color: #262626 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
  }
}

@media (min-width: 1200px) {
  html body:not(.woocommerce-checkout) .site-header > .menu {
    display: none !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .logo-link {
    position: absolute !important;
    grid-area: 1 / 1 / 2 / 2 !important;
    left: 50vw !important;
    right: auto !important;
    top: 33px !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    margin: 0 !important;
    justify-self: auto !important;
    transform: translate(-50%, -50%) !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .logo-link > .logo {
    display: block !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    max-height: 56px !important;
    object-fit: contain !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .desktop-primary {
    grid-row: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 48px !important;
    padding: 0 170px !important;
    border-top: 1px solid #f1f1f1 !important;
  }

  html body:not(.woocommerce-checkout) .site-header > .tools {
    position: absolute !important;
    right: 32px !important;
    top: 33px !important;
    transform: translateY(-50%) !important;
  }
}
