/* Weby 2.5.5 RC1 — protection visuelle inter-familles.
 * Chargé après les CSS propres à chaque visuel, sans modifier WooCommerce.
 * Règle : visuels produit entiers (contain), texte lisible, aucune largeur forcée.
 */
body.weby-theme :is(.shopini-container,.wa-container,.wv-container,.wm-container,.shopini-main,.wa-main,.wv-commerce,.wm-home,.weby-section),
body.weby-theme :is(.shopini-hero__inner,.shopini-secondary-banners__grid,.shopini-promo-banner__inner,.wa-hero-content,.wa-hero-visual,.wv-studio-hero-copy,.wv-studio-hero-image,.wv-pro-hero-content,.wv-pro-hero-image,.wv-pulse-copy,.wv-pulse-image,.wv-signature-hero-inner,.wm-hero-copy,.wm-hero-art,.wm-hero-main,.wm-catalog-products) {max-width:100%;min-width:0;box-sizing:border-box}
body.weby-theme :is(h1,h2,h3,.shopini-section-title,.woocommerce-loop-product__title,.wm-category-card strong,.wv-category-name,.wa-cat-name){overflow-wrap:anywhere}
body.weby-theme :is(.shopini-secondary-banners__grid,.wm-category-grid,.wm-product-grid ul.products,.wv-category-grid,.wv-products ul.products,.wv-commerce ul.products,.wa-categories-grid,.woocommerce ul.products){min-width:0;max-width:100%}
body.weby-theme :is(.woocommerce ul.products li.product,.woocommerce-page ul.products li.product,.wc-block-grid__product,.wc-block-product,.wm-category-card,.wv-category-card,.wa-category){min-width:0;max-width:100%;box-sizing:border-box}

/* Produit : même espace carré quelle que soit la source (portrait, paysage,
 * image détourée), sans recadrage ni agrandissement au survol. */
