/* Ion Slider — "Right Peek" and "Overlapping Stack" now use their own
   dedicated custom properties (not shared/reused ones), each set directly
   by Elementor's normal responsive control selectors. That's what makes
   per-breakpoint values (tablet/mobile) actually take effect — a shared
   variable computed once in PHP and inlined can't respond to breakpoints. */

.ion-slider {
	--ion-visible-slides: 3;
	--ion-gap: 20px;        /* peek style: space between fully-visible cards */
	--ion-peek-left: 0px;   /* peek style: left-edge preview width */
	--ion-peek-right: 0px;  /* peek style: right-edge preview width */
	--ion-overlap: -24px;   /* overlap style: negative = cards overlap */
	--ion-active-scale: 1;  /* overlap style: active card scale */
	--ion-transition: 450ms;

	position: relative;
	width: 100%;
}

/* Zero out the side that "Overflow Sides" doesn't apply to, regardless of
   whatever value the (now-hidden) control still holds. */
.ion-slider--sides-right { --ion-peek-left: 0px !important; }
.ion-slider--sides-left  { --ion-peek-right: 0px !important; }

.ion-slider-viewport {
	overflow: hidden;
	width: 100%;
	padding-top: 8px; /* headroom so a scaled-up active card isn't clipped */
}

.ion-slider-track {
	display: flex;
	align-items: stretch;
	will-change: transform;
	transition: transform var(--ion-transition) cubic-bezier(0.22, 1, 0.36, 1);
	cursor: grab;
}
.ion-slider-track:active {
	cursor: grabbing;
}

.ion-slide {
	position: relative;
	box-sizing: border-box;
	transition: transform var(--ion-transition) ease, z-index 0s;
	transform-origin: center bottom;
}
.ion-slide:last-child {
	margin-right: 0;
}

/* Right Peek */
.ion-slider--peek .ion-slide {
	flex: 0 0 calc(
		(100% - (var(--ion-gap) * (var(--ion-visible-slides) - 1)) - var(--ion-peek-left) - var(--ion-peek-right))
		/ var(--ion-visible-slides)
	);
	margin-right: var(--ion-gap);
}

/* Overlapping Stack */
.ion-slider--overlap .ion-slide {
	flex: 0 0 calc(
		(100% - (var(--ion-overlap) * (var(--ion-visible-slides) - 1)))
		/ var(--ion-visible-slides)
	);
	margin-right: var(--ion-overlap);
}
.ion-slider--overlap .ion-slide.is-active {
	transform: scale(var(--ion-active-scale));
	z-index: 5;
}

/* Arrows */
.ion-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #222;
	z-index: 10;
	transition: background 0.2s ease;
}
.ion-slider-arrow:hover {
	background: #f2f2f2;
}
.ion-slider-arrow:disabled {
	opacity: 0.35;
	cursor: default;
}
.ion-slider-prev {
	left: -8px;
}
.ion-slider-next {
	right: -8px;
}

/* Dots */
.ion-slider-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.ion-slider-dots button {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: #d8d8d8;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}
.ion-slider-dots button.is-active {
	background: #333;
	transform: scale(1.3);
}

@media (max-width: 767px) {
	.ion-slider-arrow {
		display: none;
	}
}
