/* =========================================================
   RESET / BASE
========================================================= */

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

:root {
	--verde: #00b398;
	--cremita: #ddd5c3;
	--vh: 1vh;
	--screen-h: calc(var(--vh) * 100);
}

html,
body {
	font-size: 18px;
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

body {
	background: #000;
	color: var(--cremita);
	font-family: 'Montserrat Alternates', sans-serif;
	overscroll-behavior-x: none;
}

img,
video,
iframe,
svg,
canvas {
	display: block;
	max-width: 100%;
}


/* =========================================================
   HELPERS
========================================================= */

.verde {
	color: var(--verde);
}

.blanco {
	color: #fff;
}

.derecha {
	text-align: right;
}

.izquierda {
	text-align: left;
}

.mas1 { font-size: 1.1em; }
.mas2 { font-size: 1.2em; }
.mas3 { font-size: 1.3em; }

.menos1 { font-size: 0.9em; }
.menos2 { font-size: 0.8em; }
.menos3 { font-size: 0.7em; }

.flex {
	display: flex;
	gap: 30px;
	justify-content: center;
	align-items: center;
}


/* =========================================================
   LAYOUT GENERAL
========================================================= */

.feed,
.block,
.step,
.post,
.sticky-media,
.overlay,
.text {
	width: 100%;
	max-width: 100%;
}

.feed {
	height: var(--screen-h);
	overflow-y: auto;
	overflow-x: hidden;
	scroll-snap-type: y mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-y: contain;
}

.block {
	position: relative;
}

.step,
.post {
	height: var(--screen-h);
	min-height: var(--screen-h);
	scroll-snap-align: start;
	scroll-snap-stop: always;
	position: relative;
}


/* =========================================================
   MEDIA BACKGROUND
========================================================= */

.sticky-media {
	position: sticky;
	top: 0;
	height: var(--screen-h);
	width: 100%;
	z-index: 0;
	margin-bottom: calc(-1 * var(--screen-h));
	pointer-events: none;
}

.media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dimmer {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0,0,0, var(--dimmer, .35)) 0%,
		rgba(0,0,0, 0) 55%
	);
	transition: background .2s linear;
}

.slideshow .media {
	opacity: 0;
	transition: opacity .35s linear;
}

.slideshow .media.is-active {
	opacity: 1;
}


/* =========================================================
   OVERLAY / TEXTOS
========================================================= */

.overlay {
	position: relative;
	z-index: 1;
	height: 100%;
	padding: 50px 20px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	text-align: center;
}

.text {
	font-size: 18px;
	padding: 0 clamp(20px, 6vw, 36px);
	max-width: 600px;
}

.text .logo {
	margin: 0 0 50px;
}

.text p {
	margin: 0 0 10px;
}


/* =========================================================
   DATOS / PRECIO
========================================================= */

.dato.animado {
	font-size: 2em;
	font-weight: 700;
}

.datoprecio {
	font-size: 2em;
	font-weight: 700;
}

.km {
	font-weight: 500;
}

.aclaracion {
	font-size: 0.75em;
}


/* =========================================================
   WHATSAPP / CTA FLOTANTE
========================================================= */

.wa-trigger {
	color: inherit;
	cursor: pointer;
}

.wa-trigger:hover {
	opacity: .8;
}

.side-actions {
	position: fixed;
	top: 50%;
	right: 30px;
	transform: translateY(-50%) translateX(0);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;

	transition:
		right .45s cubic-bezier(.2,.9,.22,1),
		top .45s cubic-bezier(.2,.9,.22,1),
		transform .45s cubic-bezier(.2,.9,.22,1);
}

.side-action {
	--btn-size: 65px;

	width: var(--btn-size);
	height: var(--btn-size);
	padding: 0;

	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;

	border-radius: 999px;
	background: var(--verde);
	text-decoration: none;
	box-shadow: 6px 8px 24px 9px rgba(0,0,0,0.65);
	border: 1px solid rgba(255,255,255,0.14);
	pointer-events: auto;

	opacity: 0;
	transform: translateY(12px) scale(0.85);

	animation:
		waIn .6s cubic-bezier(.2,.9,.22,1.25) forwards,
		waPulse 5s ease-in-out 2s infinite;

	transition:
		width .4s ease,
		height .4s ease,
		min-width .4s ease,
		min-height .4s ease,
		padding .4s ease,
		gap .35s ease,
		transform .45s cubic-bezier(.2,.9,.22,1),
		border-radius .35s ease,
		box-shadow .35s ease;
}

.side-action img {
	width: 55px;
	height: 55px;
	object-fit: contain;

	transition:
		width .35s ease,
		height .35s ease;
}

.side-action::after {
	content: "Consultanos";
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	white-space: nowrap;

	max-width: 0;
	opacity: 0;
	overflow: hidden;
	transform: translateX(-6px);

	transition:
		max-width .35s ease .12s,
		opacity .3s ease .18s,
		transform .3s ease .18s;
}

