/* Página do Carrinho */
.carrinho-container {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 40px 20px;
}

.carrinho-header {
    max-width: 1200px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-voltar {
    background: #fff;
    color: #2d3436;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
}

.btn-voltar:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

.carrinho-header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #2d3436;
    margin: 0;
}

.carrinho-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
}

.carrinho-itens {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.item-carrinho {
    display: grid;
    grid-template-columns: 100px 1fr 150px 120px 50px;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.item-carrinho:last-child {
    border-bottom: none;
}

.item-imagem {
    width: 100px;
    height: 100px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-imagem img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sem-imagem {
    font-size: 3rem;
}

.item-detalhes h3 {
    font-size: 1.1rem;
    color: #2d3436;
    margin-bottom: 8px;
}

.item-preco-unit {
    color: #636e72;
    font-size: 0.95rem;
}

.item-quantidade {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 8px;
    border-radius: 8px;
}

.item-quantidade button {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
    transition: all 0.2s ease;
}

.item-quantidade button:hover:not(:disabled) {
    background: #e74c3c;
    color: #fff;
}

.item-quantidade button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-quantidade input {
    width: 50px;
    height: 32px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.item-subtotal {
    text-align: right;
}

.item-subtotal strong {
    font-size: 1.2rem;
    color: #e74c3c;
}

.btn-remover {
    width: 40px;
    height: 40px;
    border: none;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.2s ease;
}

.btn-remover:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Carrinho Vazio */
.carrinho-vazio {
    text-align: center;
    padding: 60px 20px;
}

.icone-vazio {
    font-size: 5rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.carrinho-vazio h2 {
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 10px;
}

.carrinho-vazio p {
    color: #636e72;
    margin-bottom: 30px;
}

.btn-continuar {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    padding: 15px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-continuar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

/* Resumo */
.carrinho-resumo {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.carrinho-resumo h2 {
    font-size: 1.5rem;
    color: #2d3436;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.resumo-linha {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    color: #636e72;
}

.resumo-linha.total {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3436;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.resumo-linha.total span:last-child {
    color: #e74c3c;
}

.frete-info {
    color: #27ae60;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-finalizar {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: #fff;
    border: none;
    padding: 18px 30px;
    font-size: 1.2rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    margin: 25px 0 15px;
    transition: all 0.3s ease;
}

.btn-finalizar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.btn-limpar {
    width: 100%;
    background: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-limpar:hover {
    background: #e74c3c;
    color: #fff;
}

.garantias-resumo {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.garantias-resumo p {
    font-size: 0.9rem;
    color: #636e72;
    margin: 8px 0;
}

/* Responsivo */
@media (max-width: 1024px) {
    .carrinho-content {
        grid-template-columns: 1fr;
    }
    
    .carrinho-resumo {
        position: static;
    }
}

@media (max-width: 768px) {
    .carrinho-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-carrinho {
        grid-template-columns: 70px 1fr 80px;
        grid-template-rows: auto auto auto;
        gap: 15px;
    }
    
    .item-imagem {
        width: 70px;
        height: 70px;
        grid-row: 1 / 3;
    }
    
    .item-detalhes {
        grid-column: 2 / 4;
    }
    
    .item-quantidade {
        grid-column: 2;
        grid-row: 3;
    }
    
    .item-subtotal {
        grid-column: 3;
        grid-row: 3;
        text-align: right;
    }
    
    .btn-remover {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }
}
