/*
 * Everiz — ventana «Cómo funcionan los envíos» (inc/ship-info.php,
 * assets/js/ship-info.js) y los enlaces que la abren (ficha, carrito, checkout).
 *
 * Móvil: hoja que sube desde abajo (se arrastra para cerrar). Escritorio:
 * ventana centrada. Cabecera «noche» con el brillo de la marca, como la portada.
 * Con «reducir movimiento», sin desplazamientos.
 */

/* --- Enlaces ------------------------------------------------------------------ */

body.evz .evz-shipinfo-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--evz-brand-dark);
	font-size: 13.5px;
	font-weight: 800;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

body.evz .evz-shipinfo-link:hover span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.evz .evz-shipinfo-link .evz-icon:last-child {
	transition: transform 0.2s var(--evz-ease);
}

body.evz .evz-shipinfo-link:hover .evz-icon:last-child {
	transform: translateX(2px);
}

body.evz .evz-shipinfo-link--product {
	display: flex;
	width: max-content;
	margin-top: 6px;
}

body.evz .evz-shipinfo-link--cart,
body.evz .evz-shipinfo-link--checkout {
	gap: 6px;
	min-height: 32px;
	padding: 0 12px;
	border-radius: var(--evz-r-pill);
	background: var(--evz-brand-soft);
	font-size: 12.5px;
	white-space: nowrap;
	transition: background-color 0.15s;
}

body.evz .evz-shipinfo-link--cart:hover,
body.evz .evz-shipinfo-link--checkout:hover {
	background: #d3eefd;
}

body.evz .evz-shipinfo-link--cart:hover span,
body.evz .evz-shipinfo-link--checkout:hover span {
	text-decoration: none;
}

body.evz table.shop_table .evz-shipinfo-link--cart {
	color: var(--evz-brand-dark);
}

