/* Estructura y líneas de producto. Controles y estado gestionados por Blocks. */
.lucig-carrito-page {
	position: relative;
	isolation: isolate;
	background: linear-gradient(180deg, var(--lg-pink-50), var(--lg-pink-100));
}

.lucig-carrito-page__decoration {
	position: absolute;
	inset: 0;
	z-index: -1;
	overflow: clip;
	pointer-events: none;
}

.lucig-carrito-page__flowers {
	position: absolute;
	top: 12px;
	width: 64px;
	max-width: none;
	opacity: 0.6;
}

.lucig-carrito-page__flowers--left {
	left: -52px;
}

.lucig-carrito-page__flowers--right {
	right: -52px;
}

.lucig-carrito {
	--lucig-cart-gap: 28px;
	width: min(calc(100% - 32px), 1200px);
	padding-block: 24px 48px;
}

.lucig-carrito__breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 0.875rem;
	color: var(--lg-text-soft);
}

.lucig-carrito__breadcrumbs a {
	color: var(--lg-text-soft);
	text-decoration: none;
}

.lucig-carrito__breadcrumbs [aria-current] {
	color: var(--lg-pink-800);
}

.lucig-carrito__heading {
	padding-block: 20px 28px;
	text-align: center;
}

.lucig-carrito__title {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0;
	color: var(--lg-pink-600);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700;
}

.lucig-carrito__title .lg-icon {
	width: 0.7em;
	height: 0.7em;
	transform: rotate(-12deg);
}

.lucig-carrito__intro {
	max-width: 560px;
	margin: 8px auto 0;
	color: var(--lg-purple-700);
	font-family: var(--lg-font-heading);
	font-size: clamp(1rem, 2vw, 1.25rem);
	font-weight: 500;
	line-height: 1.4;
}

.lucig-carrito .lg-content {
	margin-block-end: 0;
}

.lucig-carrito .wp-block-woocommerce-cart {
	--wc-separator-color: var(--lg-border);
	margin-block: 0;
	color: var(--lg-text);
}

/* Clases nativas contrastadas con WooCommerce 11.1.2. Revisar tras actualizar
 * Blocks: no se reubican nodos React ni se alteran sus bloqueos internos. */
.lucig-carrito .wc-block-cart.wc-block-components-sidebar-layout {
	align-items: flex-start;
	flex-direction: column;
	gap: var(--lucig-cart-gap);
	padding-top: 0;
}

.lucig-carrito .wc-block-cart .wc-block-cart__main,
.lucig-carrito .wc-block-cart .wc-block-cart__sidebar {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 20px;
	border: 1px solid var(--lg-pink-100);
	border-radius: var(--lg-radius-lg);
	background: var(--lg-white);
	box-shadow: var(--lg-shadow-soft);
}

.lucig-carrito .wc-block-cart .wc-block-cart__main {
	order: 0;
}

.lucig-carrito .wc-block-cart .wc-block-cart__sidebar {
	order: 1;
}

/* Paso 3. Se conserva la tabla, su caption y cada control nativo.
 * Estos selectores de filas corresponden a WooCommerce Blocks 11.1.2. */
.lucig-carrito table.wc-block-cart-items > caption.screen-reader-text {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	text-align: left;
}

.lucig-carrito .wc-block-cart-items caption h2 {
	margin: 0 0 20px;
	color: var(--lg-pink-600);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header {
	color: var(--lg-pink-800);
	text-transform: none;
}

.lucig-carrito table.wc-block-cart-items .wc-block-cart-items__header th {
	padding: 12px;
	background: var(--lg-pink-100) !important;
	font-weight: 800;
}

.lucig-carrito .wc-block-cart-items__header th:first-child {
	border-radius: var(--lg-radius-sm) 0 0 var(--lg-radius-sm);
}

.lucig-carrito .wc-block-cart-items__header th:last-child {
	border-radius: 0 var(--lg-radius-sm) var(--lg-radius-sm) 0;
}

.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	gap: 12px;
	padding-block: 20px;
	border-bottom: 1px solid var(--lg-border);
}

.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
	grid-column: 1;
	grid-row: 1;
	padding: 0;
}

.lucig-carrito .wc-block-cart-item__image img {
	display: block;
	border-radius: var(--lg-radius-sm);
	background: var(--lg-pink-50);
}

.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
	padding: 0;
}

.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__wrap {
	gap: 8px;
}

