/**
 * Carrito 2026 — estilos propios (el chrome vive en chrome-2026.css).
 * Medidas transcritas 1:1 de design-2026/templates/carrito/Carrito.dc.html.
 * Todo contenedor flex declara dirección y alineación: el tema viejo las pisa.
 */

body.mps-carrito-2026 { background: #F5F4F2; min-height: 100vh; display: flex; flex-direction: column; }

.mpsk-main {
	padding: 40px max(56px, calc(50% - 664px)) 84px;
	display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; flex: 1;
}
@media (max-width: 1080px) { .mpsk-main { grid-template-columns: 1fr; } }

.mpsk-izq { display: flex; flex-direction: column; align-items: stretch; gap: 22px; min-width: 0; }

.mpsk-head { display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.mpsk-head h1 { margin: 0; font-size: 44px; line-height: 0.92; letter-spacing: -0.02em; text-transform: uppercase; }
.mpsk-head h1 span { font-weight: 800; }
.mpsk-head h1 i { font-weight: 300; font-style: normal; }
.mpsk-conteo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8A8782; }
.mpsk-conteo a { color: #111111; text-decoration: none; border-bottom: 2px solid #C73D2C; padding-bottom: 2px; }
.mpsk-conteo a:hover { color: #C73D2C; }

/* Avisos de Woo (carrito actualizado, errores de stock): aquí SÍ se muestran, con el diseño */
.mpsk-avisos:empty { display: none; }
.mps-2026 .mpsk-avisos .woocommerce-message,
.mps-2026 .mpsk-avisos .woocommerce-error,
.mps-2026 .mpsk-avisos .woocommerce-info {
	display: block; list-style: none; margin: 0 0 8px; padding: 14px 18px; border-radius: 6px;
	background: #FFFFFF; border: 1px solid #E4E2E0; border-left: 4px solid #C73D2C; font-size: 13.5px; font-weight: 600;
}
.mpsk-avisos .woocommerce-message a.button, .mpsk-avisos .restore-item { color: #C73D2C; font-weight: 700; margin-left: 8px; }

/* ---- Vacío ---- */
.mpsk-vacio { background: #FFFFFF; border: 1px dashed #C9C6C1; border-radius: 6px; padding: 48px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.mpsk-vacio > span { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.mpsk-vacio p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #8A8782; max-width: 520px; }
.mpsk-vacio > div { display: flex; flex-direction: row; gap: 12px; flex-wrap: wrap; }

/* ---- Ítems ---- */
.mpsk-form { margin: 0; }
.mpsk-items { background: #FFFFFF; border: 1px solid #E4E2E0; border-radius: 6px; overflow: hidden; }
.mpsk-item { display: grid; grid-template-columns: 96px 1fr auto auto; gap: 20px; align-items: center; padding: 18px 22px; border-bottom: 1px solid #F5F4F2; }
.mpsk-item:last-child { border-bottom: none; }
.mpsk-item-img { width: 96px; height: 96px; background: #F5F4F2; border-radius: 4px; display: block; overflow: hidden; }
.mpsk-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpsk-item-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.mpsk-item-txt > a:first-child { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.25; color: #111111; text-decoration: none; }
.mpsk-item-txt > a:first-child:hover { color: #C73D2C; }
.mpsk-item-sub { font-size: 12px; color: #8A8782; font-weight: 600; }
.mpsk-quitar { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8A8782; text-decoration: underline; text-underline-offset: 3px; }
.mpsk-quitar:hover { color: #C73D2C; }

.mpsk-stepper { display: flex; flex-direction: row; align-items: center; border: 1.5px solid #111111; border-radius: 2px; height: 44px; background: #FFFFFF; }
.mpsk-stepper button {
	width: 38px; height: 100%; border: none; background: none; cursor: pointer; padding: 0; margin: 0; min-width: 0;
	display: inline-flex; align-items: center; justify-content: center; line-height: 1; box-shadow: none; border-radius: 0;
	font-size: 16px; font-weight: 700; color: #111111;
}
.mpsk-qty {
	width: 34px; height: 100%; border: none; background: none; text-align: center; padding: 0; margin: 0;
	font-size: 14px; font-weight: 800; color: #111111; -moz-appearance: textfield; appearance: textfield;
}
.mpsk-qty::-webkit-outer-spin-button, .mpsk-qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mpsk-qty:focus { outline: none; }
.mpsk-item-total { font-size: 16px; font-weight: 800; min-width: 80px; text-align: right; }
.mpsk-form.mpsk-enviando { opacity: 0.55; pointer-events: none; transition: opacity .15s ease; }

/* ---- Completá tu stack ---- */
.mpsk-upsell {
	background: #0B0B0B; color: #FFFFFF; border-radius: 6px; padding: 28px 0; overflow: hidden;
	display: flex; flex-direction: column; align-items: stretch; gap: 20px;
	background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1.2px); background-size: 3px 3px;
}
.mpsk-upsell-head { display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 28px; }
.mpsk-upsell-head > span:first-child { display: flex; flex-direction: column; gap: 6px; }
.mpsk-upsell-head em { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #C73D2C; }
.mpsk-upsell-head b { font-size: 30px; line-height: 0.95; letter-spacing: -0.02em; text-transform: uppercase; font-weight: 800; }
.mpsk-upsell-head b i { font-weight: 300; font-style: normal; }
.mpsk-flechas { display: flex; flex-direction: row; gap: 8px; }
.mpsk-flechas button {
	width: 44px; height: 44px; border: 1px solid #2A2A2A; border-radius: 2px; background: rgba(255,255,255,0.06); color: #FFFFFF;
	cursor: pointer; font-size: 18px; font-weight: 700; padding: 0; display: inline-flex; align-items: center; justify-content: center;
	transition: background-color .15s ease, color .15s ease;
}
.mpsk-flechas button:hover { background: #FFFFFF; color: #111111; }
.mpsk-slider { display: flex; flex-direction: row; align-items: stretch; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 28px; scroll-padding-left: 28px; scrollbar-width: none; }
.mpsk-slider::-webkit-scrollbar { display: none; }
.mpsk-u { flex: none; width: 250px; scroll-snap-align: start; background: #FFFFFF; color: #111111; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.mpsk-u-img { display: block; background: #F5F4F2; aspect-ratio: 1 / 1; position: relative; overflow: hidden; }
.mpsk-u-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpsk-u-img span { position: absolute; top: 10px; left: 10px; background: #C73D2C; color: #FFFFFF; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 5px 8px; border-radius: 999px; }
.mpsk-u-txt { padding: 14px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; flex: 1; }
.mpsk-u-txt em { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #8A8782; }
.mpsk-u-txt > a { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.2; color: #111111; text-decoration: none; }
.mpsk-u-pie { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.mpsk-u-pie b { font-size: 14px; font-weight: 800; color: #C73D2C; white-space: nowrap; }
.mpsk-u-add {
	height: 36px; padding: 0 14px; border-radius: 2px; border: 1.5px solid #111111; background: #FFFFFF; color: #111111; text-decoration: none;
	font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; display: inline-flex; align-items: center;
	transition: background-color .15s ease, color .15s ease;
}
.mpsk-u-add:hover { background: #111111; color: #FFFFFF; }
.mpsk-upsell-nota { padding: 0 28px; font-size: 12px; color: #9A9A9A; }

/* ---- Resumen ---- */
.mpsk-der { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
body.admin-bar .mpsk-der { top: 112px; }
@media (max-width: 1080px) { .mpsk-der { position: static; } }
.mpsk-resumen { background: #FFFFFF; border: 1px solid #E4E2E0; border-radius: 6px; overflow: hidden; }
.mpsk-resumen-titulo { padding: 18px 22px; border-bottom: 1px solid #E4E2E0; font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.mpsk-resumen-cuerpo { padding: 18px 22px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; border-bottom: 1px solid #E4E2E0; }
.mpsk-fila { display: flex; flex-direction: row; justify-content: space-between; gap: 12px; font-size: 13px; color: #8A8782; font-weight: 600; }
.mpsk-fila b { color: #111111; font-weight: 600; text-align: right; }
.mpsk-fila-promo, .mpsk-fila-promo b { color: #C73D2C; font-weight: 700; }
.mpsk-fila-total { font-size: 18px; font-weight: 800; text-transform: uppercase; padding-top: 6px; border-top: 1px solid #F5F4F2; color: #111111; }
.mpsk-fila-total b { font-weight: 800; }
.mpsk-resumen-cta { padding: 18px 22px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.mpsk-pagar {
	height: 56px; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; background: #C73D2C; color: #FFFFFF;
	text-decoration: none; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 2px; transition: background-color .15s ease;
}
.mpsk-pagar:hover { background: #B23425; color: #FFFFFF; }
.mpsk-pagar span { font-weight: 600; color: #FFD9D3; }
.mpsk-pagar-off { background: #0B0B0B; }
.mpsk-pagar-off:hover { background: #1E1E1E; }
.mpsk-nota { font-size: 11.5px; color: #8A8782; text-align: center; line-height: 1.5; }
.mpsk-nota em { color: #C73D2C; font-weight: 700; }
.mpsk-resumen-trust { padding: 14px 22px; display: flex; flex-direction: column; gap: 7px; background: #0B0B0B; }
.mpsk-resumen-trust span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #FFFFFF; }
.mpsk-resumen-trust em { color: #C73D2C; }

.mpsk-ayuda {
	display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; background: #FFFFFF;
	border: 1px solid #E4E2E0; border-radius: 6px; padding: 14px 18px; text-decoration: none; color: #111111; transition: border-color .15s ease;
}
.mpsk-ayuda:hover { border-color: #111111; color: #111111; }
.mpsk-ayuda > span { display: flex; flex-direction: column; gap: 2px; }
.mpsk-ayuda b { font-size: 12.5px; font-weight: 700; }
.mpsk-ayuda i { font-style: normal; font-size: 11.5px; color: #8A8782; }
.mpsk-ayuda em { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #C73D2C; white-space: nowrap; }

/* Solo existe en móvil. */
.mpsk-barra { display: none; }

/* ======================================================================
 * MÓVIL (<= 900px) — design-2026/templates/carrito-mobile/CarritoMobile.dc.html
 * Mismo HTML: los hijos de la columna izquierda se "sueltan" (display: contents)
 * para poder ordenar como el mockup → ítems · resumen · "Completá tu stack".
 * El botón de pago vive en una barra fija con el total. Sin barra de envío gratis
 * ni promesas del mockup que el escritorio ya retiró; sí la fila de descuentos reales.
 * ==================================================================== */
@media (max-width: 900px) {
	/* Ritmo: un solo gutter de 18px (el del chrome), título a 32px del nav y 16px entre bloques. */
	.mpsk-main { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 0 0 48px; }
	.mpsk-izq { display: contents; }

	.mpsk-head { order: 1; flex-wrap: nowrap; gap: 12px; padding: 32px 18px 8px; }
	.mpsk-head h1 { font-size: 36px; }
	.mpsk-conteo { font-size: 11px; white-space: nowrap; }
	.mpsk-conteo-seguir { display: none; }
	.mpsk-avisos { order: 2; margin: 0 18px; }
	.mps-2026 .mpsk-avisos .woocommerce-message, .mps-2026 .mpsk-avisos .woocommerce-error, .mps-2026 .mpsk-avisos .woocommerce-info { padding: 12px 14px; font-size: 13px; margin: 0; } /* avisos de Woo (stock, cupón): cuerpo ≥13px */
	.mpsk-form, .mpsk-vacio { order: 3; margin: 0 18px; }
	.mpsk-der { order: 4; position: static; margin: 0 18px; gap: 16px; }
	.mpsk-upsell { order: 5; margin-top: 24px; } /* + gap 16 = 40px de aire antes del upsell */

	/* Carrito vacío: apilado. El resumen en Q0 solo repetía "Ver la tienda" y la tarjeta de ayuda iba al
	   mismo WhatsApp que el botón de arriba: fuera toda la columna (display: none no deja hueco de gap).
	   El "0 ítems" repite "Todavía no hay nada aquí". Con productos no cambia nada. */
	.mpsk-main:has(.mpsk-vacio) .mpsk-der,
	.mpsk-main:has(.mpsk-vacio) .mpsk-conteo { display: none; }
	.mpsk-vacio { padding: 32px 20px; gap: 16px; align-items: stretch; border: 0; } /* el blanco sobre gris ya la separa */
	.mpsk-vacio > span { font-size: 20px; }
	.mpsk-vacio p { font-size: 14px; line-height: 1.6; }
	.mpsk-vacio > div { flex-direction: column; align-items: stretch; }
	/* "Asesoría por WhatsApp" baja a enlace subrayado de 44px: "Ver la tienda" queda como única acción fuerte. */
	.mps-2026 .mpsk-vacio .mpsc-btn-outline-dark { height: 44px; border-color: transparent; background: none; text-decoration: underline; text-underline-offset: 4px; }
	.mps-2026 .mpsk-vacio .mpsc-btn-outline-dark:hover { background: none; color: #111111; }

	/* ---- Ítem: foto · (nombre + total) · (stepper + quitar), con toques de 44px ---- */
	.mpsk-item {
		grid-template-columns: 72px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 8px; align-items: start; padding: 16px;
		grid-template-areas: "img nombre total" "img sub sub" "img paso quitar";
	}
	.mpsk-item-img { grid-area: img; width: 72px; height: 72px; }
	.mpsk-item-txt { display: contents; }
	.mpsk-item-txt > a:first-child { grid-area: nombre; font-size: 13px; }
	.mpsk-item-sub { grid-area: sub; font-size: 12px; line-height: 1.45; }
	/* "Quitar" crece por padding hasta 44px de alto (16 + 14 + 14) sin cambiar cómo se ve. */
	.mpsk-quitar { grid-area: quitar; align-self: center; justify-self: end; font-size: 11px; line-height: 16px; padding: 14px 0 14px 12px; }
	.mpsk-stepper { grid-area: paso; justify-self: start; height: 44px; }
	.mps-2026 .mpsk-stepper button { width: 40px; font-size: 16px; }
	.mps-2026 .mpsk-qty { width: 30px; font-size: 16px; } /* 16px: iOS no hace zoom al enfocar la cantidad */
	.mpsk-item-total { grid-area: total; min-width: 0; font-size: 14px; text-align: right; white-space: nowrap; }

	/* ---- Resumen: tarjeta simple; el botón de pago se muda a la barra fija ---- */
	.mpsk-resumen-titulo { display: none; }
	.mpsk-resumen-cuerpo { padding: 20px 18px 16px; gap: 12px; border-bottom: 0; }
	.mpsk-fila { font-size: 13.5px; }
	.mpsk-fila-total { font-size: 18px; padding-top: 12px; }
	.mpsk-resumen-cta { padding: 0 18px 20px; gap: 10px; }
	.mpsk-resumen-cta .mpsk-pagar:not(.mpsk-pagar-off) { display: none; }
	/* 13px (mínimo de cuerpo): dice dónde se aplica el código de descuento, es información comercial. */
	.mpsk-nota { text-align: left; font-size: 13px; line-height: 1.5; }
	/* La franja "Pago cifrado · Recoger en 6 tiendas · Soporte real" se queda: en móvil es la única señal
	   de confianza antes de pagar (el carrito no tiene trustbar). Solo se alinea al gutter. */
	.mpsk-resumen-trust { padding: 14px 18px; }
	.mpsk-ayuda { padding: 16px 18px; }

	/* ---- "Completá tu stack": franja a sangre de 48px ---- */
	.mpsk-upsell { border-radius: 0; padding: 48px 0; gap: 20px; }
	/* Apoya directo en el filo rojo del footer, sin costura gris. Sin :has() queda como antes. */
	.mpsk-main:has(.mpsk-upsell) { padding-bottom: 0; }
	.mpsk-upsell-head { padding: 0 18px; gap: 12px; }
	.mpsk-upsell-head > span:first-child { gap: 5px; }
	.mpsk-upsell-head em { font-size: 10.5px; }
	.mpsk-upsell-head b { font-size: 26px; }
	/* En táctil se desliza con el dedo (snap) y las flechas partían el título en 2 líneas.
	   Los botones siguen en el DOM: el JS del carrusel no se rompe. */
	.mpsk-flechas { display: none; }
	.mpsk-slider { gap: 12px; padding: 0 18px; scroll-padding-left: 18px; }
	.mpsk-u { width: 210px; }
	/* Badge negro, como en las tarjetas del chrome: el rojo queda para el eyebrow y el precio. */
	.mpsk-u-img span { top: 8px; left: 8px; font-size: 9.5px; padding: 4px 8px; background: #0B0B0B; }
	.mpsk-u-txt { padding: 14px; gap: 8px; }
	.mpsk-u-txt em { display: none; } /* el motivo gris repetía el eyebrow y el badge */
	.mpsk-u-txt > a { font-size: 13px; line-height: 1.25; }
	.mpsk-u-pie { gap: 8px; flex-wrap: wrap; }
	.mpsk-u-pie b { font-size: 13px; }
	.mps-2026 .mpsk-u-add { height: 44px; padding: 0 14px; font-size: 11px; }
	.mpsk-upsell-nota { display: none; } /* nota de 11px que explicaba lo que el eyebrow ya dice */

	/* ---- Barra fija de pago ---- */
	.mpsk-barra {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
		display: flex; flex-direction: row; align-items: center; gap: 12px;
		background: #FFFFFF; border-top: 1px solid #E4E2E0;
		padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
	}
	.mpsk-barra-total { display: flex; flex-direction: column; line-height: 1.2; flex: none; }
	.mpsk-barra-total i { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8A8782; }
	.mpsk-barra-total b { font-size: 17px; font-weight: 800; color: #111111; }
	.mpsk-barra-pagar {
		flex: 1; height: 50px; display: inline-flex; flex-direction: row; align-items: center; justify-content: center;
		background: #C73D2C; color: #FFFFFF; text-decoration: none; border-radius: 2px;
		font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
	}
	.mpsk-barra-pagar:hover { background: #B23425; color: #FFFFFF; }
	body.mps-carrito-2026 .mpsc-footer { padding-bottom: 100px; }
	/* Sin productos la plantilla no imprime la barra: el footer no reserva sus 100px. Con :not(:has())
	   un navegador sin :has() ignora la regla y conserva los 100px, que es lo seguro. (0,3,1) > (0,2,1). */
	body.mps-carrito-2026:not(:has(.mpsk-barra)) .mpsc-footer { padding-bottom: 40px; }
	/* Burbuja de WhatsApp fuera: tapaba el upsell y competía con la barra de pago. WhatsApp sigue
	   en la tarjeta de ayuda (con productos), en el estado vacío y en el footer. */
	body.mps-carrito-2026 .wpsr-fm-chat-wrapper { display: none !important; }
}

/* Teléfonos de 320px: con los toques de 44px el stepper (113px) no entraba junto a "Quitar";
 * se achica la foto, el aire y el ancho de los botones del stepper (el alto sigue en 44). */
@media (max-width: 359px) {
	.mpsk-item { grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 10px; padding: 14px 12px; }
	.mpsk-item-img { width: 64px; height: 64px; }
	.mps-2026 .mpsk-stepper button { width: 36px; }
}

/* 2.1 (B32): terminar el pedido por WhatsApp (contorno negro: el rojo queda para pagar). */
.mpsk-wa { display: flex; align-items: center; justify-content: center; height: 48px; margin-top: 10px; border: 0; border-radius: 2px; background: #25D366; color: #FFFFFF; text-decoration: none; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; transition: background-color .15s ease, color .15s ease; }
.mpsk-wa:hover { background: #1EBE5A; color: #FFFFFF; }

/* 2.1: ahorro total (descuentos, combos y envío regalado). */
.mpsk-fila-ahorro span, .mpsk-fila-ahorro b { color: #C73D2C; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