body.weby-theme .woocommerce ul.products li.product a img:not(.emoji),
body.weby-theme .woocommerce-page ul.products li.product a img:not(.emoji),
body.weby-theme .wc-block-grid__product img,
body.weby-theme .wc-block-product img {
 display:block!important;box-sizing:border-box!important;width:100%!important;max-width:100%!important;
 height:auto!important;aspect-ratio:1/1!important;object-fit:contain!important;object-position:center!important;
 padding:clamp(5px,1vw,14px)!important;background:#fff!important;transform:none!important;
}
body.weby-theme .woocommerce ul.products li.product:hover img,
body.weby-theme .woocommerce-page ul.products li.product:hover img{transform:none!important}
body.weby-theme .woocommerce ul.products li.product :is(.button,.shopini-quick-buy,.shopini-btn--secondary),
body.weby-theme .woocommerce-page ul.products li.product :is(.button,.shopini-quick-buy,.shopini-btn--secondary){box-sizing:border-box;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
body.weby-theme .woocommerce ul.products li.product .price{max-width:100%;overflow-wrap:anywhere}
/* Sous 480px : supprimer les largeurs minimales héritées, mais respecter
 * les choix du marchand (colonnes d'accueil et de catalogue). */
@media(max-width:480px){
 body.weby-theme .woocommerce ul.products,body.weby-theme .woocommerce-page ul.products{min-width:0}
 body.weby-theme .woocommerce ul.products li.product{max-width:100%;min-width:0}
}

/* Les cartes de catégories ne doivent pas couper le produit illustré. */
body.weby-theme :is(.wv-category-media,.wa-cat-media,.wm-category-media,.shopini-category-card__image,.shopini-category-explorer__image) img{
 max-width:100%;max-height:100%;object-fit:contain!important;object-position:center;transform:none;
}
body.weby-theme :is(.wv-category-media,.wa-cat-media,.wm-category-media){min-width:0;max-width:100%}

/* Theme X : le CSS sectoriel héritait de position:relative, ce qui pouvait
 * empiler les slides invisibles et accroître la hauteur du héros en carrousel. */
body.weby-visual-x .shopini-hero{display:block;isolation:isolate;overflow:hidden}
body.weby-visual-x .shopini-hero__slide{position:absolute!important;inset:0!important;min-height:100%;width:100%;box-sizing:border-box}
body.weby-visual-x .shopini-hero__inner{min-height:var(--sw-hero-height,680px);display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-block:clamp(44px,6vw,90px)}
body.weby-visual-x .shopini-hero__inner>*{max-width:min(100%,590px)}
body.weby-visual-x .weby-hero-media{background:linear-gradient(110deg,#eef1f5,#d6dde6)}
body.weby-visual-x .weby-hero-media img{object-fit:contain!important;object-position:center!important;transform:none!important}
/* Évite que la section suivante recouvre les boutons ou le bas du héros. */
body.weby-visual-x .shopini-hero+*{margin-top:0!important}
@media(min-width:721px) and (max-width:1024px){body.weby-visual-x .shopini-hero__inner{min-height:var(--sw-hero-height-tablet,520px)}}
@media(max-width:720px){body.weby-visual-x .shopini-hero__inner{min-height:var(--sw-hero-height-mobile,440px);padding-block:52px 45px}}

/* Bannières secondaires : largeur et hauteur homogènes sans photo coupée. */
body.weby-visual-x .shopini-secondary-banners__grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(10px,1.5vw,18px)}
body.weby-visual-x .shopini-secondary-banners__grid--1{grid-template-columns:minmax(0,1fr)}
body.weby-visual-x .shopini-secondary-banners__grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
body.weby-visual-x .shopini-secondary-banner{min-width:0;overflow:hidden;background:var(--sw-brand-soft,#f2f4f7)}
body.weby-visual-x .shopini-secondary-banner__image{max-width:100%;object-fit:contain!important;object-position:center}
body.weby-visual-x .shopini-secondary-banner__title{max-width:100%;overflow-wrap:anywhere}
body.weby-visual-x .shopini-promo-banner{background-size:contain!important;background-repeat:no-repeat;background-position:center;background-color:var(--sw-brand-soft,#eef1f5);min-width:0}
body.weby-visual-x .shopini-promo-banner__inner{min-width:0;max-width:100%}
@media(max-width:720px){
 body.weby-visual-x .shopini-secondary-banners__grid,
 body.weby-visual-x .shopini-secondary-banners__grid--2,
 body.weby-visual-x .shopini-secondary-banners__grid--3{grid-template-columns:minmax(0,1fr)}
}

/* Aqua : l'image dépassait volontairement de 15% de son cadre et était
 * positionnée à -6%, ce qui rognait les objets près des bords. */
body.weby-visual-aqua .wa-hero-visual picture{max-width:100%}
body.weby-visual-aqua .wa-hero .wa-hero-visual picture img{width:100%!important;height:100%!important;max-width:100%!important;inset:0!important;object-fit:contain!important;object-position:center!important}

/* Studio / Pro / Pulse / Signature : conserver l'image entière et adapter le
 * cadre plutôt que de couper les bords des photos aux petits écrans. */
body.weby-visual-studio .wv-studio-hero,
body.weby-visual-pro .wv-pro-hero-content,
body.weby-visual-pulse .wv-pulse-hero{min-width:0;max-width:100%}
body.weby-visual-studio .wv-studio-hero-image,
body.weby-visual-pro .wv-pro-hero-image,
body.weby-visual-pulse .wv-pulse-image,
body.weby-visual-signature .wv-signature-photo{min-width:0;max-width:100%;background-color:#edf1f4}
body.weby-visual-studio .wv-studio-hero-image img,
body.weby-visual-pro .wv-pro-hero-image img,
body.weby-visual-pulse .wv-pulse-image img,
body.weby-visual-signature .wv-signature-photo img{width:100%;max-width:100%;object-fit:cover!important;object-position:85% center!important}
/* 2.8.2 : « cover » au lieu de « contain » : les photos des designs remplissent leur
   cadre (plus de bandes grises vides) ; le sujet, placé à droite, reste visible. */
body.weby-visual-studio .wv-studio-hero-image img{object-position:88% center!important}
body.weby-visual-studio .wv-studio-hero-image picture,
body.weby-visual-pro .wv-pro-hero-image picture,
body.weby-visual-pulse .wv-pulse-image picture,
body.weby-visual-signature .wv-signature-photo picture{display:block;max-width:100%;height:100%}

/* Marketplace : pas de héros ni de cartes tronqués par des largeurs rigides. */
body.weby-visual-marketplace .wm-hero{min-width:0;max-width:100%}
body.weby-visual-marketplace .wm-hero-art img{object-fit:contain!important;object-position:center!important;max-width:100%}
body.weby-visual-marketplace .wm-hero-copy>*{max-width:100%;overflow-wrap:anywhere}
body.weby-visual-marketplace :is(.wm-product-grid,.wm-catalog-products,.wm-category-card){min-width:0;max-width:100%}
body.weby-visual-marketplace .wm-catalog-layout{grid-template-columns:minmax(0,255px) minmax(0,1fr)}
@media(max-width:1024px){body.weby-visual-marketplace .wm-catalog-layout{display:block}}
@media(max-width:700px){
 body.weby-visual-marketplace .wm-hero{flex-wrap:wrap;align-items:center}
 body.weby-visual-marketplace .wm-hero-copy{flex:1 1 60%;padding:22px 16px;min-width:0}
 body.weby-visual-marketplace .wm-hero-art{flex:1 1 34%;min-width:100px;height:auto;align-self:stretch;max-height:230px}
 body.weby-visual-marketplace .wm-hero-art img{height:100%;width:100%}
 body.weby-visual-marketplace .wm-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.weby-visual-marketplace .wm-category-card strong{font-size:12px}
}
