/*
 * Product page (fp_produit) layout + Swiper gallery overrides.
 * Loaded separately (and versioned) to avoid stale browser cache on mobile Safari.
 */

.fp_produit .fp_main {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.fp_produit .fp_gallery,
.fp_produit .fp_infos {
	width: 100%;
}
.fp_produit .fp_image_grande {
	float: none;
	width: auto;
	margin-right: 0;
	text-align: left;
}
.fp_produit .fp_gallery_media {
	display: block;
}
.fp_produit .product-gallery {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.fp_produit .product-gallery-main {
	width: 100%;
	max-width: var(--pg-max, 500px);
	margin: 0 auto;
	aspect-ratio: var(--pg-aspect, 1 / 1);
	overflow: hidden;
	--swiper-navigation-color: #000;
	--swiper-navigation-size: 26px;
}
.fp_produit .product-gallery-main .product-gallery-button-prev,
.fp_produit .product-gallery-main .product-gallery-button-next {
	top: 0;
	bottom: 0;
	height: auto;
	margin-top: 0;
	width: 64px;
	opacity: 0.9;
	background: transparent;
	display: flex;
	align-items: center;
	transition: background 0.2s ease, opacity 0.2s ease;
}
.fp_produit .product-gallery-main .product-gallery-button-prev {
	left: 0;
	right: auto;
	justify-content: flex-start;
	padding-left: 8px;
}
.fp_produit .product-gallery-main .product-gallery-button-next {
	right: 0;
	left: auto;
	justify-content: flex-end;
	padding-right: 8px;
}
.fp_produit .product-gallery-main:hover .product-gallery-button-prev {
	background: linear-gradient(to right, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0));
	opacity: 1;
}
.fp_produit .product-gallery-main:hover .product-gallery-button-next {
	background: linear-gradient(to left, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0));
	opacity: 1;
}
@media (max-width: 991px) {
	/* Mobile: keep arrows visible, but don't use large click zones (prevents blocking swipe) */
	.fp_produit .product-gallery-main .product-gallery-button-prev,
	.fp_produit .product-gallery-main .product-gallery-button-next {
		top: 50%;
		bottom: auto;
		height: 44px;
		width: 44px;
		margin-top: -22px;
		padding: 0;
		justify-content: center;
		background: rgba(255, 255, 255, 0.75);
		border-radius: 999px;
	}
	.fp_produit .product-gallery-main .product-gallery-button-prev {
		left: 6px;
		padding-left: 0;
	}
	.fp_produit .product-gallery-main .product-gallery-button-next {
		right: 6px;
		padding-right: 0;
	}
	.fp_produit .product-gallery-main .swiper-button-disabled {
		/* don't intercept swipe when disabled */
		pointer-events: none !important;
	}
}
.fp_produit .product-gallery-main .swiper-button-disabled {
	/* Prevent click-through (lightbox) when arrows are disabled */
	pointer-events: auto;
}
.fp_produit .product-gallery-main .swiper-wrapper,
.fp_produit .product-gallery-main .swiper-slide {
	height: 100%;
}
.fp_produit .product-gallery-main .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}
.fp_produit .product-gallery-main .swiper-slide a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}
.fp_produit .product-gallery-main .product-gallery-video {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fp_produit .product-gallery-main .product-gallery-video video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	background: #000000;
}
.fp_produit .product-gallery-main img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}
.fp_produit .product-gallery-thumbs {
	width: 100%;
}
.fp_produit .product-gallery-thumbs .swiper-wrapper {
	justify-content: center;
}
.fp_produit .product-gallery-thumbs .swiper-slide {
	position: relative;
	width: 72px;
	height: 72px;
	border: 1px solid #EEEEEE;
	border-radius: 4px;
	overflow: hidden;
	opacity: 0.7;
	cursor: pointer;
	background: #FFFFFF;
}
.fp_produit .product-gallery-thumbs .swiper-slide-thumb-active {
	opacity: 1;
	border-color: #000000;
}
.fp_produit .product-gallery-thumbs .swiper-slide.is-video::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	margin-left: -17px;
	background: rgba(0, 0, 0, 0.55);
	border-radius: 999px;
	pointer-events: none;
}
.fp_produit .product-gallery-thumbs .swiper-slide.is-video::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	margin-top: -8px;
	margin-left: -3px;
	border-style: solid;
	border-width: 8px 0 8px 12px;
	border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
	pointer-events: none;
}
.fp_produit .product-gallery-thumbs img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}
.fp_produit .fp_infos .affiche_critere_stock {
	float: none !important;
	max-width: none;
	min-width: 0;
	margin-left: 0;
}
.fp_produit .fp_infos .on_estimate {
	float: none !important;
	margin-left: 0;
}
.fp_produit .fp_infos .affiche_critere_stock .product_meta_in_well {
	margin-bottom: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #DDDDDD;
}
.fp_produit .fp_infos .affiche_critere_stock .product_meta_in_well h4 {
	margin: 0 0 6px 0;
	font-size: 16px;
}
.fp_produit .fp_infos .affiche_critere_stock .product_meta_in_well p {
	margin: 0;
}
.fp_produit .fp_descriptif {
	margin-top: 10px;
}
.fp_produit .fp_description {
	margin-top: 20px;
}
.fp_produit .fp_infos .affiche_critere_stock #product_link_to_modules_container {
	margin-top: 15px;
	padding-top: 10px;
	border-top: 1px solid #DDDDDD;
}
.fp_produit .fp_infos .product_link_to_modules {
	margin: 0;
}

@media (min-width: 768px) {
	.fp_produit .fp_main {
		flex-direction: row;
		align-items: flex-start;
	}
	.fp_produit .fp_gallery {
		flex: 1 1 0;
		min-width: 0;
	}
	.fp_produit .fp_infos {
		flex: 0 0 420px;
		max-width: 480px;
	}
}

@media (min-width: 992px) {
	.fp_produit .product-gallery {
		flex-direction: row;
		align-items: stretch;
		gap: 15px;
	}
	.fp_produit .product-gallery-main {
		flex: 1 1 0;
		min-width: 0;
	}
	.fp_produit .product-gallery-thumbs {
		order: -1;
		flex: 0 0 90px;
		width: 90px;
		height: 100%;
		min-height: 0;
	}
	.fp_produit .product-gallery-thumbs .swiper-wrapper {
		justify-content: flex-start;
	}
	.fp_produit .product-gallery-thumbs .swiper-slide {
		width: 100%;
		height: 80px;
	}
}
