/* =========================================================
   SJ MUSIC — CARRITO
   Personalización visual sobre WooCommerce nativo
   ========================================================= */


/* =========================================================
   CONTENEDOR GENERAL
   ========================================================= */

body.woocommerce-cart .site-main {
    width: 100%;
}

body.woocommerce-cart .page-content {
    width: 100%;
}

body.woocommerce-cart .woocommerce {
    width: min(1400px, calc(100% - 64px));
    margin: 0 auto;
    padding: 40px 0 80px;
}


/* =========================================================
   MENSAJES / AVISOS
   ========================================================= */

body.woocommerce-cart
.woocommerce-notices-wrapper {
    width: 100%;
    margin-bottom: 24px;
}


/* =========================================================
   TABLA PRINCIPAL DEL CARRITO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form {
    width: 100%;
}

body.woocommerce-cart
.woocommerce-cart-form table.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0;
    background: #fff;
}


/* =========================================================
   CABECERA
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form table.shop_table.cart thead {
    border-bottom: 1px solid #e5e5e5;
}

body.woocommerce-cart
.woocommerce-cart-form table.shop_table.cart th {
    padding: 18px 16px;
    border: 0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #555;
    text-align: left;
}


/* =========================================================
   FILAS
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form table.shop_table.cart tbody tr {
    border-bottom: 1px solid #e9e9e9;
}

body.woocommerce-cart
.woocommerce-cart-form table.shop_table.cart td {
    padding: 24px 16px;
    border: 0;
    vertical-align: middle;
}


/* =========================================================
   ELIMINAR PRODUCTO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-remove {
    width: 50px;
    text-align: center;
}

body.woocommerce-cart
.woocommerce-cart-form .product-remove a.remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    color: #777;
    background: transparent;

    font-size: 20px;
    line-height: 1;

    text-decoration: none;

    transition:
        color .2s ease,
        background .2s ease;
}

body.woocommerce-cart
.woocommerce-cart-form .product-remove a.remove:hover {
    color: #fff;
    background: #111;
}


/* =========================================================
   IMAGEN
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-thumbnail {
    width: 120px;
}

body.woocommerce-cart
.woocommerce-cart-form .product-thumbnail img {
    display: block;

    width: 100px;
    height: 100px;

    object-fit: contain;

    margin: 0;
}


/* =========================================================
   NOMBRE DEL PRODUCTO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-name {
    min-width: 280px;
}

body.woocommerce-cart
.woocommerce-cart-form .product-name a {
    color: #111;
    font-family: Arial, sans-serif;

    font-size: 16px;
    font-weight: 600;

    line-height: 1.45;

    text-decoration: none;
}

body.woocommerce-cart
.woocommerce-cart-form .product-name a:hover {
    text-decoration: underline;
}


/* =========================================================
   PRECIO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-price {
    white-space: nowrap;
}

body.woocommerce-cart
.woocommerce-cart-form .product-price .amount {
    color: #222;
    font-size: 15px;
    font-weight: 500;
}


/* =========================================================
   CANTIDAD
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-quantity {
    width: 140px;
}

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

body.woocommerce-cart
.woocommerce-cart-form .quantity input.qty {
    width: 70px;
    height: 44px;

    padding: 0 8px;

    border: 1px solid #dcdcdc;
    border-radius: 6px;

    background: #fff;

    font-size: 14px;
    text-align: center;

    box-sizing: border-box;
}


/* =========================================================
   SUBTOTAL DEL PRODUCTO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .product-subtotal {
    white-space: nowrap;
}

body.woocommerce-cart
.woocommerce-cart-form .product-subtotal .amount {
    color: #111;
    font-size: 15px;
    font-weight: 600;
}


/* =========================================================
   CONTROLES DEBAJO DE LA TABLA
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .actions {
    padding: 24px 0;

    border-bottom: 1px solid #e5e5e5;
}


/* =========================================================
   CUPÓN
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    float: left;
}

body.woocommerce-cart
.woocommerce-cart-form .coupon input.input-text {
    width: 220px;
    height: 44px;

    padding: 0 14px;

    border: 1px solid #dcdcdc;
    border-radius: 6px;

    font-size: 14px;

    box-sizing: border-box;
}

body.woocommerce-cart
.woocommerce-cart-form .coupon button {
    height: 44px;

    padding: 0 20px;

    border: 0;
    border-radius: 6px;

    background: #111;
    color: #fff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

body.woocommerce-cart
.woocommerce-cart-form .coupon button:hover {
    background: #333;
    transform: translateY(-1px);
}


/* =========================================================
   ACTUALIZAR CARRITO
   ========================================================= */

