/* ==========================================================================
   EVOX — Mini Carrito (offcanvas)
   ========================================================================== */

.evox-cart {
	display: flex;
	flex-direction: column;
	height: 100%;
	font-family: 'Manrope', sans-serif;
	background: #fff;
}

/* -------- Badge del ícono del header -------- */
.evox-cart-count {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 9999px;
	background: var(--evox-verde);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}
/* Sin número dentro (carrito vacío) => el span queda :empty y se oculta. */
.evox-cart-count:empty {
	display: none;
}

/* -------- Header oscuro -------- */
.evox-cart__header {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--evox-tinta);
	color: #fff;
	padding: 20px 24px;
}
.evox-cart__title {
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
/* Botón "Seguir comprando" (reemplaza a la antigua X del header).
   Con texto e ícono queda claro que cierra el carrito y devuelve al catálogo,
   sobre todo en móvil donde el offcanvas ocupa toda la pantalla. */
.evox-cart__back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	color: #fff;
	font-family: 'Manrope', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 8px 14px;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color 0.2s ease, background 0.2s ease;
}
.evox-cart__back:hover,
.evox-cart__back:focus-visible {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1);
}
.evox-cart__back-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	background: currentColor;
	-webkit-mask: var(--evox-ico-arrow-left) center / contain no-repeat;
	mask: var(--evox-ico-arrow-left) center / contain no-repeat;
}

@media (max-width: 600px) {
	.evox-cart__back {
		font-size: 11px;
		padding: 8px 12px;
	}
}

/* -------- Contenedor dinámico (se reemplaza completo en cada update) -------- */
.evox-cart__dynamic {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0; /* mismo fix de flexbox usado en la galería de producto */
	overflow: hidden;
}

