/*==============================================================
   ASOL HAIR CARE — MÓDULO: CARRITO
   Detalle y contenido de la página del carrito
==============================================================*/


/* ==========================================================
   SELECTOR DE CANTIDAD
========================================================== */

.selector-cantidad {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-borde);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.selector-cantidad__boton {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: #F8F2FC;
    color: var(--color-primario);
    font-size: 1.3rem;
    cursor: pointer;
    transition: background-color .2s ease;
}

.boton--vaciar {
    width: auto;
    align-self: center;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}


    .selector-cantidad__boton:hover {
        background: #ECDCF8;
    }

.selector-cantidad__input {
    width: 70px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 1rem;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

    .selector-cantidad__input::-webkit-outer-spin-button,
    .selector-cantidad__input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }


/* ==========================================================
   SELECTOR DE CANTIDAD — DENTRO DEL CARRITO
========================================================== */

.carrito-item__cantidad .selector-cantidad {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    overflow: visible;
}

.carrito-item__cantidad .selector-cantidad__boton {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-primario);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s ease;
}

    .carrito-item__cantidad .selector-cantidad__boton:hover {
        background: #EFE2F8;
    }

.carrito-item__cantidad .selector-cantidad__input {
    width: 32px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-texto);
    outline: none;
}


/* ==========================================================
   LISTA DEL CARRITO
========================================================== */

.carrito-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* ==========================================================
   PRODUCTO DEL CARRITO
========================================================== */

.carrito-item {
    display: grid;
    grid-template-columns: 90px 1fr auto auto auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1.2rem;
    background: var(--color-card);
    border: 1px solid var(--color-borde);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.carrito-item__imagen-envoltorio {
    display: flex;
    justify-content: center;
}

.carrito-item__imagen {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--color-borde);
    background: #fff;
}

.carrito-item__imagen--vacia {
    display: block;
}

.carrito-item__info {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.carrito-item__nombre {
    font-weight: 700;
    font-size: 1.1rem;
}

.carrito-item__precio-unitario {
    color: #666;
}

.carrito-item__subtotal {
    font-weight: 600;
}


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

.carrito-item__quitar {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #eee;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color .2s ease, transform .2s ease;
}

    .carrito-item__quitar:hover {
        background: #ddd;
        transform: scale(1.05);
    }


/* ==========================================================
   BOTÓN WHATSAPP
========================================================== */

.boton--whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    border: none;
    flex-shrink: 0;
}

    .boton--whatsapp:hover {
        background: #1ebe5d;
        color: #fff;
    }


/* ==========================================================
   BOTÓN A TODO EL ANCHO
========================================================== */

.boton--bloque {
    width: 100%;
}


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

.vacio {
    padding: 2rem;
    background: var(--color-card);
    border: 1px solid var(--color-borde);
    border-radius: 18px;
    text-align: center;
}


/* ==========================================================
   RESUMEN DEL CARRITO
========================================================== */

.carrito-resumen {
    margin-top: 2rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: var(--color-card);
    border: 1px solid var(--color-borde);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.carrito-resumen__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.3rem;
}

    .carrito-resumen__total strong {
        font-size: 1.5rem;
    }


/* ==========================================================
   MÓVIL
========================================================== */

@media (max-width: 768px) {

    .carrito-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    .carrito-item__imagen-envoltorio {
        justify-content: center;
    }

    .carrito-item__cantidad {
        width: 100%;
    }

        .carrito-item__cantidad .selector-cantidad {
            justify-content: center;
        }

    .carrito-item__subtotal {
        font-size: 1.3rem;
    }

    .carrito-resumen {
        padding: 1.3rem;
    }

    .carrito-resumen__total {
        flex-direction: column;
        gap: .5rem;
        text-align: center;
    }
}
/* ==========================================================
   PIE DE PÁGINA — CARRITO
========================================================== */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.pie {
    margin-top: auto;
}