.dealbike-gallery {
	--dealbike-gallery-primary: #ff4b00;
	width: 100%;
}

.dealbike-gallery *,
.dealbike-gallery *::before,
.dealbike-gallery *::after {
	box-sizing: border-box;
}

.dealbike-gallery__main {
	--dealbike-gallery-zoom-x: 50%;
	--dealbike-gallery-zoom-y: 50%;
	position: relative;
	display: flex;
	height: 520px;
	overflow: hidden;
	align-items: center;
	justify-content: center;
	background: #f7f7f7;
	border-radius: 4px;
}

.dealbike-gallery__main-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: scale(1);
	transform-origin: var(--dealbike-gallery-zoom-x) var(--dealbike-gallery-zoom-y);
	transition: transform 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
	.dealbike-gallery__main {
		cursor: zoom-in;
	}

	.dealbike-gallery__main.is-zoomed {
		cursor: zoom-out;
	}

	.dealbike-gallery__main.is-zoomed .dealbike-gallery__main-img {
		transform: scale(1.7);
	}
}

.dealbike-gallery__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	z-index: 2;
	padding: 10px 18px;
	border-radius: 4px;
	background: var(--dealbike-gallery-primary);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.dealbike-gallery__thumbs-row {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr) 54px;
	gap: 14px;
	align-items: stretch;
	margin-top: 22px;
}

.dealbike-gallery button.dealbike-gallery__nav {
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background-color: #fff;
	color: #111;
	cursor: pointer;
	appearance: none;
	box-shadow: none;
	font: inherit;
	font-size: 38px;
	line-height: 1;
	transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.dealbike-gallery button.dealbike-gallery__nav:hover {
	border-color: var(--dealbike-gallery-primary);
	background-color: #f7f7f7;
	color: var(--dealbike-gallery-primary);
	box-shadow: none;
}

.dealbike-gallery button.dealbike-gallery__nav:focus-visible,
.dealbike-gallery button.dealbike-gallery__thumb:focus-visible {
	outline: 3px solid var(--dealbike-gallery-primary);
	outline: 3px solid color-mix(in srgb, var(--dealbike-gallery-primary) 35%, transparent);
	outline-offset: 2px;
}

.dealbike-gallery button.dealbike-gallery__nav:disabled {
	opacity: 0.45;
	cursor: default;
}

.dealbike-gallery__thumbs {
	display: grid;
	min-width: 0;
	overflow: hidden;
	grid-auto-columns: calc((100% - 54px) / 4);
	grid-auto-flow: column;
	gap: 18px;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.dealbike-gallery__thumbs::-webkit-scrollbar {
	display: none;
}

.dealbike-gallery button.dealbike-gallery__thumb {
	height: 76px;
	min-width: 0;
	overflow: hidden;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	background: #f7f7f7;
	cursor: pointer;
	appearance: none;
	box-shadow: none;
	line-height: 0;
	transition: border-color 160ms ease;
}

.dealbike-gallery button.dealbike-gallery__thumb.is-active {
	border-color: var(--dealbike-gallery-primary);
}

.dealbike-gallery button.dealbike-gallery__thumb:hover {
	background-color: #f7f7f7;
	box-shadow: none;
}

.dealbike-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 1024px) {
	.dealbike-gallery__main {
		height: 420px;
	}

	.dealbike-gallery__thumbs {
		grid-auto-columns: calc((100% - 36px) / 4);
		gap: 12px;
	}

	.dealbike-gallery button.dealbike-gallery__thumb {
		height: 68px;
	}
}

@media (max-width: 767px) {
	.dealbike-gallery__main {
		height: 320px;
	}

	.dealbike-gallery__badge {
		top: 12px;
		left: 12px;
		padding: 8px 12px;
		font-size: 12px;
	}

	.dealbike-gallery__thumbs-row {
		grid-template-columns: 42px minmax(0, 1fr) 42px;
		gap: 8px;
		margin-top: 14px;
	}

	.dealbike-gallery button.dealbike-gallery__nav {
		font-size: 32px;
	}

	.dealbike-gallery__thumbs {
		grid-auto-columns: calc((100% - 16px) / 3);
		gap: 8px;
	}

	.dealbike-gallery button.dealbike-gallery__thumb {
		height: 60px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dealbike-gallery__thumbs {
		scroll-behavior: auto;
	}

	.dealbike-gallery__main-img {
		transition: none;
	}
}
