/**
 * Kubota Europe full-bleed product hero slider (WPBakery element
 * `vc_kbeu_product_slider`).
 *
 * Figma node 4595-1687 "Promotion/NewProduct": a full-width cover (image or
 * video) with a blurred dark "glass" card over its left side (product title, a
 * turquoise division/category tag, subtitle and a turquoise "Discover more"
 * button), circular prev/next controls on the left and right edges and small
 * pagination dots at the bottom. Slides change with the same gentle opacity
 * crossfade as the other plugin sliders (`.is-fading`), kept even under
 * `prefers-reduced-motion`.
 *
 * Font "Inter" comes from the plugin's fonts stylesheet (this
 * handle depends on `kbeu-fonts`), referenced through `--kbeu-font-principal`.
 */

.kbeu-product-slider {
	--kbeu-ps-teal: var( --kbeu-color-teal );
	--kbeu-ps-teal-dark: var( --kbeu-color-teal-dark );
	position: relative;
	/* Break out of the page container to run edge to edge. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc( 50% - 50vw );
	margin-right: calc( 50% - 50vw );
	font-family: var( --kbeu-font-principal );
	color: #fff;
}

.kbeu-product-slider__stage {
	position: relative;
}

.kbeu-product-slider__viewport {
	overflow: hidden;
	transition: opacity 0.3s ease;
}

.kbeu-product-slider__viewport.is-fading {
	opacity: 0;
}

.kbeu-product-slider__track {
	display: flex;
	will-change: transform;
}

.kbeu-product-slider__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
}

/* --- Cover (background image / video) -------------------------------------- */

.kbeu-product-slider__media {
	position: relative;
	width: 100%;
	height: clamp( 480px, 42vw, 760px );
}

.kbeu-product-slider__img,
.kbeu-product-slider__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kbeu-product-slider__img--empty {
	background: var( --kbeu-color-border );
}

/* --- Glass card (left overlay) -------------------------------------------- */

.kbeu-product-slider__card {
	position: absolute;
	left: clamp( 16px, 9vw, 180px );
	top: 50%;
	transform: translateY( -50% );
	z-index: 2;
	max-width: min( 90%, 640px );
	padding: clamp( 22px, 2.4vw, 40px ) clamp( 24px, 3vw, 56px );
	border-radius: 29px;
	background: rgba( 0, 0, 0, 0.27 );
	-webkit-backdrop-filter: blur( 3.5px );
	backdrop-filter: blur( 3.5px );
}

.kbeu-product-slider__heading {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: clamp( 12px, 1.4vw, 20px );
}

.kbeu-product-slider__title {
	margin: 0;
	font-weight: 700;
	font-size: clamp( 24px, 2.6vw, 32px );
	line-height: 1.37;
	color: #fff;
}

.kbeu-product-slider__tag {
	display: inline-block;
	padding: 8px 16px 5px;
	border-radius: 7px;
	background: var( --kbeu-ps-teal );
	color: #fff;
	font-weight: 300;
	font-size: clamp( 15px, 1.3vw, 20px );
	line-height: 1;
	white-space: nowrap;
}

.kbeu-product-slider__subtitle {
	margin: clamp( 10px, 1.2vw, 16px ) 0 0;
	max-width: 720px;
	font-weight: 300;
	font-size: clamp( 16px, 1.3vw, 20px );
	line-height: 1.5;
	color: #fff;
}

/* Button row: the "Discover more" CTA plus the optional "Find a dealer" button. */
.kbeu-product-slider__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp( 12px, 1.2vw, 18px );
	margin-top: clamp( 16px, 1.8vw, 26px );
}

/* Both buttons share the plugin's standard shape via `.kbeu-btn`; the primary
   CTA adds `.kbeu-btn--primary` (blue fill), while the outline variant below
   overrides the fill for a white outline over the cover. */

/* Secondary "Find a dealer" button: white outline over the cover (Figma 4595-1713). */
.kbeu-product-slider__cta--outline {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.kbeu-product-slider__cta--outline:hover,
.kbeu-product-slider__cta--outline:focus {
	background: #fff;
	border-color: #fff;
	color: #000;
}

/* --- Circular prev/next controls (edges) ---------------------------------- */

.kbeu-product-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp( 44px, 3.6vw, 54px );
	height: clamp( 44px, 3.6vw, 54px );
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	cursor: pointer;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.kbeu-product-slider__arrow svg {
	display: block;
	width: 100%;
	height: 100%;
}

.kbeu-product-slider__arrow--prev {
	left: clamp( 12px, 3vw, 52px );
}

.kbeu-product-slider__arrow--next {
	right: clamp( 12px, 3vw, 52px );
}

.kbeu-product-slider__arrow:hover {
	color: var( --kbeu-ps-teal );
}

.kbeu-product-slider__arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* --- Pagination dots ------------------------------------------------------- */

.kbeu-product-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: clamp( 18px, 2vw, 34px );
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.kbeu-product-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.5 );
	cursor: pointer;
	transition: width 0.2s ease, background-color 0.2s ease;
}

.kbeu-product-slider__dot:hover {
	background: rgba( 255, 255, 255, 0.8 );
}

.kbeu-product-slider__dot.is-active {
	width: 28px;
	border-radius: 5px;
	background: #fff;
}

.kbeu-product-slider__dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

/* --- Responsive ------------------------------------------------------------ */

@media ( max-width: 782px ) {
	.kbeu-product-slider__media {
		height: clamp( 420px, 92vw, 560px );
	}

	.kbeu-product-slider__card {
		left: 16px;
		right: 16px;
		top: auto;
		bottom: clamp( 64px, 16vw, 104px );
		transform: none;
		max-width: none;
		padding: 20px 22px;
		border-radius: 20px;
	}

	.kbeu-product-slider__arrow {
		top: 38%;
	}

	.kbeu-product-slider__arrow--prev {
		left: 10px;
	}

	.kbeu-product-slider__arrow--next {
		right: 10px;
	}

	.kbeu-product-slider__dots {
		bottom: clamp( 20px, 6vw, 34px );
	}
}

/* Respect reduced-motion: only the gentle opacity crossfade remains (via CSS). */
@media ( prefers-reduced-motion: reduce ) {
	.kbeu-product-slider__arrow,
	.kbeu-product-slider__dot {
		transition: none;
	}
}
