/* ═══════════════════════════════════════════════════════════════════════════
   CARRITO LATERAL + AVISO "AGREGADO" — en todo el sitio (salvo Carrito y Pagar).
   Es el carrito de la landing de Biopiscinas: en Hogar se ve con los azules de
   la landing y en el resto con la paleta Tecnosol (los colores salen de tokens.css).
   Lo arma template-parts/carrito-lateral.php y lo maneja assets/js/carrito.js.
   ═══════════════════════════════════════════════════════════════════════════ */

.cart-bg { position: fixed; inset: 0; z-index: 400; background: rgba(4,22,31,.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: ts-cart-fade .22s var(--e-soft); }
@keyframes ts-cart-fade { from { opacity: 0 } to { opacity: 1 } }
aside.cart { /* "aside": WooCommerce también usa la clase "cart" en el formulario de compra de la ficha. */
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 401;
	width: min(420px, 100vw); background: var(--paper);
	display: flex; flex-direction: column;
	transform: translateX(102%); visibility: hidden;
	transition: transform .4s var(--e-out), visibility 0s .4s;
	box-shadow: -12px 0 60px rgba(4,22,31,.2);
}
aside.cart.open { transform: translateX(0); visibility: visible; transition: transform .4s var(--e-out), visibility 0s; }
aside.cart.cargando .cart-items, aside.cart.cargando .cart-foot { opacity: .55; pointer-events: none; transition: opacity .2s; }
.cart-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 1.4rem var(--gutter) 1.15rem; border-bottom: 1px solid var(--line); flex: none;
}
.cart-head h3 { font-size: 1.2rem; margin: 0; }
.cart-head .cart-cant { font-weight: 600; font-size: .9rem; }
.cart-items { flex: 1; overflow-y: auto; padding: .5rem var(--gutter); }
.cart-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-3); }
.cart-empty svg { width: 52px; height: 52px; margin: 0 auto 1.25rem; stroke: var(--line-2); display: block; }
.cart-empty p { font-size: .95rem; line-height: 1.6; margin: 0; }
.ci { display: flex; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.ci:last-child { border-bottom: none; }
.ci-ico {
	width: 54px; height: 54px; flex: none; border-radius: 12px;
	background: var(--mist-2); color: var(--deep-2);
	display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.ci-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ci-info { flex: 1; min-width: 0; }
.ci-name { font-size: .95rem; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
.ci-price { font-size: .84rem; color: var(--ink-3); margin-top: .15rem; }
.ci-qty { display: inline-flex; align-items: center; gap: .15rem; margin-top: .7rem; border: 1px solid var(--line-2); border-radius: var(--r-full); padding: .15rem; }
.ci-qty button {
	width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	color: var(--ink); background: none; border: 0; cursor: pointer; transition: background .18s;
}
.ci-qty button:hover { background: var(--mist-2); }
.ci-qty button svg { width: 13px; height: 13px; }
.ci-qty span { min-width: 26px; text-align: center; font-size: .92rem; font-weight: 700; }
.ci-x { color: var(--ink-3); align-self: flex-start; padding: .2rem; background: none; border: 0; cursor: pointer; transition: color .2s; }
.ci-x:hover { color: var(--danger); }
.ci-x svg { width: 16px; height: 16px; }
.cart-foot { flex: none; padding: 1.25rem var(--gutter) 1.75rem; border-top: 1px solid var(--line); background: var(--paper); }
.cart-foot[hidden] { display: none; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.1rem; }
.cart-total span { font-size: .95rem; color: var(--ink-3); }
.cart-total strong { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; color: var(--ink); }
.cart-note { text-align: center; font-size: .78rem; color: var(--ink-3); margin: .8rem 0 0; line-height: 1.5; }

/* Aviso flotante ("Biopiscinas agregado ×2") */
.toast {
	position: fixed; left: 50%; bottom: clamp(1.5rem, 5vh, 2.5rem); z-index: 500;
	transform: translateX(-50%) translateY(24px); opacity: 0; pointer-events: none;
	display: flex; align-items: center; gap: .65rem;
	background: var(--abyss); color: #fff; padding: .85rem 1.4rem; border-radius: var(--r-full);
	font-size: .9rem; font-weight: 600; box-shadow: var(--sh-xl);
	transition: opacity .28s var(--e-soft), transform .28s var(--e-out);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast svg { width: 17px; height: 17px; stroke: var(--aqua); flex: none; }

/* Enlace "Ver carrito" que WooCommerce agrega junto al botón: se abre el carrito lateral. */
.added_to_cart { display: none !important; }

@media (max-width: 820px) {
	.ci-qty button { width: 38px; height: 38px; }
	/* En Hogar sube por encima de la barra fija de abajo. */
	.pagina-hogar .toast { bottom: 5.5rem; }
}