@keyframes waIn {
	0% {
		opacity: 0;
		transform: translateY(12px) scale(0.85);
	}
	60% {
		opacity: 1;
		transform: translateY(-2px) scale(1.08);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes waPulse {
	0%, 94%, 100% {
		box-shadow: 6px 8px 24px 9px rgba(0,0,0,0.65);
	}
	97% {
		box-shadow:
			6px 8px 24px 9px rgba(0,0,0,0.65),
			0 0 0 8px rgba(0,179,152,0.08);
	}
}


/* Estado final: CTA grande centrado */

.side-actions.is-consulta {
	top: 50%;
	right: 50%;
	transform: translate(50%, -50%);
}

.side-actions.is-consulta .side-action {
	width: auto;
	height: auto;
	min-width: 240px;
	min-height: 66px;
	padding: 12px 24px;
	gap: 12px;
	transform: scale(1.05);
	border-radius: 999px;
	animation: none;
	opacity: 1;
}

.side-actions.is-consulta .side-action img {
	width: 38px;
	height: 38px;
}

.side-actions.is-consulta .side-action::after {
	max-width: 220px;
	opacity: 1;
	transform: translateX(0);
}


/* =========================================================
   MERCADO PAGO
========================================================= */

.mercadopago-button {
	margin: auto !important;
}


/* =========================================================
   BLOQUE DIFERENCIALES / CARDS
========================================================= */

.block-cards {
	background: var(--cremita);
}

.cards-wrap {
	height: 100vh;
	width: 100vw;
	padding: 15px 30px 15px 15px;
}

.cards-wrap h2 {
	margin: 0;
	text-align: center;
	padding: 20px;
	height: 70px;
	font-size: 30px;
	color: var(--verde);
}

.cards-grid {
	height: calc(100vh - 100px);
	width: 100%;
	display: grid;
	gap: 15px;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 1fr;
}

.diff-card {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	background: #000;
	color: var(--cremita);

	display: flex;
	justify-content: center;
	align-items: flex-end;
	text-align: center;

	opacity: 0;
	transform: translateY(18px) scale(0.98);
}

.diff-card img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.diff-card::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to top,
		rgba(0,0,0,.62) 0%,
		rgba(0,0,0,.15) 55%,
		rgba(0,0,0,.05) 100%
	);
}

.diff-card p {
	position: relative;
	z-index: 2;
	margin: 0;
	padding: 12px;
	font-weight: 700;
}

.diff-card.is-text {
	align-items: center;
	font-size: 1.25rem;
}

.diff-card.is-text::after {
	display: none;
}

.block-cards.is-visible .diff-card {
	animation: diffCardIn .55s ease forwards;
	animation-delay: calc(.08s * var(--i));
}

@keyframes diffCardIn {
	0% {
		opacity: 0;
		transform: translateY(18px) scale(0.98);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}


/* =========================================================
   BLOQUE CONSULTA FINAL
========================================================= */

.block-consulta .text {
	text-align: center;
}

/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 990px) {
	.feed {
		scroll-snap-type: y proximity;
	}

	.step,
	.post {
		scroll-snap-stop: normal;
	}
}

@media (min-width: 1024px) {
	html,
	body {
		background: #000;
		overflow-x: hidden;
	}

	body {
		margin: 0;
	}

	main.feed {
		background: #000;
		overflow-y: auto;
		overflow-x: hidden;
		box-shadow: 0 24px 70px rgba(0,0,0,.18);
	}
}


/* =========================================================
   MOBILE PORTRAIT
========================================================= */

@media (max-width: 901px) and (orientation: portrait) {
	.side-actions {
		top: auto;
		right: 5px;
		bottom: 5px;
		transform: translateY(0) translateX(0);
	}

	.side-action {
		--btn-size: 55px;
	}

	.side-action img {
		width: 45px;
		height: 45px;
	}

	.side-actions.is-consulta {
		top: 50%;
		right: 50%;
		bottom: auto;
		transform: translate(50%, -50%);
	}

	.side-actions.is-consulta .side-action {
		min-width: 220px;
		min-height: 62px;
		padding: 10px 20px;
		gap: 10px;
	}

	.side-actions.is-consulta .side-action img {
		width: 36px;
		height: 36px;
	}

	.cards-wrap {
		padding: 7px;
	}

	.cards-wrap h2 {
		padding: 10px;
		height: 50px;
		font-size: 20px;
	}

	.cards-grid {
		height: calc(100vh - 65px);
		grid-template-columns: repeat(2, 1fr);
		gap: 7px;
	}

	.diff-card.is-text {
		font-size: 1rem;
	}

	.diff-card.no-mobile {
		display: none;
	}
}