/*
 * Estado funcional del sincronizador de carrito.
 * La composicion visual de las lineas vive exclusivamente en
 * tarjeta-carrito.css; este archivo no declara layouts de tarjetas.
 */

html body .ctsys-sync-cantidad input.qty {
	box-sizing: border-box;
	font-variant-numeric: tabular-nums;
	text-align: center;
	appearance: textfield;
}

html body .ctsys-sync-cantidad input.qty::-webkit-inner-spin-button,
html body .ctsys-sync-cantidad input.qty::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

html body .ctsys-sync-cantidad__accion {
	font-size: 0;
	line-height: 1;
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

/* El catálogo comparte el contrato táctil del carrito: manipulación directa,
 * sin doble-tap zoom ni escalado visual del navegador. */
html body :is(
	.ctsys-home-producto-simple__cantidad,
	.ctsys-home-producto-simple__cantidad button,
	[data-ctsys-anadir-carrito],
	[data-ctsys-comprar-ahora]
) {
	touch-action: manipulation;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
	-webkit-appearance: none;
	appearance: none;
}

html body .ctsys-sync-cantidad__accion:disabled {
	cursor: not-allowed;
	opacity: .42;
}

html body .ctsys-sync-cantidad__accion:focus-visible,
html body .ctsys-carrito-linea__quitar:focus-visible,
html body .ctsys-checkout-linea__eliminar:focus-visible,
html body .ctsys-carrito-linea__eliminar:focus-visible {
	outline: 2px solid var(--ct-foco-teclado, #111111);
	outline-offset: 2px;
}

html body .ctsys-carrito-panel__contenido,
html body .ctsys-carrito__grid,
html body .ctsys-checkout__grid,
html body .ctsys-checkout-productos,
html body .ctsys-carrito-linea__datos,
html body .ctsys-carrito-linea__nombre,
html body .ctsys-carrito-linea__titulo,
html body .ctsys-carrito-linea__precio,
html body .ctsys-carrito-linea__unitario {
	min-width: 0;
	max-width: 100%;
}

html body .ctsys-carrito,
html body .ctsys-checkout-productos,
html body #ctsys-carrito-panel {
	overflow-x: hidden;
}

html body .ctsys-carrito-linea.is-sync-pending,
html body .ctsys-carrito.is-sync-pending,
html body .ctsys-checkout-productos.is-sync-pending {
	opacity: .82;
	transition: opacity 120ms var(--ct-ease, ease);
}

html body .ctsys-carrito-linea.is-removing {
	opacity: .42;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	html body .ctsys-carrito-linea.is-sync-pending,
	html body .ctsys-carrito.is-sync-pending,
	html body .ctsys-checkout-productos.is-sync-pending {
	transition: none;
	}
}
