Spaces:
Running

parcelar / index.html
fcofernandes's picture
Add 1 files
9e89967 verified
Raw History Blame Contribute Delete
35.5 kB
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Parcelar.com | Compare e simule empréstimos no Brasil</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#10B981',
secondary: '#3B82F6',
dark: '#1F2937',
light: '#F3F4F6',
},
fontFamily: {
sans: ['Inter', 'sans-serif'],
},
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.loan-card {
transition: all 0.3s ease;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.loan-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.best-choice {
position: relative;
border: 2px solid #10B981;
}
.best-choice::after {
content: "Melhor Opção";
position: absolute;
top: -12px;
right: 20px;
background-color: #10B981;
color: white;
padding: 2px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: bold;
}
.input-range::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 20px;
height: 20px;
background: #10B981;
cursor: pointer;
border-radius: 50%;
}
.input-range::-moz-range-thumb {
width: 20px;
height: 20px;
background: #10B981;
cursor: pointer;
border-radius: 50%;
}
.tab-active {
border-bottom: 3px solid #10B981;
color: #10B981;
font-weight: 600;
}
.amount-option {
transition: all 0.2s ease;
}
.amount-option.active {
background-color: #10B981;
color: white;
}
.form-label {
font-size: 1rem;
font-weight: 500;
color: #374151;
margin-bottom: 0.5rem;
display: block;
}
.form-input {
font-size: 1rem;
padding: 0.75rem 1rem;
border: 1px solid #D1D5DB;
border-radius: 0.5rem;
width: 100%;
background-color: white;
color: #111827;
transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
border-color: #10B981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
outline: none;
}
.form-select {
font-size: 1rem;
padding: 0.75rem 2.5rem 0.75rem 1rem;
border: 1px solid #D1D5DB;
border-radius: 0.5rem;
width: 100%;
background-color: white;
color: #111827;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 1.5em 1.5em;
}
.form-select:focus {
border-color: #10B981;
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
outline: none;
}
.bank-logo {
height: 30px;
object-fit: contain;
}
.bank-logo.nubank {
height: 24px;
}
.bank-logo.c6 {
height: 28px;
}
.bank-logo.bradesco {
height: 32px;
}
.bank-logo.santander {
height: 30px;
}
.bank-logo.bmg {
height: 30px;
}
.bank-logo.bb {
height: 28px;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-hand-holding-usd text-3xl text-primary mr-2"></i>
<h1 class="text-2xl font-bold text-dark">Parcelar<span class="text-primary">.com</span></h1>
</div>
<nav class="hidden md:flex space-x-6">
<a href="#" class="text-gray-600 hover:text-primary">Início</a>
<a href="#" class="text-gray-600 hover:text-primary">Simulador</a>
<a href="#" class="text-gray-600 hover:text-primary">Comparador</a>
<a href="#" class="text-gray-600 hover:text-primary">Blog</a>
<a href="#" class="text-gray-600 hover:text-primary">Contato</a>
</nav>
<button class="md:hidden text-gray-600">
<i class="fas fa-bars text-2xl"></i>
</button>
</div>
</header>
<!-- Hero Section -->
<section class="bg-gradient-to-r from-primary to-secondary text-white py-12">
<div class="container mx-auto px-4 text-center">
<h2 class="text-3xl md:text-4xl font-bold mb-4">Compare e simule empréstimos pessoais no Brasil</h2>
<p class="text-xl mb-8">Encontre as melhores taxas de juros e condições entre os principais bancos e financeiras</p>
<div class="max-w-3xl mx-auto bg-white rounded-lg shadow-lg p-6">
<div class="flex border-b mb-6">
<button id="personal-tab" class="tab-active px-4 py-2 font-medium text-base">Pessoal</button>
<button id="consigned-tab" class="px-4 py-2 font-medium text-gray-600 text-base">Consignado</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
<div>
<label for="loan-amount" class="form-label">Valor desejado</label>
<div class="relative">
<span class="absolute left-3 top-3 text-gray-500">R$</span>
<input type="text" id="loan-amount" class="form-input pl-8" placeholder="0,00" value="2.000,00">
</div>
<div class="flex flex-wrap gap-2 mt-3">
<button class="amount-option px-3 py-1 border rounded-full text-sm hover:bg-gray-100" data-value="500,00">R$ 500</button>
<button class="amount-option px-3 py-1 border rounded-full text-sm hover:bg-gray-100" data-value="1.000,00">R$ 1.000</button>
<button class="amount-option px-3 py-1 border rounded-full text-sm hover:bg-gray-100" data-value="1.500,00">R$ 1.500</button>
<button class="amount-option px-3 py-1 border rounded-full text-sm hover:bg-gray-100 active" data-value="2.000,00">R$ 2.000</button>
<button class="amount-option px-3 py-1 border rounded-full text-sm hover:bg-gray-100" data-value="2.500,00">R$ 2.500</button>
</div>
</div>
<div>
<label for="installments" class="form-label">Parcelas</label>
<select id="installments" class="form-select">
<option value="12">12 meses</option>
<option value="24">24 meses</option>
<option value="36">36 meses</option>
<option value="48">48 meses</option>
<option value="60">60 meses</option>
</select>
</div>
</div>
<button id="simulate-btn" class="w-full bg-primary hover:bg-green-600 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-lg">
<i class="fas fa-calculator mr-2"></i> Simular Empréstimo
</button>
</div>
</div>
</section>
<!-- Results Section -->
<section id="results-section" class="container mx-auto px-4 py-12 hidden">
<div class="text-center mb-10">
<h2 class="text-3xl font-bold text-dark mb-2">Resultados da Simulação</h2>
<p class="text-gray-600">Confira as melhores opções para seu empréstimo de <span id="result-amount" class="font-bold">R$ 2.000,00</span> em <span id="result-installments" class="font-bold">12 meses</span></p>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-10">
<!-- Card 1 - Best Choice -->
<div class="loan-card best-choice bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2021/08/nubank-logo-0.png" alt="Nubank" class="bank-logo nubank mb-2">
<h3 class="text-xl font-bold text-dark">Empréstimo Pessoal</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">1,99%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-1">R$ 193,72</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-1">R$ 2.324,64</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 24,64</span>
</div>
</div>
<a href="https://nubank.com.br/emprestimo?utm_source=parcelar&utm_medium=comparador&utm_campaign=emprestimo" target="_blank" class="block w-full bg-primary hover:bg-green-600 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
<!-- Card 2 -->
<div class="loan-card bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2021/03/c6-bank-logo.png" alt="C6 Bank" class="bank-logo c6 mb-2">
<h3 class="text-xl font-bold text-dark">Crédito Rápido</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">2,49%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-2">R$ 201,45</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-2">R$ 2.417,40</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 17,40</span>
</div>
</div>
<a href="https://www.c6bank.com.br/emprestimo?utm_source=parcelar&utm_medium=comparador&utm_campaign=emprestimo" target="_blank" class="block w-full bg-secondary hover:bg-blue-600 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
<!-- Card 3 -->
<div class="loan-card bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2014/04/bradesco-logo-1-1.png" alt="Bradesco" class="bank-logo bradesco mb-2">
<h3 class="text-xl font-bold text-dark">Crédito Consignado</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">1,79%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-3">R$ 190,12</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-3">R$ 2.281,44</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 1,44</span>
</div>
</div>
<a href="https://www.bradesco.com.br/html/classic/emprestimo-consignado.shtm?utm_source=parcelar&utm_medium=comparador&utm_campaign=emprestimo" target="_blank" class="block w-full bg-gray-700 hover:bg-gray-800 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
</div>
<!-- Additional banks row -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-10">
<!-- Card 4 -->
<div class="loan-card bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2014/04/santander-logo-1-1.png" alt="Santander" class="bank-logo santander mb-2">
<h3 class="text-xl font-bold text-dark">Crédito Pessoal</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">2,19%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-4">R$ 197,32</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-4">R$ 2.367,84</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 27,84</span>
</div>
</div>
<a href="https://www.santander.com.br/credito-pessoal?utm_source=parcelar&utm_medium=comparador&utm_campaign=emprestimo" target="_blank" class="block w-full bg-red-600 hover:bg-red-700 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
<!-- Card 5 -->
<div class="loan-card bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2017/11/bmg-logo.png" alt="BMG" class="bank-logo bmg mb-2">
<h3 class="text-xl font-bold text-dark">Crédito Consignado</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">1,69%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-5">R$ 188,25</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-5">R$ 2.259,00</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 9,00</span>
</div>
</div>
<a href="https://www.bancobmg.com.br/credito-consignado/?utm_source=parcelar&utm_medium=comparador&utm_campaign=emprestimo" target="_blank" class="block w-full bg-yellow-600 hover:bg-yellow-700 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
<!-- Card 6 -->
<div class="loan-card bg-white rounded-lg p-6">
<div class="flex justify-between items-start mb-4">
<div>
<img src="https://logodownload.org/wp-content/uploads/2021/06/banco-do-brasil-logo-0.png" alt="Banco do Brasil" class="bank-logo bb mb-2">
<h3 class="text-xl font-bold text-dark">Crédito Pessoal</h3>
</div>
<div class="text-right">
<span class="text-xs text-gray-500 block">Taxa de juros</span>
<span class="text-2xl font-bold text-primary">2,29%</span><span class="text-gray-500">/mês</span>
</div>
</div>
<div class="border-t border-b border-gray-100 py-4 my-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor da parcela:</span>
<span class="font-bold" id="installment-6">R$ 198,76</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Total a pagar:</span>
<span class="font-bold" id="total-6">R$ 2.385,12</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">IOF:</span>
<span class="font-bold">R$ 25,12</span>
</div>
</div>
<a href="https://www.bb.com.br/pbb/pagina-inicial/emprestimos/emprestimo-pessoal#/" target="_blank" class="block w-full bg-blue-800 hover:bg-blue-900 text-white font-bold py-3 px-4 rounded-lg transition duration-300 text-center">
Contratar
</a>
</div>
</div>
<div class="bg-white rounded-lg shadow-lg p-6 mb-10">
<h3 class="text-xl font-bold text-dark mb-4">Detalhes da Simulação</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h4 class="font-medium text-gray-700 mb-2">Resumo do Empréstimo</h4>
<div class="bg-gray-50 rounded-lg p-4">
<div class="flex justify-between mb-2">
<span class="text-gray-600">Valor solicitado:</span>
<span class="font-bold" id="detail-amount">R$ 2.000,00</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Taxa de juros (média):</span>
<span class="font-bold">2,09% a.m.</span>
</div>
<div class="flex justify-between mb-2">
<span class="text-gray-600">Parcelas:</span>
<span class="font-bold" id="detail-installments">12x</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Total com juros:</span>
<span class="font-bold text-primary">R$ 2.674,83</span>
</div>
</div>
</div>
<div>
<h4 class="font-medium text-gray-700 mb-2">CET (Custo Efetivo Total)</h4>
<div class="bg-gray-50 rounded-lg p-4">
<div class="mb-3">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Nubank</span>
<span class="text-sm font-medium">34,21% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-primary h-2 rounded-full" style="width: 70%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">C6 Bank</span>
<span class="text-sm font-medium">38,45% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-secondary h-2 rounded-full" style="width: 80%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Bradesco</span>
<span class="text-sm font-medium">32,15% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-gray-700 h-2 rounded-full" style="width: 65%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Santander</span>
<span class="text-sm font-medium">35,67% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-red-600 h-2 rounded-full" style="width: 73%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">BMG</span>
<span class="text-sm font-medium">30,89% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-yellow-600 h-2 rounded-full" style="width: 62%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Banco do Brasil</span>
<span class="text-sm font-medium">36,12% a.a.</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-800 h-2 rounded-full" style="width: 75%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-lg p-6">
<h3 class="text-xl font-bold text-dark mb-4">Perguntas Frequentes</h3>
<div class="faq-item mb-3 border-b border-gray-100 pb-3">
<div class="faq-question flex justify-between items-center cursor-pointer py-2">
<h4 class="font-medium text-gray-700">Como funciona a simulação de empréstimo?</h4>
<i class="fas fa-chevron-down text-gray-500"></i>
</div>
<div class="faq-answer hidden pt-2 text-gray-600">
<p>A simulação calcula o valor das parcelas e o total a ser pago com base no valor solicitado, prazo e taxa de juros. Você pode comparar diferentes opções antes de decidir qual é a melhor para você.</p>
</div>
</div>
<div class="faq-item mb-3 border-b border-gray-100 pb-3">
<div class="faq-question flex justify-between items-center cursor-pointer py-2">
<h4 class="font-medium text-gray-700">Quais documentos são necessários para contratar?</h4>
<i class="fas fa-chevron-down text-gray-500"></i>
</div>
<div class="faq-answer hidden pt-2 text-gray-600">
<p>Geralmente são necessários: RG, CPF, comprovante de residência, comprovante de renda e extrato bancário. Os documentos podem variar conforme a instituição financeira.</p>
</div>
</div>
<div class="faq-item mb-3 border-b border-gray-100 pb-3">
<div class="faq-question flex justify-between items-center cursor-pointer py-2">
<h4 class="font-medium text-gray-700">Quanto tempo demora para o dinheiro cair na conta?</h4>
<i class="fas fa-chevron-down text-gray-500"></i>
</div>
<div class="faq-answer hidden pt-2 text-gray-600">
<p>O prazo varia conforme a instituição financeira. Em alguns casos o dinheiro pode cair no mesmo dia, em outros pode levar até 2 dias úteis após a aprovação.</p>
</div>
</div>
<div class="faq-item">
<div class="faq-question flex justify-between items-center cursor-pointer py-2">
<h4 class="font-medium text-gray-700">Posso antecipar as parcelas?</h4>
<i class="fas fa-chevron-down text-gray-500"></i>
</div>
<div class="faq-answer hidden pt-2 text-gray-600">
<p>Sim, a maioria das instituições permite a antecipação das parcelas com desconto nos juros. Consulte as condições específicas do seu contrato.</p>
</div>
</div>
</div>
</section>
<script>
// Format currency input
function formatCurrency(input) {
// Remove all non-digit characters
let value = input.value.replace(/\D/g, '');
// Add comma as decimal separator
value = (value / 100).toLocaleString('pt-BR', {
minimumFractionDigits: 2,
maximumFractionDigits: 2
});
// Update input value
input.value = value;
// Return numeric value without formatting
return parseFloat(value.replace('.', '').replace(',', '.'));
}
// Initialize currency input
const loanAmountInput = document.getElementById('loan-amount');
loanAmountInput.addEventListener('input', function() {
formatCurrency(this);
// Remove active class from all amount options
document.querySelectorAll('.amount-option').forEach(opt => opt.classList.remove('active'));
});
// Show results when simulate button is clicked
document.getElementById('simulate-btn').addEventListener('click', function() {
// Get input values
const amount = formatCurrency(loanAmountInput);
const installments = document.getElementById('installments').value;
// Update result texts
document.getElementById('result-amount').textContent = 'R$ ' + amount.toLocaleString('pt-BR', {minimumFractionDigits: 2});
document.getElementById('result-installments').textContent = installments + ' meses';
document.getElementById('detail-amount').textContent = 'R$ ' + amount.toLocaleString('pt-BR', {minimumFractionDigits: 2});
document.getElementById('detail-installments').textContent = installments + 'x';
// Calculate and update installments for all banks
const banks = [
{ rate: 0.0199, id: 1 }, // Nubank
{ rate: 0.0249, id: 2 }, // C6 Bank
{ rate: 0.0179, id: 3 }, // Bradesco
{ rate: 0.0219, id: 4 }, // Santander
{ rate: 0.0169, id: 5 }, // BMG
{ rate: 0.0229, id: 6 } // Banco do Brasil
];
banks.forEach(bank => {
const installment = (amount * bank.rate * Math.pow(1 + bank.rate, installments)) / (Math.pow(1 + bank.rate, installments) - 1);
const total = installment * installments;
const iof = total - amount;
document.getElementById(`installment-${bank.id}`).textContent = 'R$ ' + installment.toLocaleString('pt-BR', {minimumFractionDigits: 2});
document.getElementById(`total-${bank.id}`).textContent = 'R$ ' + total.toLocaleString('pt-BR', {minimumFractionDigits: 2});
});
// Show results section
document.getElementById('results-section').classList.remove('hidden');
// Scroll to results
window.scrollTo({
top: document.getElementById('results-section').offsetTop - 20,
behavior: 'smooth'
});
});
// Tab switching
document.getElementById('personal-tab').addEventListener('click', function() {
this.classList.add('tab-active');
document.getElementById('consigned-tab').classList.remove('tab-active');
});
document.getElementById('consigned-tab').addEventListener('click', function() {
this.classList.add('tab-active');
document.getElementById('personal-tab').classList.remove('tab-active');
});
// FAQ accordion
const faqQuestions = document.querySelectorAll('.faq-question');
faqQuestions.forEach(question => {
question.addEventListener('click', function() {
const answer = this.nextElementSibling;
const icon = this.querySelector('i');
if (answer.classList.contains('hidden')) {
answer.classList.remove('hidden');
icon.classList.replace('fa-chevron-down', 'fa-chevron-up');
} else {
answer.classList.add('hidden');
icon.classList.replace('fa-chevron-up', 'fa-chevron-down');
}
});
});
// Amount options functionality
const amountOptions = document.querySelectorAll('.amount-option');
amountOptions.forEach(option => {
option.addEventListener('click', function() {
// Remove active class from all options
amountOptions.forEach(opt => opt.classList.remove('active'));
// Add active class to clicked option
this.classList.add('active');
// Update input value
const value = this.getAttribute('data-value');
loanAmountInput.value = value;
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=fcofernandes/parcelar" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>