/* -------- Barra de envío gratis -------- */
.evox-cart__shipping-bar {
	flex-shrink: 0;
	padding: 20px 24px;
	background: var(--evox-fondo);
	text-align: center;
}
.evox-cart__shipping-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    
    /* El color que tomará el ícono */
    background-color: var(--evox-tinta);
    
    /* La máscara reparada (sin el :svg) */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16.933333 16.933333'%3E%3Cpath d='m 3.4052178,4.4364212 a 0.26458349,0.26458349 0 0 0 -0.2635488,0.26355 0.26458349,0.26458349 0 0 0 0.2635488,0.26355 H 10.699865 V 10.99106 H 7.3719013 C 7.2796703,10.36065 6.7393011,9.8701972 6.0887754,9.8701972 c -0.6505231,0 -1.1908922,0.4904528 -1.283126,1.1208628 H 3.6708356 V 9.8443612 A 0.26458349,0.26458349 0 0 0 3.4052178,9.5787432 0.26458349,0.26458349 0 0 0 3.141669,9.8443612 v 1.4123168 a 0.26460995,0.26460995 0 0 0 0.2635488,0.263548 H 4.83614 c 0.1480926,0.558851 0.6533938,0.976686 1.2526354,0.976686 0.5992415,0 1.1045428,-0.417835 1.252638,-0.976686 h 3.6240666 1.20251 c 0.148095,0.558851 0.653397,0.976686 1.252638,0.976686 0.599242,0 1.103437,-0.417835 1.251085,-0.976686 h 1.204063 a 0.26460995,0.26460995 0 0 0 0.263549,-0.263548 V 8.7994632 a 0.26460995,0.26460995 0 0 0 -0.01912,-0.09922 l -0.990637,-2.455148 a 0.26460995,0.26460995 0 0 0 -0.243912,-0.16588 H 11.229547 V 4.6999712 A 0.26460995,0.26460995 0 0 0 10.96548,4.4364212 Z M 2.252833,6.1102202 A 0.26458349,0.26458349 0 0 0 1.9892842,6.3758382 0.26458349,0.26458349 0 0 0 2.252833,6.6393862 H 6.2448372 A 0.26458349,0.26458349 0 0 0 6.5104551,6.3758382 0.26458349,0.26458349 0 0 0 6.2448372,6.1102202 Z m 8.976714,0.498162 h 3.476274 l 0.777213,1.92753 H 11.229547 Z M 1.0596257,7.7974572 A 0.26458349,0.26458349 0 0 0 0.79400787,8.0615222 0.26458349,0.26458349 0 0 0 1.0596257,8.3250732 H 6.2448372 A 0.26458349,0.26458349 0 0 0 6.5104551,8.0615222 0.26458349,0.26458349 0 0 0 6.2448372,7.7974572 Z m 10.1699213,1.267621 h 4.380611 V 10.99106 h -0.90847 c -0.09195,-0.630404 -0.630542,-1.1208628 -1.28106,-1.1208628 -0.65052,0 -1.190371,0.4904588 -1.28261,1.1208628 H 11.229547 Z M 6.069138,10.399364 c 0.00659,-1.67e-4 0.013004,0 0.019637,0 0.4245081,0 0.7673948,0.344713 0.7673948,0.7829 0,0.438187 -0.3428867,0.785481 -0.7673948,0.785481 -0.4245081,0 -0.7673949,-0.347294 -0.7673949,-0.785481 0,-0.43134 0.332449,-0.772346 0.7477579,-0.7829 z m 7.331853,0 c 0.0066,-1.67e-4 0.013,0 0.01964,0 0.424508,0 0.767911,0.344713 0.767911,0.7829 0,0.438187 -0.343403,0.785481 -0.767911,0.785481 -0.424511,0 -0.767395,-0.347294 -0.767395,-0.785481 0,-0.43134 0.332449,-0.772346 0.747758,-0.7829 z' fill='%23000000'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16.933333 16.933333'%3E%3Cpath d='m 3.4052178,4.4364212 a 0.26458349,0.26458349 0 0 0 -0.2635488,0.26355 0.26458349,0.26458349 0 0 0 0.2635488,0.26355 H 10.699865 V 10.99106 H 7.3719013 C 7.2796703,10.36065 6.7393011,9.8701972 6.0887754,9.8701972 c -0.6505231,0 -1.1908922,0.4904528 -1.283126,1.1208628 H 3.6708356 V 9.8443612 A 0.26458349,0.26458349 0 0 0 3.4052178,9.5787432 0.26458349,0.26458349 0 0 0 3.141669,9.8443612 v 1.4123168 a 0.26460995,0.26460995 0 0 0 0.2635488,0.263548 H 4.83614 c 0.1480926,0.558851 0.6533938,0.976686 1.2526354,0.976686 0.5992415,0 1.1045428,-0.417835 1.252638,-0.976686 h 3.6240666 1.20251 c 0.148095,0.558851 0.653397,0.976686 1.252638,0.976686 0.599242,0 1.103437,-0.417835 1.251085,-0.976686 h 1.204063 a 0.26460995,0.26460995 0 0 0 0.263549,-0.263548 V 8.7994632 a 0.26460995,0.26460995 0 0 0 -0.01912,-0.09922 l -0.990637,-2.455148 a 0.26460995,0.26460995 0 0 0 -0.243912,-0.16588 H 11.229547 V 4.6999712 A 0.26460995,0.26460995 0 0 0 10.96548,4.4364212 Z M 2.252833,6.1102202 A 0.26458349,0.26458349 0 0 0 1.9892842,6.3758382 0.26458349,0.26458349 0 0 0 2.252833,6.6393862 H 6.2448372 A 0.26458349,0.26458349 0 0 0 6.5104551,6.3758382 0.26458349,0.26458349 0 0 0 6.2448372,6.1102202 Z m 8.976714,0.498162 h 3.476274 l 0.777213,1.92753 H 11.229547 Z M 1.0596257,7.7974572 A 0.26458349,0.26458349 0 0 0 0.79400787,8.0615222 0.26458349,0.26458349 0 0 0 1.0596257,8.3250732 H 6.2448372 A 0.26458349,0.26458349 0 0 0 6.5104551,8.0615222 0.26458349,0.26458349 0 0 0 6.2448372,7.7974572 Z m 10.1699213,1.267621 h 4.380611 V 10.99106 h -0.90847 c -0.09195,-0.630404 -0.630542,-1.1208628 -1.28106,-1.1208628 -0.65052,0 -1.190371,0.4904588 -1.28261,1.1208628 H 11.229547 Z M 6.069138,10.399364 c 0.00659,-1.67e-4 0.013004,0 0.019637,0 0.4245081,0 0.7673948,0.344713 0.7673948,0.7829 0,0.438187 -0.3428867,0.785481 -0.7673948,0.785481 -0.4245081,0 -0.7673949,-0.347294 -0.7673949,-0.785481 0,-0.43134 0.332449,-0.772346 0.7477579,-0.7829 z m 7.331853,0 c 0.0066,-1.67e-4 0.013,0 0.01964,0 0.424508,0 0.767911,0.344713 0.767911,0.7829 0,0.438187 -0.343403,0.785481 -0.767911,0.785481 -0.424511,0 -0.767395,-0.347294 -0.767395,-0.785481 0,-0.43134 0.332449,-0.772346 0.747758,-0.7829 z' fill='%23000000'/%3E%3C/svg%3E") center / contain no-repeat;
}
.evox-cart__progress {
	position: relative;
	height: 4px;
	background: var(--evox-borde-fuerte);
	border-radius: 2px;
	margin: 0 14px 12px;
}
.evox-cart__progress-fill {
	height: 100%;
	background: var(--evox-tinta);
	border-radius: 2px;
	transition: width 0.4s ease;
}
.evox-cart__progress-check {
	position: absolute;
	top: 50%;
	right: 0;
	transform: translate(50%, -50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--evox-borde-fuerte);
	border: 2px solid var(--evox-fondo);
	transition: background 0.3s ease;
}
.evox-cart__progress-check.is-unlocked {
	background: var(--evox-verde);
}
.evox-cart__shipping-text {
	font-size: 13px;
	color: var(--evox-tinta);
	margin: 0;
}

