/* =========================================
   FRUTIBROCHETAS
   Estilos del carrito
   ========================================= */

/* ---------- CONFIGURACIÓN GENERAL ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #fff7ed;
}


/* ---------- VARIABLES ---------- */

:root {

    --rojo: #e53935;
    --rojo-oscuro: #b71c1c;

    --amarillo: #ffc107;
    --naranja: #ff7a00;
    --naranja-oscuro: #e85d00;

    --crema: #fff7ed;
    --blanco: #ffffff;

    --gris: #666;
    --oscuro: #292929;
}


/* =========================================
   NAVBAR
   ========================================= */

header {
    width: 100%;
    background-color: var(--blanco);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.navbar {
    width: 90%;
    max-width: 1200px;
    height: 80px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--verde);
    white-space: nowrap;
}

.btn-menu {
    text-decoration: none;
    background-color: var(--rosa);
    color: white;

    padding: 11px 20px;

    border-radius: 25px;

    font-weight: 600;

    transition: 0.3s;
}

.btn-menu:hover {
    background-color: var(--rosa-oscuro);
    transform: translateY(-2px);
}


/* =========================================
   CONTENEDOR PRINCIPAL
   ========================================= */

.carrito {
    width: 90%;
    max-width: 1000px;

    margin: auto;

    padding: 70px 0 90px;

    min-height: calc(100vh - 160px);
}


/* =========================================
   TÍTULO
   ========================================= */

.carrito-titulo {
    text-align: center;

    margin-bottom: 45px;
}

.carrito-titulo h1 {
    font-size: 2.5rem;

    color: var(--oscuro);

    margin-bottom: 10px;
}

.carrito-titulo h1::after {
    content: "";

    display: block;

    width: 60px;
    height: 4px;

    background-color: var(--rosa);

    margin: 12px auto 0;

    border-radius: 10px;
}

.carrito-titulo p {
    color: var(--gris);

    font-size: 1rem;
}


/* =========================================
   PRODUCTOS DEL CARRITO
   ========================================= */

.carrito-productos {
    display: flex;

    flex-direction: column;

    gap: 15px;

    margin-bottom: 30px;
}


/* ---------- PRODUCTO ---------- */

.producto-carrito {
    background-color: var(--blanco);

    border-radius: 15px;

    padding: 20px 25px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);

    display: grid;

    grid-template-columns: 1fr auto auto auto;

    align-items: center;

    gap: 25px;

    transition: 0.3s;
}

.producto-carrito:hover {
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12);
}


/* ---------- INFORMACIÓN ---------- */

.producto-info h3 {
    color: var(--oscuro);

    font-size: 1.1rem;

    margin-bottom: 3px;
}

.producto-info p {
    color: var(--gris);

    font-size: 0.85rem;
}


/* =========================================
   CONTROLES DE CANTIDAD
   ========================================= */

.producto-controles {
    display: flex;

    align-items: center;

    gap: 10px;
}

.btn-cantidad {
    width: 32px;
    height: 32px;

    border: none;

    border-radius: 50%;

    background-color: var(--verde);

    color: white;

    font-size: 1.2rem;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}

.btn-cantidad:hover {
    background-color: var(--verde-oscuro);

    transform: scale(1.08);
}

.producto-controles span {
    min-width: 25px;

    text-align: center;

    font-weight: 600;

    color: var(--oscuro);
}


/* =========================================
   SUBTOTAL
   ========================================= */

.producto-subtotal {
    color: var(--rosa);

    font-size: 1.05rem;

    font-weight: 700;

    min-width: 90px;

    text-align: right;
}


/* =========================================
   BOTÓN ELIMINAR
   ========================================= */

.btn-eliminar {
    border: none;

    background-color: transparent;

    color: #999;

    font-size: 1.1rem;

    cursor: pointer;

    padding: 8px;

    transition: 0.3s;
}

.btn-eliminar:hover {
    color: var(--rosa);

    transform: scale(1.1);
}


/* =========================================
   CARRITO VACÍO
   ========================================= */

.carrito-vacio {
    background-color: var(--blanco);

    border-radius: 20px;

    padding: 60px 20px;

    text-align: center;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);
}

.icono-carrito {
    font-size: 4rem;

    margin-bottom: 15px;
}

.carrito-vacio h3 {
    color: var(--oscuro);

    font-size: 1.4rem;

    margin-bottom: 8px;
}

.carrito-vacio p {
    color: var(--gris);

    font-size: 0.95rem;
}


/* =========================================
   RESUMEN
   ========================================= */

.resumen {
    background-color: var(--blanco);

    border-radius: 20px;

    padding: 30px;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.08);

    margin-top: 30px;
}

.resumen h2 {
    color: var(--oscuro);

    font-size: 1.4rem;

    margin-bottom: 20px;
}


/* ---------- LÍNEAS DEL RESUMEN ---------- */

.resumen-linea {
    display: flex;

    justify-content: space-between;

    align-items: center;

    color: var(--gris);

    padding: 10px 0;
}

.resumen-linea.total {
    border-top: 1px solid #eee;

    margin-top: 10px;

    padding-top: 20px;

    color: var(--oscuro);

    font-size: 1.3rem;
}

.resumen-linea.total strong:last-child {
    color: var(--rosa);
}


/* =========================================
   BOTONES DE ACCIÓN
   ========================================= */

.acciones {
    display: flex;

    justify-content: flex-end;

    gap: 15px;

    margin-top: 25px;
}