.lucig-carrito table.wc-block-cart-items .wc-block-components-product-name {
	color: var(--lg-purple-700);
	font-family: var(--lg-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	text-decoration: none;
}

.lucig-carrito .wc-block-components-product-name:hover {
	text-decoration: underline;
}

.lucig-carrito .wc-block-cart-item__prices,
.lucig-carrito .wc-block-cart-item__total {
	color: var(--lg-pink-800);
	font-weight: 800;
}

.lucig-carrito .wc-block-cart-item__prices del {
	color: var(--lg-text-soft);
	font-weight: 400;
}

.lucig-carrito .wc-block-components-product-metadata {
	color: var(--lg-text-soft);
	overflow-wrap: anywhere;
}

.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__quantity {
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}

.lucig-carrito .wc-block-cart-item__quantity::before {
	content: var(--lucig-cart-quantity-label);
	flex-basis: 100%;
	color: var(--lg-text-soft);
	font-size: 0.8125rem;
}

.lucig-carrito .wc-block-cart-item__quantity .wc-block-components-quantity-selector {
	width: 132px;
	min-height: 44px;
	border-color: var(--lg-border);
	border-radius: var(--lg-radius-pill);
	background: var(--lg-pink-100);
}

.lucig-carrito .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	background: var(--lg-white);
	color: var(--lg-text);
	font-size: 1rem;
}

.lucig-carrito .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	min-width: 44px;
	min-height: 44px;
	color: var(--lg-pink-800);
	font-size: 1.25rem;
	opacity: 1;
}

.lucig-carrito .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
	color: var(--lg-text-soft);
	opacity: 0.5;
}

.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--lg-radius-pill);
	color: var(--lg-pink-800);
}

.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover {
	background: var(--lg-pink-100);
	color: var(--lg-pink-800);
}

.lucig-carrito .wc-block-components-quantity-selector :focus-visible,
.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__remove-link:focus-visible {
	outline: 3px solid var(--lg-purple-700);
	outline-offset: 2px;
}

.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
	grid-column: 2;
	grid-row: 2;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
	text-align: left;
}

.lucig-carrito .wc-block-cart-item__total::before {
	content: var(--lucig-cart-subtotal-label);
	color: var(--lg-text-soft);
	font-size: 0.8125rem;
	font-weight: 400;
}

/* Paso 4: formulario y validaciones nativos. El cupón permanece en el resumen;
 * no se alteran pointer-events, nonces ni los bloqueos de actualización de Blocks. */
.lucig-carrito .wc-block-components-totals-coupon {
	margin-block: 16px;
}

