/* ==========================================================================
   Página del carrito: tarjetas, acciones por producto, sugerencias y
   "Guardado para después".
   ========================================================================== */

.wp-block-woocommerce-cart.alignwide { max-width: none; }

/* Columna de productos como tarjeta */
.wc-block-cart .wc-block-cart__main {
	box-sizing: border-box;
	padding: 24px 28px 8px !important;
	border: 1px solid var(--nh-line);
	border-radius: 24px;
	background: #fff;
}
.wc-block-cart .wc-block-cart-items { border: 0; margin: 0; }
.wc-block-cart .wc-block-cart-items__header { font-size: 13px; color: var(--nh-muted); text-transform: none; letter-spacing: 0; }
.wc-block-cart .wc-block-cart-items__header th { padding-bottom: 14px !important; border-bottom: 1px solid var(--nh-line); }
.wc-block-cart .wc-block-cart-items__row { border-bottom: 1px solid var(--nh-line); }
.wc-block-cart .wc-block-cart-items__row:last-child { border-bottom: 0; }
.wc-block-cart .wc-block-cart-items__row > td { padding-top: 22px !important; padding-bottom: 22px !important; border-top: 0 !important; }
.is-large.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image { width: 140px; padding-right: 22px !important; }
.is-large.wc-block-cart .wc-block-cart-item__image img { width: 140px; height: 140px; }
.wc-block-cart .wc-block-cart-item__image img {
	object-fit: contain;
	box-sizing: border-box;
	padding: 6px;
	border-radius: 16px !important;
	background: var(--nh-mist) !important;
}
.wc-block-cart .wc-block-components-product-name { font-size: 17px; line-height: 1.3; text-decoration: none; }
.wc-block-cart .wc-block-components-product-name:hover { color: var(--nh-blue); }
.wc-block-cart .wc-block-cart-item__prices { font-size: 14px; }
.wc-block-cart .wc-block-cart-item__total .wc-block-components-product-price__value { font-family: var(--nh-font-display); font-weight: 800; font-size: 20px; }

