/* ==========================================================================
   Prestige Detailing — image slider (pd-slider)
   Figma "Group 1261154725" 12:2104 (698 × 836) on Services / Packages.
   Rendered inside #wrap_all, so every rule is paired:
   ".pd-sl .x" + "#top #wrap_all .pd-sl .x". Tokens-only rules are not.
   Vendor sheet (css/vendor/splide-core.min.css) loads first; pre-mount rules
   sit behind .pd-sl:not(.pd-sl--ready) so the two cannot fight.
   ========================================================================== */

/* ---------- Tokens (ramps: 375 → 1728) ---------- */
.pd-sl {
	--pd-sl-dark: #161414;
	--pd-sl-red: #d60c0c;
	--pd-sl-white: #fff;
	--pd-sl-btn: clamp(44px, calc(40.674px + 0.8869vw), 56px);    /* 56 @ 1728 */
	--pd-sl-inset: clamp(12px, calc(9.783px + 0.5913vw), 20px);   /* 20 @ 1728 */
	--pd-sl-icon: 24px;
	--pd-sl-ratio: 698 / 836;
	--pd-sl-focus: 50% 50%;

	/* Margins: inline --pd-sl-mt / --pd-sl-mb from the panel; the ramp only writes -now */
	--pd-sl-mt-now: var(--pd-sl-mt, 0px);
}

@media (max-width: 1199px) {
	.pd-sl.pd-sl--scale { --pd-sl-mt-now: calc(var(--pd-sl-mt, 0px) * 0.75); }
}
@media (max-width: 899px) {
	.pd-sl.pd-sl--scale { --pd-sl-mt-now: calc(var(--pd-sl-mt, 0px) * 0.6); }
}

/* Ratio select — one block per choice (pd_sl_ratios()) */
.pd-sl.pd-sl--r-portrait  { --pd-sl-ratio: 698 / 836; }
.pd-sl.pd-sl--r-square    { --pd-sl-ratio: 1 / 1; }
.pd-sl.pd-sl--r-landscape { --pd-sl-ratio: 4 / 3; }
.pd-sl.pd-sl--r-wide      { --pd-sl-ratio: 16 / 9; }

/* Image focus select */
.pd-sl.pd-sl--pos-top    { --pd-sl-focus: 50% 0%; }
.pd-sl.pd-sl--pos-center { --pd-sl-focus: 50% 50%; }
.pd-sl.pd-sl--pos-bottom { --pd-sl-focus: 50% 100%; }

/* ---------- Root ---------- */
.pd-sl,
#top #wrap_all .pd-sl {
	position: relative;
	display: block;
	width: 100%;
	margin-top: var(--pd-sl-mt-f, var(--pd-sl-mt-now));
	margin-bottom: var(--pd-sl-mb, 0px);
}

.pd-sl *,
#top #wrap_all .pd-sl * {
	box-sizing: border-box;
}

.pd-sl .pd-sl__splide,
#top #wrap_all .pd-sl .pd-sl__splide {
	position: relative;
}

/* ---------- Track + slides ---------- */
.pd-sl .pd-sl__list,
#top #wrap_all .pd-sl .pd-sl__list {
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
	list-style-type: none;
}

.pd-sl .pd-sl__slide,
#top #wrap_all .pd-sl .pd-sl__slide {
	margin-left: 0;
	padding-top: 0;
	padding-bottom: 0;
	list-style-type: none;
	aspect-ratio: var(--pd-sl-ratio);
	overflow: hidden;
	background-color: var(--pd-sl-dark);
}

.pd-sl .pd-sl__img,
#top #wrap_all .pd-sl .pd-sl__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin-top: 0;
	margin-bottom: 0;
	border-radius: 0;
	object-fit: cover;
	object-position: var(--pd-sl-focus);
}

/* Before Splide mounts (and for a single image): first slide only, full width */
.pd-sl:not(.pd-sl--ready) .pd-sl__slide,
#top #wrap_all .pd-sl:not(.pd-sl--ready) .pd-sl__slide {
	width: 100%;
}

.pd-sl:not(.pd-sl--ready) .pd-sl__slide + .pd-sl__slide,
#top #wrap_all .pd-sl:not(.pd-sl--ready) .pd-sl__slide + .pd-sl__slide {
	display: none;
}

.pd-sl:not(.pd-sl--ready) .pd-sl__arrows,
#top #wrap_all .pd-sl:not(.pd-sl--ready) .pd-sl__arrows {
	visibility: hidden;
}

/* ---------- Arrows: 56 squares, 20 in from the sides, centred ---------- */
.pd-sl .pd-sl__arrows,
#top #wrap_all .pd-sl .pd-sl__arrows {
	position: absolute;
	top: 50%;
	left: var(--pd-sl-inset);
	right: var(--pd-sl-inset);
	display: flex;
	justify-content: space-between;
	align-items: center;
	transform: translateY(-50%);
	pointer-events: none;
}

.pd-sl .pd-sl__arrow,
#top #wrap_all .pd-sl .pd-sl__arrow {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: var(--pd-sl-btn);
	height: var(--pd-sl-btn);
	min-width: 0;
	margin-top: 0;
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding-top: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
	border-width: 0;
	border-style: none;
	border-radius: 0;
	box-shadow: none;
	background-image: none;
	background-color: var(--pd-sl-red);
	color: var(--pd-sl-white);
	cursor: pointer;
	pointer-events: auto;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.pd-sl .pd-sl__arrow--prev,
#top #wrap_all .pd-sl .pd-sl__arrow--prev {
	background-color: var(--pd-sl-white);
	color: var(--pd-sl-dark);
}

@media (hover: hover) {
	.pd-sl .pd-sl__arrow:hover:not(:disabled),
	#top #wrap_all .pd-sl .pd-sl__arrow:hover:not(:disabled) {
		background-color: var(--pd-sl-dark);
		color: var(--pd-sl-white);
	}
}

.pd-sl .pd-sl__arrow:focus-visible,
#top #wrap_all .pd-sl .pd-sl__arrow:focus-visible {
	background-color: var(--pd-sl-dark);
	color: var(--pd-sl-white);
	outline: 2px solid var(--pd-sl-white);
	outline-offset: -6px;
}

.pd-sl .pd-sl__arrow:disabled,
#top #wrap_all .pd-sl .pd-sl__arrow:disabled {
	opacity: 0.4;
	cursor: default;
}

/* The exported lucide chevron, painted in currentColor */
.pd-sl .pd-sl__chev,
#top #wrap_all .pd-sl .pd-sl__chev {
	display: block;
	flex: 0 0 auto;
	width: var(--pd-sl-icon);
	height: var(--pd-sl-icon);
	background-color: currentColor;
	-webkit-mask-image: url("../img/chevron-right.svg");
	mask-image: url("../img/chevron-right.svg");
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.pd-sl .pd-sl__arrow--prev .pd-sl__chev,
#top #wrap_all .pd-sl .pd-sl__arrow--prev .pd-sl__chev {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.pd-sl .pd-sl__arrow,
	#top #wrap_all .pd-sl .pd-sl__arrow {
		transition: none;
	}
}