.lucig-carrito .wc-block-components-totals-coupon .wc-block-components-panel__button {
	min-height: 44px;
	padding-block: 10px;
	color: var(--lg-purple-700);
	font-family: var(--lg-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
}

.lucig-carrito .wc-block-components-totals-coupon__form {
	align-items: flex-start;
	gap: 12px;
}

.lucig-carrito .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input {
	flex: 1 1 180px;
	min-width: 0;
}

.lucig-carrito .wc-block-components-totals-coupon__input input {
	min-height: 54px;
	border-color: var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: var(--lg-white);
	color: var(--lg-text);
}

.lucig-carrito .wc-block-components-totals-coupon__input label {
	color: var(--lg-text-soft);
}

.lucig-carrito .wc-block-components-totals-coupon__input input:focus {
	border-color: var(--lg-purple-700);
	box-shadow: 0 0 0 2px var(--lg-purple-100);
}

.lucig-carrito .wc-block-components-totals-coupon__input input[aria-invalid="true"] {
	border-color: var(--lg-pink-800);
}

.lucig-carrito .wc-block-components-totals-coupon .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button {
	flex: 0 0 auto;
	min-height: 54px;
	margin: 0;
	padding: 12px 20px;
	border: 1px solid var(--lg-pink-600);
	border-radius: var(--lg-radius-pill);
	background: var(--lg-white);
	color: var(--lg-pink-800);
	font-weight: 800;
	line-height: 1.4;
}

.lucig-carrito .wc-block-components-totals-coupon__button:hover:not(:disabled):not([aria-disabled="true"]) {
	background: var(--lg-pink-100);
}

.lucig-carrito .wc-block-components-totals-coupon__button:disabled,
.lucig-carrito .wc-block-components-totals-coupon__button[aria-disabled="true"] {
	opacity: 0.6;
	cursor: not-allowed;
}

.lucig-carrito .wc-block-components-totals-coupon .wc-block-components-validation-error {
	margin-block-start: 12px;
	color: var(--lg-pink-800);
	font-size: 0.875rem;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.lucig-carrito .wc-block-components-totals-coupon .wc-block-components-validation-error p {
	margin: 0;
}

.lucig-carrito .wc-block-components-totals-coupon .wc-block-components-validation-error svg {
	flex-shrink: 0;
}

.lucig-carrito .wc-block-components-totals-discount__coupon-list button {
	min-width: 44px;
	min-height: 44px;
}

.lucig-carrito .wc-block-components-totals-coupon :focus-visible,
.lucig-carrito .wc-block-components-totals-discount__coupon-list button:focus-visible {
	outline: 3px solid var(--lg-purple-700);
	outline-offset: 3px;
}

.lucig-carrito .wc-block-components-notice-banner {
	border-radius: var(--lg-radius-sm);
	overflow-wrap: anywhere;
}

/* Paso 6: contenido propio en ExperimentalOrderMeta, antes del checkout nativo. */
.lucig-carrito__support {
	margin-block: 20px 0;
}

.lucig-carrito__whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 52px;
	padding: 10px 16px;
	border: 1px solid var(--lg-pink-600);
	border-radius: var(--lg-radius-pill);
	background: var(--lg-white);
	color: var(--lg-pink-800);
	font-size: 1rem;
	font-weight: 800;
	text-decoration: none;
}

a.lucig-carrito__whatsapp:hover {
	background: var(--lg-pink-100);
}

.lucig-carrito__whatsapp.is-disabled {
	border-color: var(--lg-border);
	background: var(--lg-pink-50);
	color: var(--lg-text-soft);
}

.lucig-carrito__help-status {
	margin: 8px 0 0;
	color: var(--lg-text-soft);
	font-size: 0.8125rem;
	line-height: 1.5;
	text-align: center;
}

.lucig-carrito__benefits {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 20px 0 0;
	padding: 16px 8px;
	border-radius: var(--lg-radius-md);
	background: var(--lg-pink-50);
	list-style: none;
}

.lucig-carrito__benefits li {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: var(--lg-purple-700);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	overflow-wrap: anywhere;
}

.lucig-carrito__benefit-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--lg-radius-pill);
	background: var(--lg-pink-100);
	color: var(--lg-pink-800);
}

.lucig-carrito__continue {
	margin: 24px 0 0;
}

.lucig-carrito__continue a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding-block: 10px;
	color: var(--lg-pink-800);
	font-weight: 800;
	text-decoration: none;
}

.lucig-carrito__continue a:hover {
	text-decoration: underline;
}

.lucig-carrito__continue .lg-icon {
	transform: rotate(180deg);
}

/* Paso 5: resumen y enlace nativos. Las filas se muestran según los datos
 * de Blocks; no se generan importes, costes de envío ni medios de pago. */
