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

.carrito-container {
    width: 100%;
    max-width: 1200px;

    margin: 45px auto 80px;

    padding: 0 20px;

    box-sizing: border-box;
}


/* =========================================
   ENCABEZADO
========================================= */

.carrito-header {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    margin-bottom: 30px;
}


.carrito-header h1 {
    margin: 0;

    color: #222;

    font-size: 1.8rem;

    font-weight: 600;
}


.carrito-header span {
    color: #777;

    font-size: .85rem;
}


/* =========================================
   CONTENIDO
========================================= */

.carrito-contenido {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 350px;

    gap: 30px;

    align-items: start;
}


/* =========================================
   TABLA
========================================= */

.carrito-tabla {
    width: 100%;

    background-color: #fff;

    border-radius: 16px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);

    overflow: hidden;
}


.cart-table-wrapper {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}


.cart-table {
    width: 100%;

    min-width: 750px;

    border-collapse: collapse;

    margin: 0;
}


/* =========================================
   ENCABEZADO TABLA
========================================= */

.cart-table thead {
    background-color: #f7f9fa;
}


.cart-table th {
    padding: 16px;

    border: none;

    color: #666;

    font-size: .75rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .4px;

    white-space: nowrap;
}


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

.cart-table tbody tr {
    border-top: 1px solid #eeeeee;

    transition: background-color .2s ease;
}


.cart-table tbody tr:hover {
    background-color: #fafcfd;
}


.cart-table td {
    padding: 20px 16px;

    border: none;

    vertical-align: middle;
}


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

.cart-product {
    display: flex;

    align-items: center;

    gap: 15px;
}


.cart-product-image {
    width: 85px;
    height: 85px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 10px;

    background-color: #f5f5f5;
}


.cart-product-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


.cart-product-info {
    display: flex;

    flex-direction: column;

    gap: 4px;
}


.cart-product-name {
    color: #222;

    text-decoration: none;

    font-size: .95rem;

    font-weight: 600;
}


.cart-product-name:hover {
    color: #048ABF;
}


.cart-product-info span {
    color: #777;

    font-size: .78rem;
}


/* =========================================
   PRECIOS
========================================= */

.cart-price {
    color: #555;

    font-size: .9rem;

    white-space: nowrap;
}


.cart-subtotal {
    color: #222;

    font-size: .9rem;

    white-space: nowrap;
}


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

.cart-quantity-form {
    display: flex;

    align-items: center;

    width: fit-content;

    border: 1px solid #dfe3e5;

    border-radius: 8px;

    overflow: hidden;

    background-color: #fff;
}


.cart-quantity-form button {
    width: 32px;
    height: 34px;

    padding: 0;

    border: none;

    background-color: #fff;

    color: #555;

    font-size: 1rem;

    cursor: pointer;

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


.cart-quantity-form button:hover {
    background-color: #f0f7fa;

    color: #048ABF;
}


.cart-quantity-form input {
    width: 35px;
    height: 34px;

    padding: 0;

    border: none;

    border-left: 1px solid #eee;
    border-right: 1px solid #eee;

    outline: none;

    background-color: #fff;

    text-align: center;

    font-size: .85rem;
}


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

.cart-remove {
    width: 34px;
    height: 34px;

    padding: 0;

    border: none;

    border-radius: 8px;

    background-color: #fff1f1;

    color: #dc3545;

    display: flex;

    align-items: center;
    justify-content: center;

    cursor: pointer;

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


.cart-remove:hover {
    background-color: #ffe0e0;

    transform: scale(1.05);
}


.cart-remove i {
    font-size: .9rem;
}


/* =========================================
   CARRITO VACÍO
========================================= */

.carrito-vacio {
    min-height: 350px;
    padding: 50px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}


.carrito-vacio > i {
    margin-bottom: 15px;
    color: #048ABF;
    font-size: 3rem;
}


.carrito-vacio h3 {
    margin-bottom: 8px;
    color: #333;
    font-size: 1.25rem;
}


.carrito-vacio p {
    margin-bottom: 22px;
    color: #777;
    font-size: .9rem;
}


.boton-seguir {
    padding: 10px 20px;
    border-radius: 7px;
    background-color: #048ABF;
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    transition: background-color .2s ease;
}


.boton-seguir:hover {
    background-color: #03779f;
    color: #fff;
}


/* =========================================
   RESUMEN
========================================= */

.detalle-container {
    width: 100%;

    padding: 25px;

    box-sizing: border-box;

    background-color: #fff;

    border-radius: 16px;

    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);

    position: sticky;

    top: 20px;
}


.detalle-container h2 {
    margin: 0 0 25px;

    color: #222;

    font-size: 1.15rem;

    font-weight: 600;
}


/* =========================================
   LÍNEAS RESUMEN
========================================= */

.resumen-linea {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 17px;

    color: #666;

    font-size: .85rem;
}


.resumen-linea strong {
    color: #333;
}


.envio-texto {
    color: #048ABF;

    font-size: .8rem;
}


.resumen-separador {
    height: 1px;

    margin: 20px 0;

    background-color: #eeeeee;
}


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

.resumen-total {
    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 25px;
}


.resumen-total span {
    color: #333;

    font-size: 1rem;

    font-weight: 600;
}


.resumen-total strong {
    color: #048ABF;

    font-size: 1.35rem;

    font-weight: 700;
}


/* =========================================
   CHECKOUT
========================================= */

.boton-checkout {
    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    border-radius: 8px;

    background-color: #048ABF;

    color: #fff;

    text-decoration: none;

    font-size: .9rem;

    font-weight: 600;

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


.boton-checkout:hover {
    background-color: #03779f;

    color: #fff;

    transform: translateY(-2px);
}


.boton-checkout i {
    transition: transform .2s ease;
}


.boton-checkout:hover i {
    transform: translateX(3px);
}


/* =========================================
   INFORMACIÓN CHECKOUT
========================================= */

.checkout-info {
    margin-top: 16px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #888;

    font-size: .72rem;

    text-align: center;
}


.checkout-info i {
    color: #048ABF;

    font-size: .9rem;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {

    .carrito-container {
        margin-top: 35px;
    }


    .carrito-contenido {
        grid-template-columns: 1fr;

        gap: 25px;
    }


    .detalle-container {
        position: static;

        max-width: 500px;

        margin: 0 auto;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 576px) {

    .carrito-container {
        margin-top: 25px;
        margin-bottom: 50px;

        padding: 0 12px;
    }


    .carrito-header {
        margin-bottom: 20px;
    }


    .carrito-header h1 {
        font-size: 1.4rem;
    }


    .carrito-header span {
        font-size: .75rem;
    }


    .carrito-tabla {
        border-radius: 12px;
    }


    .cart-table {
        min-width: 720px;
    }


    .cart-table td {
        padding: 15px 12px;
    }


    .cart-product-image {
        width: 70px;
        height: 70px;
    }


    .cart-product {
        gap: 10px;
    }


    .cart-product-name {
        font-size: .85rem;
    }


    .detalle-container {
        padding: 22px 18px;

        border-radius: 12px;
    }


    .detalle-container h2 {
        font-size: 1.05rem;
    }


    .resumen-total strong {
        font-size: 1.2rem;
    }

}