/* Cantidad y acciones en una sola línea */
.wc-block-cart .wc-block-cart-item__quantity { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.wc-block-cart .wc-block-components-quantity-selector { border: 2px solid var(--nh-orange) !important; border-radius: var(--nh-pill) !important; margin: 0 !important; width: 120px; }
.wc-block-cart .wc-block-cart-item__remove-link,
.nh-cart-acts button {
	border: 0;
	background: none;
	padding: 0;
	font: inherit;
	font-size: 14px !important;
	color: var(--nh-blue) !important;
	text-decoration: none !important;
	cursor: pointer;
}
.wc-block-cart .wc-block-cart-item__remove-link:hover,
.nh-cart-acts button:hover { text-decoration: underline !important; }
.nh-cart-acts { display: inline-flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.nh-cart-acts button { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; }
.nh-cart-acts button + button::before { content: ""; width: 1px; height: 16px; background: #CBD5E1; }
.wc-block-cart .wc-block-cart-item__remove-link + .nh-cart-acts::before { content: ""; width: 1px; height: 16px; background: #CBD5E1; }
.nh-cart-acts { gap: 8px 14px; }
.nh-cart-acts button:disabled { opacity: .5; cursor: default; }
.nh-cart-acts--classic { display: block; margin-top: 6px; font-size: 13.5px; }
.nh-cart-acts--classic a { text-decoration: none; }

/* Resumen */
.wc-block-cart .wc-block-cart__sidebar { display: flex; flex-direction: column; gap: 20px; }
.wc-block-cart .wc-block-components-sidebar .wp-block-woocommerce-cart-totals-block,
.wc-block-cart .wc-block-cart__sidebar > .wp-block-woocommerce-cart-totals-block {
	box-sizing: border-box;
	padding: 22px 24px;
	border: 1px solid var(--nh-line);
	border-radius: 24px;
	background: #fff;
}
.wc-block-cart .wc-block-cart__totals-title { font-size: 13px !important; color: var(--nh-muted); }
.wc-block-cart .wc-block-components-totals-item__label { font-size: 15px; }
.wc-block-cart .wc-block-components-totals-discount .wc-block-components-totals-item__value,
.wc-block-cart .wc-block-components-totals-fees .wc-block-components-totals-item__value { color: var(--nh-green); }
.wc-block-cart .wc-block-cart__submit-button {
	min-height: 54px;
	border-radius: var(--nh-pill) !important;
	background: var(--nh-orange) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	border: 0 !important;
}
.wc-block-cart .wc-block-cart__submit-button:hover { background: var(--nh-orange-dark) !important; }

/* Sugerencias junto al resumen y en "Ver productos parecidos" */
.nh-cart-aside .nh-mini {
	padding: 20px 22px;
	border: 1px solid var(--nh-line);
	border-radius: 24px;
	background: #fff;
}
.nh-mini__title { margin: 0 0 14px; font-family: var(--nh-font-body); font-size: 16px; font-weight: 700; line-height: 1.3; }
.nh-mini__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.nh-mini__item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; }
.nh-mini__img img { width: 72px; height: 72px; object-fit: contain; box-sizing: border-box; padding: 6px; border-radius: 12px; background: var(--nh-mist); display: block; }
.nh-mini__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nh-mini__name { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--nh-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nh-mini__name:hover { color: var(--nh-blue); }
.nh-mini__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nh-mini__price { font-weight: 700; font-size: 14.5px; }
.nh-mini__price del { font-weight: 400; font-size: 12.5px; color: var(--nh-muted); }
.nh-mini__price ins { text-decoration: none; }
.nh-mini__add {
	flex: none;
	height: 32px;
	padding: 0 14px;
	border-radius: var(--nh-pill);
	border: 1px solid var(--nh-blue);
	background: #fff;
	color: var(--nh-blue);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	cursor: pointer;
}
.nh-mini__add:hover { background: var(--nh-blue); color: #fff; }
.nh-mini__add.is-done { border-color: var(--nh-green); color: var(--nh-green); background: var(--nh-green-soft); }

/* Guardado para después */
.nh-cartx { margin-top: 28px; }
.nh-later {
	box-sizing: border-box;
	max-width: calc(100% - 380px);
	padding: 24px 28px;
	border: 1px solid var(--nh-line);
	border-radius: 24px;
	background: #fff;
}
.nh-later[hidden] { display: none; }
.nh-later__title { margin: 0 0 8px; font-size: 22px; }
.nh-later__title span { color: var(--nh-muted); font-weight: 600; }
.nh-later__list { list-style: none; margin: 0; padding: 0; }
.nh-later__item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--nh-line); }
.nh-later__item:first-child { border-top: 0; }
.nh-later__img img { width: 96px; height: 96px; object-fit: contain; box-sizing: border-box; padding: 8px; border-radius: 14px; background: var(--nh-mist); display: block; }
.nh-later__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nh-later__name { font-weight: 600; color: var(--nh-ink); text-decoration: none; }
.nh-later__name:hover { color: var(--nh-blue); }
.nh-later__attrs { font-size: 13px; color: var(--nh-muted); }
.nh-later__info .stock { margin: 0; font-size: 13px; font-weight: 600; color: var(--nh-green); }
.nh-later__info .stock.out-of-stock { color: var(--nh-muted); }
.nh-later__price del { font-weight: 400; color: var(--nh-muted); font-size: 13px; }
.nh-later__price ins { text-decoration: none; }
.nh-later__acts { display: flex; gap: 10px; align-items: center; }
.nh-later__move { min-height: 40px; padding: 0 16px; font-size: 14px; }
.nh-later__del {
	min-height: 40px;
	padding: 0 16px;
	border-radius: var(--nh-pill);
	border: 1px solid #CBD5E1;
	background: #fff;
	color: var(--nh-ink);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	cursor: pointer;
}
.nh-later__del:hover { border-color: var(--nh-ink); }
.is-busy { opacity: .6; pointer-events: none; }

@media (max-width: 1024px) {
	.nh-later { max-width: none; }
}
@media (max-width: 767px) {
	.wc-block-cart .wc-block-cart__main { padding: 0 !important; border: 0; border-radius: 0; }
	.nh-cart-acts button { white-space: normal; text-align: left; }
	.nh-cart-acts button + button::before { display: none; }
	.wc-block-cart .wc-block-cart-items { table-layout: fixed; width: 100%; }
	.wc-block-cart .wc-block-cart-items__row > td { padding-top: 16px !important; padding-bottom: 16px !important; }
	.wc-block-cart .wc-block-components-product-name { font-size: 15px; }
	.wc-block-cart .wc-block-cart-item__total .wc-block-components-product-price__value { font-size: 16px; }
	.wc-block-cart .wc-block-components-product-metadata { display: none; }
	.nh-cart-acts { flex-basis: 100%; }
	.wc-block-cart .wc-block-cart-item__remove-link + .nh-cart-acts::before { display: none; }
	.nh-later { padding: 18px 16px; border-radius: 20px; }
	.nh-later__item { grid-template-columns: 72px minmax(0, 1fr); }
	.nh-later__img img { width: 72px; height: 72px; }
	.nh-later__acts { grid-column: 1 / -1; }
	.nh-later__acts > * { flex: 1; justify-content: center; }
}
