/* Preview only (5 Nov): shrink the fixed header on scroll. Top-of-page look unchanged.
   Selectors use :not(#q1):not(#q2) to beat white-bg.css / hero-header.css specificity. */
.bwc-hdr-spacer{
  display:none;
  width:100%;
  margin:0;
  padding:0;
  border:0;
  pointer-events:none;
}
html.bwc-hdr-shrunk .bwc-hdr-spacer{display:block}

html.bwc-hdr-shrunk body a.mark-banner.mb-a.bwc-hdr-pin:not(#q1):not(#q2),
html.bwc-hdr-shrunk body header.nav.bwc-hdr-pin:not(#q1):not(#q2){
  position:fixed!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  box-sizing:border-box;
}
html.bwc-hdr-shrunk body a.mark-banner.mb-a.bwc-hdr-pin:not(#q1):not(#q2){
  top:0!important;
  z-index:1002!important;
  box-shadow:none;
  transition:padding .22s ease;
}
html.bwc-hdr-shrunk body header.nav.bwc-hdr-pin:not(#q1):not(#q2){
  top:var(--bwc-hdr-nav-top, 0px)!important;
  z-index:1003!important;
  box-shadow:0 1px 0 #D0D0D5;
  transition:padding .22s ease;
}

/* Collapse secondary rows / Giving Back / tagline */
html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .bwc-cp,
html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .mb-line,
html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .mb-rule,
html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .mb-ptag{
  opacity:0!important;
  max-height:0!important;
  height:0!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  line-height:0!important;
  font-size:0!important;
  pointer-events:none!important;
  transition:opacity .18s ease, max-height .22s ease;
}

/* Logo ~70% (desktop 56→39, mid 46→32) */
html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-logo{
  height:39px!important;
  width:auto!important;
  transform:none!important;
  transition:height .22s ease, transform .22s ease;
}
html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .mb-phone img{
  max-width:105px!important;
  padding-top:6px!important;
  padding-bottom:4px!important;
  transition:max-width .22s ease, padding .22s ease;
}
html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-desk{
  height:auto!important;
  min-height:0!important;
  padding:8px 24px 4px!important;
  gap:12px!important;
  transition:padding .22s ease;
}
@media (max-width:879px){
  html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-desk{
    padding:6px 14px 2px!important;
    min-height:0!important;
  }
  html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-logo{
    height:32px!important;
  }
}
@media (min-width:601px) and (max-width:860px){
  html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-desk{
    padding:6px 16px 2px 72px!important;
  }
}

/* —— Phone shrunk: hamburger + logo + cart on ONE logo row; nav links clear —— */
@media (max-width:600px){
  html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-desk{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:4px 56px 2px!important; /* room for menu left + cart right */
    min-height:42px!important;
  }
  html.bwc-hdr-shrunk body a.mark-banner.mb-a:not(#q1):not(#q2) .mb-logo{
    height:30px!important;
    position:static!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    margin:0 auto!important;
  }
  html.bwc-hdr-shrunk body a.mark-banner:not(#q1):not(#q2) .mb-phone img{
    max-width:105px!important;
    padding-top:6px!important;
  }

  /* Hamburger stays on the logo row (viewport-fixed), not on the Partner row */
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .menu-btn.menu-btn.bwc-burger:not(#q3),
  html.bwc-hdr-shrunk body .nav .menu-btn.bwc-burger:not(#q1):not(#q2){
    position:fixed!important;
    top:5px!important;
    left:10px!important;
    width:32px!important;
    min-width:32px!important;
    height:32px!important;
    min-height:32px!important;
    margin:0!important;
    padding:0!important;
    z-index:1005!important;
    box-sizing:border-box!important;
    gap:3px!important;
  }
  html.bwc-hdr-shrunk body .nav .menu-btn.bwc-burger:not(#q1):not(#q2) span{
    width:16px!important;
  }

  /* Cart/shopper (.hpic) stays on the right of the logo row, smaller */
  html.bwc-hdr-shrunk body .hero-h .hpic:not(#q1):not(#q2),
  html.bwc-hdr-shrunk body img.hpic:not(#q1):not(#q2){
    position:fixed!important;
    top:7px!important;
    right:12px!important;
    left:auto!important;
    transform:none!important;
    margin:0!important;
    height:28px!important;
    width:auto!important;
    z-index:1005!important;
    pointer-events:none!important;
  }

  /* Nav row: clear left inset so Partner isn't under where the burger used to sit */
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .wrap{
    padding-left:12px!important;
  }
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .hdr-actions a.hlink.hlink-bizm{
    margin-left:0!important;
  }
}

/* Compact the sticky/fixed nav row */
html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .wrap{
  min-height:0!important;
  height:auto!important;
  padding-top:2px!important;
  padding-bottom:2px!important;
  transition:padding .22s ease;
}
html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) nav ul li a{
  padding-top:4px!important;
  padding-bottom:4px!important;
}
@media (max-width:860px){
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .wrap{
    height:52px!important;
    padding-top:0!important;
    padding-bottom:0!important;
  }
}

@media (max-width:600px){
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .wrap{
    height:36px!important;
    min-height:36px!important;
    align-items:center!important;
    padding:0 12px!important;
  }
  html.bwc-hdr-shrunk body header.nav:not(#q1):not(#q2) .hdr-actions{
    width:100%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    margin:0!important;
  }
}

/* Preserve accessibility preference in this header-only behavior. */
@media(prefers-reduced-motion:reduce){html.bwc-hdr-shrunk a.mark-banner,html.bwc-hdr-shrunk header.nav,html.bwc-hdr-shrunk a.mark-banner *{transition:none!important;animation:none!important}}

/* Synchronous expanded-flow measurement must not start a new CSS transition. */
html.bwc-hdr-measuring a.mark-banner,html.bwc-hdr-measuring a.mark-banner *,html.bwc-hdr-measuring header.nav,html.bwc-hdr-measuring header.nav *{transition:none!important;animation:none!important}
