/**
 * Estilos del carrito - Paleta moderna azul y naranja
 */

/* === PALETA DE COLORES === */
:root {
    --primary-blue: #3498db;
    --primary-dark: #2c3e50;
    --accent-orange: #f39c12;
    --accent-green: #27ae60;
    --light-bg: #ecf0f1;
    --shadow-color: rgba(52, 152, 219, 0.15);
}

/* === PÁGINA DEL CARRITO === */

.woocommerce-cart .woocommerce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Tabla del carrito */
.woocommerce-cart-form {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #e8ecef;
}

.woocommerce table.cart {
    border: none;
    margin: 0;
}

.woocommerce table.cart thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.woocommerce table.cart thead th {
    color: #ffffff !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 20px 15px;
    border: none;
}

/* Asegurar que TODOS los textos del header sean blancos */
.woocommerce-cart table.cart thead th,
.woocommerce-cart table.shop_table thead th,
table.cart thead th,
table.shop_table thead th {
    color: #ffffff !important;
}

.woocommerce table.cart tbody td {
    padding: 25px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f3f5;
    background: #fff;
}

.woocommerce table.cart tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce table.cart tbody tr:hover td {
    background-color: #f8fafb;
    transition: background-color 0.3s ease;
}

/* Imagen del producto */
.woocommerce table.cart img {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 80px;
    height: auto;
    border: 1px solid #e8ecef;
}

/* Nombre del producto */
.woocommerce table.cart .product-name a {
    color: #2c3e50;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woocommerce table.cart .product-name a:hover {
    color: #3498db;
}

/* Precio */
.woocommerce table.cart .product-price,
.woocommerce table.cart .product-subtotal {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
}

.woocommerce table.cart .product-subtotal {
    color: #27ae60;
}

/* Campo de cantidad */
.woocommerce table.cart .quantity {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.woocommerce table.cart .quantity input.qty {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    -moz-appearance: textfield;
}

.woocommerce table.cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce table.cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce table.cart .quantity input.qty:focus {
    outline: none;
    background-color: #f8fafb;
}

/* Botón de eliminar */
.woocommerce table.cart .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    color: #e74c3c;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid #e74c3c;
}

.woocommerce table.cart .product-remove a:hover {
    background: #e74c3c;
    color: #fff;
    transform: scale(1.05);
}

/* Acciones del carrito */
.actions {
    padding: 20px !important;
    background: #f8fafb !important;
    border-top: 1px solid #e8ecef;
}

/* Botón actualizar carrito */
.woocommerce-cart-form button[name="update_cart"] {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.woocommerce-cart-form button[name="update_cart"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.woocommerce-cart-form button[name="update_cart"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cupón */
.coupon {
    display: flex;
    gap: 12px;
    align-items: center;
}

.coupon input.input-text {
    flex: 1;
    max-width: 200px;
    padding: 12px 15px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
}

.coupon input.input-text:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.coupon button.button {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.coupon button.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* === TOTALES DEL CARRITO === */

.cart-collaterals {
    margin-top: 30px;
}

.cart_totals {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 35px;
    max-width: 500px;
    margin-left: auto;
    border: 1px solid #e8ecef;
}

.cart_totals h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 15px;
}

.cart_totals h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db 0%, #f39c12 100%);
    border-radius: 2px;
}

.cart_totals table {
    border: none;
    width: 100%;
}

.cart_totals table th,
.cart_totals table td {
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid #f0f3f5;
}

.cart_totals table th {
    font-weight: 600;
    color: #7f8c8d;
    text-align: left;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.cart_totals table td {
    text-align: right;
    font-weight: 700;
    color: #2c3e50;
    font-size: 15px;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 24px;
    color: #27ae60;
    padding-top: 20px;
    padding-bottom: 5px;
    border-bottom: none;
    font-weight: 800;
}

/* Botón proceder al pago */
.wc-proceed-to-checkout {
    padding-top: 25px;
}

.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
    text-align: center;
    padding: 18px 30px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.35);
    border: none;
    cursor: pointer;
}

.wc-proceed-to-checkout .checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.45);
}

/* Botón continuar comprando */
.woocommerce-button.button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.woocommerce-button.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* === CARRITO VACÍO === */

.woocommerce-info,
.cart-empty {
    background: linear-gradient(135deg, #e8f4f8 0%, #d6eaf8 100%);
    border-left: 4px solid #3498db;
    padding: 25px;
    border-radius: 10px;
    color: #2c3e50;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.woocommerce-info::before {
    color: #3498db;
}

.return-to-shop {
    text-align: center;
    margin-top: 40px;
}

.return-to-shop .button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 18px 50px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.35);
}

.return-to-shop .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.45);
}

/* === RESPONSIVE === */

@media (max-width: 768px) {
    .woocommerce table.cart thead {
        display: none;
    }
    
    .woocommerce table.cart tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e8ecef;
        border-radius: 12px;
        padding: 20px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .woocommerce table.cart tbody td {
        display: block;
        text-align: right;
        padding: 12px 0;
        border: none;
    }
    
    .woocommerce table.cart tbody td::before {
        content: attr(data-title) ": ";
        font-weight: 600;
        float: left;
        color: #7f8c8d;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
    
    .woocommerce table.cart .product-thumbnail {
        text-align: center;
    }
    
    .woocommerce table.cart img {
        max-width: 120px;
    }
    
    .cart_totals {
        max-width: 100%;
    }
    
    .coupon {
        flex-direction: column;
        align-items: stretch;
    }
    
    .coupon input.input-text {
        max-width: 100%;
        width: 100%;
    }
    
    .coupon button.button {
        width: 100%;
    }
    
    .actions {
        text-align: center;
    }
    
    .actions .coupon,
    .actions button[name="update_cart"] {
        width: 100%;
        margin-bottom: 15px;
    }
}
