/* Nissan sliders — replaces Slider Revolution 5 with the same geometry and styles.
 * Grid levels (like the original): desktop > 778px, tablet 481–778px, phone <= 480px.
 * The grid (stage) is centered and scaled by --s (set by nissan-slider.js). */

.ns-slider {
	--gw: var(--gdw);
	--gh: var(--gdh);
	--s: 1;
	position: relative;
	width: 100%;
	height: calc(var(--gh) * var(--s));
	overflow: hidden;
	background: #000;
	font-family: "Open Sans", sans-serif;
	-webkit-font-smoothing: antialiased;
}
@media only screen and (max-width: 778px) {
	.ns-slider { --gw: var(--gtw); --gh: var(--gth); }
}
@media only screen and (max-width: 480px) {
	.ns-slider { --gw: var(--gmw); --gh: var(--gmh); }
}

/* ---------- slides (fade) ---------- */
.ns-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s ease, visibility 0s linear .4s;
}
.ns-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity .4s ease;
}

/* background picture: cover, centered (strong rules: some site CSS forces img height:auto) */
.ns-slider img.ns-bg {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	object-fit: cover !important;
	object-position: center center;
}

/* ---------- stage = original grid, centered & scaled ---------- */
.ns-stage {
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--gw);
	height: var(--gh);
	transform: translateX(-50%) scale(var(--s));
	transform-origin: 50% 0;
	z-index: 2;
}

/* ---------- layers ---------- */
.ns-l {
	--x: var(--dx);
	--y: var(--dy);
	--fs: var(--ds);
	position: absolute;
	left: var(--x);
	top: var(--y);
	font-size: var(--fs);
	font-family: "Open Sans", sans-serif;
	font-weight: 400;
	color: #fff;
	white-space: nowrap;
	text-align: left;
	margin: 0;
}
@media only screen and (max-width: 778px) {
	.ns-l { --x: var(--tx); --y: var(--ty); --fs: var(--ts); }
	.ns-l.ns-hide-t { display: none; }
}
@media only screen and (max-width: 480px) {
	.ns-l { --x: var(--mx); --y: var(--my); --fs: var(--ms); }
	.ns-l.ns-hide-t { display: block; }
	.ns-l.ns-hide-m { display: none; }
}
.ns-l a,
.ns-l span {
	text-decoration: none;
}

/* text styles (values from the original slides) */
.ns-l--band {
	background: rgba(10, 10, 10, .8);
	line-height: 60px;
}
.ns-l--band-light {
	background: rgba(10, 9, 9, .8);
	font-weight: 300;
	line-height: 40px;
}
.ns-l--band-padded {
	background: rgba(0, 0, 0, .85);
	padding: 10px;
	line-height: 60px;
}
.ns-l--band-padded-light {
	background: rgba(0, 0, 0, .85);
	padding: 10px;
	font-weight: 300;
	line-height: 40px;
}
.ns-l--band-red {
	background: rgba(10, 10, 10, .8);
	color: #ff1000;
	line-height: 1;
}
.ns-l--price {
	color: #ff1000;
	font-weight: 600;
	line-height: 60px;
}
.ns-l--cta {
	background: #c3092e;
	padding: 12px 35px;
	line-height: 30px;
}
.ns-l--cta a,
.ns-l--cta span {
	color: #fff;
}
.ns-l--cta:hover {
	background: #a30027;
}
.ns-l--band a, .ns-l--band-light a, .ns-l--band-padded a, .ns-l--band-padded-light a {
	color: #fff;
}
.ns-l--band-red a, .ns-l--price a {
	color: #ff1000;
}
/* red / grey buttons: the theme's own .slider_button / .button2 styles apply to the link */
.ns-l--red,
.ns-l--grey {
	line-height: 22px;
}

/* layers slide in from the left, like the original ("sfl", 1.5 s) */
@keyframes ns-in {
	from { opacity: 0; transform: translateX(-50px); }
	to   { opacity: 1; transform: none; }
}
.ns-slide.is-active .ns-l {
	animation: ns-in 1.5s cubic-bezier(.22, .61, .36, 1) var(--delay, 0s) both;
}

/* ---------- arrows: dark 40px squares, 20px from the edge ---------- */
.ns-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, .5);
	cursor: pointer;
	transition: background .3s, opacity .3s;
}
.ns-arrow:hover,
.ns-arrow:focus-visible {
	background: #000;
}
.ns-arrow::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-top: 1.5px solid #fff;
	border-right: 1.5px solid #fff;
}
.ns-prev { left: 20px; }
.ns-next { right: 20px; }
.ns-prev::after { transform: translate(-25%, -50%) rotate(-135deg); }
.ns-next::after { transform: translate(-75%, -50%) rotate(45deg); }

/* ---------- dots: "uranus" style, 15px, 5px apart, 20px from the bottom ---------- */
.ns-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 5px;
	transition: opacity .3s;
}
.ns-dot {
	width: 15px;
	height: 15px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0);
	cursor: pointer;
	transition: box-shadow .3s;
}
.ns-dot span {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(255, 255, 255, .7);
	transition: transform .3s, background .3s;
}
.ns-dot:hover,
.ns-dot.is-active {
	box-shadow: 0 0 0 2px #fff;
}
.ns-dot:hover span,
.ns-dot.is-active span {
	transform: scale(.4);
	background: #fff;
}

/* arrows & dots appear on hover (like the original); always visible on touch screens */
@media (hover: hover) {
	.ns-arrow,
	.ns-dots {
		opacity: 0;
	}
	.ns-slider:hover .ns-arrow,
	.ns-slider:hover .ns-dots,
	.ns-slider:focus-within .ns-arrow,
	.ns-slider:focus-within .ns-dots {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ns-slide, .ns-slide.is-active { transition: none; }
	.ns-slide.is-active .ns-l { animation: none; }
}
