/* =========================================================
   ENCABEZADO DEL CARRITO
   ========================================================= */

.carrito-header {
    padding: 80px 20px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.65)
        ),
        url("../img/local/ambiente.jpg")
        center center / cover no-repeat;

    color: #ffffff;

    text-align: center;
}

.carrito-header .subtitulo {
    color: #ffca28;
}

.carrito-header h1 {
    font-size: 48px;

    font-weight: 800;

    margin: 15px 0;
}

.carrito-header p {
    color: rgba(255, 255, 255, 0.90);

    font-size: 18px;

    margin-bottom: 0;
}


/* =========================================================
   SECCIÓN PRINCIPAL
   ========================================================= */

.carrito-section {
    background: #f7f7f7;

    min-height: 600px;
}


/* =========================================================
   CONTENEDOR DE PRODUCTOS
   ========================================================= */

.carrito-contenedor {
    background: #ffffff;

    border-radius: 15px;

    padding: 25px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.06);
}


/* =========================================================
   TÍTULO DEL CARRITO
   ========================================================= */

.carrito-titulo {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}

.carrito-titulo h2 {
    margin: 0;

    font-size: 25px;

    font-weight: 700;
}


/* =========================================================
   PRODUCTO DEL CARRITO
   ========================================================= */

.carrito-producto {
    display: grid;

    grid-template-columns:
        100px
        minmax(0, 1fr)
        auto
        auto
        40px;

    align-items: center;

    gap: 20px;

    padding: 20px 0;

    border-bottom: 1px solid #e5e5e5;
}

.carrito-producto:last-child {
    border-bottom: none;
}

.carrito-producto img {
    width: 100px;
    height: 90px;

    object-fit: cover;

    border-radius: 10px;

    background: #eeeeee;
}


/* =========================================================
   INFORMACIÓN DEL PRODUCTO
   ========================================================= */

.carrito-producto-info {
    min-width: 0;
}

.carrito-producto-info h3 {
    margin: 5px 0;

    font-size: 18px;

    font-weight: 700;
}

.carrito-producto-info p {
    margin: 0;

    font-weight: bold;
}

.producto-categoria {
    color: #c62828;

    font-size: 11px;

    font-weight: bold;

    text-transform: uppercase;
}


/* =========================================================
   CONTROL DE CANTIDAD
   ========================================================= */

.cantidad-control {
    display: flex;

    align-items: center;

    gap: 10px;
}

.btn-cantidad {
    width: 34px;
    height: 34px;

    display: inline-flex;

    justify-content: center;
    align-items: center;

    border: 1px solid #cccccc;

    background: #ffffff;

    border-radius: 50%;

    cursor: pointer;

    font-size: 18px;

    transition:
        background 0.20s ease,
        color 0.20s ease,
        border-color 0.20s ease;
}

.btn-cantidad:hover {
    background: #c62828;

    color: #ffffff;

    border-color: #c62828;
}


/* =========================================================
   SUBTOTAL DEL PRODUCTO
   ========================================================= */

.producto-subtotal {
    min-width: 90px;

    text-align: right;

    font-size: 17px;

    font-weight: 700;

    color: #333333;
}


/* =========================================================
   BOTÓN ELIMINAR
   ========================================================= */

.btn-eliminar {
    border: none;

    background: transparent;

    color: #c62828;

    font-size: 25px;

    cursor: pointer;

    transition:
        color 0.20s ease,
        transform 0.20s ease;
}

.btn-eliminar:hover {
    color: #9e1f1f;

    transform: scale(1.10);
}


/* =========================================================
   RESUMEN DEL CARRITO
   ========================================================= */

.resumen-carrito {
    background: #ffffff;

    border-radius: 15px;

    padding: 25px;

    position: sticky;

    top: 90px;

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.06);
}

.resumen-carrito h2 {
    margin-bottom: 25px;

    font-size: 25px;

    font-weight: 700;
}

.resumen-linea {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}

.resumen-total {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    font-size: 22px;

    margin-bottom: 25px;

    padding-top: 15px;

    border-top: 1px solid #dddddd;
}

.resumen-total strong {
    color: #c62828;

    font-size: 28px;
}


/* =========================================================
   BOTONES DEL RESUMEN
   ========================================================= */

.btn-continuar,
.btn-checkout {
    width: 100%;

    padding: 13px;

    margin-top: 10px;

    border-radius: 30px;

    font-weight: 700;
}

.btn-continuar {
    border: 1px solid #cccccc;

    background: #ffffff;

    color: #333333;
}

.btn-continuar:hover {
    background: #f5f5f5;

    color: #333333;
}

.btn-checkout {
    background: #c62828;

    border: 1px solid #c62828;

    color: #ffffff;
}

.btn-checkout:hover {
    background: #9e1f1f;

    border-color: #9e1f1f;

    color: #ffffff;
}

.btn-checkout.disabled,
.btn-checkout:disabled {
    opacity: 0.55;

    pointer-events: none;
}


/* =========================================================
   CARRITO VACÍO
   ========================================================= */

.carrito-vacio {
    text-align: center;

    padding: 70px 20px;
}

.carrito-icono {
    font-size: 60px;

    margin-bottom: 20px;
}

.carrito-vacio h2 {
    margin-bottom: 10px;

    font-weight: 700;
}

.carrito-vacio p {
    color: #666666;

    margin-bottom: 25px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {

    .resumen-carrito {
        position: static;

        margin-top: 20px;
    }
}


@media (max-width: 768px) {

    .carrito-header {
        padding: 60px 15px;
    }

    .carrito-header h1 {
        font-size: 36px;
    }

    .carrito-header p {
        font-size: 16px;
    }

    .carrito-contenedor {
        padding: 20px;
    }

    .carrito-producto {
        grid-template-columns:
            80px
            minmax(0, 1fr)
            35px;

        gap: 12px;
    }

    .carrito-producto img {
        width: 80px;
        height: 80px;
    }

    .cantidad-control {
        grid-column: 2;

        justify-content: flex-start;
    }

    .producto-subtotal {
        grid-column: 2;

        min-width: auto;

        text-align: left;
    }

    .btn-eliminar {
        grid-column: 3;
        grid-row: 1;

        align-self: start;
    }

    .carrito-titulo {
        flex-direction: column;

        align-items: stretch;
    }

    .carrito-titulo .btn {
        width: 100%;
    }
}


@media (max-width: 480px) {

    .carrito-header {
        padding: 50px 15px;
    }

    .carrito-header h1 {
        font-size: 31px;
    }

    .carrito-contenedor,
    .resumen-carrito {
        padding: 16px;
    }

    .carrito-producto {
        grid-template-columns:
            70px
            minmax(0, 1fr)
            30px;

        gap: 10px;
    }

    .carrito-producto img {
        width: 70px;
        height: 70px;
    }

    .carrito-producto-info h3 {
        font-size: 16px;
    }

    .resumen-total {
        font-size: 19px;
    }

    .resumen-total strong {
        font-size: 23px;
    }
}