/**
 * Cart Page CSS
 * Estilos para la página del carrito de WooCommerce
 * Mantiene compatibilidad con la estructura de tabla de WooCommerce
 *
 * @package ClimaZona
 * @version 2.7.0
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --cart-bg: #fff;
    --cart-bg-secondary: var(--theme-secondary-light, #f4f4f5);
    --cart-bg-highlight: var(--theme-secondary, #334155);
    --cart-text: #1e293b;
    --cart-text-light: #64748b;
    --cart-text-muted: #94a3b8;
    --cart-border: var(--border-color, #e4e4e7);
    --cart-border-light: var(--border-color-light, #f4f4f5);
    --cart-primary: var(--theme-primary, #007bff);
    --cart-primary-dark: var(--theme-primary, #007bff);
    --cart-primary-light: var(--theme-primary-light, #dbeafe);
    --cart-success: #22c55e;
    --cart-success-light: #dcfce7;
    --cart-error: #ef4444;
    --cart-error-light: #fee2e2;
    --cart-info: #3b82f6;
    --cart-info-light: #dbeafe;
    --cart-radius: 0.5rem;
    --cart-radius-lg: 0.75rem;
    --cart-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --cart-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --cart-transition: all 0.2s ease;
}

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */
body.woocommerce-cart .woocommerce {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 1200px) {
    body.woocommerce-cart .woocommerce {
        grid-template-columns: 7.5fr 2.5fr;
    }
}

body.woocommerce-cart .woocommerce > form.woocommerce-cart-form,
body.woocommerce-cart .woocommerce > .cart-collaterals {
    min-width: 0;
}

body.woocommerce-cart .woocommerce > :not(form.woocommerce-cart-form):not(.cart-collaterals) {
    grid-column: 1 / -1;
}

/* ========================================
   CABECERA DEL CARRITO
   ======================================== */
.cart-header {
    margin-bottom: 1.5rem;
}

.cart-header__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--cart-text);
}

.cart-header__icon {
    color: var(--cart-primary);
    flex-shrink: 0;
}

/* ========================================
   TABLA DEL CARRITO
   ======================================== */
.woocommerce-cart-form__contents {
    width: 100%;
    border-collapse: collapse;
    background: var(--cart-bg);
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius-lg);
    overflow: hidden;
    box-shadow: var(--cart-shadow);
}

.woocommerce-cart .woocommerce-cart-form__contents {
    table-layout: fixed;
}

.woocommerce table.shop_table {
    border: none!important;
}

/* Cabecera de la tabla */
.woocommerce-cart-form__contents thead {
    background: var(--cart-bg-secondary);
}

.woocommerce-cart-form__contents thead th {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--cart-text-light);
    border-bottom: 1px solid var(--cart-border);
    text-align: left;
}

.woocommerce-cart-form__contents thead th.product-remove,
.woocommerce-cart-form__contents thead th.product-thumbnail {
    width: 50px;
}

.woocommerce-cart-form__contents thead th.product-thumbnail,
.woocommerce-cart-form__contents td.product-thumbnail {
    width: 90px;
}

.woocommerce-cart-form__contents thead th.product-price,
.woocommerce-cart-form__contents thead th.product-quantity,
.woocommerce-cart-form__contents thead th.product-subtotal {
    text-align: center;
    width: 120px;
}

/* Filas del carrito - producto */
.woocommerce-cart-form__cart-item {
    border-bottom: 1px solid var(--cart-border-light);
}

.woocommerce-cart-form__cart-item:last-child {
    border-bottom: none;
}

.woocommerce-cart-form__cart-item td {
    padding: 1rem 0.5rem;
    vertical-align: middle;
}

/* Botón eliminar */
.woocommerce-cart-form__contents .product-remove {
    text-align: center;
    width: 50px;
}

.woocommerce-cart-form__contents .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cart-bg-secondary);
    color: var(--cart-text-muted) !important;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
    transition: var(--cart-transition);
}

