:root {
	--mbpcg-image-ratio: 4 / 5;
	--mbpcg-image-fit: cover;
	--mbpcg-image-background: #f5f3ef;
	--mbpcg-arrow-background: rgba(255, 255, 255, 0.92);
	--mbpcg-arrow-color: #111111;
	--mbpcg-progress-color: #111111;
	--mbpcg-progress-track: rgba(17, 17, 17, 0.18);
}

.mbpcg-link {
	display: block;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.mbpcg {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
}

.mbpcg-viewport {
	position: relative;
	display: flex;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	direction: ltr;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y pinch-zoom;
	cursor: grab;
}

.mbpcg-viewport.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
}

.mbpcg-viewport::-webkit-scrollbar {
	display: none;
}

.mbpcg.is-peeking .mbpcg-viewport {
	scroll-snap-type: none;
}

.mbpcg-slide {
	position: relative;
	display: block;
	flex: 0 0 100%;
	width: 100%;
	aspect-ratio: var(--mbpcg-image-ratio);
	overflow: hidden;
	background: var(--mbpcg-image-background);
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

.mbpcg-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: var(--mbpcg-image-fit);
	object-position: center;
	transform: none;
	-webkit-user-drag: none;
	user-select: none;
}

.mbpcg-arrow {
	position: absolute;
	z-index: 4;
	top: calc(50% - 12px);
	display: grid;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	place-items: center;
	background: var(--mbpcg-arrow-background);
	color: var(--mbpcg-arrow-color);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
	cursor: pointer;
	opacity: 0;
	transform: translateY(-50%);
	transition: opacity 160ms ease, transform 160ms ease;
}

.mbpcg-arrow svg {
	display: block;
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.mbpcg-arrow--prev {
	left: 12px;
	transform: translate(-4px, -50%);
}

.mbpcg-arrow--next {
	right: 12px;
	transform: translate(4px, -50%);
}

.mbpcg:hover .mbpcg-arrow:not(.is-disabled),
.mbpcg:focus-within .mbpcg-arrow:not(.is-disabled) {
	opacity: 1;
	transform: translate(0, -50%);
}

.mbpcg-arrow.is-disabled {
	pointer-events: none;
	opacity: 0;
}

.mbpcg-arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mbpcg-progress {
	position: relative;
	display: block;
	width: 100%;
	height: 2px;
	margin-top: 0;
	overflow: hidden;
	background: var(--mbpcg-progress-track);
}

.mbpcg-progress__active {
	position: absolute;
	inset: 0 auto 0 0;
	display: block;
	width: var(--mbpcg-segment);
	background: var(--mbpcg-progress-color);
	transform: translate3d(calc(var(--mbpcg-index) * 100%), 0, 0);
	transition: transform 240ms ease;
}

.mbpcg--single .mbpcg-progress,
.mbpcg--single .mbpcg-arrow {
	display: none;
}

.mbpcg-card--navigating {
	pointer-events: none;
	cursor: progress;
	opacity: 0.5 !important;
	transition: opacity 120ms ease;
}

/* Blocksy card types use figure wrappers with different defaults. */
.products .product figure > .mbpcg-link,
.products .product figure > .mbpcg {
	width: 100%;
}

.products .product figure .mbpcg img {
	border-radius: inherit;
}

@media (max-width: 999px) {
	.mbpcg-arrow {
		display: none;
	}

}

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

	.mbpcg-arrow,
	.mbpcg-progress__active {
		transition: none;
	}
}