.btn-vaciar,
.btn-comprar {
    border: none;

    padding: 12px 24px;

    border-radius: 25px;

    font-family: 'Poppins', sans-serif;

    font-weight: 600;

    cursor: pointer;

    transition: 0.3s;
}


/* ---------- VACIAR ---------- */

.btn-vaciar {
    background-color: #f1f1f1;

    color: #666;
}

.btn-vaciar:hover {
    background-color: #e2e2e2;
}


/* ---------- COMPRAR ---------- */

.btn-comprar {
    background-color: var(--rosa);

    color: white;
}

.btn-comprar:hover {
    background-color: var(--rosa-oscuro);

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.15);
}


/* =========================================
   SEGUIR COMPRANDO
   ========================================= */

.regresar {
    text-align: center;

    margin-top: 30px;
}

.regresar a {
    color: var(--verde);

    text-decoration: none;

    font-weight: 600;

    transition: 0.3s;
}

.regresar a:hover {
    color: var(--verde-oscuro);
}


/* =========================================
   FOOTER
   ========================================= */

footer {
    background-color: var(--oscuro);

    color: white;

    text-align: center;

    padding: 25px 15px;

    font-size: 0.9rem;
}


/* =========================================
   RESPONSIVE
   ========================================= */

/* ---------- TABLETS ---------- */

@media (max-width: 800px) {

    .producto-carrito {
        grid-template-columns: 1fr auto;

        gap: 15px;
    }

    .producto-controles {
        justify-self: end;
    }

    .producto-subtotal {
        text-align: left;
    }

    .btn-eliminar {
        justify-self: end;
    }

}


/* ---------- CELULARES ---------- */

@media (max-width: 600px) {

    .navbar {
        height: auto;

        padding: 15px 0;

        gap: 15px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .btn-menu {
        padding: 9px 15px;

        font-size: 0.85rem;
    }


    /* CARRITO */

    .carrito {
        width: 92%;

        padding: 50px 0 70px;
    }

    .carrito-titulo {
        margin-bottom: 30px;
    }

    .carrito-titulo h1 {
        font-size: 2rem;
    }


    /* PRODUCTOS */

    .producto-carrito {
        display: grid;

        grid-template-columns: 1fr auto;

        padding: 18px;

        gap: 12px;
    }

    .producto-info {
        grid-column: 1 / 2;
    }

    .producto-controles {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    .producto-subtotal {
        grid-column: 1 / 2;

        text-align: left;

        min-width: auto;
    }

    .btn-eliminar {
        grid-column: 2 / 3;

        grid-row: 2;

        justify-self: end;
    }


    /* RESUMEN */

    .resumen {
        padding: 25px 20px;
    }

    .acciones {
        flex-direction: column;
    }

    .btn-vaciar,
    .btn-comprar {
        width: 100%;
    }

}

/* =========================================
   COLORES Y CONTRASTE DEL CARRITO
   ESTILO DORILOCOS
   ========================================= */

/* ---------- CONTROLES DE CANTIDAD ---------- */

.producto-controles {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-cantidad {
    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background-color: #e63946;
    color: #ffffff;

    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: 0.2s;
}

.btn-cantidad:hover {
    background-color: #c92532;
    transform: scale(1.08);
}

.producto-controles span {
    min-width: 30px;

    text-align: center;

    color: #222;
    font-size: 1rem;
    font-weight: 700;
}


/* ---------- SUBTOTAL ---------- */

.producto-subtotal {
    color: #d62828;
    font-size: 1.05rem;
    font-weight: 700;

    min-width: 90px;
    text-align: right;
}


/* ---------- BOTÓN ELIMINAR ---------- */

.btn-eliminar {
    border: none;

    background-color: transparent;

    color: #d62828;

    font-size: 1.2rem;

    cursor: pointer;

    padding: 8px;

    transition: 0.2s;
}

.btn-eliminar:hover {
    color: #a4161a;
    transform: scale(1.15);
}


/* =========================================
   BOTONES DEL RESUMEN
   ========================================= */

.acciones {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 15px;

    margin-top: 25px;
}


/* ---------- VACIAR CARRITO ---------- */

.btn-vaciar {
    border: 2px solid #e63946;

    background-color: #ffffff;

    color: #d62828;

    padding: 12px 24px;

    border-radius: 25px;

    font-family: 'Poppins', sans-serif;
    font-weight: 600;

    cursor: pointer;

    transition: 0.3s;
}

.btn-vaciar:hover {
    background-color: #e63946;
    color: #ffffff;
}


/* ---------- REALIZAR PEDIDO ---------- */

.btn-comprar {
    border: none;

    background-color: #e63946;

    color: #ffffff;

    padding: 12px 24px;

    border-radius: 25px;

    font-family: 'Poppins', sans-serif;
    font-weight: 700;

    cursor: pointer;

    transition: 0.3s;
}

.btn-comprar:hover {
    background-color: #c92532;

    transform: translateY(-2px);

    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}


/* =========================================
   RESUMEN
   ========================================= */

.resumen-linea.total {
    color: #222;
}

.resumen-linea.total strong:first-child {
    color: #222;
}

.resumen-linea.total strong:last-child {
    color: #d62828;
}


/* =========================================
   SEGUIR COMPRANDO
   ========================================= */

.regresar a {
    color: #e63946;
}

.regresar a:hover {
    color: #b71c1c;
}