/* DB Race - Product Image gallery. */

.dbrace-product-image {
	--dbrace-product-gap: 12px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--dbrace-product-gap);
	width: 100%;
}

.dbrace-product-image *,
.dbrace-product-image *::before,
.dbrace-product-image *::after {
	box-sizing: border-box;
}

.dbrace-product-image__stage {
	position: relative;
	width: 100%;
	height: clamp(360px, 52vw, 680px);
	min-height: 360px;
	border-radius: 12px;
	background-color: #f2f2f2;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	overflow: hidden;
	will-change: background-position, background-size;
}

.dbrace-product-image__stage.is-zoomed {
	background-size: 180%;
}

.dbrace-product-image__arrow,
.dbrace-product-image__strip-arrow {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 !important;
	line-height: 1 !important;
	font-size: 0 !important;
	text-indent: 0 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	cursor: pointer !important;
}

.dbrace-product-image__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px !important;
	height: 44px !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.94) !important;
	color: #1a1816 !important;
	transform: translateY(-50%);
}

.dbrace-product-image__arrow--prev { left: 16px; }
.dbrace-product-image__arrow--next { right: 16px; }

.dbrace-product-image__arrow svg,
.dbrace-product-image__strip-arrow svg {
	display: block !important;
	width: 20px !important;
	height: 20px !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	color: inherit !important;
}

.dbrace-product-image__thumbs {
	position: relative;
	width: 100%;
	min-width: 0;
}

.dbrace-product-image__track {
	display: flex;
	gap: var(--dbrace-product-gap);
	width: 100%;
	min-width: 0;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.dbrace-product-image__track::-webkit-scrollbar { display: none; }

.dbrace-product-image__thumb {
	position: relative;
	display: block !important;
	flex: 1 0 0;
	width: auto !important;
	height: 108px !important;
	min-width: 0;
	min-height: 108px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 2px solid transparent !important;
	border-radius: 8px !important;
	background-color: #f2f2f2 !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: cover !important;
	box-shadow: none !important;
	cursor: pointer !important;
	opacity: 0.68;
	transition: border-color 0.2s ease, opacity 0.2s ease;
}

.dbrace-product-image__thumb:hover,
.dbrace-product-image__thumb.is-active {
	opacity: 1;
}

.dbrace-product-image__thumb.is-active {
	border-color: #8b2218 !important;
}

.dbrace-product-image--scrollable .dbrace-product-image__thumb {
	flex: 0 0 calc((100% - 5 * var(--dbrace-product-gap)) / 5.5);
}

.dbrace-product-image__strip-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 34px !important;
	height: 34px !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #1a1816 !important;
	transform: translateY(-50%);
}

.dbrace-product-image--scrollable .dbrace-product-image__strip-arrow { display: flex !important; }
.dbrace-product-image__strip-arrow--prev { left: -8px; }
.dbrace-product-image__strip-arrow--next { right: -8px; }
.dbrace-product-image__strip-arrow svg { width: 16px !important; height: 16px !important; }
.dbrace-product-image__strip-arrow[disabled] { display: none !important; }

.dbrace-product-image-placeholder {
	padding: 16px;
	background: #f2f2f2;
	color: #1a1816;
}

@media (max-width: 767px) {
	.dbrace-product-image { --dbrace-product-gap: 8px; }
	.dbrace-product-image__stage { height: min(92vw, 520px); min-height: 280px; }
	.dbrace-product-image__arrow { width: 38px !important; height: 38px !important; }
	.dbrace-product-image__arrow--prev { left: 10px; }
	.dbrace-product-image__arrow--next { right: 10px; }
	.dbrace-product-image__thumb { height: 82px !important; min-height: 82px !important; }
	.dbrace-product-image--scrollable .dbrace-product-image__thumb {
		flex-basis: calc((100% - 3 * var(--dbrace-product-gap)) / 3.5);
	}
}