/* WIS Image Slider - Frontend styles */

.wis-slider {
	--wis-items-desktop: 4.3;
	--wis-items-tablet: 2.3;
	--wis-items-mobile: 1.15;
	--wis-gap: 24px;
	--wis-side-pad: clamp(20px, 3.6vw, 56px);

	position: relative;
	width: 100%;
	box-sizing: border-box;
	padding: 56px 0 40px;
	background: #faf9f5;
	outline: none;
	font-family: 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* Break fully out of the theme's boxed/contained content area so the
   slider touches both edges of the browser window.
   NOTE: we intentionally do NOT rely on raw 100vw here — 100vw includes
   the width of the vertical scrollbar, so on most desktop pages a plain
   100vw breakout overflows past the true right edge and throws the
   whole slider's left alignment off. --wis-vw is measured in JS from
   document.documentElement.clientWidth (which excludes the scrollbar)
   and kept in sync on resize; 100vw is only a fallback if JS hasn't run yet. */
.wis-slider.wis-slider--full-bleed {
	width: var(--wis-vw, 100vw) !important;
	max-width: var(--wis-vw, 100vw) !important;
	margin-left: calc(50% - (var(--wis-vw, 100vw) / 2)) !important;
	margin-right: calc(50% - (var(--wis-vw, 100vw) / 2)) !important;
}

.wis-slider *,
.wis-slider *::before,
.wis-slider *::after {
	box-sizing: border-box;
}

.wis-slider__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 32px;
	gap: 20px;
	padding: 0 var(--wis-side-pad) !important;
}

.wis-slider__heading {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wis-slider__title {
	margin: 0;
	font-weight: 800;
	font-size: clamp(30px, 3vw, 44px);
	line-height: 1;
	color: #161513;
	letter-spacing: -0.02em;
}

.wis-slider__subtitle {
	margin: 0;
	font-weight: 400;
	font-size: clamp(15px, 1.1vw, 18px);
	line-height: 1.5;
	color: #8f8a80;
	max-width: 640px;
}

.wis-slider__nav {
	display: flex;
	align-items: center;
	gap: 28px;
	flex-shrink: 0;
}

.wis-slider__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	background: transparent;
	color: #1a1a1a;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.15s ease;
	opacity: 0.85;
}

.wis-slider__arrow:hover {
	opacity: 1;
}

.wis-slider__arrow:active {
	transform: scale(0.9);
}

.wis-slider__arrow:disabled {
	opacity: 0.25;
	cursor: default;
}

.wis-slider__arrow svg {
	pointer-events: none;
	width: 24px;
	height: auto;
}

.wis-slider__viewport {
	position: relative;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	cursor: grab;

	/* hide scrollbar cross-browser */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.wis-slider__viewport--dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	user-select: none;
	-webkit-user-select: none;
}

.wis-slider__viewport--dragging .wis-slide__image {
	transform: none !important;
}

.wis-slider__viewport::-webkit-scrollbar {
	display: none;
	height: 0;
}

.wis-slider__track {
	display: flex;
	align-items: flex-start;
	gap: var(--wis-gap);
	width: 100%;
	padding: 0;
	margin: 0;
}

/* Guarantees the left gutter as a real generated box in the flex flow
   (not CSS padding, and not an empty DOM element), so a theme's "full
   width row" styles, Gutenberg alignfull resets, or a global
   `:empty { display:none }` rule can't strip it out. */
.wis-slider__track::before {
	content: '';
	display: block;
	flex: 0 0 auto;
	width: max( 0px, calc( var(--wis-side-pad) - var(--wis-gap) ) );
	height: 1px;
}

.wis-slide {
	flex: 0 0 auto;
	width: calc((100% - var(--wis-side-pad) - (var(--wis-items-mobile) - 1) * var(--wis-gap)) / var(--wis-items-mobile));
}

@media (min-width: 700px) {
	.wis-slide {
		width: calc((100% - var(--wis-side-pad) - (var(--wis-items-tablet) - 1) * var(--wis-gap)) / var(--wis-items-tablet));
	}
}

@media (min-width: 1100px) {
	.wis-slide {
		width: calc((100% - var(--wis-side-pad) - (var(--wis-items-desktop) - 1) * var(--wis-gap)) / var(--wis-items-desktop));
	}
}

.wis-slide__link {
	display: block;
	color: inherit;
	text-decoration: none;
	outline: none;
	-webkit-user-drag: none;
	user-drag: none;
}

.wis-slide__image {
	-webkit-user-drag: none;
	user-drag: none;
}

.wis-slide__image-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #e9e4da;
}

.wis-slide__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transform: scale(1);
	transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.wis-slide:hover .wis-slide__image,
.wis-slide__link:focus-visible .wis-slide__image {
	transform: scale(1.06);
}

.wis-slide__content {
	margin-top: 20px;
}

.wis-slide__title {
	margin: 0;
	font-weight: 700;
	font-size: clamp(22px, 1.9vw, 30px);
	line-height: 1.2;
	color: #161513;
	letter-spacing: -0.01em;
}

.wis-slide__desc {
	margin: 4px 0 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	color: #9a968d;
}

.wis-slide__hover-text {
	margin: 0;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #161513;
	transition: max-height 0.35s ease, opacity 0.3s ease, margin-top 0.35s ease;
}

.wis-slide:hover .wis-slide__hover-text,
.wis-slide__link:focus-visible .wis-slide__hover-text {
	max-height: 40px;
	opacity: 1;
	margin-top: 10px;
}

@media (max-width: 600px) {
	.wis-slider {
		padding: 36px 0 28px;
	}

	.wis-slider__title {
		font-size: 26px;
	}

	.wis-slider__nav {
		gap: 18px;
	}
}
