/* EH Product Gallery — carrousel mobile avec flèches + miniatures */

@media (max-width: 1024px) {
	.single-product .eh-pg-carousel {
		position: relative;
	}

	.single-product .eh-pg-carousel .flex-viewport {
		position: relative;
		overflow: hidden;
		touch-action: pan-y pinch-zoom;
	}

	.single-product .eh-pg-carousel .woocommerce-product-gallery__image {
		margin: 0 !important;
	}

	.single-product .eh-pg-carousel .woocommerce-product-gallery__image img {
		display: block;
		width: 100%;
		height: auto;
	}

	/* Flèches sur l'image principale */
	.single-product .eh-pg-arrows {
		position: absolute;
		inset: 0;
		z-index: 4;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 6px;
		pointer-events: none;
	}

	.single-product .eh-pg-arrow {
		pointer-events: auto;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 38px;
		height: 38px;
		padding: 0;
		border: none;
		border-radius: 50%;
		background: rgba(255, 255, 255, 0.92);
		color: #000;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
		cursor: pointer;
		transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
	}

	.single-product .eh-pg-arrow span {
		display: block;
		font-size: 1.5rem;
		line-height: 1;
		margin-top: -2px;
	}

	.single-product .eh-pg-arrow:hover,
	.single-product .eh-pg-arrow:focus-visible {
		background: #fff;
		transform: scale(1.04);
	}

	.single-product .eh-pg-arrow:focus-visible {
		outline: 2px solid #c9a96e;
		outline-offset: 2px;
	}

	.single-product .eh-pg-counter {
		position: absolute;
		right: 10px;
		bottom: 10px;
		z-index: 5;
		padding: 0.35rem 0.6rem;
		font-size: 0.6875rem;
		font-weight: 600;
		letter-spacing: 0.06em;
		color: #fff;
		background: rgba(0, 0, 0, 0.45);
		border-radius: 2px;
		pointer-events: none;
		line-height: 1;
	}

	/* Bandeau miniatures custom */
	.single-product .eh-pg-thumbs {
		padding: 10px 0 4px;
	}

	.single-product .eh-pg-thumbs-strip {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 8px;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 2px 2px 6px;
		margin: 0;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.single-product .eh-pg-thumbs-strip::-webkit-scrollbar {
		display: none;
	}

	.single-product .eh-pg-thumb {
		flex: 0 0 56px;
		width: 56px;
		height: 56px;
		padding: 0;
		border: 1px solid rgba(0, 0, 0, 0.1);
		background: #fff;
		cursor: pointer;
		overflow: hidden;
		scroll-snap-align: start;
		transition: border-color 0.2s ease, box-shadow 0.2s ease;
	}

	.single-product .eh-pg-thumb img {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.single-product .eh-pg-thumb.is-active {
		border-color: #c9a96e;
		box-shadow: 0 0 0 1px #c9a96e;
	}

	.single-product .eh-pg-thumb:focus-visible {
		outline: 2px solid #c9a96e;
		outline-offset: 2px;
	}

	/* Miniatures natives flexslider (si présentes) — même style */
	.single-product .eh-pg-carousel ol.flex-control-thumbs.eh-pg-thumbs-native {
		display: flex !important;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		gap: 8px;
		padding: 10px 2px 6px !important;
		margin: 0 !important;
		list-style: none;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.single-product .eh-pg-carousel ol.flex-control-thumbs.eh-pg-thumbs-native::-webkit-scrollbar {
		display: none;
	}

	.single-product .eh-pg-carousel ol.flex-control-thumbs.eh-pg-thumbs-native li {
		flex: 0 0 56px;
		width: 56px !important;
		padding: 0 !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}

	.single-product .eh-pg-carousel ol.flex-control-thumbs.eh-pg-thumbs-native li img {
		display: block;
		width: 56px !important;
		height: 56px !important;
		object-fit: cover;
		border: 1px solid rgba(0, 0, 0, 0.1);
		opacity: 1 !important;
		transition: border-color 0.2s ease, box-shadow 0.2s ease;
	}

	.single-product .eh-pg-carousel ol.flex-control-thumbs.eh-pg-thumbs-native li img.flex-active {
		border-color: #c9a96e;
		box-shadow: 0 0 0 1px #c9a96e;
		opacity: 1 !important;
	}

	/* Si bandeau custom présent, masquer le doublon natif */
	.single-product .eh-pg-carousel:has(.eh-pg-thumbs) ol.flex-control-thumbs {
		display: none !important;
	}

	.single-product .mobile_gallery,
	.single-product .product_layout_classic .product-images-wrapper {
		margin-bottom: 0;
	}
}

@media (min-width: 1025px) {
	.single-product .eh-pg-thumbs,
	.single-product .eh-pg-arrows,
	.single-product .eh-pg-counter {
		display: none !important;
	}
}
