/* ==========================================================================
   Fiche produit Wouly
   ========================================================================== */

/* Bandeau fil d'Ariane + navigation */
.wf-pbar { background: #e1edeb; margin-bottom: 40px; }
.wf-pbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 56px; }
.wf-pbar .wf-crumbs { justify-content: flex-start; font-size: 14px; }
.wf-pbar .wf-crumbs a { color: var(--wh-text); text-decoration: none; }
.wf-pbar .wf-crumbs a:hover { color: var(--wh-nav); }
.wf-pbar .wf-crumbs > :last-child { font-weight: 600; color: var(--wh-title); }
.wf-pbar .wf-crumbs { min-width: 0; }
.wf-crumbs { display: flex; flex-wrap: wrap; gap: 0 8px; }
.wf-crumbs__sep { color: var(--wh-text); }
.wf-pnav { display: flex; align-items: center; gap: 14px; flex: none; }
.wf-pnav a { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 24px; color: var(--wh-nav); font-size: 24px; line-height: 1; text-decoration: none; }
.wf-pnav a:hover { color: var(--wh-primary); }
.wf-pnav__grid svg { width: 13px; height: 13px; fill: currentColor; }

/* Deux colonnes */
.wouly-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 50px; align-items: start; position: relative; }
.wouly-product div.product::before, .wouly-product div.product::after { display: none; }
/* « overflow: hidden » empêcherait la colonne d'achat de suivre le défilement. */
.wouly-product div.product { overflow: visible; }
.wouly-product .site { overflow-x: clip; }
.wouly-product div.product > * { grid-column: 1 / -1; }
.wouly-product div.product > .wf-gallery { grid-column: 1; width: auto !important; float: none !important; margin: 0 !important; opacity: 1 !important; }
.wouly-product div.product > .summary { grid-column: 2; width: auto !important; float: none !important; margin: 0 !important; position: sticky; top: calc(var(--wh-top) + 90px); }
.wouly-product div.product > .onsale { position: absolute; top: 20px; left: 20px; grid-column: 1; }

