.woocommerce-product-gallery.wc-gallery-thumbnail-strip {
	--wc-gallery-thumb-size: clamp(60px, 15vw, 96px);
	--wc-gallery-thumb-arrow-size: 32px;
	position: relative;
}

body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 8px;
	width: auto;
	margin: 12px 0 0;
	padding: 0;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs::-webkit-scrollbar {
	display: none;
}

body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs::before,
body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs::after {
	display: none;
}

body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs > li {
	flex: 0 0 var(--wc-gallery-thumb-size);
	float: none;
	width: var(--wc-gallery-thumb-size);
	margin: 0;
}

body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs > li > img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: contain;
}

.wc-gallery-thumbnail-strip__controls {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	body.single-product .product .woocommerce-product-gallery.wc-gallery-thumbnail-strip > ol.flex-control-thumbs {
		margin-inline: 40px;
	}

	.wc-gallery-thumbnail-strip__controls:not([hidden]) {
		position: absolute;
		inset-inline: 0;
		bottom: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: var(--wc-gallery-thumb-size);
		pointer-events: none;
	}

	.wc-gallery-thumbnail-strip__controls > button {
		display: grid;
		place-items: center;
		width: var(--wc-gallery-thumb-arrow-size);
		height: var(--wc-gallery-thumb-arrow-size);
		padding: 0 0 2px;
		border: 1px solid #d6d6d6;
		border-radius: 50%;
		background: #fff;
		color: #202124;
		font: 24px/1 system-ui, sans-serif;
		cursor: pointer;
		pointer-events: auto;
	}

	.wc-gallery-thumbnail-strip__controls > button:hover:not(:disabled) {
		border-color: #202124;
	}

	.wc-gallery-thumbnail-strip__controls > button:focus-visible {
		outline: 2px solid #202124;
		outline-offset: 2px;
	}

	.wc-gallery-thumbnail-strip__controls > button:disabled {
		opacity: 0.35;
		cursor: default;
	}
}