.woocommerce-cart-form__contents .product-remove a.remove:hover {
    background: var(--cart-error-light);
    color: var(--cart-error) !important;
}

/* Imagen del producto */
.woocommerce-cart-form__contents .product-thumbnail {
    width: 90px;
    padding: 0.75rem;
}

.woocommerce-cart-form__contents .product-thumbnail a {
    display: block;
}

.woocommerce-cart-form__contents .product-thumbnail img {
    width: 70px;
    height: 70px;
    max-width: 70px;
    object-fit: contain;
    border-radius: var(--cart-radius);
    border: 1px solid var(--cart-border-light);
    background: var(--cart-bg);
}

/* Nombre del producto */
.woocommerce-cart-form__contents .product-name {
    font-weight: 500;
    color: var(--cart-text);
    max-width: 300px;
}

.woocommerce-cart-form__contents .product-name > a {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.woocommerce-cart-form__contents .product-name > a:hover {
    color: var(--cart-primary);
}

.woocommerce-cart-form__contents .product-name .variation {
    font-size: 0.8125rem;
    color: var(--cart-text-light);
    margin-top: 0.25rem;
}

.woocommerce-cart-form__contents .product-name .variation dt,
.woocommerce-cart-form__contents .product-name .variation dd {
    display: inline;
    margin: 0;
}

.woocommerce-cart-form__contents .product-name .variation dt::after {
    content: ": ";
}

/* ========================================
   FILA DE ENVÍOS (colspan completo)
   Separación visual entre parejas producto + envío
   ======================================== */
.cart-item-shipping-row {
    background: var(--cart-bg-secondary);
}

.cart-item-shipping-row:hover {
    background: var(--cart-bg-secondary);
}

.cart-item-shipping-cell {
    padding: 0 !important;
    border-bottom: 3px solid var(--cart-border);
    position: relative;
}

/* Línea separadora sutil entre parejas */
.cart-item-shipping-cell::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(to bottom, var(--cart-border-light) 0%, transparent 100%);
    pointer-events: none;
}

/* Última fila de envíos no necesita separador extra */
.woocommerce-cart-form__contents tbody tr:last-of-type .cart-item-shipping-cell::after,
.cart-item-shipping-row:last-of-type .cart-item-shipping-cell::after {
    display: none;
}