/* Galerie */
.wf-gallery { position: relative; }
.wf-gallery__track { display: flex; flex-direction: column; gap: 20px; }
.wf-gallery__item { margin: 0; }
.wf-gallery__link { display: block; overflow: hidden; border-radius: 4px; background: #fafafa; cursor: zoom-in; }
.wf-gallery__link img { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; transition: transform .5s ease; }
.wf-gallery__link:hover img { transform: scale(1.02); }
.wf-gallery__counter { display: none; }

/* Colonne d'achat */
.wouly-product div.product > .summary > :first-child { margin-top: 0; }
.wouly-product div.product .summary .product_title { margin: 0 0 12px; padding: 0; font-size: 32px; font-weight: 500; line-height: 1.3; color: var(--wh-title); }
.wouly-product .summary .woocommerce-product-rating { margin: 0 0 10px; }
.wouly-product .summary p.price { margin: 0 0 18px; font-size: 26px; font-weight: 600; color: var(--wh-primary); }
.wouly-product .summary p.price del { font-size: 20px; }
.wouly-product .summary .woocommerce-product-details__short-description { margin: 0 0 22px; font-size: 15px; line-height: 1.65; color: var(--wh-text); }
.wouly-product .summary .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* Variantes */
.wouly-product table.variations { width: 100%; margin: 0 0 12px; border: 0; background: none; }
.wouly-product table.variations tr { display: block; margin-bottom: 14px; }
.wouly-product table.variations th, .wouly-product table.variations td { display: block; padding: 0; background: none; border: 0; text-align: left; }
.wouly-product table.variations th label, .wouly-product table.variations .label label { display: block; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--wh-nav); }
.wf-var__chosen { font-weight: 400; color: var(--wh-text); }
.wf-var { display: flex; flex-wrap: wrap; gap: 8px; }
button.wf-var__btn {
	min-height: 38px; padding: 8px 16px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 35px; background: #fff;
	font-size: 14px; font-weight: 500; color: var(--wh-nav); text-transform: none; line-height: 1.2; transition: border-color .15s ease, background .15s ease;
}
button.wf-var__btn:hover { border-color: var(--wh-nav); background: #fff; }
button.wf-var__btn[aria-pressed="true"] { border-color: var(--wh-primary); background: #e1edeb; color: var(--wh-title); box-shadow: inset 0 0 0 1px var(--wh-primary); }
button.wf-var__btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.wf-var__select { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 !important; padding: 0 !important; }
.wouly-product .reset_variations[style*="hidden"] { display: none; }
.wouly-product .reset_variations { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--wh-text); }
.wouly-product .single_variation_wrap .woocommerce-variation-price { margin-bottom: 10px; }
.wouly-product .single_variation_wrap .woocommerce-variation-price .price { font-size: 20px; font-weight: 600; color: var(--wh-primary); }
.wouly-product .woocommerce-variation-availability p { margin: 0 0 10px; font-size: 14px; }

/* Quantité + boutons */
.wouly-product div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 0; border: 0; border-radius: 0; background: none; }
.wouly-product div.product form.variations_form { display: block; }
.wouly-product .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; }
.wouly-product form.cart .quantity { margin: 0; float: none; }
.wf-qty { display: inline-flex; align-items: center; height: 42px; border: 1px solid rgba(0, 0, 0, .12); border-radius: 35px; overflow: hidden; }
.wf-qty input.qty { width: 38px; height: 40px; padding: 0; border: 0 !important; border-radius: 0; background: none; text-align: center; font-size: 15px; font-weight: 600; -moz-appearance: textfield; }
.wf-qty input.qty::-webkit-inner-spin-button, .wf-qty input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
button.wf-qty__btn { width: 34px; height: 40px; font-size: 17px; color: var(--wh-nav); }
button.wf-qty__btn:hover { color: var(--wh-primary); }
.wouly-product form.cart .single_add_to_cart_button,
.wouly-product form.cart .wf-buy-now {
	flex: 1 1 180px; min-height: 42px; margin: 0; padding: 8px 20px; float: none;
	border-radius: 35px; font-size: 13px; font-weight: 600; text-transform: capitalize;
}
.wouly-product form.cart .wf-buy-now { background: #242424 !important; color: #fff !important; }
.wouly-product form.cart .wf-buy-now:hover { background: #333 !important; }
.wouly-product form.cart .wf-buy-now:disabled,
.wouly-product form.cart .single_add_to_cart_button.disabled { opacity: .45; cursor: not-allowed; }

/* Partage */
.wf-share { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 14px; }
.wf-share__label { font-weight: 600; color: var(--wh-nav); }
.wf-share ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wf-share li { margin: 0; }
.wf-share a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--wh-nav); }
.wf-share a:hover { background: #f5f5f5; color: var(--wh-primary); }
.wf-share svg { width: 16px; height: 16px; }

/* Encadrés de réassurance */
.wf-pboxes { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }
.wf-pbox { display: flex; align-items: center; gap: 18px; margin: 0; padding: 16px 20px; border-radius: 4px; background: #f5f5f5; }
.wf-pbox svg { width: 40px; height: 40px; flex: none; color: var(--wh-primary); }
.wf-pbox strong { display: block; margin-bottom: 3px; font-size: 15px; font-weight: 600; color: var(--wh-title); }
.wf-pbox span { display: block; font-size: 14px; line-height: 1.5; color: var(--wh-text); }

/* Onglets (panneaux latéraux) */
.wf-ptabs { margin: 0; padding: 0; list-style: none; }
.wf-ptabs li { margin: 0; border-bottom: 1px solid var(--wh-border); }
button.wf-ptabs__btn { text-transform: none; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 20px 0; font-size: 17px; font-weight: 600; color: var(--wh-title); text-align: left; }
button.wf-ptabs__btn .wh-icon { width: 14px; height: 14px; transform: rotate(-90deg); opacity: .6; }
button.wf-ptabs__btn:hover { color: var(--wh-primary); }
.wf-ptab { width: min(560px, 92vw); }
.wf-ptab__body { padding: 25px; font-size: 15px; line-height: 1.7; color: var(--wh-text); }
.wf-ptab__body h2, .wf-ptab__body h3, .wf-ptab__body h4 { color: var(--wh-title); font-size: 18px; margin: 1.2em 0 .5em; }
.wf-ptab__body h2:first-child, .wf-ptab__body h3:first-child, .wf-ptab__body h4:first-child { margin-top: 0; }
.wf-ptab__body img { max-width: 100%; height: auto; border-radius: 4px; }
.wf-ptab__body table.woocommerce-product-attributes { width: 100%; border: 0; }
.wf-ptab__body table.woocommerce-product-attributes th,
.wf-ptab__body table.woocommerce-product-attributes td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--wh-border); background: none; font-style: normal; }
.wf-ptab__body table.woocommerce-product-attributes th { width: 40%; color: var(--wh-nav); font-weight: 600; }
.wf-ptab__body table.woocommerce-product-attributes td p { margin: 0; }

/* Avis */
.wf-previews { margin-top: 70px; padding-top: 50px; border-top: 1px solid var(--wh-border); }
.wf-psection__title { margin: 0 0 25px; font-size: 32px; }
.wf-previews #reviews { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; }
.wf-previews #reviews > * { min-width: 0; }
.wf-previews #reviews .woocommerce-Reviews-title { margin: 0 0 25px; font-size: 32px; font-weight: 600; color: var(--wh-title); }
.wf-previews .woocommerce-noreviews { margin: 0; padding: 0; background: none; color: var(--wh-text); }
.wf-previews #review_form_wrapper { padding: 25px; border-radius: 4px; background: #fafafa; }
.wf-previews #reply-title { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 600; color: var(--wh-title); }
.wf-previews .clear { display: none; }