.lucig-carrito .wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title {
	display: block;
	margin: 0 0 12px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--lg-border);
	color: var(--lg-pink-600);
	font-family: var(--lg-font-heading);
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-item {
	column-gap: 12px;
	row-gap: 0;
	padding-block: 14px;
	font-size: 1rem;
	line-height: 1.5;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-item__label {
	color: var(--lg-text);
	font-weight: 700;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-item__value {
	min-width: 0;
	color: var(--lg-text);
	font-weight: 600;
	overflow-wrap: anywhere;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-item__description {
	color: var(--lg-text-soft);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: anywhere;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-footer-item {
	align-items: baseline;
	padding-block: 20px;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	font-size: 1.125rem;
	line-height: 1.4;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--lg-pink-800);
	font-family: var(--lg-font-heading);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-discount__coupon-list {
	margin-block-start: 10px;
}

.lucig-carrito .wc-block-cart__sidebar .wc-block-components-totals-discount__coupon-list .wc-block-components-chip {
	max-width: 100%;
	border-color: var(--lg-border);
	border-radius: var(--lg-radius-pill);
	background: var(--lg-pink-50);
	color: var(--lg-pink-800);
}

.lucig-carrito .wc-block-cart .wc-block-cart__submit {
	/* Mantiene espacio para el sensor nativo cuando el botón pasa a posición fija. */
	min-height: 56px;
	margin: 20px 0 0;
}

.lucig-carrito .wc-block-cart .wc-block-cart__submit-container .wc-block-cart__submit-button {
	min-height: 56px;
	padding: 13px 20px;
	border: 1px solid var(--lg-pink-600);
	border-radius: var(--lg-radius-pill);
	background: linear-gradient(110deg, var(--lg-pink-600), var(--lg-pink-700));
	color: var(--lg-white);
	font-family: var(--lg-font-body);
	font-size: 1.25rem;
	font-weight: 800;
	line-height: 1.4;
	box-shadow: var(--lg-shadow-soft);
	text-decoration: none;
	transition: background 150ms ease, transform 150ms ease;
}

.lucig-carrito .wc-block-cart__submit-button .wc-block-components-button__text {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.lucig-carrito .wc-block-cart__submit-button .wc-block-components-button__text::after {
	content: "";
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	background: currentColor;
	mask: var(--lucig-cart-checkout-arrow) center / contain no-repeat;
}

.lucig-carrito .wc-block-cart .wc-block-cart__submit-container .wc-block-cart__submit-button:hover:not([aria-disabled="true"]):not(.wc-block-cart__submit-button--loading) {
	background: var(--lg-pink-700);
	transform: translateY(-2px);
}

.lucig-carrito .wc-block-cart .wc-block-cart__submit-container .wc-block-cart__submit-button:focus-visible {
	outline: 3px solid var(--lg-purple-700);
	outline-offset: 4px;
}

.lucig-carrito .wc-block-cart__submit-button[aria-disabled="true"] {
	opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
	.lucig-carrito .wc-block-cart .wc-block-cart__submit-container .wc-block-cart__submit-button {
		transition: none;
	}

	.lucig-carrito .wc-block-cart .wc-block-cart__submit-container .wc-block-cart__submit-button:hover {
		transform: none;
	}
}

@media (max-width: 991px) {
	/* La tabla nativa vuelve a usar columnas desde 700px de contenedor.
	 * Mantener aquí filas de ancho completo evita celdas comprimidas en tablet. */
	.lucig-carrito .wc-block-cart table.wc-block-cart-items,
	.lucig-carrito table.wc-block-cart-items tbody {
		display: block;
		width: 100%;
	}

	.lucig-carrito table.wc-block-cart-items caption {
		display: block;
	}

	.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__header {
		display: none;
	}
}

@media (min-width: 768px) {
	.lucig-carrito {
		width: min(calc(100% - 48px), 1200px);
		padding-block-start: 28px;
	}

	.lucig-carrito-page__flowers {
		width: 110px;
		opacity: 0.85;
	}

	.lucig-carrito-page__flowers--left {
		left: -90px;
	}

	.lucig-carrito-page__flowers--right {
		right: -90px;
	}

	.lucig-carrito__heading {
		padding-block: 8px 36px;
	}
}

@media (min-width: 992px) {
	.lucig-carrito .wc-block-cart.wc-block-components-sidebar-layout {
		flex-direction: row;
	}

	.lucig-carrito .wc-block-cart .wc-block-cart__main {
		width: calc((100% - var(--lucig-cart-gap)) * 0.65);
		padding: 24px;
	}

	.lucig-carrito .wc-block-cart .wc-block-cart__sidebar {
		width: calc((100% - var(--lucig-cart-gap)) * 0.35);
		padding: 24px;
	}

	.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		display: table-row;
	}

	.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row td {
		padding-block: 20px;
		border-bottom: 1px solid var(--lg-border);
	}

	.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image {
		width: 96px;
		padding-right: 16px;
	}

	.lucig-carrito .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total {
		display: table-cell;
		width: 100px;
		padding-left: 12px;
		text-align: right;
	}

	.lucig-carrito .wc-block-cart-item__total::before {
		content: none;
	}

	.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__wrap {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 184px;
		align-items: start;
		column-gap: 12px;
	}

	.lucig-carrito .wc-block-cart-item__wrap > :not(.wc-block-cart-item__quantity) {
		grid-column: 1;
	}

	.lucig-carrito table.wc-block-cart-items .wc-block-cart-item__quantity {
		grid-column: 2;
		grid-row: 1 / span 4;
		align-self: center;
	}
}

@media (min-width: 1280px) {
	.lucig-carrito-page__flowers {
		width: min(160px, calc((100vw - 1200px) / 2 + 12px));
	}

	.lucig-carrito-page__flowers--left {
		left: -20px;
	}

	.lucig-carrito-page__flowers--right {
		right: -20px;
	}
}
