.celestia-scroll-showcase {
	--celestia-scroll-showcase-progress: 0;
	--celestia-scroll-showcase-sticky-top: 0px;
	--celestia-scroll-showcase-item-width: var(--celestia-scroll-showcase-item-width-desktop, 190px);
	--celestia-scroll-showcase-product-height: var(--celestia-scroll-showcase-product-height-desktop, 240px);
	--celestia-scroll-showcase-gap: var(--celestia-scroll-showcase-gap-desktop, 110px);
	--gp-conveyor-baseline-inset: 20px;
	--gp-conveyor-content-gutter: var(--celestia-content-gutter-desktop, 64px);
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	min-width: 0;
	isolation: isolate;
}

.celestia-scroll-showcase--scene-full {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.celestia-scroll-showcase--scene-contained {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.celestia-scroll-showcase *,
.celestia-scroll-showcase *::before,
.celestia-scroll-showcase *::after {
	box-sizing: border-box;
}

.celestia-scroll-showcase__stage {
	position: relative;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	width: 100%;
	min-height: calc(var(--celestia-scroll-showcase-scene-height, 100svh) - var(--celestia-scroll-showcase-sticky-top, 0px));
	background: inherit;
}

.celestia-scroll-showcase.has-no-scene-heading .celestia-scroll-showcase__stage {
	grid-template-rows: minmax(0, 1fr);
}

.celestia-scroll-showcase.is-pinned .celestia-scroll-showcase__stage {
	position: sticky;
	top: var(--celestia-scroll-showcase-sticky-top, 0px);
	z-index: 1;
}

.gp-conveyor__heading {
	position: relative;
	z-index: 10;
	display: flex;
	justify-content: center;
	width: 100%;
	padding-block: clamp(2rem, 5.5svh, 4.5rem) clamp(1.25rem, 2.8svh, 2.25rem);
	padding-inline: var(--gp-conveyor-content-gutter);
	text-align: center;
}

.gp-conveyor__heading-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(100%, 780px);
}

.gp-conveyor__kicker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 0 clamp(0.8rem, 1.5vw, 1.2rem);
	color: var(--wp--preset--color--champagne-gold, #b79545);
	font-size: clamp(0.7rem, 0.8vw, 0.8rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.gp-conveyor__kicker > span {
	display: block;
	width: 0.38rem;
	height: 0.38rem;
	background: currentColor;
}

.gp-conveyor__scene-title {
	max-width: 18ch;
	margin: 0;
	color: var(--wp--preset--color--industrial-black, #121416);
	font-size: clamp(2.45rem, 4.2vw, 4.4rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.055em;
	text-wrap: balance;
}

.gp-conveyor__scene-description {
	max-width: 62ch;
	margin-top: clamp(1rem, 1.9vw, 1.55rem);
	color: color-mix(in srgb, currentColor 58%, transparent);
	font-size: clamp(0.96rem, 1.1vw, 1.08rem);
	line-height: 1.65;
	text-wrap: balance;
}

.gp-conveyor__scene-description p {
	margin: 0;
}

.gp-conveyor__scene {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 0;
	overflow: clip;
	isolation: isolate;
}

.celestia-scroll-showcase__viewport {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	bottom: calc(var(--gp-conveyor-height, 132px) - var(--gp-conveyor-baseline-inset, 20px));
	z-index: 4;
	height: calc(var(--celestia-scroll-showcase-product-height) + 88px);
	overflow: visible;
	overscroll-behavior-inline: contain;
	scrollbar-width: none;
}

.celestia-scroll-showcase__viewport::-webkit-scrollbar {
	display: none;
}

.celestia-scroll-showcase__viewport:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -4px;
}

.celestia-scroll-showcase__track {
	display: flex;
	align-items: flex-end;
	gap: var(--celestia-scroll-showcase-gap);
	width: max-content;
	min-width: 100%;
	height: 100%;
	will-change: transform;
}

.celestia-scroll-showcase__item {
	position: relative;
	display: flex;
	flex: 0 0 var(--celestia-scroll-showcase-item-width);
	flex-direction: column;
	justify-content: flex-end;
	width: var(--celestia-scroll-showcase-item-width);
	min-width: 0;
	opacity: var(--celestia-scroll-showcase-inactive-opacity, 0.42);
	transform: translateY(var(--gp-conveyor-product-sink, 6px)) scale(var(--celestia-scroll-showcase-inactive-scale, 0.9));
	transform-origin: center bottom;
	transition: opacity 280ms ease, transform 440ms cubic-bezier(0.22, 1, 0.36, 1), filter 280ms ease;
	will-change: transform, opacity;
}

.celestia-scroll-showcase__item:first-child,
.celestia-scroll-showcase__item.is-active {
	z-index: 6;
	opacity: 1;
	transform: translateY(var(--gp-conveyor-product-sink, 6px)) scale(1.06);
}

.celestia-scroll-showcase__item-link {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	color: inherit;
	text-decoration: none;
}

.celestia-scroll-showcase__body {
	order: -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	min-height: 2.25rem;
	margin-bottom: clamp(0.45rem, 0.9vw, 0.75rem);
	padding: 0;
	text-align: center;
}

.celestia-scroll-showcase--align-left .celestia-scroll-showcase__body {
	align-items: flex-start;
	text-align: left;
}

.celestia-scroll-showcase--align-right .celestia-scroll-showcase__body {
	align-items: flex-end;
	text-align: right;
}

.celestia-scroll-showcase__eyebrow {
	font-size: 0.67rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	opacity: 0.58;
}

.celestia-scroll-showcase__title,
.celestia-scroll-showcase__description {
	margin: 0;
}

.celestia-scroll-showcase__title {
	max-width: 20ch;
	font-size: clamp(0.72rem, 0.8vw, 0.84rem);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0.035em;
	text-transform: uppercase;
	text-wrap: balance;
}

.celestia-scroll-showcase__description {
	max-width: 26ch;
	font-size: 0.78rem;
	line-height: 1.45;
	opacity: 0.68;
}

.celestia-scroll-showcase__action {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	color: inherit;
	font-size: 0.74rem;
	font-weight: 700;
	text-decoration: none;
}

.celestia-scroll-showcase__media {
	position: relative;
	width: 100%;
	height: var(--celestia-scroll-showcase-product-height);
	margin: 0;
	overflow: visible;
	background: transparent;
}

.celestia-scroll-showcase__media::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -3px;
	z-index: -1;
	width: 76%;
	height: 15px;
	border-radius: 50%;
	background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.13) 46%, transparent 74%);
	filter: blur(3px);
	transform: translateX(-50%);
	opacity: 0.7;
}

.celestia-scroll-showcase__image,
.celestia-scroll-showcase__media-placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

.celestia-scroll-showcase__image {
	object-position: center bottom;
	filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.16));
	user-select: none;
	-webkit-user-drag: none;
}