.cart-item-shipping-cell .envios-servicios {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

/* Precio */
.woocommerce-cart-form__contents .product-price,
.woocommerce-cart-form__contents .product-subtotal {
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.woocommerce-cart-form__contents th.product-subtotal,
.woocommerce-cart-form__contents td.product-subtotal {
    width: 1%;
}

.woocommerce-cart-form__contents td.product-subtotal .tax_label {
    display: block;
    white-space: normal;
    font-weight: 400;
    margin-top: 2px;
}

.woocommerce-cart-form__contents .product-price .woocommerce-Price-amount,
.woocommerce-cart-form__contents .product-subtotal .woocommerce-Price-amount {
    display: inline;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
}

.woocommerce-cart-form__contents .product-subtotal {
    color: inherit;
}

.woocommerce-cart-form__contents .product-subtotal .woocommerce-Price-amount {
    color: inherit;
    font-size: 1rem;
}

/* ========================================
   SELECTOR DE CANTIDAD (qty-stepper --compact)
   Reutiliza la estructura de qty-stepper.js
   ======================================== */
.woocommerce-cart-form__contents .product-quantity {
    text-align: center;
}

.woocommerce-cart-form__contents .product-quantity > label,
.woocommerce-cart-form__contents .quantity > label {
    display: none;
}

.woocommerce-cart-form__contents .quantity {
    display: inline-flex;
    align-items: center;
}

/* Base stepper styles (duplicated from single-product.css for cart context) */
.qty-stepper--compact {
    display: inline-flex;
    align-items: stretch;
    height: 2.25rem;
    border: 1.5px solid var(--border-color, #e4e4e7);
    border-radius: var(--border-radius-md, 0.5rem);
    overflow: hidden;
    background: var(--card, #fff);
}

.qty-stepper--compact .qty-stepper__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--foreground, #09090b);
    transition: background-color var(--transition-fast, 0.15s ease);
    user-select: none;
}

.qty-stepper--compact .qty-stepper__btn:hover:not(:disabled) {
    background-color: var(--accent, #f4f4f5);
}

.qty-stepper--compact .qty-stepper__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.qty-stepper--compact .qty-stepper__btn svg {
    width: 0.75rem;
    height: 0.75rem;
    pointer-events: none;
}

.woocommerce .qty-stepper--compact .qty-stepper__input.qty {
    width: 2rem;
    height: 100%;
    border: none;
    border-left: 1.5px solid var(--border-color, #e4e4e7);
    border-right: 1.5px solid var(--border-color, #e4e4e7);
    border-radius: 0;
    text-align: center;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--foreground, #09090b);
    background: var(--card, #fff);
    box-shadow: none;
    padding: 0;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.woocommerce .qty-stepper--compact .qty-stepper__input.qty::-webkit-inner-spin-button,
.woocommerce .qty-stepper--compact .qty-stepper__input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Fallback before JS processes the input */
.woocommerce-cart-form__contents .quantity .qty:not(.qty-stepper__input) {
    width: 3rem;
    height: 2.25rem;
    padding: 0 0.25rem;
    border: 1px solid var(--border-color, #e4e4e7);
    border-radius: var(--border-radius-md, 0.5rem);
    text-align: center;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    color: var(--foreground, #09090b);
    background: var(--card, #fff);
}

/* ========================================
   ACCIONES DEL CARRITO
   ======================================== */
.woocommerce-cart-form__contents .actions {
    padding: 1rem;
    background: var(--cart-bg-secondary);
    border-top: 1px solid var(--cart-border);
}

.woocommerce-cart-form__contents .actions::after {
    content: '';
    display: table;
    clear: both;
}

/* Cupón */
.woocommerce-cart-form .coupon {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    float: left;
}

.woocommerce-cart-form .coupon label {
    display: none;
}

.woocommerce-cart-form .coupon #coupon_code {
    width: 180px;
    height: 42px;
    padding: 0 1rem;
    border: 1px solid var(--cart-border);
    border-radius: 2rem;
    font-size: 0.875rem;
    background: var(--cart-bg);
    transition: var(--cart-transition);
}

.woocommerce-cart-form .coupon #coupon_code:focus {
    outline: none;
    border-color: var(--cart-primary);
    box-shadow: 0 0 0 3px var(--cart-primary-light);
}

.woocommerce-cart-form .coupon #coupon_code::placeholder {
    color: var(--cart-text-muted);
}

.woocommerce-cart-form .coupon .button {
    height: 42px;
    padding: 0 1.25rem;
    border: 1px solid var(--cart-border);
    border-radius: 2rem;
    background: var(--cart-bg);
    color: var(--cart-text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cart-transition);
}

.woocommerce-cart-form .coupon .button:hover {
    background: var(--cart-bg-secondary);
    border-color: var(--cart-text-muted);
}

/* Botón actualizar */
.woocommerce-cart-form .actions > button[name="update_cart"] {
    float: right;
    height: 42px;
    padding: 0 1.5rem;
    border: none;
    border-radius: 2rem;
    background: var(--cart-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--cart-transition);
}

.woocommerce-cart-form .actions > button[name="update_cart"]:hover {
    background: var(--cart-primary-dark);
}

.woocommerce-cart-form .actions > button[name="update_cart"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   TOTALES DEL CARRITO
   ======================================== */
.cart-collaterals .cart_totals {
    background: var(--cart-bg);
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius-lg);
    overflow: hidden;
}

.cart-collaterals .cart_totals:hover {
    box-shadow: var(--cart-shadow-md);
    transition: var(--cart-transition);
}

.cart-collaterals .cart_totals > h2 {
    margin: 0;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cart-text);
    background: var(--cart-bg-secondary);
    border-bottom: 1px solid var(--cart-border);
}

.cart-collaterals .cart_totals table {
    width: 100%;
    border-collapse: collapse;
}

.cart-collaterals .cart_totals table th,
.cart-collaterals .cart_totals table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--cart-border-light);
    vertical-align: top;
}

.cart-collaterals .cart_totals table tr:last-child th,
.cart-collaterals .cart_totals table tr:last-child td {
    border-bottom: none;
}

.cart-collaterals .cart_totals table th {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cart-text-light);
    text-align: left;
    width: 40%;
}

.cart-collaterals .cart_totals table td {
    text-align: right;
    font-weight: 500;
    color: var(--cart-text);
}

.cart-collaterals .cart_totals table td .woocommerce-Price-amount {
    display: inline;
    font-size: 1rem;
    font-weight: 600;
}

/* Total final */
.cart-collaterals .cart_totals .order-total th,
.cart-collaterals .cart_totals .order-total td {
    padding: 1.25rem;
    background: var(--cart-bg, #fff);
    font-weight: 700;
}

.cart-collaterals .cart_totals .order-total td {
    color: var(--cart-text, #1e293b);
}

.cart-collaterals .cart_totals .order-total .includes_tax, .cart-collaterals .cart_totals .order-total .includes_tax > .woocommerce-Price-amount {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--cart-text, #1e293b);
}

.cart-collaterals .cart_totals .order-total td strong .woocommerce-Price-amount {
    font-size: 1.5rem;
    color: inherit;
}

/* Botón proceder al pago */
.wc-proceed-to-checkout {
    padding: 1.25rem;
    background: var(--cart-bg-secondary);
    border-top: 1px solid var(--cart-border);
}

.wc-proceed-to-checkout .checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    padding: 0 1.5rem;
    border: none;
    border-radius: var(--cart-radius);
    background: var(--cart-success);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--cart-transition);
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: var(--cart-shadow-md);
}

/* ========================================
   CTA ENVÍOS ESPECIALES
   ======================================== */
.cart-special-shipping__card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--cart-info-light) 0%, #eff6ff 100%);
    border: 1px solid var(--cart-info);
    border-radius: var(--cart-radius-lg);
}

.cart-special-shipping__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--cart-bg);
    border-radius: var(--cart-radius);
    color: var(--cart-info);
}