/* -------- Lista de items — scrollable -------- */
.evox-cart__items {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 0 24px;
}
.evox-cart__empty {
	text-align: center;
	color: var(--evox-suave);
	font-size: 14px;
	padding: 48px 0;
}

.evox-cart__item {
	display: flex;
	gap: 16px;
	padding: 20px 0;
	border-bottom: 1px solid var(--evox-borde);
}
.evox-cart__item:last-child {
	border-bottom: none;
}

.evox-cart__item-media {
	width: 72px;
	flex-shrink: 0;
}
.evox-cart__item-media img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.evox-cart__item-info {
	flex: 1;
	min-width: 0;
}
.evox-cart__item-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}
.evox-cart__item-name {
	font-weight: 600;
	font-size: 14px;
	color: var(--evox-tinta);
	line-height: 1.3;
}
.evox-cart__item-remove {
	background: none;
	border: none;
	color: var(--evox-suave);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: color 0.2s ease;
}
.evox-cart__item-remove:hover {
	color: var(--evox-error);
}

.evox-cart__item-price {
	font-size: 14px;
	font-weight: 600;
	color: var(--evox-tinta);
	margin: 4px 0 8px;
}

.evox-cart__item-attrs {
	margin-bottom: 10px;
}
.evox-cart__attr-line {
	font-size: 11.5px;
	color: var(--evox-cuerpo);
	line-height: 1.6;
}
.evox-cart__attr-line strong {
	color: var(--evox-tinta);
	letter-spacing: 0.02em;
}

.evox-cart__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--evox-borde-fuerte);
	border-radius: 6px;
	overflow: hidden;
}
.evox-cart__qty-btn {
	width: 28px;
	height: 28px;
	background: #fff;
	border: none;
	font-size: 14px;
	cursor: pointer;
	color: var(--evox-tinta);
	transition: background 0.15s ease;
	text-align: center;
}
.evox-cart__qty-btn:hover {
	background: var(--evox-fondo);
}
.evox-cart__qty-btn:disabled {
	color: var(--evox-borde-fuerte);
	cursor: not-allowed;
	background: #fff;
}
.evox-cart__stock-note {
	font-size: 11px;
	color: var(--evox-error);
	margin: 6px 0 0;
}
.evox-cart__qty-value {
	width: 32px;
	text-align: center;
	font-size: 13px;
	color: var(--evox-tinta);
}

/* -------- Footer fijo abajo -------- */
.evox-cart__footer {
	flex-shrink: 0;
	padding: 20px 24px;
	border-top: 1px solid var(--evox-borde);
	background: #fff;
}
.evox-cart__subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: 'Manrope', sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: var(--evox-tinta);
	margin-bottom: 16px;
}

/* -------- Filas de totales: Subtotal / Descuentos / Total -------- */
.evox-cart__totals-row {
	display: flex;
	justify-content: space-between; /* título a la izquierda, monto a la derecha */
	align-items: baseline;
	gap: 16px;
	font-family: 'Manrope', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: var(--evox-cuerpo);
	padding: 7px 0;
}
.evox-cart__totals-row span:last-child {
	color: var(--evox-tinta);
	font-weight: 700;
	white-space: nowrap;
}
/* Descuentos en el verde de marca (título y monto) */
.evox-cart__totals-row--discount,
.evox-cart__totals-row--discount span:last-child {
	color: var(--evox-verde);
}
/* Total: mayor peso y tamaño, separado por una línea */
.evox-cart__totals-row--total {
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid var(--evox-borde);
	font-family: 'Manrope', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: var(--evox-tinta);
}
.evox-cart__totals-row--total span:last-child {
	font-size: 19px;
	font-weight: 700;
}
/* Nota del costo de envío */
.evox-cart__ship-note {
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--evox-suave);
	margin: 8px 0 16px;
}
.evox-cart__checkout {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--evox-azul);
	color: #fff;
	padding: 14px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 10px;
	transition: background 0.2s ease;
}
.evox-cart__checkout:hover {
	background: var(--evox-azul-hover);
	color: #fff;
}

.evox-cart__view-cart {
	display: block;
	width: 100%;
	text-align: center;
	background: transparent;
	color: var(--evox-tinta);
	border: 1px solid var(--evox-tinta);
	padding: 12px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	transition: background 0.2s ease;
}
.evox-cart__view-cart:hover {
	background: var(--evox-fondo);
}

/* -------- Responsive (mobile) -------- */
@media (max-width: 480px) {
	.evox-cart__header,
	.evox-cart__shipping-bar,
	.evox-cart__items,
	.evox-cart__footer {
		padding-left: 16px;
		padding-right: 16px;
	}
	.evox-cart__item-media {
		width: 60px;
	}
}
