/* Estilos para o carrinho */
.carrinho-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.carrinho-titulo {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

/* Opções de Pagamento */
.opcoes-pagamento {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.opcoes-pagamento h3 {
    margin-bottom: 15px;
    color: #333;
}

.opcoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.opcao-pagamento-item {
    cursor: pointer;
}

.opcao-pagamento-item input[type="radio"] {
    display: none;
}

.opcao-conteudo {
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.opcao-pagamento-item input[type="radio"]:checked + .opcao-conteudo {
    border-color: #007bff;
    background: #e7f1ff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
}

.opcao-conteudo i {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 10px;
}

.opcao-conteudo span {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.opcao-conteudo small {
    color: #666;
    font-size: 0.85rem;
}

/* Opções de Parcelamento */
.opcoes-parcelamento {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.opcoes-parcelamento h3 {
    margin-bottom: 15px;
    color: #333;
}

.parcelamento-grid {
    display: grid;
    gap: 15px;
}

.form-select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-select:focus {
    border-color: #007bff;
    outline: none;
}

/* Detalhes do Parcelamento */
.detalhes-parcelamento {
    margin-bottom: 20px;
}

.detalhes-parcelamento .alert {
    border-radius: 8px;
    border: none;
}

.detalhes-parcelamento .alert h5 {
    margin-bottom: 15px;
}

.detalhes-parcelamento .total-final {
    font-size: 1.2rem;
    color: #28a745;
    margin-top: 10px;
}

/* Carrinho Items */
.carrinho-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.carrinho-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.item-imagem {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-nome {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.item-sabor {
    color: #666;
    font-size: 0.9rem;
}

.item-sabor span {
    color: #333;
    font-weight: 500;
}

.item-preco-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-preco {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-preco {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-pix {
    background: #17a2b8;
    color: white;
}

.badge-atacado {
    background: #28a745;
    color: white;
}

.badge-varejo {
    background: #6c757d;
    color: white;
}

.preco-original {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9rem;
}

.info-quantidade {
    font-size: 0.85rem;
    color: #666;
}

.alerta-atacado {
    color: #ffc107 !important;
    font-weight: 500;
}

.economia {
    color: #28a745;
    font-weight: bold;
}

/* Controle de Quantidade */
.quantidade-controle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quantidade-btn {
    width: 35px;
    height: 35px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quantidade-btn:hover {
    background: #e9ecef;
}

.quantidade-input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

/* Subtotal */
.item-subtotal {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    min-width: 100px;
    text-align: right;
}

/* Ações */
.item-acoes .btn-remover {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.item-acoes .btn-remover:hover {
    background: #c82333;
}

/* Carrinho Total */
.carrinho-total {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.total-info {
    margin-bottom: 25px;
}

.total-base, .total-juros, .total-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.total-final {
    border-bottom: none;
    font-size: 1.3rem;
    font-weight: bold;
}

.total-label {
    color: #333;
}

.total-valor {
    font-weight: bold;
}

.total-valor.juros {
    color: #dc3545;
}

.total-valor.final {
    color: #28a745;
    font-size: 1.5rem;
}

/* Ações do Carrinho */
.carrinho-acoes {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-continuar {
    background: #6c757d;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.btn-continuar:hover {
    background: #5a6268;
    color: white;
}

.btn-finalizar {
    background: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease;
}
/* Estilos para parcelamento */
.parcelamento-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.parcelamento-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.parcelamento-header h4 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.parcelamento-header i {
    color: #007bff;
    font-size: 1.2rem;
}

.parcelamento-opcoes {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.parcelamento-opcoes label {
    font-weight: 600;
    color: #555;
    margin: 0;
}

.parcelamento-opcoes select {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.parcelamento-opcoes select:hover {
    border-color: #007bff;
}

.parcelamento-opcoes select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.juros-info {
    font-size: 0.85rem;
    color: #e74c3c;
    font-weight: 600;
}

.parcelamento-detalhes {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.detalhe-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #555;
}

.detalhe-item.total {
    border-top: 2px solid #ddd;
    padding-top: 12px;
    margin-top: 8px;
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.detalhe-item.parcela {
    background: #e8f4ff;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    color: #0066cc;
    font-weight: 600;
}

.juros-negativo {
    color: #e74c3c;
    font-weight: 600;
}

/* Estilos para o total no rodapé */
.total-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.total-info.juros-info {
    color: #e74c3c;
}

.total-info.parcela-info {
    color: #0066cc;
    font-weight: 500;
}

.total-info.total-final {
    border-top: 2px solid #ddd;
    border-bottom: none;
    padding-top: 15px;
    margin-top: 5px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.total-info.total-final .grande {
    font-size: 1.4rem;
    color: #27ae60;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .parcelamento-opcoes {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .parcelamento-opcoes select {
        width: 100%;
    }
    
    .parcelamento-detalhes {
        font-size: 0.9rem;
    }
    
    .total-info.total-final {
        font-size: 1.1rem;
    }
    
    .total-info.total-final .grande {
        font-size: 1.2rem;
    }
}
.btn-finalizar:hover {
    background: #218838;
    color: white;
}

/* Mensagens */
.mensagem {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

.mensagem.sucesso {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.loading-spinner span {
    display: block;
    margin-top: 10px;
    color: #333;
}

/* Mensagem de Atualização */
.mensagem-atualizacao {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .carrinho-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .item-imagem {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    
    .carrinho-acoes {
        flex-direction: column;
    }
    
    .opcoes-grid {
        grid-template-columns: 1fr;
    }
}