@media (max-width: 479.98px) {
	body.evz .evz-shipinfo-link--checkout span {
		position: absolute !important;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	body.evz .evz-shipinfo-link--checkout {
		padding: 0 9px;
	}

	body.evz .evz-shipinfo-link--checkout .evz-icon:last-child {
		display: none;
	}
}

/* Ficha: la ventaja de envío destaca un poco. */
body.evz .evz-perks__ship > div {
	display: grid;
	gap: 1px;
}

/* --- Ventana --------------------------------------------------------------------- */

html.evz-sheet-open {
	overflow: hidden;
}

body.evz .evz-sheet {
	position: fixed;
	inset: 0;
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: transparent;
	color: var(--evz-text);
}

body.evz .evz-sheet[open] {
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

body.evz .evz-sheet::backdrop {
	background: rgba(4, 22, 30, 0);
	transition: background-color 0.26s ease, backdrop-filter 0.26s ease;
}

body.evz .evz-sheet.is-open::backdrop {
	background: rgba(4, 22, 30, 0.56);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.evz-sheet__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100dvh - 24px);
	overflow: hidden;
	border-radius: 24px 24px 0 0;
	background: var(--evz-bg);
	box-shadow: 0 -24px 60px -24px rgba(4, 22, 30, 0.55);
	transform: translateY(105%);
	transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.evz-sheet.is-open .evz-sheet__panel {
	transform: none;
}

.evz-sheet.is-closing .evz-sheet__panel {
	transform: translateY(105%);
	transition-duration: 0.22s;
	transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

@media (min-width: 768px) {
	body.evz .evz-sheet[open] {
		align-items: center;
		padding: 24px;
	}

	.evz-sheet__panel {
		max-width: 760px;
		max-height: min(88vh, 860px);
		border-radius: 24px;
		box-shadow: 0 40px 90px -30px rgba(4, 22, 30, 0.6);
		opacity: 0;
		transform: translateY(18px) scale(0.97);
		transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.22s ease;
	}

	.evz-sheet.is-open .evz-sheet__panel {
		opacity: 1;
		transform: none;
	}

	.evz-sheet.is-closing .evz-sheet__panel {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
}

/* Cabecera noche con brillo. */
.evz-sheet__head {
	position: relative;
	z-index: 1;
	display: flex;
	flex: none;
	align-items: center;
	gap: 14px;
	padding: 26px 18px 20px;
	overflow: hidden;
	background: var(--evz-night-grad);
	color: #fff;
	touch-action: none;
}

.evz-sheet__head::before {
	content: "";
	position: absolute;
	top: -90px;
	right: -60px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(79, 227, 255, 0.3) 0%, rgba(79, 227, 255, 0) 68%);
	pointer-events: none;
}

.evz-sheet__head::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: linear-gradient(90deg, rgba(79, 227, 255, 0) 0%, rgba(79, 227, 255, 0.6) 50%, rgba(79, 227, 255, 0) 100%);
}

.evz-sheet__grab {
	position: absolute;
	top: 9px;
	left: 50%;
	width: 42px;
	height: 4px;
	margin-left: -21px;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.32);
}

@media (min-width: 768px) {
	.evz-sheet__grab {
		display: none;
	}

	.evz-sheet__head {
		padding: 22px 22px 20px;
		touch-action: auto;
	}
}

.evz-sheet__icon {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: rgba(79, 227, 255, 0.14);
	box-shadow: inset 0 0 0 1px rgba(79, 227, 255, 0.28);
	color: var(--evz-glow);
}

.evz-sheet__heading {
	position: relative;
	min-width: 0;
}

body.evz .evz-sheet__eyebrow {
	margin: 0 0 2px;
	color: var(--evz-glow);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

body.evz .evz-sheet__title {
	margin: 0;
	color: #fff;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

body.evz .evz-sheet__close {
	position: relative;
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s, transform 0.2s var(--evz-ease);
}

body.evz .evz-sheet__close:hover {
	background: rgba(255, 255, 255, 0.18);
	transform: rotate(90deg);
}

body.evz .evz-sheet__close:focus-visible {
	outline: 2px solid var(--evz-glow);
	outline-offset: 2px;
}

/* Cuerpo. */
.evz-sheet__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 16px 14px 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

@media (min-width: 768px) {
	.evz-sheet__body {
		padding: 20px 22px 8px;
	}
}

/* Entradas escalonadas al abrir. */
.evz-sheet .evz-sinfo-steps__item,
.evz-sheet .evz-sinfo,
.evz-sheet .evz-sinfo-notes,
.evz-sheet .evz-sinfo-latam {
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
	transition-delay: calc(0.06s + var(--i, 0) * 0.045s);
}

.evz-sheet.is-open .evz-sinfo-steps__item,
.evz-sheet.is-open .evz-sinfo,
.evz-sheet.is-open .evz-sinfo-notes,
.evz-sheet.is-open .evz-sinfo-latam {
	opacity: 1;
	transform: none;
}

/* Tres pasos. */
.evz-sinfo-steps {
	position: relative;
	display: grid;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	counter-reset: evz-sinfo;
}

.evz-sinfo-steps__item {
	position: relative;
	display: grid;
	grid-template-columns: 38px minmax(0, 1fr);
	column-gap: 12px;
	align-items: center;
	padding: 10px 12px;
	border-radius: 14px;
	background: var(--evz-surface);
	box-shadow: inset 0 0 0 1px var(--evz-line);
}

.evz-sinfo-steps__icon {
	display: grid;
	grid-row: span 2;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: var(--evz-grad);
	box-shadow: 0 8px 16px -10px rgba(0, 130, 222, 0.85);
	color: #fff;
}

.evz-sinfo-steps__item strong {
	color: var(--evz-ink);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
}

.evz-sinfo-steps__item span:not(.evz-sinfo-steps__icon) {
	color: var(--evz-muted);
	font-size: 12.5px;
	line-height: 1.4;
}

@media (min-width: 560px) {
	.evz-sinfo-steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 10px;
	}

	.evz-sinfo-steps__item {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		align-content: start;
		row-gap: 4px;
		padding: 14px;
	}

	.evz-sinfo-steps__icon {
		grid-row: auto;
		margin-bottom: 6px;
	}

	/* Línea que une los pasos. */
	.evz-sinfo-steps__item:not(:last-child)::after {
		content: "";
		position: absolute;
		z-index: 1;
		top: 33px;
		right: -10px;
		width: 10px;
		height: 2px;
		background: linear-gradient(90deg, #1cc3ff, #0082de);
	}
}

/* Tarjetas. */
.evz-sinfo-grid {
	display: grid;
	gap: 10px;
}

@media (min-width: 700px) {
	.evz-sinfo-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		align-items: stretch;
	}
}

.evz-sinfo {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	padding: 14px;
	border-radius: 16px;
	background: var(--evz-surface);
	box-shadow: 0 1px 2px rgba(4, 22, 30, 0.04), inset 0 0 0 1px var(--evz-line);
}

.evz-sinfo--everiz {
	position: relative;
	background: linear-gradient(160deg, #eefaff 0%, var(--evz-surface) 55%);
	box-shadow: 0 12px 28px -20px rgba(0, 130, 222, 0.7), inset 0 0 0 1.5px #9fdcf7;
}

.evz-sinfo__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
}

.evz-sinfo__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: var(--evz-brand-soft);
	color: var(--evz-brand-dark);
}

.evz-sinfo__icon--mark {
	background: var(--evz-surface);
	box-shadow: 0 3px 10px -4px rgba(0, 120, 196, 0.4);
}

.evz-sinfo__icon--mark img {
	display: block;
	width: 24px;
	height: auto;
}

body.evz .evz-sinfo__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: var(--evz-ink);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.evz-sinfo__tag {
	flex: none;
	padding: 3px 9px;
	border-radius: var(--evz-r-pill);
	font-size: 11.5px;
	font-weight: 800;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.evz-sinfo__tag--free {
	background: #e3f5ea;
	color: #17663a;
}

.evz-sinfo__tag--fast {
	background: var(--evz-accent-soft);
	color: #a84300;
}

.evz-sinfo__list {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.evz-sinfo__list li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--evz-text);
	font-size: 13.5px;
	line-height: 1.45;
}

.evz-sinfo__list li > .evz-icon {
	flex: none;
	margin-top: 2px;
	color: var(--evz-brand-dark);
}

.evz-sinfo__list strong {
	color: var(--evz-ink);
	font-weight: 800;
}

body.evz .evz-sinfo__link {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	margin-left: 4px;
	color: var(--evz-brand-dark);
	font-weight: 800;
	white-space: nowrap;
}

body.evz .evz-sinfo__link:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.evz .evz-sinfo__text {
	margin: 0;
	color: var(--evz-text);
	font-size: 13.5px;
	line-height: 1.5;
}

body.evz .evz-sinfo__note {
	margin: auto 0 0;
	padding: 9px 11px;
	border-radius: 11px;
	background: var(--evz-warn-bg);
	color: #7a4a00;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.45;
}

body.evz .evz-sinfo__note--info {
	background: var(--evz-brand-soft);
	color: var(--evz-brand-dark);
}

body.evz .evz-sinfo__hint {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: auto 0 0;
	color: var(--evz-muted);
	font-size: 12.5px;
	line-height: 1.45;
}

body.evz .evz-sinfo__hint .evz-icon {
	flex: none;
	margin-top: 2px;
}

.evz-sinfo__carriers {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.evz-sinfo__carriers li {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.evz-sinfo__services {
	min-width: 0;
	color: var(--evz-text);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.35;
}

/* Distintivos de los transportistas (los mismos que en el bloque de entrega). */
.evz-sheet .evz-ship-chip {
	position: relative;
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 24px;
	padding: 0 8px;
	border-radius: 6px;
	font-family: var(--evz-font);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.03em;
	line-height: 1;
	white-space: nowrap;
}

.evz-sheet .evz-ship-chip--ups {
	height: 27px;
	padding: 0 7px 2px;
	border-radius: 5px 5px 13px 13px / 5px 5px 10px 10px;
	background: #351c15;
	color: #ffb500;
	font-size: 14px;
	letter-spacing: 0;
}

.evz-sheet .evz-ship-chip--usps {
	padding-left: 15px;
	background: #004b87;
	color: #fff;
}

.evz-sheet .evz-ship-chip--usps::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 6px;
	width: 4px;
	border-radius: 1px;
	background: #da291c;
	transform: skewX(-18deg);
}

.evz-sheet .evz-ship-chip--fedex {
	background: #4d148c;
	color: #fff;
	font-size: 13px;
	letter-spacing: -0.01em;
}

.evz-sheet .evz-ship-chip--fedex span {
	color: #ff8a3d;
}

/* Notas y Latinoamérica. */
.evz-sinfo-notes {
	display: grid;
	gap: 8px;
	margin: 12px 0 0;
	padding: 14px;
	border-radius: 16px;
	background: var(--evz-surface);
	box-shadow: inset 0 0 0 1px var(--evz-line);
	list-style: none;
}

@media (min-width: 700px) {
	.evz-sinfo-notes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 18px;
	}
}

.evz-sinfo-notes li {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--evz-text);
	font-size: 13px;
	line-height: 1.45;
}

