/**
 * Scroll galleries (Owl replacement) and lightbox helpers.
 */

.wl-scroll-gallery {
	position: relative;
	padding: 0 2.25rem;
	margin-bottom: 1.5rem;
}

.wl-scroll-gallery__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	padding-bottom: 0.25rem;
}

.wl-scroll-gallery__track::-webkit-scrollbar {
	height: 6px;
}

.wl-scroll-gallery__item {
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: min(100%, 405px);
	max-width: min(100%, 405px);
}

.wl-scroll-gallery__item > a,
.wl-scroll-gallery__item a.wl-lightbox {
	display: block;
	line-height: 0;
	width: 100%;
	max-width: min(100%, 405px);
}

.wl-scroll-gallery__item img,
.wl-scroll-gallery__item img.img-fluid {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

.wl-scroll-gallery__prev,
.wl-scroll-gallery__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 1px solid #ccc;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #333;
	line-height: 1;
	cursor: pointer;
}

.wl-scroll-gallery__prev {
	left: 0;
}

.wl-scroll-gallery__next {
	right: 0;
}

.wl-scroll-gallery__prev:hover,
.wl-scroll-gallery__next:hover,
.wl-scroll-gallery__prev:focus,
.wl-scroll-gallery__next:focus {
	background: #fff;
	border-color: #666;
}

.responsive-carousel .wl-scroll-gallery {
	min-height: 80px;
}

.wl-lightbox-desc {
	display: none;
}

a.wl-lightbox {
	cursor: zoom-in;
}

/* Highslide: image fits the viewport, no secondary full-size zoom */
.glightbox-container .gslide-image img {
	display: block;
	max-width: min(100vw, 100%);
	max-height: 100vh;
	width: auto;
	height: auto;
	object-fit: contain;
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}

.glightbox-container .zoomed .gslide-image img {
	transform: none !important;
	max-width: min(100vw, 100%) !important;
	max-height: 100vh !important;
}

/* Highslide UX: never show prev/next in lightbox */
.glightbox-container .gbtn.gprev,
.glightbox-container .gbtn.gnext {
	display: none !important;
}

/* No on-page carousel arrows (native horizontal scroll only) */
.wl-scroll-gallery__prev,
.wl-scroll-gallery__next {
	display: none !important;
}

.wl-scroll-gallery {
	padding-left: 0;
	padding-right: 0;
}

.gallery .wl-lightbox .thumbnail,
.gallery a.wl-lightbox.thumbnail {
	display: block;
}

@media (max-width: 767.98px) {
	.wl-scroll-gallery {
		padding: 0 1.75rem;
	}
}