body.woocommerce-cart
.woocommerce-cart-form .actions button[name="update_cart"] {
    height: 44px;

    padding: 0 22px;

    border: 1px solid #111;
    border-radius: 6px;

    background: #fff;
    color: #111;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}

body.woocommerce-cart
.woocommerce-cart-form .actions button[name="update_cart"]:hover {
    background: #111;
    color: #fff;
}


/* =========================================================
   COLUMNAS INFERIORES
   ========================================================= */

body.woocommerce-cart
.cart-collaterals {
    display: flex;
    justify-content: flex-end;

    width: 100%;

    margin-top: 45px;
}


/* =========================================================
   TOTALES
   ========================================================= */

body.woocommerce-cart
.cart_totals {
    width: 420px;

    padding: 30px;

    border: 1px solid #e5e5e5;
    border-radius: 10px;

    background: #fff;

    box-sizing: border-box;
}

body.woocommerce-cart
.cart_totals h2 {
    margin: 0 0 25px;

    color: #111;

    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
}


/* =========================================================
   TABLA DE TOTALES
   ========================================================= */

body.woocommerce-cart
.cart_totals table.shop_table {
    width: 100%;

    margin: 0;

    border: 0;
    border-collapse: collapse;
}

body.woocommerce-cart
.cart_totals table.shop_table th,
body.woocommerce-cart
.cart_totals table.shop_table td {
    padding: 15px 0;

    border: 0;

    font-size: 14px;
}

body.woocommerce-cart
.cart_totals table.shop_table tr {
    border-bottom: 1px solid #ededed;
}

body.woocommerce-cart
.cart_totals table.shop_table th {
    color: #555;
    font-weight: 500;
    text-align: left;
}

body.woocommerce-cart
.cart_totals table.shop_table td {
    color: #111;
    font-weight: 600;
    text-align: right;
}


/* =========================================================
   TOTAL FINAL
   ========================================================= */

body.woocommerce-cart
.cart_totals table.shop_table tr.order-total {
    border-bottom: 0;
}

body.woocommerce-cart
.cart_totals table.shop_table tr.order-total th,
body.woocommerce-cart
.cart_totals table.shop_table tr.order-total td {
    padding-top: 20px;

    color: #111;

    font-size: 18px;
    font-weight: 700;
}


/* =========================================================
   BOTÓN FINALIZAR COMPRA
   ========================================================= */

body.woocommerce-cart
.wc-proceed-to-checkout {
    padding: 20px 0 0;
}

body.woocommerce-cart
.wc-proceed-to-checkout a.checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 50px;

    margin: 0;

    border-radius: 6px;

    background: #111;
    color: #fff;

    font-size: 14px;
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    transition:
        background .2s ease,
        transform .2s ease;
}

body.woocommerce-cart
.wc-proceed-to-checkout a.checkout-button:hover {
    background: #333;
    transform: translateY(-1px);
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 900px) {

    body.woocommerce-cart .woocommerce {
        width: min(100% - 32px, 700px);
        padding: 30px 0 60px;
    }

    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    body.woocommerce-cart
    .cart-collaterals {
        justify-content: stretch;
    }

    body.woocommerce-cart
    .cart_totals {
        width: 100%;
    }

}


/* =========================================================
   RESPONSIVE — MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    body.woocommerce-cart .woocommerce {
        width: calc(100% - 24px);
        padding: 20px 0 50px;
    }

    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart {
        display: block;
        overflow: visible;
        white-space: normal;
    }

    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart thead {
        display: none;
    }

    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart tbody,
    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart tr,
    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body.woocommerce-cart
    .woocommerce-cart-form table.shop_table.cart tr.cart_item {
        position: relative;

        padding: 20px 0;

        border-bottom: 1px solid #e5e5e5;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .product-remove {
        position: absolute;

        top: 15px;
        right: 0;

        width: auto;

        padding: 0;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .product-thumbnail {
        width: 100%;
        padding: 0 0 15px;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .product-thumbnail img {
        width: 120px;
        height: 120px;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .product-name {
        min-width: 0;
        padding: 8px 35px 8px 0;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .product-price,
    body.woocommerce-cart
    .woocommerce-cart-form .product-quantity,
    body.woocommerce-cart
    .woocommerce-cart-form .product-subtotal {
        width: 100%;
        padding: 8px 0;
    }

    body.woocommerce-cart
    .woocommerce-cart-form td[data-title]::before {
        content: attr(data-title);

        display: inline-block;

        margin-right: 8px;

        color: #666;

        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .coupon {
        float: none;

        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    body.woocommerce-cart
    .woocommerce-cart-form .coupon input.input-text,
    body.woocommerce-cart
    .woocommerce-cart-form .coupon button,
    body.woocommerce-cart
    .woocommerce-cart-form .actions button[name="update_cart"] {
        width: 100%;
    }

    body.woocommerce-cart
    .cart-collaterals {
        margin-top: 30px;
    }

    body.woocommerce-cart
    .cart_totals {
        padding: 22px;
    }

}