/* Maison Levane v5.9 (LOCAL PREVIEW ONLY): mobile horizontal-overflow fix.
   Root cause: the PDP gallery sits in a grid whose items had min-width:auto. FlexSlider writes inline
   px widths on slides (li.woocommerce-product-gallery__image) and the ul track; if it measures once
   while the column is wider (iOS first layout, orientation change, late CSS, variation image swap),
   those px widths push the grid item, the gallery and the whole page wider than the viewport, and the
   next FlexSlider resize re-measures the now-wider gallery, so it locks in. Result: the image is cut off,
   the thumbs run off the right edge and the page pans sideways. */
.ml4-pdp, .ml4-pdp > *, .ml4-pdp [class*="is-layout-grid"] > *, .ml4-pdp__gallery,
.ml4-pdp .wp-block-woocommerce-product-image-gallery{min-width:0!important;max-width:100%!important}
.ml4-pdp .woocommerce-product-gallery{position:relative;max-width:100%!important;min-width:0;overflow:hidden;contain:inline-size layout paint}
.ml4-pdp .flex-viewport,.ml4-pdp .woocommerce-product-gallery__wrapper{max-width:100%!important}
.ml4-pdp .woocommerce-product-gallery__image img,.ml4-pdp .woocommerce-product-gallery img{max-width:100%}
.ml4-pdp .woocommerce-product-gallery .zoomImg{max-width:none}
/* Thumbs: grid inside the gallery width, never wider */
.ml4-pdp .flex-control-thumbs{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;width:100%!important;max-width:100%!important;box-sizing:border-box;overflow:hidden}
.ml4-pdp .flex-control-thumbs li{min-width:0}
/* Long words/URLs/emails anywhere in content */
table{max-width:100%}
iframe,video,embed,object{max-width:100%}
/* Root cause 2: long unbroken strings in headings (e.g. search-results H1 echoing a long query/URL/email) */
h1,h2,h3,h4,h5,h6,p,li,dd,dt,td,th,a,label,.wp-block-query-title,.woocommerce-message,.woocommerce-error,.woocommerce-info,.wc-block-components-notice-banner__content{overflow-wrap:anywhere}
/* Root cause 3: block cart row at <=360px: qty stepper (130px) + "Remove" (nowrap) in a ~122px column */
.wc-block-cart-item__wrap,.wc-block-cart-item__product{min-width:0}
.wc-block-cart-item__quantity{flex-wrap:wrap;min-width:0;max-width:100%;row-gap:.5rem}
.wc-block-cart-item__quantity .wc-block-components-quantity-selector{max-width:100%;min-width:0}
.wc-block-cart-item__quantity .wc-block-components-quantity-selector input{min-width:0}
/* Safety net (in addition to the fixes above, not instead of them) */
html,body{overflow-x:clip}