.cart-special-shipping__content {
    flex: 1;
    min-width: 0;
}

.cart-special-shipping__title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cart-text);
    line-height: 1.3;
}

.cart-special-shipping__text {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--cart-text-light);
    line-height: 1.5;
}

.cart-special-shipping__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--cart-info);
    color: #fff !important;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 2rem;
    transition: var(--cart-transition);
}

.cart-special-shipping__button:hover {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}

/* Garantías */
.cart-guarantees {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0 0;
    padding: 1rem;
    background: var(--cart-bg);
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius-lg);
    list-style: none;
}

.cart-guarantees__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--cart-text-light);
}

.cart-guarantees__item svg {
    flex-shrink: 0;
    color: var(--cart-success);
}

/* ========================================
   MÉTODOS DE ENVÍO
   ======================================== */
.woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-shipping-methods li {
    padding: 0.5rem 0;
}

.woocommerce-shipping-methods li label {
    display: flex;
    align-items: center;
    justify-content: right;
    gap: 0.5rem;
    color: var(--cart-text);
    cursor: pointer;
}

.woocommerce-shipping-methods li input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cart-primary);
}

/* Calculadora de envío */
.shipping-calculator-button {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cart-primary);
    text-decoration: none;
}

.shipping-calculator-button:hover {
    color: var(--cart-primary-dark);
}

