/* Fluid responsive layout for the Brands panel; JS anchors it to viewport, not menu item. */
@media screen and (min-width:1024px) {
  html body #d-header .nav_main > ul > li.sbg-brands-menu > .sbg-brands-mega {
    box-sizing:border-box !important;
    width:min(950px,calc(100vw - 32px)) !important;
    max-width:calc(100vw - 32px) !important;
    min-width:0 !important;
    max-height:calc(100vh - 160px) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    padding:clamp(12px,1.8vw,24px) !important;
  }
  html body #d-header .sbg-brands-mega__links {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    grid-template-rows:none !important;
    grid-auto-flow:row !important;
    gap:0 clamp(10px,1.5vw,20px) !important;
    width:100% !important;
  }
  html body #d-header .sbg-brands-mega__links > a {
    min-width:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
    font-size:clamp(11px,.9vw,14px) !important;
    line-height:1.25 !important;
    padding:5px 0 !important;
  }
}
@media screen and (min-width:1024px) and (max-width:1199px) {
  html body #d-header .sbg-brands-mega__links {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:0 12px !important;
  }
  html body #d-header .nav_main > ul > li.sbg-brands-menu > .sbg-brands-mega {
    padding:12px 16px !important;
  }
  html body #d-header .sbg-brands-mega__links > a {
    font-size:11px !important;
    padding:4px 0 !important;
  }
}
@media screen and (min-width:1200px) and (max-width:1439px) {
  html body #d-header .sbg-brands-mega__links {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}
@media screen and (min-width:1440px) {
  html body #d-header .nav_main > ul > li.sbg-brands-menu > .sbg-brands-mega {
    width:min(1040px,calc(100vw - 64px)) !important;
    max-width:calc(100vw - 64px) !important;
  }
}
@media screen and (max-width:1023px) {
  html body #d-header .sbg-brands-mega {display:none !important;}
}