/* Produits similaires */
.wouly-product section.related, .wouly-product section.up-sells { margin-top: 70px; padding-top: 50px; border-top: 1px solid var(--wh-border); }
.wf-rel__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.wf-rel__head h2 { margin: 0; font-size: 32px; font-weight: 600; color: var(--wh-title); }
.wf-rel__nav { display: flex; gap: 8px; }
.wf-rel__nav button { width: 42px; height: 42px; border-radius: 50%; background: #f4f4f4; color: var(--wh-link); font-size: 22px; line-height: 1; }
.wf-rel__nav button:hover:not(:disabled) { background: var(--wh-link); color: #fff; }
.wf-rel__nav button:disabled { opacity: .4; cursor: default; }
.wouly-product section.related ul.products, .wouly-product section.up-sells ul.products {
	display: flex; gap: 20px; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.wouly-product section.related ul.products::-webkit-scrollbar, .wouly-product section.up-sells ul.products::-webkit-scrollbar { display: none; }
.wouly-product section.related ul.products li.product, .wouly-product section.up-sells ul.products li.product {
	flex: 0 0 calc((100% - 60px) / 4); scroll-snap-align: start;
}

/* Visionneuse */
.wf-lightbox { position: fixed; inset: 0; z-index: 100010; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); }
.wf-lightbox[hidden] { display: none; }
.wf-lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 100px); width: auto; height: auto; object-fit: contain; border-radius: 0; }
button.wf-lightbox__close, button.wf-lightbox__prev, button.wf-lightbox__next { position: absolute; color: #fff; font-size: 40px; width: 56px; height: 56px; }
button.wf-lightbox__close { top: 12px; right: 12px; font-size: 38px; }
button.wf-lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
button.wf-lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
button.wf-lightbox__close:hover, button.wf-lightbox__prev:hover, button.wf-lightbox__next:hover { color: #9fd9c9; }
.wf-lightbox__count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }

/* Tablette */
@media (max-width: 1024px) {
	.wouly-product div.product { gap: 0 30px; }
	.wouly-product div.product .summary .product_title { font-size: 26px; }
	.wouly-product section.related ul.products li.product, .wouly-product section.up-sells ul.products li.product { flex-basis: calc((100% - 40px) / 3); }
	.wf-previews #reviews { grid-template-columns: 1fr; gap: 30px; }
}

/* Mobile */
@media (max-width: 767px) {
	.wf-pbar { margin-bottom: 20px; }
	.wf-pbar__inner { min-height: 48px; }
	.wf-pbar .wf-crumbs { font-size: 13px; }
	.wf-pbar .wf-crumbs > .wf-crumb:last-child, .wf-pbar .wf-crumbs > .wf-crumbs__sep:nth-last-child(2) { display: none; }
	.wouly-product div.product { grid-template-columns: minmax(0, 1fr); }
	.wouly-product div.product > .wf-gallery, .wouly-product div.product > .summary { grid-column: 1; position: static; }
	.wouly-product div.product > .wf-gallery { margin: 0 -15px 20px; }
	.wf-gallery__track { flex-direction: row; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
	.wf-gallery__track::-webkit-scrollbar { display: none; }
	.wf-gallery__item { flex: 0 0 100%; scroll-snap-align: start; }
	.wf-gallery__link { border-radius: 0; }
	.wf-gallery__counter { display: block; position: absolute; right: 15px; bottom: 12px; padding: 3px 10px; border-radius: 35px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; }
	.wouly-product div.product .summary .product_title { font-size: 22px; }
	.wouly-product .summary p.price { font-size: 22px; }
	.wouly-product form.cart .single_add_to_cart_button, .wouly-product form.cart .wf-buy-now { flex-basis: 100%; }
	.wouly-product .woocommerce-variation-add-to-cart .single_add_to_cart_button { flex: 1 1 0; }
	.wf-psection__title, .wf-rel__head h2 { font-size: 24px; }
	.wouly-product section.related ul.products li.product, .wouly-product section.up-sells ul.products li.product { flex-basis: calc((100% - 10px) / 2); }
	.wouly-product section.related ul.products, .wouly-product section.up-sells ul.products { gap: 10px; }
	.wf-lightbox img { max-width: 100vw; max-height: calc(100vh - 120px); }
	button.wf-lightbox__prev, button.wf-lightbox__next { top: auto; bottom: 4px; transform: none; }
}
