/* Factory Industrial Elements — horizontal overflow guard v0.6.1
   Scoped to the new FPMX modules only. Factory Post Showcase is untouched. */

/* Divi section is the viewport-level clipping boundary. This preserves source-style
   shapes outside the row, but prevents any decoration from increasing page width. */
.fpmx-section-clip,
.et_pb_section:has(.fpmx){overflow-x:clip!important}
@supports not (overflow:clip){
  .fpmx-section-clip,
  .et_pb_section:has(.fpmx){overflow-x:hidden!important}
}

/* Defensive sizing against grid/flex min-content overflow. */
.fpmx{width:100%!important;max-width:100%!important;min-width:0!important}
.fpmx-wrap,.fpmx-why-grid,.fpmx-process-row,.fpmx-impact-grid,.fpmx-newsletter-row,
.fpmx-tab-panel,.fpmx-carousel,.fpmx-carousel-window,.fpmx-carousel-track,
.fpmx-carousel-item,.fpmx-gallery,.fpmx-gallery-row,.fpmx-gallery-cell{min-width:0;max-width:100%}

/* Source arrows are normally -62px outside the carousel. Keep that only when the
   real viewport gutter is large enough; otherwise pull them inward automatically. */
@media(min-width:1201px){
  .fpmx-carousel-controls .fpmx-prev{left:max(-62px,calc((100% - 100vw)/2 + 2px))!important}
  .fpmx-carousel-controls .fpmx-next{right:max(-62px,calc((100% - 100vw)/2 + 2px))!important}
}
@media(max-width:1200px){
  .fpmx-carousel-controls .fpmx-prev{left:4px!important}
  .fpmx-carousel-controls .fpmx-next{right:4px!important}
}

/* Full-bleed bands now use measured viewport gutters instead of percentage overshoot. */
.fpmx-header-band.fpmx-band-left::before{
  left:var(--fpmx-edge-left-neg,0px)!important;right:auto!important;
  width:calc(var(--fpmx-edge-left,0px) + 2px)!important;transform:none!important;clip-path:none!important
}
.fpmx-header-band.fpmx-band-right{margin-left:auto}
.fpmx-header-band.fpmx-band-right::before{
  right:var(--fpmx-edge-right-neg,0px)!important;left:auto!important;
  width:calc(var(--fpmx-edge-right,0px) + 2px)!important;transform:none!important;clip-path:none!important
}

/* Floating decorations stay clipped by their own carousel viewport. */
.fpmx-client-carousel .fpmx-carousel-window,
.fpmx-leader-carousel .fpmx-carousel-window,
.fpmx-insights-carousel .fpmx-carousel-window{overflow-x:clip!important}
@supports not (overflow:clip){
  .fpmx-client-carousel .fpmx-carousel-window,
  .fpmx-leader-carousel .fpmx-carousel-window,
  .fpmx-insights-carousel .fpmx-carousel-window{overflow-x:hidden!important}
}

@media(max-width:767px){
  .fpmx-header-band{max-width:100%!important}
  .fpmx-header-band::before,.fpmx-header-band::after{max-width:100vw}
}
