Spaces:
Running

File size: 35,509 Bytes
5943b87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d8c9a70
 
 
 
 
 
 
 
 
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa93afe
 
 
 
 
9e89967
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5943b87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e625412
 
5943b87
 
d8c9a70
5943b87
e625412
5943b87
 
fa93afe
d8c9a70
 
 
fa93afe
 
 
 
 
5943b87
 
 
 
e625412
 
5943b87
 
 
 
 
 
 
 
 
e625412
5943b87
 
 
 
 
 
e625412
 
 
 
fa93afe
e625412
 
 
 
 
 
 
9e89967
e625412
 
 
 
fa93afe
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
e625412
9e89967
e625412
 
 
 
 
 
9e89967
e625412
 
 
 
fa93afe
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
e625412
9e89967
e625412
 
 
 
 
 
9e89967
e625412
 
 
 
fa93afe
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
e625412
9e89967
e625412
 
 
fa93afe
 
 
 
 
 
9e89967
fa93afe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
fa93afe
9e89967
fa93afe
 
 
 
 
 
9e89967
fa93afe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
fa93afe
9e89967
fa93afe
 
 
 
 
 
9e89967
fa93afe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9e89967
fa93afe
9e89967
fa93afe
 
 
e625412
 
 
 
 
 
 
 
 
 
 
 
 
fa93afe
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa93afe
e625412
 
 
 
 
 
 
 
 
fa93afe
e625412
 
 
 
 
 
 
fa93afe
e625412
fa93afe
e625412
 
 
 
 
 
fa93afe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e625412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5943b87
 
 
fa93afe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5943b87
 
e625412
fa93afe
e625412
 
 
fa93afe
e625412
fa93afe
e625412
 
fa93afe
 
 
 
 
 
 
 
 
e625412
fa93afe
 
 
 
 
 
 
 
e625412
 
5943b87
e625412
 
5943b87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d8c9a70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5943b87
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
<!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>