.celestia-scroll-showcase--fit-contain .celestia-scroll-showcase__image,
.celestia-scroll-showcase__media--fit-contain .celestia-scroll-showcase__image {
	object-fit: contain;
}

.celestia-scroll-showcase--fit-cover .celestia-scroll-showcase__image,
.celestia-scroll-showcase__media--fit-cover .celestia-scroll-showcase__image {
	object-fit: cover;
}

.celestia-scroll-showcase__media-placeholder {
	background:
		linear-gradient(135deg, color-mix(in srgb, currentColor 4%, transparent), color-mix(in srgb, currentColor 10%, transparent)),
		repeating-linear-gradient(45deg, transparent 0 16px, color-mix(in srgb, currentColor 6%, transparent) 16px 17px);
}

.gp-conveyor__machine {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: grid;
	grid-template-rows: 8% 44% 8% 40%;
	height: var(--gp-conveyor-height, 132px);
	pointer-events: none;
	filter: drop-shadow(0 18px 16px rgba(0, 0, 0, 0.12));
}

.gp-conveyor__rail {
	position: relative;
	z-index: 3;
	min-height: 6px;
	background: linear-gradient(180deg, #fff 0%, #dcdcdc 22%, #f6f6f6 48%, #b7b9bc 74%, #e9e9ea 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.gp-conveyor__rail--top {
	border-top: 1px solid var(--wp--preset--color--champagne-gold, #d0bd8e);
}

.gp-conveyor__rail--top::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 43%;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent);
}

