/**
 * =============================================
 * FEYMA.AR - Cart Layout Improvements
 * Layout de dos columnas: Beneficios + Totales
 * =============================================
 */

/* ============================================
   TABLA PRINCIPAL DEL CARRITO - LÍNEAS FINAS
   ============================================ */

/* Encabezado de tabla */
.woocommerce-cart-form .shop_table thead tr {
    border-bottom: 1px solid #E5E7EB;
}

.woocommerce-cart-form .shop_table thead th {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9CA3AF;
    padding: 12px 16px;
    border-bottom: 1px solid #E5E7EB !important;
}

/* Filas del carrito */
.woocommerce-cart-form .shop_table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background 0.15s ease;
}

.woocommerce-cart-form .shop_table tbody tr:last-child {
    border-bottom: none;
}

.woocommerce-cart-form .shop_table tbody tr:hover {
    background: #FAFAFA;
}

.woocommerce-cart-form .shop_table td {
    padding: 16px;
    vertical-align: middle;
    border-top: none !important;
    border-bottom: none !important;
}

/* Imagen del producto */
.woocommerce-cart-form .shop_table td.product-thumbnail img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #F3F4F6;
    display: block;
}

/* Nombre del producto */
.woocommerce-cart-form .shop_table td.product-name a {
    font-size: 14px;
    font-weight: 300;
    color: #1A1A1A;
    text-decoration: none;
    transition: color 0.15s ease;
}

.woocommerce-cart-form .shop_table td.product-name a:hover {
    color: #3D3180;
}

/* Precio y subtotal */
.woocommerce-cart-form .shop_table td.product-price,
.woocommerce-cart-form .shop_table td.product-subtotal {
    font-size: 14px;
    font-weight: 300;
    color: #374151;
}

.woocommerce-cart-form .shop_table td.product-subtotal {
    color: #3D3180;
    font-weight: 300;
}

/* Botón eliminar */
.woocommerce-cart-form .shop_table td.product-remove {
    width: 36px;
}

/* Fila de acciones */
.woocommerce-cart-form .shop_table td.actions {
    padding: 14px 16px;
    border-top: 1px solid #F3F4F6 !important;
    background: transparent;
}

/* Botón actualizar carrito */
.woocommerce-cart-form .shop_table td.actions button[name="update_cart"] {
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 8px;
    color: #6B7280;
    background: transparent;
    border: 1px solid #E5E7EB;
    transition: all 0.2s ease;
}

.woocommerce-cart-form .shop_table td.actions button[name="update_cart"]:hover {
    border-color: #3D3180;
    color: #3D3180;
    background: #F0EFF8;
}

/* ============================================
   LAYOUT DE DOS COLUMNAS: BENEFICIOS + TOTALES
   ============================================ */
.cart-totals-wrapper {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    width: 100%;
    margin-top: 24px;
}

/* COLUMNA IZQUIERDA: BENEFICIOS */
.cart-trust-badges {
    flex: 0 0 300px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
}

.cart-trust-badges h3 {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9CA3AF;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.cart-trust-badges .trust-badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid #E5E7EB;
    transition: border-color 0.15s ease;
}

.cart-trust-badges .trust-badge-item:last-child {
    margin-bottom: 0;
}

.cart-trust-badges .trust-badge-item:hover {
    transform: none;
    box-shadow: none;
    border-color: #D0CDE8;
}

.cart-trust-badges .trust-badge-item i {
    font-size: 18px;
    color: #3D3180;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(61, 49, 128, 0.06);
    border-radius: 8px;
    flex-shrink: 0;
}

.cart-trust-badges .badge-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cart-trust-badges .badge-info strong {
    font-size: 13px;
    font-weight: 300;
    color: #1A1A1A;
    line-height: 1.3;
}

.cart-trust-badges .badge-info span {
    font-size: 12px;
    color: #10b981;
    font-weight: 400;
}

