/* =================================================================== */
/* IMPORTACIÓN DE FUENTE Y VARIABLES GLOBALES              */
/* =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');
:root {
    --accent: #DE0A2F;
    --black: #000;
    --muted: #e6e6e6;
    --bg: #fff;
    --fredoka: 'Fredoka One', sans-serif;
}
/* =================================================================== */
/* CSS DEFINITIVO PARA EL CARRITO USANDO TUS VARIABLES           */
/* =================================================================== */
/* ---------- 1. Contenedor Principal y Layout General ---------- */
.woocommerce-cart .woocommerce {
    overflow: hidden; 
}
.woocommerce-cart-form {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}
@media (max-width: 992px) {
    .woocommerce-cart-form {
        grid-template-columns: 1fr;
    }
}
/* ---------- 2. Estilo de "Tarjeta" para cada Producto ---------- */
.woocommerce-cart-form .cart_item {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--muted);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 6px 14px rgba(15, 15, 15, 0.04);
}
.woocommerce-cart-form table.shop_table td {
    border: none;
    padding: 0;
    vertical-align: middle;
}
/* --- Elementos dentro de la tarjeta --- */
.woocommerce-cart-form .product-thumbnail { flex: 0 0 96px; }
.woocommerce-cart-form .product-thumbnail img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f3f3;
}
.woocommerce-cart-form .product-name { flex: 1 1 auto; }
.woocommerce-cart-form .product-name a {
    font-family: var(--fredoka);
    font-weight: 400; /* Fredoka One ya es bold, 400 es normal */
    text-transform: uppercase;
    color: var(--black);
    text-decoration: none;
    font-size: 1.2em;
    line-height: 1.2;
}
.woocommerce-cart-form .product-quantity,
.woocommerce-cart-form .product-price,
.woocommerce-cart-form .product-subtotal {
    flex: 0 0 150px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1em;
}
/* ---------- 3. Selector de Cantidad ---------- */
.woocommerce-cart-form .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--muted);
    border-radius: 8px;
    background: var(--bg);
    box-shadow: 0 4px 10px rgba(15, 15, 15, 0.04);
}
.woocommerce-cart-form .quantity input.qty {
    width: 50px;
    height: 42px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border: none;
    background: transparent;
    padding: 0;
    color: var(--black);
}
.woocommerce-cart-form .quantity .plus,
.woocommerce-cart-form .quantity .minus {
    width: 40px;
    height: 42px;
    border: none;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 1.2em;
    color: #555;
}
.woocommerce-cart-form .quantity .minus { border-radius: 8px 0 0 8px; }
.woocommerce-cart-form .quantity .plus { border-radius: 0 8px 8px 0; }
/* ---------- 4. Icono para Eliminar Producto ---------- */
.woocommerce-cart-form .product-remove { flex: 0 0 60px; text-align: right; }
.woocommerce-cart-form .product-remove .remove {
    font-size: 0 !important;
    text-decoration: none;
    display: inline-block;
    width: 24px;
    height: 24px;
    color: #999;
}
.woocommerce-cart-form .product-remove .remove::before {
    content: '\f182';
    font-family: 'Dashicons';
    font-size: 24px;
    line-height: 1;
    transition: color 0.2s ease;
}
.woocommerce-cart-form .product-remove .remove:hover::before { color: var(--accent); }
/* ---------- 5. Cabeceras de la tabla (Producto, Precio, etc.) ---------- */
.woocommerce-cart-form table.shop_table thead { display: table-header-group; visibility: visible; margin-bottom: 8px; }
.woocommerce-cart-form table.shop_table thead tr { display: flex; gap: 18px; align-items: center; padding: 0 18px; }
.woocommerce-cart-form table.shop_table thead th {
    flex: 1 1 auto;
    text-align: left;
    font-family: var(--fredoka);
    text-transform: uppercase;
    color: var(--black);
    opacity: 0.7;
    font-size: 12px;
    padding: 0;
    border: none;
}
.woocommerce-cart-form thead .product-thumbnail { flex: 0 0 96px; }
.woocommerce-cart-form thead .product-name { flex: 1 1 auto; }
.woocommerce-cart-form thead .product-quantity,
.woocommerce-cart-form thead .product-price,
.woocommerce-cart-form thead .product-subtotal { flex: 0 0 150px; text-align: center; }
.woocommerce-cart-form thead .product-remove { flex: 0 0 60px; }
.woocommerce-cart-form thead .product-thumbnail,
.woocommerce-cart-form thead .product-remove { font-size: 0; }
/* ---------- 6. Columna Derecha (Cupón y Resumen) ---------- */
.cart-collaterals { position: sticky; top: 24px; }
.cart-collaterals .coupon, .cart-collaterals .cart_totals {
    background: var(--bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--muted);
    box-shadow: 0 8px 18px rgba(15, 15, 15, 0.05);
    margin-bottom: 20px;
}
.cart-collaterals .coupon { display: flex; gap: 8px; }
.cart-collaterals .coupon input[type="text"] {
    flex-grow: 1;
    height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--muted);
    background: #fafafa;
}
.cart_totals h2 {
    font-family: var(--fredoka);
    text-transform: uppercase;
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--black);
}
.cart-collaterals .shop_table, .cart-collaterals .shop_table td, .cart-collaterals .shop_table th {
    border: none;
    background: none;
    padding: 8px 0;
}
/* ---------- 7. Botones Principales (Cupón y Finalizar) ---------- */
.cart-collaterals .coupon .button,
.woocommerce .wc-proceed-to-checkout .checkout-button {
    background-color: var(--accent);
    color: var(--bg);
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    transition: filter 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
}
.woocommerce .wc-proceed-to-checkout .checkout-button {
    width: 100%;
    box-shadow: 0 8px 24px rgba(222, 10, 47, 0.18);
}
.cart-collaterals .coupon .button {
    height: 44px; padding: 0 16px; font-size: 1em;
}
.cart-collaterals .coupon .button:hover,
.woocommerce .wc-proceed-to-checkout .checkout-button:hover {
    filter: brightness(0.9);
    color: var(--bg);
}
.woocommerce-cart-form table.shop_table thead {
    display: none;
}
