/* KPS CART product gallery: arrows, counter, compact thumbnails. No hover zoom. */

/* Safety net: never show the hover-zoom layer (it is also switched off in functions.php). */
.woocommerce-product-gallery .zoomImg {
	display: none !important;
}

.kps-gallery-enhanced .flex-viewport {
	position: relative;
}

.kps-gallery-arrow {
	position: absolute;
	top: 50%;
	z-index: 12;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #0b1f44;
	box-shadow: 0 2px 12px rgba(11, 31, 68, 0.22);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.kps-gallery-arrow:hover {
	background: #1f5fd9;
	color: #fff;
}

.kps-gallery-arrow--prev {
	left: 10px;
}

.kps-gallery-arrow--next {
	right: 10px;
}

.kps-gallery-counter {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 12;
	padding: 4px 11px;
	border-radius: 999px;
	background: rgba(7, 22, 52, 0.85);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	pointer-events: none;
}

/* Compact thumbnails: one scrolling row. */
.kps-gallery-enhanced .flex-control-thumbs {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 8px;
	margin: 10px 0 0 !important;
	padding: 2px 0 6px !important;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.kps-gallery-enhanced .flex-control-thumbs li {
	flex: 0 0 64px !important;
	float: none !important;
	width: 64px !important;
	margin: 0 !important;
}

.kps-gallery-enhanced .flex-control-thumbs img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	opacity: 0.65;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

.kps-gallery-enhanced .flex-control-thumbs img.flex-active,
.kps-gallery-enhanced .flex-control-thumbs img:hover {
	opacity: 1;
}

@media (max-width: 600px) {
	.kps-gallery-arrow {
		width: 40px;
		height: 40px;
	}

	.kps-gallery-enhanced .flex-control-thumbs li {
		flex-basis: 56px !important;
		width: 56px !important;
	}
}

/* Images are never stretched or cropped: they keep their own proportions. */
.woocommerce-product-gallery__image img {
	height: auto;
	object-fit: contain;
}

/* Visible keyboard focus. */
.kps-gallery-enhanced .flex-viewport:focus-visible,
.kps-gallery-enhanced .flex-control-thumbs img:focus-visible {
	outline: 3px solid #1f5fd9;
	outline-offset: 2px;
}

.kps-gallery-enhanced .flex-control-thumbs img[aria-current="true"] {
	box-shadow: 0 0 0 2px #1f5fd9;
}