.gp-conveyor__rail--bottom::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 36%;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent);
}

.gp-conveyor__belt {
	position: relative;
	z-index: 2;
	overflow: hidden;
	background: #15171a;
}

.gp-conveyor__belt::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, transparent 14%, transparent 78%, rgba(0, 0, 0, 0.55) 100%);
}

.gp-conveyor__belt-surface {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 18%, transparent 72%, rgba(0, 0, 0, 0.36) 100%),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0%, transparent 18%, rgba(0, 0, 0, 0.16) 55%, rgba(255, 255, 255, 0.025) 100%),
		#17191c;
}

.gp-conveyor__frame {
	position: relative;
	display: flex;
	align-items: center;
	z-index: 1;
	background: linear-gradient(180deg, #d3d6d9 0%, #a4a8ac 55%, #8d9195 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.16);
}

.gp-conveyor__frame::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%, rgba(0, 0, 0, 0.08));
}

.gp-conveyor__rivets {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	width: 100%;
	padding-inline: 6%;
}

.gp-conveyor__rivets span {
	display: block;
	width: clamp(9px, 1vw, 18px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle at 32% 30%, #f5f5f5, #c7c9cb 45%, #7d8083 100%);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.gp-conveyor__edge-fade {
	display: none;
	position: absolute;
	inset: 0 0 var(--gp-conveyor-height, 132px);
	z-index: 8;
	pointer-events: none;
}

.celestia-scroll-showcase.has-side-fade .gp-conveyor__edge-fade {
	display: block;
}

.gp-conveyor__edge-fade::before,
.gp-conveyor__edge-fade::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: var(--celestia-scroll-showcase-fade-width, 10vw);
}

