/* LISTA */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ITEM */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px 120px 140px 100px;
    align-items: center;
    gap: 15px;

    padding: 15px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* IMAGEM */
.cart-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

/* INFO */
.cart-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}


/* TAMANHO */
.cart-info div {
    font-size: 14px;
    color: #555;
}

/* QUANTIDADE */
.cart-qtd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cart-qtd button {
    width: 30px;
    height: 30px;
}

.cart-qtd button:hover {
    background: #000;
    color: #fff;
}

.cart-qtd span {
    min-width: 25px;
    text-align: center;
    font-weight: bold;
}

/* PREÇO */
.cart-info div strong {
    font-size: 15px;
    color: #000;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.btn-limpar {
    background: #fff;
    border: 1px solid #ddd;

    padding: 10px 15px;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.2s;

    font-size: 14px;
}

.btn-limpar:hover {
    background: #f5f5f5;
}


/* BOTÃO REMOVER */

.btn-remover:hover {
    text-decoration: underline;
}

/* TOTAL GERAL */

.cart-total h3 {
    margin: 0;
    font-size: 20px;
}

.cart-nome {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-unit,
.cart-total-item {
    text-align: center;
    font-size: 14px;
}

.cart-total-item {
    font-weight: bold;
}

.cart-remove {
    text-align: center;
}

.btn-remover {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
}

.cart-total {
    margin-top: 20px;
    padding: 20px;

    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.btn-cancelar {
    width: 100%;
    margin-top: 10px;

    padding: 12px;
    border-radius: 8px;

    border: none;
    background: #eee;

    color: #333;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    transition: 0.2s;
}

.btn-cancelar:hover {
    background: #ddd;
}

.btn-cancelar::before {
    content: "✖ ";
}

/* TEXTO DO TOTAL */
.cart-total-info {
    display: flex;
    flex-direction: column;
}

.cart-total-info span {
    font-size: 13px;
    color: #666;
}

.cart-total-info strong {
    font-size: 22px;
    color: #000;
}

/* BOTÃO */
#btn-whatsapp {
    background: #25D366;
    color: #fff;

    border: none;
    padding: 12px 20px;

    font-size: 14px;
    border-radius: 8px;

    cursor: pointer;
    transition: 0.2s;

    width: auto;
    /* 🔥 remove largura total */
    min-width: 200px;
}

#btn-whatsapp:hover {
    background: #1ebe5d;
}

/* FUNDO ESCURO */
#modal-lojas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0, 0, 0, 0.5);

    display: none;
    /* começa escondido */

    align-items: center;
    justify-content: center;

    z-index: 9999;
}

/* CAIXA */

#modal-lojas {
    opacity: 0;
    transition: opacity 0.2s ease;
}

#modal-lojas.ativo {
    display: flex;
    opacity: 1;
}

#modal-lojas .modal-content {
    transform: scale(0.9);
    transition: transform 0.2s ease;
}

#modal-lojas.ativo .modal-content {
    transform: scale(1);
}


#modal-lojas .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 320px;
    max-width: 90%;
}

/* BOTÕES */
#lista-lojas button {
    width: 100%;
    padding: 12px;

    border-radius: 8px;
    border: 1px solid #eee;

    background: #fff;
    cursor: pointer;

    transition: 0.2s;
}

#lista-lojas button:hover {
    background: #000;
    color: #fff;
}

@media (max-width: 768px) {

    .cart-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cart-img {
        width: 100%;
        height: auto;
    }

    .cart-qtd {
        justify-content: flex-start;
    }

    .cart-unit,
    .cart-total-item,
    .cart-remove {
        text-align: left;
    }

    .cart-total {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    #btn-whatsapp {
        width: 100%;
    }

    .cart-actions {
        width: 100%;
        flex-direction: column;
    }

    .btn-limpar,
    #btn-whatsapp {
        width: 100%;
    }

}