/* =========================================================================
   cart.css — Carrito
   Layout main + aside, tabla responsive, totales.
   ========================================================================= */

.agc-cart { padding-block: 32px 56px; }
.agc-cart__layout { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: flex-start; }

/* ---------- Tabla ---------- */
.agc-cart__table { width: 100%; border-collapse: collapse; }
.agc-cart__table thead th { text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--texto-2); padding: 0 12px 12px; border-bottom: 1px solid var(--fondo-panel); }
.agc-cart__table td { padding: 16px 12px; border-bottom: 1px solid var(--fondo-panel); vertical-align: middle; }
.agc-cart__table .product-thumbnail img { width: 72px; height: 72px; object-fit: cover; }
.agc-cart__table .product-name a { font-weight: 600; }
.agc-cart__table .product-name a:hover { color: var(--primario); }
.agc-cart__table .product-remove .remove { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; color: var(--texto-2); font-size: 20px; line-height: 1; border-radius: 9999px; }
.agc-cart__table .product-remove .remove:hover { background: var(--alerta); color: var(--texto-inv); }
.agc-cart__table .quantity .qty { width: 64px; height: 42px; text-align: center; border: 1px solid var(--fondo-panel); background: var(--fondo-base); }

.agc-cart__actions { padding-top: 20px; }
.agc-cart__coupon { display: flex; gap: 8px; max-width: 360px; }
.agc-cart__coupon .input-text { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--fondo-panel); background: var(--fondo-base); }
.agc-cart__coupon .input-text:focus { outline: none; border-color: var(--primario); }

/* ---------- Aside / totales ---------- */
.agc-cart__collaterals { background: var(--fondo-suave); padding: 24px; position: sticky; top: calc(var(--nav-h) + 16px); }
.agc-cart__collaterals h2 { font-size: 18px; margin-bottom: 16px; }
.cart_totals table { width: 100%; border-collapse: collapse; }
.cart_totals th, .cart_totals td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--fondo-panel); font-size: 14px; }
.cart_totals .order-total th, .cart_totals .order-total td { font-size: 18px; font-weight: 700; border-bottom: 0; }
.cart_totals td { text-align: right; }
.wc-proceed-to-checkout { margin-top: 18px; }
.wc-proceed-to-checkout .checkout-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; background: var(--acento); color: var(--texto); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; transition: background var(--t-base); }
.wc-proceed-to-checkout .checkout-button:hover { background: var(--acento-hover); }

.woocommerce-cart-form .actions .button,
.woocommerce-info, .woocommerce-message { /* notices */ }
.woocommerce-message, .woocommerce-info, .woocommerce-error { padding: 14px 18px; margin-bottom: 20px; background: var(--fondo-suave); border-left: 4px solid var(--primario); list-style: none; font-size: 14px; }
.woocommerce-error { border-left-color: var(--alerta); }

/* ---------- Order bump ---------- */
.agc-bump { margin-top: 20px; border: 2px dashed var(--primario); background: var(--fondo-suave); }
.agc-bump__inner { display: flex; align-items: center; gap: 14px; padding: 16px; cursor: pointer; }
.agc-bump__check { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--primario); }
.agc-bump__thumb { width: 64px; height: 64px; flex-shrink: 0; }
.agc-bump__thumb img { width: 100%; height: 100%; object-fit: cover; }
.agc-bump__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agc-bump__kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--primario); }
.agc-bump__name { font-weight: 600; }
.agc-bump__price { font-weight: 700; }
.agc-bump__tf { display: block; font-size: 12px; font-weight: 700; color: var(--verde-ok); }
.agc-bump.is-loading { opacity: .6; pointer-events: none; }

@media (min-width: 992px) {
	.agc-cart__layout { grid-template-columns: 1fr 340px; gap: 40px; }
}

/* ---------- Tabla de carrito apilada en mobile (estilo propio, no nativo WC) ---------- */
@media (max-width: 767px) {
	.agc-cart__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
	.agc-cart__table tr { display: block; border-bottom: 1px solid var(--fondo-panel); padding: 8px 0 12px; position: relative; }
	.agc-cart__table td { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; padding: 7px 4px; text-align: right; }
	.agc-cart__table td[data-title]::before { content: attr(data-title); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--texto-2); text-align: left; }
	.agc-cart__table .product-name { padding-right: 36px; } /* espacio para la X */
	.agc-cart__table .product-thumbnail { justify-content: flex-start; padding-top: 12px; }
	.agc-cart__table .product-thumbnail img { width: 84px; height: 84px; }
	.agc-cart__table .product-remove { position: absolute; top: 10px; right: 4px; padding: 0; }
	.agc-cart__table .quantity .qty { width: 72px; }
}
