/* Hoja «Sumado al carrito» de Eco Party. */
.eco-hoja {
	--eco-verde: #4e7a1d;
	--eco-verde-oscuro: #3f6516;
	--eco-verde-claro: #9fc162;
	--eco-borde: #e6e8e1;
	--eco-texto: #2b2f26;
	--eco-suave: #6b7064;
	position: fixed;
	left: 50%;
	bottom: 0;
	z-index: 100001;
	width: 100%;
	max-width: 620px;
	max-height: 92vh;
	max-height: 92dvh; /* en el celular, sin contar las barras del navegador */
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	box-sizing: border-box;
	padding: 10px 18px 0;
	background: #fff;
	color: var(--eco-texto);
	border-radius: 22px 22px 0 0;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, .18);
	transform: translate(-50%, 105%);
	transition: transform .32s cubic-bezier(.2, .8, .2, 1);
	font-size: 15px;
	line-height: 1.35;
}
.eco-hoja.abierta { transform: translate(-50%, 0); }
.eco-hoja *, .eco-hoja *::before, .eco-hoja *::after { box-sizing: border-box; }
@media (min-width: 700px) {
	.eco-hoja { bottom: 24px; max-height: calc(100vh - 48px); border-radius: 22px; }
	.eco-hoja.abierta { transform: translate(-50%, 0); }
}
@media (prefers-reduced-motion: reduce) {
	.eco-hoja, .eco-hoja-fondo { transition: none; }
}

.eco-hoja-fondo {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(30, 33, 26, .45);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
}
.eco-hoja-fondo.abierta { opacity: 1; pointer-events: auto; }
html.eco-hoja-sin-scroll { overflow: hidden; }
/* El botón flotante de WhatsApp (Click to Chat) tapaba «Ver carrito». */
html.eco-hoja-sin-scroll .ht-ctc { display: none !important; }

.eco-hoja-asa { display: block; width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: #d9dbd4; }

/* cabeza */
.eco-hoja-cabeza { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--eco-borde); }
.eco-hoja-ok { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--eco-verde); position: relative; }
.eco-hoja-ok::after { content: ""; position: absolute; left: 12px; top: 8px; width: 8px; height: 14px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.eco-hoja-foto { flex: 0 0 60px; }
.eco-hoja-foto img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; display: block; background: #f4f5f1; }
.eco-hoja-titulo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.eco-hoja-titulo strong { font-size: 18px; }
.eco-hoja-titulo span { color: var(--eco-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-hoja-cerrar { flex: 0 0 40px; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--eco-texto); font-size: 30px; line-height: 1; cursor: pointer; min-height: 0; }
.eco-hoja-cerrar:hover, .eco-hoja-cerrar:focus-visible { background: #f0f1ec; outline: none; }

/* envío gratis (lo arma el plugin _eco-fichas) */
.eco-hoja-envio { padding: 12px 0 4px; }
.eco-hoja-envio:empty { display: none; }
.eco-hoja-envio .eco-envio-gratis { margin: 0; font-weight: 400; }
.eco-hoja-envio .eco-envio-gratis .woocommerce-Price-amount { font-weight: 700; }

/* sugerencias */
.eco-hoja-sug { padding-top: 12px; }
.eco-hoja-sug-cabeza { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.eco-hoja-sug-cabeza strong { font-size: 17px; }
.eco-hoja-sug-cabeza span { color: var(--eco-suave); font-size: 14px; text-align: right; }
.eco-hoja-carril { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 18px; padding-bottom: 8px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scrollbar-width: thin; }
.eco-hoja-carril::after { content: ""; flex: 0 0 6px; } /* aire después de la última tarjeta */
.eco-hoja-tarjeta { flex: 0 0 158px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.eco-hoja-img img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; background: #f4f5f1; }
.eco-hoja-nombre { color: var(--eco-texto); font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; text-decoration: none; }
.eco-hoja-nombre:hover { text-decoration: underline; }
.eco-hoja-precio { font-weight: 700; font-size: 15px; }
.eco-hoja-precio del { font-weight: 400; color: var(--eco-suave); font-size: 13px; margin-left: 4px; }
.eco-hoja-precio ins { text-decoration: none; }
.eco-hoja-var { width: 100%; height: 38px; margin: 0; padding: 0 8px; font-size: 14px; border: 1px solid #cfd2c8; border-radius: 10px; background-color: #fff; box-shadow: none; }
.eco-hoja-unica { font-size: 13px; color: var(--eco-suave); text-transform: uppercase; min-height: 38px; display: flex; align-items: center; }
.eco-hoja-agregar { margin: auto 0 0; width: 100%; height: 42px; min-height: 0; border: 0; border-radius: 999px; background: var(--eco-verde); color: #fff; font-weight: 700; font-size: 15px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.eco-hoja-agregar:hover, .eco-hoja-agregar:focus-visible { background: var(--eco-verde-oscuro); outline: none; }
.eco-hoja-agregar.cargando { opacity: .6; cursor: progress; }
.eco-hoja-agregar.hecho { background: #e9f1dd; color: var(--eco-verde-oscuro); cursor: default; }
.eco-hoja-error { color: #b3261e; font-size: 13px; }
.eco-hoja-error:empty { display: none; }

/* pie */
.eco-hoja-pie { position: sticky; bottom: 0; z-index: 1; background: #fff; border-top: 1px solid var(--eco-borde); margin: 10px -18px 0; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); }
.eco-hoja-resumen { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; color: var(--eco-suave); }
.eco-hoja-resumen strong { color: var(--eco-texto); font-size: 18px; }
.eco-hoja-botones { display: flex; gap: 10px; }
.eco-hoja-seguir, .eco-hoja-carrito { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; margin: 0; min-height: 0; border-radius: 999px; font-weight: 700; font-size: 16px; text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer; }
.eco-hoja-seguir { border: 1.5px solid #cfd2c8; background: #fff; color: var(--eco-texto); }
.eco-hoja-seguir:hover, .eco-hoja-seguir:focus-visible { border-color: var(--eco-texto); outline: none; }
.eco-hoja-carrito, .eco-hoja-carrito:visited { border: 0; background: var(--eco-verde); color: #fff; }
.eco-hoja-carrito:hover, .eco-hoja-carrito:focus-visible { background: var(--eco-verde-oscuro); color: #fff; outline: none; }

@media (max-width: 600px) {
	.eco-hoja-tarjeta { flex-basis: 136px; }
	.eco-hoja-titulo strong { font-size: 17px; }
	.eco-hoja-botones { gap: 8px; }
	.eco-hoja-seguir, .eco-hoja-carrito { height: 46px; }
}
@media (max-width: 380px) {
	.eco-hoja { padding: 8px 14px 0; }
	.eco-hoja-carril { margin: 0 -14px; padding-left: 14px; padding-right: 14px; scroll-padding-inline: 14px; }
	.eco-hoja-pie { margin: 10px -14px 0; padding-left: 14px; padding-right: 14px; }
	.eco-hoja-tarjeta { flex-basis: 128px; }
	.eco-hoja-seguir, .eco-hoja-carrito { font-size: 15px; }
}