.shipping-calculator-form {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--cart-bg-secondary);
    border-radius: var(--cart-radius);
}

.shipping-calculator-form p {
    margin-bottom: 0.75rem;
}

.shipping-calculator-form label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cart-text-light);
}

.shipping-calculator-form select,
.shipping-calculator-form input[type="text"] {
    width: 100%;
    height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius);
    font-size: 0.875rem;
    background: var(--cart-bg);
}

.shipping-calculator-form button {
    width: 100%;
    height: 40px;
    margin-top: 0.5rem;
    border: none;
    border-radius: var(--cart-radius);
    background: var(--cart-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

/* ========================================
   MENSAJES
   ======================================== */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--cart-radius-lg);
    font-size: 0.875rem;
}

.woocommerce-cart .woocommerce-message {
    background: var(--cart-success-light);
    color: #166534;
    border: 1px solid var(--cart-success);
}

.woocommerce-cart .woocommerce-info {
    background: var(--cart-info-light);
    color: #1e40af;
    border: 1px solid var(--cart-info);
}

.woocommerce-cart .woocommerce-error {
    background: var(--cart-error-light);
    color: #991b1b;
    border: 1px solid var(--cart-error);
}

.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-info::before,
.woocommerce-cart .woocommerce-error::before {
    content: none;
}

/* ========================================
   CARRITO VACÍO
   ======================================== */
.woocommerce-cart .cart-empty {
    text-align: center;
    padding: 3rem;
}

.woocommerce-cart .cart-empty.woocommerce-info {
    background: var(--cart-bg);
    border: 2px dashed var(--cart-border);
    color: var(--cart-text-light);
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin-top: 1.5rem;
}

.woocommerce-cart .return-to-shop .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 2rem;
    border: none;
    border-radius: 2rem;
    background: var(--cart-primary);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

/* ========================================
   RESPONSIVE - MÓVIL
   ======================================== */
