.carrinho-main {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 70vh; 
}

.carrinho-main h1 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5em;
    font-weight: 700;
}


.carrinho-container {
    display: flex;
    gap: 40px;
    align-items: flex-start; 
}


.carrinho-itens {
    flex: 2; 
}

.item-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 0.9em;
    text-transform: uppercase;
}

.item-header span:nth-child(1) { text-align: left; }
.item-header span:nth-child(2) { text-align: center; }
.item-header span:nth-child(3) { text-align: right; }


.carrinho-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.item-info {
    display: flex;
    align-items: center;
}

.item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid #ddd;
}

.item-nome {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.item-preco {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.btn-remover {
    background: none;
    border: none;
    color: red;
    font-size: 0.8em;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 5px;
    padding: 0;
}

.item-quantidade {
    text-align: center;
}

.item-quantidade input {
    width: 50px;
    padding: 8px;
    border: 1px solid #ccc;
    text-align: center;
}

.item-total {
    font-weight: 700;
}


.btn-continuar-comprando {
    display: inline-block;
    margin-top: 30px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 10px 0;
}
.btn-continuar-comprando:hover {
    color: #000;
    text-decoration: underline;
}


.carrinho-resumo {
    flex: 1; 
    border: 1px solid #ddd;
    padding: 25px;
    background-color: #f9f9f9;
}

.carrinho-resumo h2 {
    font-size: 1.5em;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.resumo-linha.total {
    font-weight: 700;
    font-size: 1.2em;
    border-top: 2px solid #000;
    margin-top: 15px;
    padding-top: 15px;
}


.cupom-desconto {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}
.cupom-desconto input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
}
.cupom-desconto button {
    background-color: #333;
    color: white;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-finalizar-compra {
    display: block;
    width: 100%;
    background-color: #000000;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}
.btn-finalizar-compra:hover {
    background-color: #333;
}

@media (max-width: 800px) {
    .carrinho-container {
        flex-direction: column;
    }

    .item-header {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .carrinho-main h1 {
        font-size: 2em;
    }
    
    .item-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .item-info img {
        width: 60px;
        height: 60px;
        margin-right: 0;
    }
    
    .carrinho-item {
        grid-template-columns: 2fr 1fr 1fr;
    }
}
/* Estilo Básico para Itens do Carrinho na Página */
.carrinho-item-linha {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.col-produto { display: flex; gap: 15px; align-items: center; }
.col-produto img { width: 80px; height: 80px; object-fit: contain; background: #f9f9f9; }
.col-produto .nome { font-weight: bold; margin-bottom: 5px; }
.col-produto .detalhe { font-size: 12px; color: #666; margin-bottom: 5px; }
.btn-remove-link { background: none; border: none; color: red; cursor: pointer; font-size: 12px; padding: 0; text-decoration: underline; }

.col-qtd { display: flex; align-items: center; gap: 10px; justify-content: center; }
.col-qtd button { width: 30px; height: 30px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.col-total { text-align: right; font-weight: bold; font-size: 1.1rem; }
/* --- ESTILO DA LISTA DE CARRINHO --- */
.carrinho-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Itens */
.carrinho-item-linha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.col-produto {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 50%;
}

.col-produto img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.col-produto .infos .nome {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}

.btn-remover {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
    margin-top: 5px;
}

/* Quantidade */
.col-qtd {
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-qtd button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
}

/* Total */
.col-total {
    font-weight: bold;
    font-size: 1.1rem;
    width: 20%;
    text-align: right;
}

/* Responsivo */
@media (max-width: 768px) {
    .carrinho-container { grid-template-columns: 1fr; }
    .carrinho-item-linha { flex-direction: column; gap: 15px; align-items: flex-start; }
    .col-produto { width: 100%; }
    .col-total { width: 100%; text-align: left; margin-top: 10px; }
}