/**
 * Nexta Properties — Property Slider
 * Booking.com-style with peek of next image, auto-play, zoom + lightbox.
 */

.nexta-slider {
	position: relative;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 0 24px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Manrope", sans-serif;
}

/* =================================================================
   TRACK + SLIDES
   ================================================================= */
.nexta-slider-viewport {
	position: relative;
	overflow: hidden;
	border-radius: 14px;
	aspect-ratio: 16 / 10;
	background: #0a1628;
}

.nexta-slider-track {
	display: flex;
	height: 100%;
	transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
	will-change: transform;
}

.nexta-slider-slide {
	flex: 0 0 90%;            /* main slide is 90% wide → 10% peek of next */
	height: 100%;
	padding: 0 6px;
	box-sizing: border-box;
	position: relative;
}

.nexta-slider-slide:first-child {
	padding-left: 0;
}
.nexta-slider-slide:last-child {
	padding-right: 0;
}

.nexta-slider-slide-inner {
	width: 100%;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	cursor: zoom-in;
	background: #0a1628;
	position: relative;
	transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.nexta-slider-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none; /* clicks go through to the inner wrapper */
}

/* Make non-active slides slightly darker for focus on the active one */
.nexta-slider-slide:not(.is-active) .nexta-slider-slide-inner {
	transform: scale(0.96);
	opacity: 0.7;
}
.nexta-slider-slide.is-active .nexta-slider-slide-inner {
	transform: scale(1);
	opacity: 1;
}

/* Zoomed state (after single tap) */
.nexta-slider-slide.is-zoomed .nexta-slider-slide-inner {
	cursor: zoom-out;
}
.nexta-slider-slide.is-zoomed img {
	transform: scale(1.4);
}

/* =================================================================
   NAVIGATION ARROWS
   ================================================================= */
.nexta-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transition: all 0.2s ease;
	color: #0a1628;
	padding: 0;
}
.nexta-slider-nav:hover {
	background: #fff;
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}
.nexta-slider-nav:active {
	transform: translateY(-50%) scale(0.95);
}
.nexta-slider-nav.is-prev { left: 18px; }
.nexta-slider-nav.is-next { right: 18px; }
.nexta-slider-nav svg { width: 20px; height: 20px; }
.nexta-slider-nav[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* =================================================================
   COUNTER (top-right)
   ================================================================= */
.nexta-slider-counter {
	position: absolute;
	top: 18px;
	right: 18px;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 100px;
	letter-spacing: 0.05em;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.nexta-slider-counter svg {
	width: 13px;
	height: 13px;
}

/* =================================================================
   PROGRESS BAR (auto-play indicator)
   ================================================================= */
.nexta-slider-progress {
	position: absolute;
	bottom: 12px;
	left: 16px;
	right: 16px;
	height: 3px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
	overflow: hidden;
	z-index: 5;
}
.nexta-slider-progress-bar {
	height: 100%;
	background: rgba(255, 255, 255, 0.95);
	width: 0;
	transition: width 0.1s linear;
	border-radius: 2px;
}
.nexta-slider-progress.is-paused .nexta-slider-progress-bar {
	transition: none;
}

/* =================================================================
   DOTS
   ================================================================= */
.nexta-slider-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	flex-wrap: wrap;
}
.nexta-slider-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d8d8d8;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: all 0.25s ease;
}
.nexta-slider-dot:hover {
	background: #999;
	transform: scale(1.2);
}
.nexta-slider-dot.is-active {
	width: 28px;
	border-radius: 4px;
	background: #c9a876;
}

/* Apply color override token if set */
.nexta-slider-dot.is-active {
	background: var(--nx-c-accent, #c9a876);
}

/* =================================================================
   PLAY / PAUSE BUTTON
   ================================================================= */
.nexta-slider-play {
	position: absolute;
	bottom: 16px;
	right: 18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	padding: 0;
	transition: all 0.2s ease;
}
.nexta-slider-play:hover {
	background: rgba(0, 0, 0, 0.75);
	transform: scale(1.05);
}

/* =================================================================
   FULL-SCREEN LIGHTBOX (double-tap or "expand" button)
   ================================================================= */
.nexta-slider-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	z-index: 99999;
	display: none;
	flex-direction: column;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.nexta-slider-lightbox.is-open {
	display: flex;
	opacity: 1;
}
.nexta-slider-lightbox-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	padding: calc(env(safe-area-inset-top, 0) + 16px) 18px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	z-index: 10;
	color: #fff;
	background: linear-gradient(180deg, rgba(0,0,0,0.7), transparent);
}
.nexta-slider-lightbox-counter {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.03em;
}
.nexta-slider-lightbox-close {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: none;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease;
}
.nexta-slider-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.3);
}

.nexta-slider-lightbox-track {
	flex: 1;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.nexta-slider-lightbox-track::-webkit-scrollbar { display: none; }
.nexta-slider-lightbox-slide {
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: start;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 70px 20px 90px;
}
.nexta-slider-lightbox-slide img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Lightbox arrows (desktop) */
.nexta-slider-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	transition: all 0.2s ease;
	padding: 0;
}
.nexta-slider-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.32);
	transform: translateY(-50%) scale(1.08);
}
.nexta-slider-lightbox-nav.is-prev { left: 24px; }
.nexta-slider-lightbox-nav.is-next { right: 24px; }
.nexta-slider-lightbox-nav svg { width: 22px; height: 22px; }

/* Thumbnail strip at the bottom of lightbox */
.nexta-slider-lightbox-thumbs {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0));
	background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent);
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	z-index: 5;
}
.nexta-slider-lightbox-thumbs::-webkit-scrollbar { display: none; }
.nexta-slider-lightbox-thumb {
	flex: 0 0 70px;
	width: 70px;
	height: 50px;
	border-radius: 5px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.15s ease;
	padding: 0;
	background: none;
	opacity: 0.5;
}
.nexta-slider-lightbox-thumb:hover {
	opacity: 1;
}
.nexta-slider-lightbox-thumb.is-active {
	border-color: #c9a876;
	border-color: var(--nx-c-accent, #c9a876);
	opacity: 1;
}
.nexta-slider-lightbox-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 900px) {
	.nexta-slider-slide {
		flex-basis: 86%;
		padding: 0 4px;
	}
	.nexta-slider-viewport {
		aspect-ratio: 4/3;
		border-radius: 12px;
	}
	.nexta-slider-nav {
		width: 38px;
		height: 38px;
	}
	.nexta-slider-nav.is-prev { left: 10px; }
	.nexta-slider-nav.is-next { right: 10px; }
	.nexta-slider-nav svg { width: 16px; height: 16px; }
	.nexta-slider-counter {
		font-size: 11px;
		padding: 5px 10px;
		top: 12px;
		right: 12px;
	}
	.nexta-slider-play {
		width: 32px;
		height: 32px;
		bottom: 12px;
		right: 12px;
	}
	.nexta-slider-progress {
		left: 12px;
		right: 56px;
		bottom: 16px;
	}
	.nexta-slider-dots {
		margin-top: 14px;
	}
	.nexta-slider-lightbox-nav {
		display: none;
	}
}

@media (max-width: 500px) {
	.nexta-slider-slide {
		flex-basis: 92%;
	}
	.nexta-slider-viewport {
		border-radius: 10px;
	}
}

/* Hide/show empty state */
.nexta-slider-empty {
	aspect-ratio: 16/10;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c9a876;
	background: linear-gradient(135deg, #0a1628, #1a2942);
	border-radius: 14px;
	font-size: 14px;
}