.gp-conveyor__edge-fade::before {
	left: 0;
	background: linear-gradient(90deg, var(--wp--preset--color--base, #fff), color-mix(in srgb, var(--wp--preset--color--base, #fff) 78%, transparent) 35%, transparent);
}

.gp-conveyor__edge-fade::after {
	right: 0;
	background: linear-gradient(270deg, var(--wp--preset--color--base, #fff), color-mix(in srgb, var(--wp--preset--color--base, #fff) 78%, transparent) 35%, transparent);
}

.celestia-scroll-showcase__progress {
	position: absolute;
	left: 50%;
	bottom: calc(var(--gp-conveyor-height, 132px) + 14px);
	z-index: 9;
	width: min(220px, 42vw);
	height: 2px;
	overflow: hidden;
	background: color-mix(in srgb, currentColor 16%, transparent);
	transform: translateX(-50%);
}

.celestia-scroll-showcase__progress-value {
	display: block;
	width: 100%;
	height: 100%;
	background: currentColor;
	transform: scaleX(var(--celestia-scroll-showcase-progress, 0));
	transform-origin: left center;
	will-change: transform;
}

@media (max-width: 1080px) {
	.celestia-scroll-showcase {
		--celestia-scroll-showcase-item-width: var(--celestia-scroll-showcase-item-width-tablet, 170px);
		--celestia-scroll-showcase-product-height: var(--celestia-scroll-showcase-product-height-tablet, 210px);
		--celestia-scroll-showcase-gap: var(--celestia-scroll-showcase-gap-tablet, 64px);
	}
}

@media (max-width: 781px) {
	.celestia-scroll-showcase {
		--gp-conveyor-content-gutter: var(--celestia-content-gutter-mobile, 24px);
		--celestia-scroll-showcase-item-width: min(var(--celestia-scroll-showcase-item-width-mobile, 150px), 58vw);
		--celestia-scroll-showcase-product-height: var(--celestia-scroll-showcase-product-height-mobile, 180px);
		--celestia-scroll-showcase-gap: var(--celestia-scroll-showcase-gap-mobile, 36px);
		height: auto !important;
	}

	.celestia-scroll-showcase__stage,
	.celestia-scroll-showcase.is-pinned .celestia-scroll-showcase__stage {
		position: relative;
		top: auto;
		display: block;
		min-height: 0;
	}

	.gp-conveyor__heading {
		padding-top: clamp(2.5rem, 10vw, 4.5rem);
		padding-bottom: 1.5rem;
	}

	.gp-conveyor__scene-title {
		font-size: clamp(2.25rem, 10.5vw, 3.55rem);
	}

	.gp-conveyor__scene {
		min-height: calc(var(--celestia-scroll-showcase-product-height) + var(--gp-conveyor-height, 132px) + 105px);
	}

	.celestia-scroll-showcase__viewport {
		/* Keep the horizontal scroller vertically locked, but extend its clipping
		 * box below the product baseline. The compensating track padding leaves
		 * every product in the same visual position while preserving its lower
		 * edge and drop shadow. */
		--gp-conveyor-mobile-vertical-bleed: max(36px, calc(var(--gp-conveyor-product-sink, 6px) + 30px));
		bottom: calc(var(--gp-conveyor-height, 132px) - var(--gp-conveyor-baseline-inset, 20px) - var(--gp-conveyor-mobile-vertical-bleed));
		height: calc(var(--celestia-scroll-showcase-product-height) + 84px + var(--gp-conveyor-mobile-vertical-bleed));
		overflow-x: auto;
		/* `overflow-y: visible` computes to `auto` when the other axis scrolls,
		 * which let the products be dragged vertically on touch devices. */
		overflow-y: hidden;
		overscroll-behavior-block: auto;
		/* Vertical gestures keep scrolling the page. Horizontal touch dragging is
		 * handled by the scene script so it remains reliable inside clipped layouts. */
		touch-action: pan-y pinch-zoom;
		scroll-padding-inline: max(0px, calc((var(--gp-conveyor-viewport-width, 100vw) - var(--celestia-scroll-showcase-item-width)) / 2));
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
	}

	.celestia-scroll-showcase__viewport.is-dragging {
		scroll-snap-type: none;
	}

	.gp-conveyor-scene:not(.is-pinned) .celestia-scroll-showcase__track,
	.celestia-scroll-showcase:not(.gp-conveyor-track) .celestia-scroll-showcase__track {
		padding-inline: max(0px, calc((var(--gp-conveyor-viewport-width, 100vw) - var(--celestia-scroll-showcase-item-width)) / 2));
		padding-bottom: var(--gp-conveyor-mobile-vertical-bleed);
		transform: none !important;
	}

	.gp-conveyor-scene.is-pinned .celestia-scroll-showcase__viewport {
		overflow-x: hidden;
		scroll-snap-type: none;
	}

	.gp-conveyor-scene.is-pinned .celestia-scroll-showcase__track {
		padding-inline: 0;
		padding-bottom: var(--gp-conveyor-mobile-vertical-bleed);
	}

	.celestia-scroll-showcase__item {
		scroll-snap-align: center;
	}

	.celestia-scroll-showcase__item:not(.is-active) {
		opacity: max(var(--celestia-scroll-showcase-inactive-opacity, 0.42), 0.58);
		transform: translateY(var(--gp-conveyor-product-sink, 6px)) scale(max(var(--celestia-scroll-showcase-inactive-scale, 0.9), 0.94));
	}

	.gp-conveyor__edge-fade {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.celestia-scroll-showcase__item,
	.celestia-scroll-showcase__track,
	.celestia-scroll-showcase__progress-value {
		transition: none !important;
	}
}

.celestia-scroll-showcase[data-active-index] .celestia-scroll-showcase__item:first-child:not(.is-active) {
	opacity: var(--celestia-scroll-showcase-inactive-opacity, 0.42);
	transform: translateY(var(--gp-conveyor-product-sink, 6px)) scale(var(--celestia-scroll-showcase-inactive-scale, 0.9));
	z-index: auto;
}

/* Split GP Conveyor architecture: the track lives inside GP Conveyor Scene. */
.gp-conveyor-track {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: clip;
	min-height: calc(var(--celestia-scroll-showcase-product-height) + var(--gp-conveyor-height, 132px) + 92px);
	margin-top: auto;
}

.gp-conveyor-track .gp-conveyor__scene {
	height: 100%;
	min-height: inherit;
}

@media (max-width: 781px) {
	.gp-conveyor-track {
		min-height: calc(var(--celestia-scroll-showcase-product-height) + var(--gp-conveyor-height, 132px) + 105px);
	}
}
