/* STLBEAST V229 — GLOBAL HEADER + FOOTER LOGO EMERGENCY FIX
   Purpose: globally stop header overflow/right-side falloff and make footer logo readable.
   This file is intentionally loaded last and uses conservative fixed sizing/wrapping. */

html, body{
  width:100%!important;
  max-width:100%!important;
  overflow-x:hidden!important;
}

*, *::before, *::after{
  box-sizing:border-box!important;
}

body{
  min-width:0!important;
}

/* Global public shells */
.v114-shell,
.stlb125-shell,
.stlb159-shell,
.sb-shell,
.container,
.main,
main,
footer,
header{
  max-width:100%!important;
}

/* Top status bars must wrap instead of widening mobile screens. */
.v114-topbar,
.stlb125-topbar,
.stlb159-topbar,
.topbar{
  width:min(1180px,calc(100vw - 16px))!important;
  max-width:calc(100vw - 16px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center!important;
  gap:6px 10px!important;
  padding-left:8px!important;
  padding-right:8px!important;
  overflow:hidden!important;
}

.v114-topbar span,
.stlb125-topbar span,
.stlb159-topbar span,
.topbar span{
  min-width:0!important;
  max-width:100%!important;
  white-space:normal!important;
  text-align:center!important;
}

/* Global header frame: no public header can exceed viewport width. */
.v114-nav.stlb147-premium-nav,
header.stlb125-nav,
header.nav.stlb159-nav,
.sb-header,
.seo-nav,
.site-header,
header[class*="nav"]{
  width:min(1180px,calc(100vw - 16px))!important;
  max-width:calc(100vw - 16px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
  overflow:visible!important;
  transform:none!important;
  left:auto!important;
  right:auto!important;
}

/* Global header interior: stacked by default so it cannot fall off the right on index/product pages. */
.v114-nav.stlb147-premium-nav .stlb147-nav-shell,
header.stlb125-nav .stlb147-nav-shell,
header.nav.stlb159-nav,
.sb-header .sb-nav,
.seo-nav,
.header-inner,
nav[class*="shell"]{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-areas:
    "brand"
    "nav"
    "search"!important;
  justify-items:center!important;
  align-items:center!important;
  gap:12px!important;
  padding:14px 12px!important;
  overflow:visible!important;
}

/* Brand/logo plate: fixed safe size, centered, no overflow. */
.v114-nav .stlb147-logo-frame,
header.stlb125-nav .stlb125-brand,
header.nav .stlb159-brand,
.sb-header .sb-logo,
.seo-nav .logo,
header.nav > .logo,
.brand,
.site-logo,
.logo{
  grid-area:brand!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  width:min(360px,88vw)!important;
  max-width:min(360px,88vw)!important;
  min-width:0!important;
  height:74px!important;
  min-height:74px!important;
  max-height:82px!important;
  margin:0 auto!important;
  overflow:visible!important;
}

/* Real logo image: never crop, never push layout, never hide. */
.stlb161-logo,
.v114-nav .stlb147-logo-frame .stlb161-logo,
header.stlb125-nav .stlb125-brand .stlb161-logo,
header.nav .stlb159-brand .stlb161-logo,
.footer .stlb161-logo,
.v114-footer .stlb161-logo,
footer .stlb161-logo{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  justify-content:center!important;
  align-items:center!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:100%!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
}

.stlb161-logo img,
.v114-nav .stlb147-logo-frame img,
header.stlb125-nav .stlb125-brand img,
header.nav .stlb159-brand img,
.footer .stlb161-logo img,
.v114-footer .stlb161-logo img,
footer .stlb161-logo img{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:0 auto!important;
  padding:0!important;
  border:0!important;
  transform:none!important;
  clip-path:none!important;
}

/* Navigation: contained grid/buttons, no horizontal push. */
.v114-nav .stlb147-link-row,
header.stlb125-nav .stlb125-links,
header.nav .stlb159-links,
.v114-links,
.stlb125-links,
.stlb159-links,
.navlinks,
.nav,
.menu,
header nav{
  grid-area:nav!important;
  width:100%!important;
  max-width:760px!important;
  min-width:0!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  justify-content:center!important;
  align-items:center!important;
  overflow:visible!important;
}

.v114-nav .stlb147-link-row a,
header.stlb125-nav .stlb125-links a,
header.nav .stlb159-links a,
.v114-links a,
.stlb125-links a,
.stlb159-links a,
.navlinks a,
.nav a,
.menu a,
header nav a{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:36px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  padding:0 8px!important;
  white-space:normal!important;
  line-height:1.08!important;
  font-size:clamp(9.75px,2.6vw,11.5px)!important;
  overflow-wrap:normal!important;
}

/* Search: contained, centered, no long text forcing width. */
.v114-search.stlb147-searchbox,
.stlb125-search.stlb147-searchbox,
.stlb159-search,
.stlb147-searchbox,
.search,
.searchbox{
  grid-area:search!important;
  width:min(340px,88vw)!important;
  max-width:min(340px,88vw)!important;
  min-width:0!important;
  justify-self:center!important;
  overflow:hidden!important;
}

.stlb147-searchtext,
.v114-search span,
.stlb125-search span,
.stlb159-search span{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

/* Desktop can use a row, but only when enough room exists. */
@media(min-width:1280px){
  .v114-nav.stlb147-premium-nav .stlb147-nav-shell,
  header.stlb125-nav .stlb147-nav-shell,
  header.nav.stlb159-nav,
  .sb-header .sb-nav,
  .seo-nav{
    grid-template-columns:minmax(260px,340px) minmax(0,1fr) minmax(210px,300px)!important;
    grid-template-areas:"brand nav search"!important;
    justify-items:stretch!important;
    gap:14px!important;
  }

  .v114-nav .stlb147-logo-frame,
  header.stlb125-nav .stlb125-brand,
  header.nav .stlb159-brand,
  .sb-header .sb-logo,
  .seo-nav .logo{
    justify-self:start!important;
    width:100%!important;
    max-width:340px!important;
  }

  .v114-nav .stlb147-link-row,
  header.stlb125-nav .stlb125-links,
  .v114-links,
  .stlb125-links,
  .navlinks,
  header nav{
    max-width:100%!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
  }

  .v114-search.stlb147-searchbox,
  .stlb125-search.stlb147-searchbox,
  .stlb147-searchbox{
    justify-self:end!important;
    width:100%!important;
    max-width:300px!important;
  }
}

/* Phone: two-column nav, safer logo and footer. */
@media(max-width:720px){
  .v114-nav.stlb147-premium-nav,
  header.stlb125-nav,
  header.nav.stlb159-nav,
  .site-header{
    width:calc(100vw - 10px)!important;
    max-width:calc(100vw - 10px)!important;
    margin-top:8px!important;
    margin-bottom:18px!important;
  }

  .v114-nav.stlb147-premium-nav .stlb147-nav-shell,
  header.stlb125-nav .stlb147-nav-shell,
  header.nav.stlb159-nav,
  .header-inner{
    padding:12px 9px!important;
    border-radius:18px!important;
  }

  .v114-nav .stlb147-logo-frame,
  header.stlb125-nav .stlb125-brand,
  header.nav .stlb159-brand,
  .brand,
  .logo,
  .site-logo{
    width:min(310px,86vw)!important;
    max-width:min(310px,86vw)!important;
    height:66px!important;
    min-height:66px!important;
  }

  .v114-nav .stlb147-link-row,
  header.stlb125-nav .stlb125-links,
  .v114-links,
  .stlb125-links,
  .navlinks,
  header nav{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-width:360px!important;
  }

  .v114-search.stlb147-searchbox,
  .stlb125-search.stlb147-searchbox,
  .stlb147-searchbox{
    width:min(330px,86vw)!important;
    max-width:min(330px,86vw)!important;
  }
}

/* Footer logo: the bottom logo must be visible, centered, and not oversized/cropped. */
.v114-footer,
.footer,
footer{
  width:100%!important;
  max-width:100%!important;
  overflow:hidden!important;
}

.v114-footer .stlb161-logo,
.footer .stlb161-logo,
footer .stlb161-logo,
.v114-footer .v114-logo,
.footer .logo,
footer .logo{
  width:min(300px,78vw)!important;
  max-width:min(300px,78vw)!important;
  height:66px!important;
  min-height:66px!important;
  margin:0 auto 14px!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
}

.v114-footer .stlb161-logo img,
.footer .stlb161-logo img,
footer .stlb161-logo img,
.v114-footer img[src*="stlbeast-nav-logo"],
.footer img[src*="stlbeast-nav-logo"],
footer img[src*="stlbeast-nav-logo"]{
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
