/* Wallgaming Grille : cartes produits immersives pour WoodMart.
   Couleurs réglables avec les variables ci-dessous. */
body.wgg{--wgg-bg:#0a0d14;--wgg-panel:#111828;--wgg-border:#1e2b47;--wgg-accent:#2587d7;--wgg-lead:#4ea1ff;--wgg-text:#ffffff;--wgg-soft:#c7d2df;--wgg-muted:#8b9ab0;--wgg-check:#6f7f96;--wgg-star:#f5a524;--wgg-radius:12px;--wgg-ratio:5/7;--wgg-lines:2}

/* Le widget Elementor qui contient la grille prend toute la largeur
   (sinon la hauteur des cartes peut être calculée à largeur nulle). */
body.wgg .elementor-widget:has(.wd-products),body.wgg .elementor-widget-wd_archive_products,body.wgg .elementor-widget-wd_products{width:100%!important;max-width:100%!important}

/* ---------- La carte ---------- */
body.wgg .wd-products .wd-product .product-wrapper{position:relative!important;display:block!important;aspect-ratio:var(--wgg-ratio);padding:0!important;margin:0!important;border:1px solid var(--wgg-border)!important;border-radius:var(--wgg-radius)!important;background:var(--wgg-bg)!important;overflow:hidden!important;box-shadow:none!important;transform:none;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease!important}

/* Image en plein cadre */
body.wgg .wd-products .wd-product .product-element-top{position:absolute!important;inset:0!important;margin:0!important;border-radius:0!important;background:transparent!important;overflow:hidden!important}
body.wgg .wd-products .wd-product .product-element-top .product-image-link,body.wgg .wd-products .wd-product .product-element-top .product-image-link picture{display:block;width:100%;height:100%}
body.wgg .wd-products .wd-product .product-element-top img{width:100%!important;height:100%!important;object-fit:cover;transform:none;transition:transform .45s ease!important}

/* Infos en surimpression : on annule le fond et le dégradé du CSS additionnel actuel */
body.wgg .wd-products .wd-product .product-element-bottom{position:absolute!important;left:0;right:0;bottom:0;z-index:3;display:flex!important;flex-direction:column;align-items:stretch;gap:10px;margin:0!important;padding:90px 18px 18px!important;background:linear-gradient(to top,var(--wgg-bg) 0%,rgba(10,13,20,.94) 55%,rgba(10,13,20,0) 100%)!important;text-align:left!important;pointer-events:none}
body.wgg .wd-products .wd-product .product-element-bottom::before{display:none!important}
body.wgg .wd-products .wd-product .product-element-bottom a{pointer-events:auto}

/* Tous les éléments du bas deviennent une seule colonne, dans le bon ordre */
body.wgg .wd-products .wd-product .wd-product-header,
body.wgg .wd-products .wd-product .wrap-price,
body.wgg .wd-products .wd-product .wrap-price .swap-wrapp,
body.wgg .wd-products .wd-product .wrap-price .swap-elements{display:contents!important}
body.wgg .wd-products .wd-product .product-element-bottom>*,body.wgg .wd-products .wd-product .wrap-price *{order:5}

/* Titre */
body.wgg .wd-products .wd-product .wd-entities-title{order:1!important;margin:0!important;color:var(--wgg-text)!important;font-size:18px!important;font-weight:700!important;line-height:1.3!important;text-align:left!important}
body.wgg .wd-products .wd-product .wd-entities-title a{display:-webkit-box;-webkit-line-clamp:var(--wgg-lines);line-clamp:var(--wgg-lines);-webkit-box-orient:vertical;overflow:hidden;color:inherit!important}

/* Note */
body.wgg .wd-products .wd-product .wgg-rating{order:2!important}
.wgg-rating{display:inline-flex;align-items:center;gap:6px;font-size:13px;line-height:1;color:var(--wgg-muted);white-space:nowrap}
.wgg-rating b{color:#e6edf5;font-weight:600}
.wgg-stars{display:inline-block;width:70px;height:14px;background:linear-gradient(90deg,var(--wgg-star,#f5a524) var(--wgg-fill),rgba(138,154,176,.35) var(--wgg-fill));-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17.1l-6.1 3.5 1.5-6.8L2.2 9.2l6.9-.7z'/%3E%3C/svg%3E") left center/14px 14px repeat-x;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17.1l-6.1 3.5 1.5-6.8L2.2 9.2l6.9-.7z'/%3E%3C/svg%3E") left center/14px 14px repeat-x}
/* Les autres notes (WooCommerce, WooCommerce Avis) ne s'affichent pas en double dans la carte */
body.wgg .wd-products .wd-product .star-rating,body.wgg .wd-products .wd-product .wcav-stars,body.wgg .wd-products .wd-product .wcav-loop-rating{display:none!important}

/* Avantages (ACF) : l'ancien bloc du thème est remplacé par celui-ci */
body.wgg .wd-products .wd-product .wg-avantages-produit{display:none!important}
body.wgg .wd-products .wd-product .wgg-perks{order:3!important}
.wgg-perks{display:flex;flex-direction:column;gap:6px;margin:0!important;padding:0!important;list-style:none!important;font-size:13px;line-height:1.45}
.wgg-perks li{display:flex;align-items:flex-start;gap:8px;margin:0!important;padding:0!important;color:var(--wgg-soft);font-size:inherit!important;line-height:inherit!important;font-weight:500}
.wgg-perks li::before{display:none!important}
.wgg-perks li.is-lead{color:var(--wgg-lead)}
.wgg-perks svg{flex:none;width:15px;height:15px;margin-top:2px;fill:none;stroke:var(--wgg-check);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.wgg-perks li.is-lead svg{stroke:currentColor}

/* Prix : seul sur sa ligne, sous un trait fin, le bouton « Voir » à droite */
body.wgg .wd-products .wd-product .price{order:4!important;display:flex!important;flex-wrap:wrap;align-items:baseline;align-content:flex-end;column-gap:6px;box-sizing:border-box!important;width:100%;min-height:55px;margin:4px 0 0!important;padding:14px 96px 0 0!important;border-top:1px solid rgba(255,255,255,.08);color:var(--wgg-text)!important;font-size:21px!important;font-weight:700!important;line-height:1.1!important;text-align:left!important}
body.wgg .wd-products .wd-product .price .from{display:block;flex-basis:100%;margin-bottom:3px;font-size:11px!important;font-weight:400!important;color:var(--wgg-muted)!important;opacity:1!important}
body.wgg .wd-products .wd-product .price del{margin-left:0;font-size:13px!important;font-weight:400!important;color:var(--wgg-muted)!important;opacity:1!important}
body.wgg .wd-products .wd-product .price ins{text-decoration:none!important;color:inherit!important}
body.wgg .wd-products .wd-product .price .amount{color:inherit!important}
body.wgg .wd-products .wd-product .wc-stripe-bnpl-shop-message{display:none!important}

/* Bouton « Voir » */
.wgg-go{display:none}
body.wgg .wd-products .wd-product .wgg-go{position:absolute;right:18px;bottom:18px;z-index:4;display:inline-flex!important;align-items:center;justify-content:center;gap:6px;height:40px;padding:0 14px;border-radius:var(--wgg-radius);background:rgba(22,33,58,.92);color:#8fb3e8!important;font-size:13px;font-weight:600;line-height:1;text-decoration:none!important;pointer-events:auto;transition:background .2s ease,color .2s ease}
.wgg-go svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}

/* Le bouton panier de WoodMart, l'échange prix / bouton et le bloc qui s'ouvre au survol
   (description, boutons) sont retirés : sinon la carte s'agrandit au survol */
body.wgg .wd-products .wd-product .wd-add-btn,body.wgg .wd-products .wd-product .btn-add,
body.wgg .wd-products .wd-product .fade-in-block,body.wgg .wd-products .wd-product .hover-content,
body.wgg .wd-products .wd-product .wd-bottom-actions,body.wgg .wd-products .wd-product .wd-product-footer,
body.wgg .wd-products .wd-product .wd-more-desc,body.wgg .wd-products .wd-product .content-product-imagin{display:none!important}

/* Étiquettes (WoodMart et labels personnalisés) : en haut de l'image, au-dessus de tout.
   Leur style reste celui de leur plugin. */
body.wgg .wd-products .wd-product .product-labels{z-index:5!important}

/* WoodMart déplace l'image et les infos au survol (selon le style de survol choisi) : on fige tout,
   la carte ne bouge que d'un bloc */
body.wgg .wd-products .wd-product .product-element-top,body.wgg .wd-products .wd-product:hover .product-element-top,
body.wgg .wd-products .wd-product.state-hover .product-element-top{top:0!important;right:0!important;bottom:0!important;left:0!important;height:auto!important;transform:none!important;margin:0!important}
body.wgg .wd-products .wd-product .product-element-bottom,body.wgg .wd-products .wd-product:hover .product-element-bottom,
body.wgg .wd-products .wd-product.state-hover .product-element-bottom{top:auto!important;bottom:0!important;transform:none!important}
body.wgg .wd-products .wd-product:hover .wd-entities-title,body.wgg .wd-products .wd-product:hover .wrap-price,body.wgg .wd-products .wd-product:hover .wd-product-header{transform:none!important}

/* ---------- Survol (ordinateur avec souris) ---------- */
@media (hover:hover) and (min-width:768px){
	body.wgg .wd-products .wd-product:hover .product-wrapper,body.wgg .wd-products .wd-product.state-hover .product-wrapper{padding:0!important;margin:0!important;height:auto!important}
	body.wgg .wd-products .wd-product:hover .product-wrapper{transform:translateY(-4px)!important;border-color:#2f6fd6!important;box-shadow:0 14px 34px rgba(0,0,0,.5)!important}
	body.wgg .wd-products .wd-product:hover .product-element-top img{transform:scale(1.06)!important}
	body.wgg .wd-products .wd-product:hover .wgg-go{background:var(--wgg-accent);color:#fff!important}
}

/* ---------- Mobile ---------- */
@media (max-width:767px){
	body.wgg .wd-products .wd-product .product-element-bottom{padding:70px 14px 14px!important;gap:8px}
	body.wgg .wd-products .wd-product .wd-entities-title{font-size:15px!important}
	body.wgg .wd-products .wd-product .price{font-size:17px!important}
	body.wgg .wd-products .wd-product .wgg-go{right:14px;bottom:14px}

	/* Mode liste : image à gauche, infos à droite, seul le premier avantage */
	body.wgg-mlist .wd-products .wd-product .product-wrapper{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:stretch;gap:14px;aspect-ratio:auto;padding:12px!important;border-radius:var(--wgg-radius)!important;background:var(--wgg-panel)!important}
	body.wgg-mlist .wd-products .wd-product .product-element-top{position:relative!important;inset:auto!important;flex:none;width:96px;min-height:116px;border-radius:10px!important}
	body.wgg-mlist .wd-products .wd-product .product-element-bottom{position:static!important;flex:1;min-width:0;gap:5px;padding:0!important;background:none!important}
	body.wgg-mlist .wd-products .wd-product .wd-entities-title{font-size:14px!important;line-height:1.35!important}
	body.wgg-mlist .wd-products .wd-product .wgg-rating{font-size:12px}
	body.wgg-mlist .wd-products .wd-product .wgg-rating .wgg-stars{width:12px;height:12px;-webkit-mask-size:12px 12px;mask-size:12px 12px;--wgg-fill:100%!important}
	body.wgg-mlist .wd-products .wd-product .wgg-perks{font-size:12px}
	body.wgg-mlist .wd-products .wd-product .wgg-perks li:not(.is-lead){display:none}
	body.wgg-mlist .wd-products .wd-product .wgg-perks svg{display:none}
	body.wgg-mlist .wd-products .wd-product .price{min-height:0;margin:2px 0 0!important;padding:0 48px 0 0!important;border-top:0;font-size:17px!important}
	body.wgg-mlist .wd-products .wd-product .price .from{display:inline;margin:0 4px 0 0}
	body.wgg-mlist .wd-products .wd-product .wgg-go{right:12px;bottom:12px;width:36px;height:36px;padding:0;font-size:0;gap:0}
	body.wgg-mlist .wd-products .wd-product .wgg-go svg{width:15px;height:15px}
	body.wgg-mlist .wd-products .wd-product .product-labels{inset:18px auto auto 18px!important;transform:scale(.85);transform-origin:top left}

	/* Mode cartes compactes (2 par ligne) : image en haut, infos dessous, seul le premier avantage */
	body.wgg-mstack .wd-products .wd-product .product-wrapper{display:flex!important;flex-direction:column!important;aspect-ratio:auto;padding:10px!important;border-radius:var(--wgg-radius)!important;background:var(--wgg-panel)!important}
	body.wgg-mstack .wd-products .wd-product .product-element-top{position:relative!important;inset:auto!important;width:100%!important;aspect-ratio:1/1;border-radius:10px!important}
	body.wgg-mstack .wd-products .wd-product .product-element-bottom{position:static!important;gap:5px;margin-top:10px!important;padding:0!important;background:none!important}
	body.wgg-mstack .wd-products .wd-product .wd-entities-title{font-size:14px!important;line-height:1.35!important}
	body.wgg-mstack .wd-products .wd-product .wgg-rating{font-size:12px}
	body.wgg-mstack .wd-products .wd-product .wgg-rating .wgg-stars{width:12px;height:12px;-webkit-mask-size:12px 12px;mask-size:12px 12px;--wgg-fill:100%!important}
	body.wgg-mstack .wd-products .wd-product .wgg-rating-n{display:none}
	body.wgg-mstack .wd-products .wd-product .wgg-perks{font-size:12px;line-height:1.35}
	body.wgg-mstack .wd-products .wd-product .wgg-perks li:not(.is-lead){display:none}
	body.wgg-mstack .wd-products .wd-product .wgg-perks svg{display:none}
	body.wgg-mstack .wd-products .wd-product .price{min-height:0;margin:auto 0 0!important;padding:6px 44px 0 0!important;border-top:0;font-size:16px!important}
	body.wgg-mstack .wd-products .wd-product .price .from{margin-bottom:2px;font-size:10px!important}
	body.wgg-mstack .wd-products .wd-product .wgg-go{right:10px;bottom:10px;width:34px;height:34px;padding:0;font-size:0;gap:0}
	body.wgg-mstack .wd-products .wd-product .wgg-go svg{width:15px;height:15px}
	body.wgg-mstack .wd-products .wd-product .product-element-bottom{flex:1}
	body.wgg-mstack .wd-products .wd-product .product-labels{transform:scale(.85);transform-origin:top left}
}

/* ---------- Tactile : aucun effet de survol de WoodMart, juste un retour discret à l'appui ---------- */
@media (hover:none),(max-width:767px){
	body.wgg .wd-products .wd-product .product-wrapper,body.wgg .wd-products .wd-product:hover .product-wrapper,body.wgg .wd-products .wd-product.state-hover .product-wrapper{transform:none!important;box-shadow:none!important;-webkit-tap-highlight-color:transparent}
	body.wgg .wd-products .wd-product:hover .product-element-top img{transform:none!important}
	body.wgg .wd-products .wd-product:hover .wgg-go{background:rgba(22,33,58,.92)}
	body.wgg .wd-products .wd-product:active .product-wrapper{border-color:#2f6fd6!important}
	body.wgg .wd-products .wd-product:active .product-element-top img{transform:scale(1.04)!important}
	body.wgg .wd-products .wd-product:active .wgg-go{background:var(--wgg-accent);color:#fff!important}
}

/* ---------- Mobile, cartes immersives (2 par ligne) ---------- */
@media (max-width:767px){
	body.wgg-mcard .wd-products .wd-product .product-wrapper{aspect-ratio:3/4.4;border-radius:var(--wgg-radius)!important}
	body.wgg-mcard .wd-products .wd-product .product-element-bottom{gap:6px;padding:56px 10px 10px!important}
	body.wgg-mcard .wd-products .wd-product .wd-entities-title{font-size:14px!important;line-height:1.3!important}
	body.wgg-mcard .wd-products .wd-product .wgg-rating{font-size:11px}
	body.wgg-mcard .wd-products .wd-product .wgg-rating .wgg-stars{width:11px;height:11px;-webkit-mask-size:11px 11px;mask-size:11px 11px;--wgg-fill:100%!important}
	body.wgg-mcard .wd-products .wd-product .wgg-rating-n{display:none}
	/* Avantage mis en avant : une seule ligne, petit, coupé avec « … » si trop long */
	body.wgg-mcard .wd-products .wd-product .wgg-perks{font-size:11.5px!important;line-height:1.3!important}
	body.wgg-mcard .wd-products .wd-product .wgg-perks li:not(.is-lead){display:none}
	body.wgg-mcard .wd-products .wd-product .wgg-perks li.is-lead{gap:5px;align-items:center;font-weight:500}
	body.wgg-mcard .wd-products .wd-product .wgg-perks li.is-lead span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
	body.wgg-mcard .wd-products .wd-product .wgg-perks svg{width:11px;height:11px;margin:0;stroke-width:3}
	body.wgg-mcard .wd-products .wd-product .price{min-height:44px;margin:2px 0 0!important;padding:9px 42px 0 0!important;font-size:16px!important}
	body.wgg-mcard .wd-products .wd-product .price .from{margin-bottom:1px;font-size:10px!important}
	body.wgg-mcard .wd-products .wd-product .price del{font-size:11px!important}
	body.wgg-mcard .wd-products .wd-product .wgg-go{right:10px;bottom:10px;width:34px;height:34px;padding:0;font-size:0;gap:0;border-radius:var(--wgg-radius)}
	body.wgg-mcard .wd-products .wd-product .wgg-go svg{width:15px;height:15px}
	body.wgg-mcard .wd-products .wd-product .product-labels{transform:scale(.85);transform-origin:top left}
}

@media (prefers-reduced-motion:reduce){
	body.wgg .wd-products .wd-product .product-wrapper,body.wgg .wd-products .wd-product .product-element-top img{transition:none!important}
	body.wgg .wd-products .wd-product:hover .product-wrapper,body.wgg .wd-products .wd-product:hover .product-element-top img{transform:none!important}
}