@media (max-width: 767px) {
    .cart-page {
        padding: 0.75rem;
    }

    /* Tabla responsive */
    .woocommerce-cart-form__contents,
    .woocommerce-cart-form__contents thead,
    .woocommerce-cart-form__contents tbody,
    .woocommerce-cart-form__contents tr,
    .woocommerce-cart-form__contents td {
        display: block;
    }

    .woocommerce-cart-form__contents thead {
        display: none;
    }

    /* Cart item en móvil - diseño de tarjeta */
    .woocommerce-cart-form__cart-item {
        position: relative;
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-areas:
            "thumb name"
            "thumb price"
            "thumb subtotal"
            "qty qty";
        gap: 0.375rem 0.75rem;
        padding: 1rem;
        align-items: start;
        background: var(--cart-bg);
        border: 1px solid var(--cart-border);
        border-radius: var(--cart-radius-lg) var(--cart-radius-lg) 0 0;
        margin-top: 1rem;
    }

    .woocommerce-cart-form__cart-item:first-child {
        margin-top: 0;
    }

    .woocommerce-cart-form__cart-item td {
        padding: 0;
        border: none;
        text-align: left !important;
    }

    /* Imagen del producto */
    .woocommerce-cart-form__contents .product-thumbnail {
        grid-area: thumb;
        width: 80px !important;
        padding: 0;
        display: block !important;
    }

    .woocommerce-cart-form__contents .product-thumbnail a {
        display: block;
    }

    .woocommerce-cart-form__contents .product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
        max-width: 80px !important;
        object-fit: contain;
        border-radius: var(--cart-radius);
        border: 1px solid var(--cart-border-light);
    }

    /* Botón eliminar - esquina superior derecha */
    .woocommerce-cart-form__contents .product-remove {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: auto;
        height: auto;
        display: block;
    }

    .woocommerce-cart-form__contents .product-remove a.remove {
        margin: 0;
        width: 28px;
        height: 28px;
        font-size: 1.25rem;
    }

    /* Nombre del producto */
    .woocommerce-cart-form__contents .product-name {
        grid-area: name;
        max-width: none;
        font-size: 0.9375rem;
        line-height: 1.3;
    }

    /* Precio */
    .woocommerce-cart-form__contents .product-price {
        grid-area: price;
        margin-top: 0.5rem;
    }

    /* Subtotal */
    .woocommerce-cart-form__contents .product-subtotal {
        grid-area: subtotal;
        font-size: 1rem;
        font-weight: 700;
        margin-top: 0.5rem;
        color: var(--cart-primary-dark);
    }

    /* Cantidad - fila completa */
    .woocommerce-cart-form__contents .product-quantity {
        grid-area: qty;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--cart-border-light);
    }

    /* Fila de envíos en móvil - rounded bottom */
    .cart-item-shipping-row {
        display: block;
        background: var(--cart-bg-secondary);
        border: 1px solid var(--cart-border);
        border-top: none;
        border-radius: 0 0 var(--cart-radius-lg) var(--cart-radius-lg);
        margin-bottom: 0;
        overflow: hidden;
    }

    .cart-item-shipping-row td,
    .cart-item-shipping-cell {
        display: block;
        padding: 0 !important;
    }

    /* Ocultar ::before de WooCommerce en la fila de envíos */
    .cart-item-shipping-row td::before,
    .cart-item-shipping-cell::before {
        display: none !important;
        content: none !important;
    }

    /* Ocultar ::before en celdas sin data-title relevante */
    .woocommerce-cart-form__contents .product-remove::before,
    .woocommerce-cart-form__contents .product-thumbnail::before,
    .woocommerce-cart-form__contents .product-name::before {
        display: none !important;
        content: none !important;
    }

    /* Etiquetas para precio, cantidad y subtotal */
    .woocommerce-cart-form__contents .product-price::before,
    .woocommerce-cart-form__contents .product-subtotal::before,
    .woocommerce-cart-form__contents .product-quantity::before {
        font-weight: 400;
        color: var(--cart-text-muted);
        margin-right: 0.25rem;
    }

    .woocommerce-cart-form__contents .product-price::before {
        content: "Precio: ";
    }

    .woocommerce-cart-form__contents .product-subtotal::before {
        content: "Subtotal: ";
    }

    .woocommerce-cart-form__contents .product-quantity::before {
        content: "Cantidad: ";
        flex-shrink: 0;
    }

    /* Acciones */
    .woocommerce-cart-form .coupon {
        float: none;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .woocommerce-cart-form .coupon #coupon_code {
        flex: 1;
        width: auto;
    }

    .woocommerce-cart-form .actions > button[name="update_cart"] {
        float: none;
        width: 100%;
    }

    /* CTA */
    .cart-special-shipping__card {
        flex-direction: column;
        text-align: center;
    }

    .cart-special-shipping__icon {
        margin: 0 auto;
    }

    .cart-special-shipping__button {
        width: 100%;
        justify-content: center;
    }
    
    .woocommerce-cart-form__contents td.product-subtotal .tax_label {
        white-space: inherit;
    }
}

/* ========================================
   CROSS-SELLS
   ======================================== */
.cross-sells {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--cart-border);
}

.cross-sells > h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cart-text);
    margin-bottom: 1rem;
}

.cross-sells ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cross-sells ul.products li.product {
    background: var(--cart-bg);
    border: 1px solid var(--cart-border-light);
    border-radius: var(--cart-radius);
    padding: 1rem;
    text-align: center;
}

.cross-sells ul.products li.product img {
    max-width: 100%;
    height: auto;
    border-radius: var(--cart-radius);
    margin-bottom: 0.5rem;
}

.cross-sells ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--cart-text);
    margin-bottom: 0.25rem;
}

.cross-sells ul.products li.product .price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cart-primary-dark);
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .cart-page {
        display: block;
    }

    .cart-actions,
    .cross-sells,
    .cart-special-shipping {
        display: none;
    }
}