/**
 * Layout1 bold — header BEM layout (replaces Bootstrap col-7/col-5 + float toolbar for header only).
 * Build: 20260522-layout1-header-bem-v47
 *
 * Blocks:
 *   .sf-mheader          — mobile bar (see layout1-header-modern.css)
 *   .sf-dheader         — desktop shell (≥992px, legacy row element)
 *   .sf-dheader__*       — brand, aside, strip, toolbar
 *   .storefront-bold__header-nav-host — off-canvas nav host (mobile portal; desktop inline)
 *
 * Does NOT affect cart minicart grids, pagetitle inline backgrounds, or module pages.
 */

@media (min-width: 992px) {
  /* Desktop: flex header row — ignore Bootstrap col widths inside .sf-dheader */
  body.storefront-bold .storefront-bold__header .saf_header_wrapper > .sf-dheader.storefront-bold__header-row--legacy,
  body.storefront-bold .storefront-bold__header .sf-dheader.storefront-bold__header-row--legacy {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader > .sf-dheader__brand,
  body.storefront-bold .storefront-bold__header .sf-dheader > .storefront-bold__header-brand,
  body.storefront-bold .storefront-bold__header .sf-dheader > .mobilesetlogo {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: min(28%, 12rem) !important;
    min-width: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader > .sf-dheader__aside,
  body.storefront-bold .storefront-bold__header .sf-dheader > .storefront-bold__header-col,
  body.storefront-bold .storefront-bold__header .sf-dheader > .mobilesetlogosp {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    float: none !important;
    display: flex !important;
    flex-flow: column nowrap !important;
    align-items: stretch !important;
    gap: 0.35rem !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__strip,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__header-strip {
    display: block !important;
    width: 100% !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__strip-list,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__header-strip > ul {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.5rem 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__strip-item,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__strip-item {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__menu-row,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__menu-row {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__header-toolbar,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__header-toolbar-shell > .storefront-bold__header-toolbar {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.35rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar > .sf-dheader__item,
  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar > li,
  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar > .storefront-bold__toolbar-strip-item,
  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__header-toolbar > li {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar > .sf-dheader__item--cart.cartcart > .sub_menu {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    z-index: 120 !important;
  }

  /* Nav host: desktop inline pill (not off-screen) */
  body.storefront-bold .storefront-bold__header .storefront-bold__header-nav-host {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    visibility: visible !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.storefront-bold .storefront-bold__header .storefront-bold__header-nav-host .storefront-bold__header-below-mobile {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  body.storefront-bold .storefront-bold__header .storefront-bold__header-nav-host #mega-layout-main-nav,
  body.storefront-bold .storefront-bold__header .storefront-bold__header-nav-host #mega-layout-user-nav,
  body.storefront-bold .storefront-bold__header .storefront-bold__header-aside #mega-layout-main-nav,
  body.storefront-bold .storefront-bold__header .storefront-bold__header-aside #mega-layout-user-nav {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    flex: 0 0 auto !important;
    z-index: auto !important;
    clip: auto !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader .storefront-bold__toolbar-menu,
  body.storefront-bold .storefront-bold__header .sf-dheader__toolbar .storefront-bold__toolbar-menu {
    display: none !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__nav,
  body.storefront-bold .storefront-bold__header .sf-dheader__aside > #mega-layout-main-nav,
  body.storefront-bold .storefront-bold__header .sf-dheader__aside > #mega-layout-user-nav {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    flex: 1 1 auto !important;
  }

  body.storefront-bold .storefront-bold__header .sf-dheader__nav > ul,
  body.storefront-bold .storefront-bold__header .sf-dheader__aside > #mega-layout-main-nav > ul,
  body.storefront-bold .storefront-bold__header .sf-dheader__aside > #mega-layout-user-nav > ul {
    display: flex !important;
    flex-flow: row wrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.25rem 0.75rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    float: none !important;
  }
}

@media (max-width: 991.98px) {
  /* Mobile: only BEM mobile bar + nav host; desktop shell hidden via layout1-header-modern.css */
  body.storefront-bold .storefront-bold__header .sf-dheader,
  body.storefront-bold .storefront-bold__header .sf-dheader.storefront-bold__header-row--legacy {
    display: none !important;
  }
}
