/* Product gallery for drone cards. Scoped to the product media block. */
.ud-drone-gallery {
	width: 100%;
}

.ud-drone-gallery__stage {
	position: relative;
	height: clamp(390px, 42vw, 520px);
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	touch-action: pan-y;
}

.ud-drone-gallery__slide {
	display: none;
	width: 100%;
	height: 100%;
	margin: 0;
	align-items: center;
	justify-content: center;
}

.ud-drone-gallery__slide.is-active {
	display: flex;
}

.ud-drone-product__media .ud-drone-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	object-fit: contain;
	object-position: center;
}

.ud-drone-gallery__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	padding: 0 0 3px;
	border: 1px solid rgba(40,44,52,.12);
	border-radius: 50%;
	background: rgba(255,255,255,.94);
	color: var(--ud-dpo-foreground);
	font: inherit;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 5px 18px rgba(40,44,52,.12);
	transform: translateY(-50%);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ud-drone-gallery__arrow:hover {
	border-color: rgba(0,164,230,.45);
	box-shadow: 0 7px 20px rgba(40,44,52,.16);
}

.ud-drone-gallery__arrow:focus-visible,
.ud-drone-gallery__thumb:focus-visible,
.ud-drone-gallery:focus-visible {
	outline: 3px solid rgba(0,164,230,.25);
	outline-offset: 2px;
}

.ud-drone-gallery__arrow--prev {
	left: 14px;
}

.ud-drone-gallery__arrow--next {
	right: 14px;
}

.ud-drone-gallery__thumbs {
	display: flex;
	gap: 9px;
	overflow-x: auto;
	padding: 10px 2px 2px;
	scrollbar-width: thin;
}

.ud-drone-gallery__thumb {
	flex: 0 0 78px;
	height: 62px;
	overflow: hidden;
	padding: 3px;
	border: 1px solid var(--ud-dpo-border);
	border-radius: 9px;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ud-drone-gallery__thumb.is-active {
	border-color: var(--ud-dpo-primary);
	box-shadow: 0 0 0 2px var(--ud-dpo-primary-soft);
}

.ud-drone-product__media .ud-drone-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	border-radius: 5px;
	object-fit: cover;
}

.ud-drone-gallery--single .ud-drone-gallery__stage {
	height: clamp(390px, 42vw, 520px);
}

@media (max-width: 720px) {
	.ud-drone-gallery__stage,
	.ud-drone-gallery--single .ud-drone-gallery__stage {
		height: 300px;
	}

	.ud-drone-gallery__arrow {
		width: 38px;
		height: 38px;
		font-size: 27px;
	}

	.ud-drone-gallery__arrow--prev {
		left: 9px;
	}

	.ud-drone-gallery__arrow--next {
		right: 9px;
	}

	.ud-drone-gallery__thumb {
		flex-basis: 68px;
		height: 54px;
	}
}

@media (max-width: 480px) {
	.ud-drone-gallery__stage,
	.ud-drone-gallery--single .ud-drone-gallery__stage {
		height: 270px;
	}
}