.evz-sinfo-notes li .evz-icon {
	flex: none;
	margin-top: 2px;
	padding: 2px;
	border-radius: 50%;
	background: #e3f5ea;
	color: #17803d;
	stroke-width: 2.6;
}

body.evz .evz-sinfo-latam {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 12px 0 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--evz-night-grad);
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
}

body.evz .evz-sinfo-latam .evz-icon {
	flex: none;
	margin-top: 1px;
	color: var(--evz-glow);
}

/* Pie fijo. */
.evz-sheet__foot {
	flex: none;
	padding: 12px 14px calc(12px + var(--evz-safe-b));
	border-top: 1px solid var(--evz-line);
	background: var(--evz-surface);
}

@media (min-width: 768px) {
	.evz-sheet__foot {
		display: flex;
		justify-content: flex-end;
		padding: 14px 22px;
	}

	.evz-sheet__foot .evz-btn--block {
		width: auto;
		min-width: 200px;
	}
}

/* Movimiento reducido: sin desplazamientos ni escalonados. */
@media (prefers-reduced-motion: reduce) {
	.evz-sheet__panel,
	.evz-sheet .evz-sinfo-steps__item,
	.evz-sheet .evz-sinfo,
	.evz-sheet .evz-sinfo-notes,
	.evz-sheet .evz-sinfo-latam {
		transition: none !important;
		transform: none !important;
	}

	.evz-sheet:not(.is-open) .evz-sheet__panel {
		opacity: 0;
	}

	.evz-sheet.is-open .evz-sheet__panel,
	.evz-sheet .evz-sinfo-steps__item,
	.evz-sheet .evz-sinfo,
	.evz-sheet .evz-sinfo-notes,
	.evz-sheet .evz-sinfo-latam {
		opacity: 1;
	}
}