/* COLUMNA DERECHA: TOTALES */
.cart-totals-wrapper .cart_totals {
    flex: 1;
    background: #fff;
    border: none;
    border-radius: 0;
    padding: 0 0 0 28px;
}

/* Título de totales */
.cart-totals-wrapper .cart_totals h2 {
    font-size: 12px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9CA3AF;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

/* Quitar border/radius que WooCommerce aplica a .shop_table */
.cart-collaterals .cart_totals table.shop_table,
.cart-totals-wrapper .cart_totals table.shop_table {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.cart-totals-wrapper .cart_totals table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
}

.cart-totals-wrapper .cart_totals table tr {
    border-bottom: 1px solid #F3F4F6;
}

.cart-totals-wrapper .cart_totals table tr:last-of-type {
    border-bottom: none;
}

.cart-totals-wrapper .cart_totals table th {
    text-align: left;
    font-weight: 300;
    font-size: 14px;
    color: #6B7280;
    padding: 12px 0;
    border-bottom: none !important;
    border-top: none !important;
}

.cart-totals-wrapper .cart_totals table td {
    text-align: right;
    padding: 12px 0;
    border-bottom: none !important;
    border-top: none !important;
}

.cart-totals-wrapper .cart_totals table td .amount {
    font-weight: 300;
    font-size: 14px;
    color: #1A1A1A;
}

/* Fila de total final — override completo del border que pone el SCSS */
.cart-collaterals .cart_totals table tr.order-total,
.cart-totals-wrapper .cart_totals table tr.order-total {
    border: none !important;
    border-top: 1px solid #E5E7EB !important;
    background: transparent !important;
}

.cart-collaterals .cart_totals table tr.order-total th,
.cart-collaterals .cart_totals table tr.order-total td,
.cart-totals-wrapper .cart_totals table tr.order-total th,
.cart-totals-wrapper .cart_totals table tr.order-total td {
    font-size: 15px !important;
    font-weight: 300;
    padding: 14px 0 !important;
    color: #1A1A1A;
}

.cart-collaterals .cart_totals table tr.order-total .amount,
.cart-totals-wrapper .cart_totals table tr.order-total .amount {
    color: #3D3180;
    font-size: 20px !important;
    font-weight: 300;
}

/* ============================================
   BOTÓN "INICIAR COMPRA" — REFINADO CON ICONO
   ============================================ */
.cart-collaterals .wc-proceed-to-checkout,
.cart-totals-wrapper .wc-proceed-to-checkout {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.cart-collaterals .wc-proceed-to-checkout a.checkout-button,
.cart-totals-wrapper .wc-proceed-to-checkout a.checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    padding: 11px 36px;
    background: #3D3180;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(61, 49, 128, 0.2);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-collaterals .wc-proceed-to-checkout a.checkout-button:hover,
.cart-totals-wrapper .wc-proceed-to-checkout a.checkout-button:hover {
    background: #fff;
    color: #3D3180;
    border: 1px solid #3D3180;
    box-shadow: none;
    text-decoration: none;
}

.cart-collaterals .wc-proceed-to-checkout a.checkout-button:active,
.cart-totals-wrapper .wc-proceed-to-checkout a.checkout-button:active {
    background: #221b4a;
    transform: none;
}

.cart-collaterals .wc-proceed-to-checkout a.checkout-button .bi,
.cart-totals-wrapper .wc-proceed-to-checkout a.checkout-button .bi {
    font-size: 17px;
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .cart-totals-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .cart-trust-badges {
        flex: 1 1 100%;
        order: 2;
    }

    .cart-totals-wrapper .cart_totals {
        order: 1;
    }
}

@media (max-width: 576px) {
    .cart-trust-badges {
        padding: 16px;
    }

    .cart-trust-badges .trust-badge-item i {
        font-size: 16px;
        width: 30px;
        height: 30px;
    }

    .cart-trust-badges .badge-info strong {
        font-size: 12px;
    }

    .cart-totals-wrapper .wc-proceed-to-checkout a.checkout-button {
        font-size: 14px;
        padding: 12px 20px;
    }
}
