arshtech commited on
Commit
9dc9c6d
·
verified ·
1 Parent(s): d56c65c

Update templates/base.html

Browse files
Files changed (1) hide show
  1. templates/base.html +554 -191
templates/base.html CHANGED
@@ -21,6 +21,59 @@
21
  font-family: 'Poppins', sans-serif;
22
  background-color: #f8fafc;
23
  overflow-x: hidden;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
 
26
  .hero-bg {
@@ -214,46 +267,87 @@
214
  .nav-link:hover:after {
215
  width: 100%;
216
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  </style>
218
  </head>
219
  <body>
 
 
 
220
  <!-- Navigation -->
221
  <nav class="nav-transparent text-white shadow-lg fixed w-full z-50 transition-all duration-300">
222
  <div class="container mx-auto px-4">
223
  <div class="flex justify-between items-center py-4">
224
- <a href="{{ url_for('index') }}" class="text-2xl font-bold flex items-center">
225
  <i class="fas fa-car text-blue-400 mr-2"></i>
226
  <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-cyan-300">Carwala</span>
227
  </a>
228
 
229
  <div class="flex space-x-6 items-center">
230
- {% if session.get('user_id') %}
231
- {% if session.get('role') == 'admin' %}
232
- <a href="{{ url_for('admin_dashboard') }}" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
233
- <i class="fas fa-cog mr-1"></i>Admin Dashboard
234
- </a>
235
- {% elif session.get('role') == 'seller' %}
236
- <a href="{{ url_for('seller_dashboard') }}" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
237
- <i class="fas fa-store mr-1"></i>Seller Dashboard
238
- </a>
239
- {% endif %}
240
- <a href="{{ url_for('index') }}" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
241
- <i class="fas fa-home mr-1"></i>Home
242
- </a>
243
- <a href="{{ url_for('logout') }}" class="bg-red-500 hover:bg-red-600 px-4 py-2 rounded-lg transition-all duration-300 btn-glow">
244
- <i class="fas fa-sign-out-alt mr-1"></i>Logout
245
- </a>
246
- {% else %}
247
- <a href="{{ url_for('index') }}" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
248
- <i class="fas fa-home mr-1"></i>Home
249
- </a>
250
- <a href="{{ url_for('login') }}" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
251
- <i class="fas fa-sign-in-alt mr-1"></i>Login
252
- </a>
253
- <a href="{{ url_for('register') }}" class="bg-gradient-to-r from-blue-500 to-cyan-400 hover:from-blue-600 hover:to-cyan-500 px-5 py-2 rounded-lg font-medium transition-all duration-300 btn-glow">
254
- <i class="fas fa-user-plus mr-1"></i>Register
255
- </a>
256
- {% endif %}
257
  </div>
258
  </div>
259
  </div>
@@ -273,10 +367,10 @@
273
  Carwala is your premier marketplace for buying and selling cars. With thousands of verified listings and trusted sellers, find the car of your dreams today.
274
  </p>
275
  <div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
276
- <a href="#featured" class="bg-gradient-to-r from-blue-500 to-cyan-400 hover:from-blue-600 hover:to-cyan-500 px-6 py-3 rounded-lg font-medium text-lg transition-all duration-300 text-center btn-glow pulse">
277
  <i class="fas fa-search mr-2"></i>Browse Cars
278
  </a>
279
- <a href="{{ url_for('register') }}" class="bg-transparent border-2 border-white hover:bg-white hover:text-gray-900 px-6 py-3 rounded-lg font-medium text-lg transition-all duration-300 text-center">
280
  <i class="fas fa-plus mr-2"></i>Sell Your Car
281
  </a>
282
  </div>
@@ -302,24 +396,8 @@
302
  <div class="absolute bottom-20 right-20 w-32 h-32 rounded-full bg-cyan-500 opacity-10 floating" style="animation-delay: 1s;"></div>
303
  </section>
304
 
305
- <!-- Flash Messages -->
306
- {% with messages = get_flashed_messages() %}
307
- {% if messages %}
308
- <div class="container mx-auto mt-24 px-4">
309
- {% for message in messages %}
310
- <div class="bg-gradient-to-r from-green-100 to-green-50 border-l-4 border-green-500 text-green-700 px-4 py-3 rounded-r shadow-lg mb-4 fade-in" role="alert">
311
- <div class="flex items-center">
312
- <i class="fas fa-check-circle text-green-500 mr-3"></i>
313
- <span class="block sm:inline">{{ message }}</span>
314
- </div>
315
- </div>
316
- {% endfor %}
317
- </div>
318
- {% endif %}
319
- {% endwith %}
320
-
321
  <!-- Stats Section -->
322
- <section class="py-12 stats-bg text-white">
323
  <div class="container mx-auto px-4">
324
  <div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center">
325
  <div class="fade-in">
@@ -343,191 +421,323 @@
343
  </section>
344
 
345
  <!-- Main Content -->
346
- <main class="container mx-auto px-4 py-12">
347
- {% block content %}
348
- <!-- Default content if not overridden -->
349
- <div class="text-center py-12">
350
- <h2 class="text-3xl font-bold mb-6 text-gray-800">Featured Cars</h2>
351
- <p class="text-gray-600 mb-12 max-w-2xl mx-auto">Explore our handpicked selection of premium vehicles. Each car is thoroughly inspected to ensure quality and reliability.</p>
 
352
 
353
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-12">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
  <!-- Car Card 1 -->
355
- <div class="bg-white rounded-2xl shadow-lg overflow-hidden car-card card-hover">
356
  <div class="relative overflow-hidden">
357
- <img src="https://images.unsplash.com/photo-1549317661-bd32c8ce0db2?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80"
358
- alt="Tesla Model S"
359
  class="w-full h-56 object-cover car-card-image">
360
- <div class="absolute top-4 right-4 bg-red-500 text-white px-3 py-1 rounded-full text-sm font-medium">
361
- Hot Deal
362
  </div>
363
  </div>
364
  <div class="p-6">
365
- <h3 class="text-xl font-bold mb-2">Tesla Model S</h3>
366
- <p class="text-gray-600 mb-4">2022 • Electric • 12,000 miles</p>
 
 
 
 
 
 
 
 
 
367
  <div class="flex justify-between items-center">
368
- <span class="text-2xl font-bold text-blue-600">$89,999</span>
369
- <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-all duration-300 btn-glow">
370
- <i class="fas fa-eye mr-1"></i> View Details
371
- </button>
 
372
  </div>
373
  </div>
374
  </div>
375
 
376
  <!-- Car Card 2 -->
377
- <div class="bg-white rounded-2xl shadow-lg overflow-hidden car-card card-hover">
378
  <div class="relative overflow-hidden">
379
- <img src="https://images.unsplash.com/photo-1553440569-bcc63803a83d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2025&q=80"
380
- alt="BMW X5"
381
  class="w-full h-56 object-cover car-card-image">
 
 
 
382
  </div>
383
  <div class="p-6">
384
- <h3 class="text-xl font-bold mb-2">BMW X5</h3>
385
- <p class="text-gray-600 mb-4">2021 • SUV • 18,500 miles</p>
 
 
 
 
 
 
 
 
 
386
  <div class="flex justify-between items-center">
387
- <span class="text-2xl font-bold text-blue-600">$65,500</span>
388
- <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-all duration-300 btn-glow">
389
- <i class="fas fa-eye mr-1"></i> View Details
390
- </button>
 
391
  </div>
392
  </div>
393
  </div>
394
 
395
  <!-- Car Card 3 -->
396
- <div class="bg-white rounded-2xl shadow-lg overflow-hidden car-card card-hover">
397
  <div class="relative overflow-hidden">
398
- <img src="https://images.unsplash.com/photo-1533473359331-0135ef1b58bf?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80"
399
- alt="Ford Mustang"
400
  class="w-full h-56 object-cover car-card-image">
401
- <div class="absolute top-4 right-4 bg-green-500 text-white px-3 py-1 rounded-full text-sm font-medium">
402
- Just Added
403
  </div>
404
  </div>
405
  <div class="p-6">
406
- <h3 class="text-xl font-bold mb-2">Ford Mustang GT</h3>
407
- <p class="text-gray-600 mb-4">2023 • Sports • 5,200 miles</p>
 
 
 
 
 
 
 
 
 
408
  <div class="flex justify-between items-center">
409
- <span class="text-2xl font-bold text-blue-600">$52,800</span>
410
- <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition-all duration-300 btn-glow">
411
- <i class="fas fa-eye mr-1"></i> View Details
412
- </button>
 
413
  </div>
414
  </div>
415
  </div>
416
- </div>
417
-
418
- <!-- Brands Section -->
419
- <div class="mb-16">
420
- <h2 class="text-3xl font-bold mb-8 text-gray-800">Trusted Brands</h2>
421
- <div class="grid grid-cols-2 md:grid-cols-6 gap-8">
422
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
423
- <i class="fas fa-car text-4xl text-gray-700"></i>
424
- <span class="ml-2 text-xl font-bold">Toyota</span>
425
- </div>
426
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
427
- <i class="fas fa-car text-4xl text-gray-700"></i>
428
- <span class="ml-2 text-xl font-bold">BMW</span>
429
- </div>
430
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
431
- <i class="fas fa-car text-4xl text-gray-700"></i>
432
- <span class="ml-2 text-xl font-bold">Mercedes</span>
433
- </div>
434
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
435
- <i class="fas fa-car text-4xl text-gray-700"></i>
436
- <span class="ml-2 text-xl font-bold">Tesla</span>
437
- </div>
438
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
439
- <i class="fas fa-car text-4xl text-gray-700"></i>
440
- <span class="ml-2 text-xl font-bold">Ford</span>
441
- </div>
442
- <div class="bg-white p-6 rounded-xl shadow-md flex items-center justify-center brand-logo">
443
- <i class="fas fa-car text-4xl text-gray-700"></i>
444
- <span class="ml-2 text-xl font-bold">Audi</span>
445
- </div>
446
- </div>
447
- </div>
448
-
449
- <!-- How It Works -->
450
- <div class="bg-gradient-to-r from-blue-50 to-cyan-50 rounded-2xl p-8 md:p-12 mb-16">
451
- <h2 class="text-3xl font-bold mb-8 text-gray-800 text-center">How It Works</h2>
452
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
453
- <div class="text-center fade-in">
454
- <div class="bg-blue-100 text-blue-600 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-6 text-2xl">
455
- 1
456
  </div>
457
- <h3 class="text-xl font-bold mb-4">Browse or List</h3>
458
- <p class="text-gray-600">Browse thousands of verified car listings or easily list your car for sale with our step-by-step process.</p>
459
  </div>
460
- <div class="text-center fade-in">
461
- <div class="bg-blue-100 text-blue-600 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-6 text-2xl">
462
- 2
 
463
  </div>
464
- <h3 class="text-xl font-bold mb-4">Connect & Inspect</h3>
465
- <p class="text-gray-600">Connect with buyers or sellers and schedule inspections at your convenience.</p>
466
- </div>
467
- <div class="text-center fade-in">
468
- <div class="bg-blue-100 text-blue-600 w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-6 text-2xl">
469
- 3
470
  </div>
471
- <h3 class="text-xl font-bold mb-4">Complete Transaction</h3>
472
- <p class="text-gray-600">Complete your purchase or sale with our secure payment and documentation support.</p>
473
- </div>
474
- </div>
475
- </div>
476
-
477
- <!-- Testimonials -->
478
- <div class="mb-16">
479
- <h2 class="text-3xl font-bold mb-8 text-gray-800 text-center">What Our Users Say</h2>
480
- <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
481
- <div class="testimonial-card fade-in">
482
- <div class="flex items-center mb-4">
483
- <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
484
- <i class="fas fa-user text-blue-600 text-xl"></i>
485
- </div>
486
- <div>
487
- <h4 class="font-bold">Alex Johnson</h4>
488
- <p class="text-gray-600 text-sm">Car Buyer</p>
489
  </div>
490
  </div>
491
- <p class="text-gray-700">"Found my dream car at an amazing price! The verification process gave me confidence in the purchase."</p>
492
  </div>
493
-
494
- <div class="testimonial-card fade-in">
495
- <div class="flex items-center mb-4">
496
- <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
497
- <i class="fas fa-user text-blue-600 text-xl"></i>
498
- </div>
499
- <div>
500
- <h4 class="font-bold">Sarah Williams</h4>
501
- <p class="text-gray-600 text-sm">Car Seller</p>
502
- </div>
503
  </div>
504
- <p class="text-gray-700">"Sold my car within 3 days of listing! The platform made everything so simple and secure."</p>
505
  </div>
506
-
507
- <div class="testimonial-card fade-in">
508
- <div class="flex items-center mb-4">
509
- <div class="w-12 h-12 rounded-full bg-blue-100 flex items-center justify-center mr-4">
510
- <i class="fas fa-user text-blue-600 text-xl"></i>
511
- </div>
512
- <div>
513
- <h4 class="font-bold">Michael Chen</h4>
514
- <p class="text-gray-600 text-sm">Dealership Owner</p>
 
 
 
 
 
 
 
 
515
  </div>
516
  </div>
517
- <p class="text-gray-700">"Carwala has increased our sales by 40%. The quality of leads is far better than other platforms."</p>
518
  </div>
519
  </div>
520
  </div>
521
- </div>
522
- {% endblock %}
 
 
 
 
 
 
 
 
 
 
 
 
 
523
  </main>
524
 
525
  <!-- Footer -->
526
- <footer class="bg-gray-900 text-white py-12">
527
  <div class="container mx-auto px-4">
528
  <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
529
  <div>
530
- <a href="{{ url_for('index') }}" class="text-2xl font-bold flex items-center mb-6">
531
  <i class="fas fa-car text-blue-400 mr-2"></i>
532
  <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-cyan-300">Carwala</span>
533
  </a>
@@ -551,9 +761,9 @@
551
  <div>
552
  <h3 class="text-lg font-bold mb-6">Quick Links</h3>
553
  <ul class="space-y-3">
554
- <li><a href="{{ url_for('index') }}" class="text-gray-400 hover:text-white transition-all duration-300">Home</a></li>
555
- <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">Browse Cars</a></li>
556
- <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">Sell Your Car</a></li>
557
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">About Us</a></li>
558
  </ul>
559
  </div>
@@ -561,12 +771,8 @@
561
  <div>
562
  <h3 class="text-lg font-bold mb-6">Account</h3>
563
  <ul class="space-y-3">
564
- {% if session.get('user_id') %}
565
- <li><a href="{{ url_for('logout') }}" class="text-gray-400 hover:text-white transition-all duration-300">Logout</a></li>
566
- {% else %}
567
- <li><a href="{{ url_for('login') }}" class="text-gray-400 hover:text-white transition-all duration-300">Login</a></li>
568
- <li><a href="{{ url_for('register') }}" class="text-gray-400 hover:text-white transition-all duration-300">Register</a></li>
569
- {% endif %}
570
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">My Profile</a></li>
571
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">My Listings</a></li>
572
  </ul>
@@ -602,10 +808,12 @@
602
  <script>
603
  // Animation on scroll
604
  document.addEventListener('DOMContentLoaded', function() {
 
 
 
605
  // Fade in elements on scroll
606
  const fadeElements = document.querySelectorAll('.fade-in');
607
  const slideLeftElements = document.querySelectorAll('.slide-in-left');
608
- const slideRightElements = document.querySelectorAll('.slide-in-right');
609
 
610
  const observer = new IntersectionObserver((entries) => {
611
  entries.forEach(entry => {
@@ -617,7 +825,6 @@
617
 
618
  fadeElements.forEach(el => observer.observe(el));
619
  slideLeftElements.forEach(el => observer.observe(el));
620
- slideRightElements.forEach(el => observer.observe(el));
621
 
622
  // Animated counters
623
  const counters = document.querySelectorAll('.counter');
@@ -667,7 +874,163 @@
667
  this.style.transform = 'translateY(0)';
668
  });
669
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
671
  </script>
672
  </body>
673
  </html>
 
21
  font-family: 'Poppins', sans-serif;
22
  background-color: #f8fafc;
23
  overflow-x: hidden;
24
+ position: relative;
25
+ }
26
+
27
+ /* Animated background elements */
28
+ .bg-animation {
29
+ position: fixed;
30
+ top: 0;
31
+ left: 0;
32
+ width: 100%;
33
+ height: 100%;
34
+ z-index: -1;
35
+ overflow: hidden;
36
+ }
37
+
38
+ .bg-circle {
39
+ position: absolute;
40
+ border-radius: 50%;
41
+ background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
42
+ animation: float 20s infinite linear;
43
+ }
44
+
45
+ .bg-tire {
46
+ position: absolute;
47
+ width: 100px;
48
+ height: 100px;
49
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='45' fill='none' stroke='%233b82f6' stroke-width='2' opacity='0.1'/%3E%3Ccircle cx='50' cy='50' r='15' fill='none' stroke='%233b82f6' stroke-width='2' opacity='0.1'/%3E%3C/g%3E");
50
+ animation: spin 40s infinite linear;
51
+ }
52
+
53
+ .bg-car {
54
+ position: absolute;
55
+ width: 80px;
56
+ height: 40px;
57
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 40'%3E%3Cpath d='M10,20 L70,20 L75,30 L5,30 Z' fill='%233b82f6' fill-opacity='0.05'/%3E%3Ccircle cx='20' cy='35' r='5' fill='%233b82f6' fill-opacity='0.05'/%3E%3Ccircle cx='60' cy='35' r='5' fill='%233b82f6' fill-opacity='0.05'/%3E%3C/svg%3E");
58
+ animation: drive 60s infinite linear;
59
+ }
60
+
61
+ @keyframes float {
62
+ 0% { transform: translateY(0px) translateX(0px); }
63
+ 25% { transform: translateY(-100px) translateX(100px); }
64
+ 50% { transform: translateY(-50px) translateX(200px); }
65
+ 75% { transform: translateY(-100px) translateX(300px); }
66
+ 100% { transform: translateY(0px) translateX(0px); }
67
+ }
68
+
69
+ @keyframes spin {
70
+ 0% { transform: rotate(0deg); }
71
+ 100% { transform: rotate(360deg); }
72
+ }
73
+
74
+ @keyframes drive {
75
+ 0% { transform: translateX(-100px) translateY(0px); }
76
+ 100% { transform: translateX(calc(100vw + 100px)) translateY(calc(100vh * var(--y-pos))); }
77
  }
78
 
79
  .hero-bg {
 
267
  .nav-link:hover:after {
268
  width: 100%;
269
  }
270
+
271
+ .search-box {
272
+ background: rgba(255, 255, 255, 0.95);
273
+ backdrop-filter: blur(10px);
274
+ border-radius: 15px;
275
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
276
+ transition: all 0.3s ease;
277
+ }
278
+
279
+ .search-box:hover {
280
+ box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
281
+ transform: translateY(-5px);
282
+ }
283
+
284
+ .car-filter-card {
285
+ transition: all 0.3s ease;
286
+ cursor: pointer;
287
+ border: 2px solid transparent;
288
+ }
289
+
290
+ .car-filter-card:hover, .car-filter-card.active {
291
+ border-color: #3b82f6;
292
+ background-color: rgba(59, 130, 246, 0.05);
293
+ }
294
+
295
+ .price-range {
296
+ -webkit-appearance: none;
297
+ width: 100%;
298
+ height: 8px;
299
+ border-radius: 5px;
300
+ background: #e5e7eb;
301
+ outline: none;
302
+ }
303
+
304
+ .price-range::-webkit-slider-thumb {
305
+ -webkit-appearance: none;
306
+ width: 24px;
307
+ height: 24px;
308
+ border-radius: 50%;
309
+ background: #3b82f6;
310
+ cursor: pointer;
311
+ border: 3px solid white;
312
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
313
+ }
314
+
315
+ .main-content-bg {
316
+ background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
317
+ position: relative;
318
+ z-index: 1;
319
+ }
320
+
321
+ .feature-section {
322
+ background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
323
+ border-radius: 20px;
324
+ box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
325
+ }
326
  </style>
327
  </head>
328
  <body>
329
+ <!-- Animated Background Elements -->
330
+ <div class="bg-animation" id="bgAnimation"></div>
331
+
332
  <!-- Navigation -->
333
  <nav class="nav-transparent text-white shadow-lg fixed w-full z-50 transition-all duration-300">
334
  <div class="container mx-auto px-4">
335
  <div class="flex justify-between items-center py-4">
336
+ <a href="/" class="text-2xl font-bold flex items-center">
337
  <i class="fas fa-car text-blue-400 mr-2"></i>
338
  <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-cyan-300">Carwala</span>
339
  </a>
340
 
341
  <div class="flex space-x-6 items-center">
342
+ <a href="/" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
343
+ <i class="fas fa-home mr-1"></i>Home
344
+ </a>
345
+ <a href="/login" class="nav-link hover:text-blue-300 px-3 py-2 rounded-lg transition-all duration-300">
346
+ <i class="fas fa-sign-in-alt mr-1"></i>Login
347
+ </a>
348
+ <a href="/register" class="bg-gradient-to-r from-blue-500 to-cyan-400 hover:from-blue-600 hover:to-cyan-500 px-5 py-2 rounded-lg font-medium transition-all duration-300 btn-glow">
349
+ <i class="fas fa-user-plus mr-1"></i>Register
350
+ </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  </div>
352
  </div>
353
  </div>
 
367
  Carwala is your premier marketplace for buying and selling cars. With thousands of verified listings and trusted sellers, find the car of your dreams today.
368
  </p>
369
  <div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
370
+ <a href="#search-section" class="bg-gradient-to-r from-blue-500 to-cyan-400 hover:from-blue-600 hover:to-cyan-500 px-6 py-3 rounded-lg font-medium text-lg transition-all duration-300 text-center btn-glow pulse">
371
  <i class="fas fa-search mr-2"></i>Browse Cars
372
  </a>
373
+ <a href="/register" class="bg-transparent border-2 border-white hover:bg-white hover:text-gray-900 px-6 py-3 rounded-lg font-medium text-lg transition-all duration-300 text-center">
374
  <i class="fas fa-plus mr-2"></i>Sell Your Car
375
  </a>
376
  </div>
 
396
  <div class="absolute bottom-20 right-20 w-32 h-32 rounded-full bg-cyan-500 opacity-10 floating" style="animation-delay: 1s;"></div>
397
  </section>
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  <!-- Stats Section -->
400
+ <section class="py-12 stats-bg text-white relative z-10">
401
  <div class="container mx-auto px-4">
402
  <div class="grid grid-cols-1 md:grid-cols-4 gap-8 text-center">
403
  <div class="fade-in">
 
421
  </section>
422
 
423
  <!-- Main Content -->
424
+ <main class="container mx-auto px-4 py-12 main-content-bg relative z-10">
425
+ <!-- Search Section -->
426
+ <section id="search-section" class="mb-16 fade-in">
427
+ <div class="text-center mb-12">
428
+ <h2 class="text-3xl font-bold mb-4 text-gray-800">Find Your Dream Car</h2>
429
+ <p class="text-gray-600 max-w-2xl mx-auto">Use our advanced search to filter through thousands of cars and find exactly what you're looking for.</p>
430
+ </div>
431
 
432
+ <div class="search-box p-6 md:p-8 mb-12">
433
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
434
+ <!-- Search Input -->
435
+ <div class="md:col-span-2">
436
+ <label class="block text-gray-700 font-medium mb-2">Search Cars</label>
437
+ <div class="relative">
438
+ <input type="text" id="car-search" placeholder="Search by make, model, or keyword..."
439
+ class="w-full p-4 pl-12 rounded-lg border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition-all duration-300">
440
+ <i class="fas fa-search absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
441
+ </div>
442
+ </div>
443
+
444
+ <!-- Price Range -->
445
+ <div>
446
+ <label class="block text-gray-700 font-medium mb-2">Max Price: <span id="price-value">$50,000</span></label>
447
+ <input type="range" min="5000" max="100000" value="50000" step="1000" class="price-range" id="price-range">
448
+ </div>
449
+
450
+ <!-- Year Filter -->
451
+ <div>
452
+ <label class="block text-gray-700 font-medium mb-2">Year</label>
453
+ <select id="year-filter" class="w-full p-4 rounded-lg border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none transition-all duration-300">
454
+ <option value="all">All Years</option>
455
+ <option value="2023">2023 & Above</option>
456
+ <option value="2020">2020 - 2022</option>
457
+ <option value="2017">2017 - 2019</option>
458
+ <option value="2014">2014 - 2016</option>
459
+ </select>
460
+ </div>
461
+ </div>
462
+
463
+ <!-- Car Type Filters -->
464
+ <div class="mt-8">
465
+ <label class="block text-gray-700 font-medium mb-4">Car Type</label>
466
+ <div class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 gap-4">
467
+ <div class="car-filter-card active p-4 rounded-lg text-center border-2 border-blue-500 bg-blue-50" data-type="all">
468
+ <i class="fas fa-car text-blue-600 text-2xl mb-2"></i>
469
+ <p class="font-medium">All Cars</p>
470
+ </div>
471
+ <div class="car-filter-card p-4 rounded-lg text-center border border-gray-200 bg-white hover:border-blue-300" data-type="sedan">
472
+ <i class="fas fa-car text-gray-600 text-2xl mb-2"></i>
473
+ <p class="font-medium">Sedan</p>
474
+ </div>
475
+ <div class="car-filter-card p-4 rounded-lg text-center border border-gray-200 bg-white hover:border-blue-300" data-type="suv">
476
+ <i class="fas fa-car text-gray-600 text-2xl mb-2"></i>
477
+ <p class="font-medium">SUV</p>
478
+ </div>
479
+ <div class="car-filter-card p-4 rounded-lg text-center border border-gray-200 bg-white hover:border-blue-300" data-type="sports">
480
+ <i class="fas fa-bolt text-gray-600 text-2xl mb-2"></i>
481
+ <p class="font-medium">Sports</p>
482
+ </div>
483
+ <div class="car-filter-card p-4 rounded-lg text-center border border-gray-200 bg-white hover:border-blue-300" data-type="electric">
484
+ <i class="fas fa-charging-station text-gray-600 text-2xl mb-2"></i>
485
+ <p class="font-medium">Electric</p>
486
+ </div>
487
+ <div class="car-filter-card p-4 rounded-lg text-center border border-gray-200 bg-white hover:border-blue-300" data-type="luxury">
488
+ <i class="fas fa-gem text-gray-600 text-2xl mb-2"></i>
489
+ <p class="font-medium">Luxury</p>
490
+ </div>
491
+ </div>
492
+ </div>
493
+
494
+ <!-- Search Button -->
495
+ <div class="mt-8 text-center">
496
+ <button id="search-button" class="bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 text-white px-8 py-4 rounded-lg font-medium text-lg transition-all duration-300 btn-glow">
497
+ <i class="fas fa-search mr-2"></i>Search Cars
498
+ </button>
499
+ </div>
500
+ </div>
501
+
502
+ <!-- Search Results Count -->
503
+ <div class="flex justify-between items-center mb-8">
504
+ <h3 class="text-2xl font-bold text-gray-800">Available Cars <span id="result-count" class="text-blue-600">(5)</span></h3>
505
+ <div class="flex items-center space-x-4">
506
+ <span class="text-gray-600">Sort by:</span>
507
+ <select class="p-2 rounded-lg border border-gray-300 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 outline-none">
508
+ <option>Newest First</option>
509
+ <option>Price: Low to High</option>
510
+ <option>Price: High to Low</option>
511
+ <option>Year: New to Old</option>
512
+ </select>
513
+ </div>
514
+ </div>
515
+ </section>
516
+
517
+ <!-- How It Works Section -->
518
+ <section class="feature-section p-8 md:p-12 mb-16 fade-in">
519
+ <h2 class="text-3xl font-bold mb-8 text-gray-800 text-center">How It Works</h2>
520
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
521
+ <div class="text-center">
522
+ <div class="relative mx-auto mb-6">
523
+ <div class="bg-gradient-to-r from-blue-500 to-cyan-400 w-20 h-20 rounded-full flex items-center justify-center mx-auto text-white text-2xl font-bold">
524
+ 1
525
+ </div>
526
+ <div class="absolute -right-10 top-1/2 transform -translate-y-1/2 hidden md:block">
527
+ <i class="fas fa-arrow-right text-3xl text-gray-300"></i>
528
+ </div>
529
+ </div>
530
+ <h3 class="text-xl font-bold mb-4">Search & Filter</h3>
531
+ <p class="text-gray-600">Use our advanced search to find cars that match your preferences. Filter by price, year, make, model, and more.</p>
532
+ </div>
533
+ <div class="text-center">
534
+ <div class="relative mx-auto mb-6">
535
+ <div class="bg-gradient-to-r from-blue-500 to-cyan-400 w-20 h-20 rounded-full flex items-center justify-center mx-auto text-white text-2xl font-bold">
536
+ 2
537
+ </div>
538
+ <div class="absolute -right-10 top-1/2 transform -translate-y-1/2 hidden md:block">
539
+ <i class="fas fa-arrow-right text-3xl text-gray-300"></i>
540
+ </div>
541
+ </div>
542
+ <h3 class="text-xl font-bold mb-4">View Details & Contact</h3>
543
+ <p class="text-gray-600">Check detailed specifications, photos, and seller information. Contact sellers directly through our secure platform.</p>
544
+ </div>
545
+ <div class="text-center">
546
+ <div class="bg-gradient-to-r from-blue-500 to-cyan-400 w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 text-white text-2xl font-bold">
547
+ 3
548
+ </div>
549
+ <h3 class="text-xl font-bold mb-4">Test Drive & Purchase</h3>
550
+ <p class="text-gray-600">Schedule a test drive and finalize your purchase with our secure payment and documentation assistance.</p>
551
+ </div>
552
+ </div>
553
+ </section>
554
+
555
+ <!-- Cars Section -->
556
+ <section id="cars" class="mb-16">
557
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
558
  <!-- Car Card 1 -->
559
+ <div class="car-card bg-white rounded-xl shadow-lg overflow-hidden card-hover fade-in" data-type="sedan" data-price="25000" data-year="2020">
560
  <div class="relative overflow-hidden">
561
+ <img src="https://images.unsplash.com/photo-1549399542-7e3f8b79c341?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1064&q=80"
562
+ alt="Toyota Camry"
563
  class="w-full h-56 object-cover car-card-image">
564
+ <div class="absolute top-4 left-4 bg-blue-600 text-white px-3 py-1 rounded-full text-sm font-medium">
565
+ Sedan
566
  </div>
567
  </div>
568
  <div class="p-6">
569
+ <div class="flex justify-between items-start mb-2">
570
+ <h3 class="text-xl font-bold">Toyota Camry</h3>
571
+ <span class="text-blue-600 font-bold text-lg">$25,000</span>
572
+ </div>
573
+ <div class="flex items-center text-gray-600 mb-4">
574
+ <i class="fas fa-calendar-alt mr-2"></i>
575
+ <span class="mr-4">2020</span>
576
+ <i class="fas fa-tachometer-alt mr-2"></i>
577
+ <span>Low Mileage</span>
578
+ </div>
579
+ <p class="text-gray-700 mb-4">Excellent condition, low mileage, fuel efficient. Well-maintained with full service history.</p>
580
  <div class="flex justify-between items-center">
581
+ <span class="text-gray-600">Condition: <span class="font-medium text-green-600">Excellent</span></span>
582
+ <div class="text-red-500">
583
+ <i class="fas fa-lock mr-1"></i>
584
+ <span class="text-sm">Login to Book</span>
585
+ </div>
586
  </div>
587
  </div>
588
  </div>
589
 
590
  <!-- Car Card 2 -->
591
+ <div class="car-card bg-white rounded-xl shadow-lg overflow-hidden card-hover fade-in" data-type="sports" data-price="35000" data-year="2021">
592
  <div class="relative overflow-hidden">
593
+ <img src="https://images.unsplash.com/photo-1553440569-bcc63803a83d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1065&q=80"
594
+ alt="Ford Mustang"
595
  class="w-full h-56 object-cover car-card-image">
596
+ <div class="absolute top-4 left-4 bg-red-600 text-white px-3 py-1 rounded-full text-sm font-medium">
597
+ Sports
598
+ </div>
599
  </div>
600
  <div class="p-6">
601
+ <div class="flex justify-between items-start mb-2">
602
+ <h3 class="text-xl font-bold">Ford Mustang</h3>
603
+ <span class="text-blue-600 font-bold text-lg">$35,000</span>
604
+ </div>
605
+ <div class="flex items-center text-gray-600 mb-4">
606
+ <i class="fas fa-calendar-alt mr-2"></i>
607
+ <span class="mr-4">2021</span>
608
+ <i class="fas fa-horse-head mr-2"></i>
609
+ <span>450 HP</span>
610
+ </div>
611
+ <p class="text-gray-700 mb-4">Powerful engine, sporty look, premium features. Recently serviced with new tires installed.</p>
612
  <div class="flex justify-between items-center">
613
+ <span class="text-gray-600">Condition: <span class="font-medium text-green-600">Like New</span></span>
614
+ <div class="text-red-500">
615
+ <i class="fas fa-lock mr-1"></i>
616
+ <span class="text-sm">Login to Book</span>
617
+ </div>
618
  </div>
619
  </div>
620
  </div>
621
 
622
  <!-- Car Card 3 -->
623
+ <div class="car-card bg-white rounded-xl shadow-lg overflow-hidden card-hover fade-in" data-type="sedan" data-price="22000" data-year="2019">
624
  <div class="relative overflow-hidden">
625
+ <img src="https://images.unsplash.com/photo-1544636331-e26879cd4d9b?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80"
626
+ alt="Honda Civic"
627
  class="w-full h-56 object-cover car-card-image">
628
+ <div class="absolute top-4 left-4 bg-blue-600 text-white px-3 py-1 rounded-full text-sm font-medium">
629
+ Sedan
630
  </div>
631
  </div>
632
  <div class="p-6">
633
+ <div class="flex justify-between items-start mb-2">
634
+ <h3 class="text-xl font-bold">Honda Civic</h3>
635
+ <span class="text-blue-600 font-bold text-lg">$22,000</span>
636
+ </div>
637
+ <div class="flex items-center text-gray-600 mb-4">
638
+ <i class="fas fa-calendar-alt mr-2"></i>
639
+ <span class="mr-4">2019</span>
640
+ <i class="fas fa-user mr-2"></i>
641
+ <span>Single Owner</span>
642
+ </div>
643
+ <p class="text-gray-700 mb-4">Well maintained, single owner, all services done. Excellent fuel economy and reliability.</p>
644
  <div class="flex justify-between items-center">
645
+ <span class="text-gray-600">Condition: <span class="font-medium text-green-600">Very Good</span></span>
646
+ <div class="text-red-500">
647
+ <i class="fas fa-lock mr-1"></i>
648
+ <span class="text-sm">Login to Book</span>
649
+ </div>
650
  </div>
651
  </div>
652
  </div>
653
+
654
+ <!-- Car Card 4 -->
655
+ <div class="car-card bg-white rounded-xl shadow-lg overflow-hidden card-hover fade-in" data-type="sedan" data-price="300000" data-year="2020">
656
+ <div class="relative overflow-hidden">
657
+ <img src="https://images.unsplash.com/photo-1618843479313-40f8afb4b4d8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80"
658
+ alt="Swift"
659
+ class="w-full h-56 object-cover car-card-image">
660
+ <div class="absolute top-4 left-4 bg-green-600 text-white px-3 py-1 rounded-full text-sm font-medium">
661
+ Hatchback
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
  </div>
 
 
663
  </div>
664
+ <div class="p-6">
665
+ <div class="flex justify-between items-start mb-2">
666
+ <h3 class="text-xl font-bold">Maruti Suzuki Swift</h3>
667
+ <span class="text-blue-600 font-bold text-lg">$3,000</span>
668
  </div>
669
+ <div class="flex items-center text-gray-600 mb-4">
670
+ <i class="fas fa-calendar-alt mr-2"></i>
671
+ <span class="mr-4">2020</span>
672
+ <i class="fas fa-road mr-2"></i>
673
+ <span>10,000 km</span>
 
674
  </div>
675
+ <p class="text-gray-700 mb-4">10,000 km, regularly serviced, no denting and painting, PPF done. Excellent city car.</p>
676
+ <div class="flex justify-between items-center">
677
+ <span class="text-gray-600">Condition: <span class="font-medium text-green-600">Excellent</span></span>
678
+ <div class="text-red-500">
679
+ <i class="fas fa-lock mr-1"></i>
680
+ <span class="text-sm">Login to Book</span>
 
 
 
 
 
 
 
 
 
 
 
 
681
  </div>
682
  </div>
 
683
  </div>
684
+ </div>
685
+
686
+ <!-- Car Card 5 -->
687
+ <div class="car-card bg-white rounded-xl shadow-lg overflow-hidden card-hover fade-in" data-type="electric" data-price="40000" data-year="2025">
688
+ <div class="relative overflow-hidden">
689
+ <img src="https://images.unsplash.com/photo-1560958089-b8a1929cea89?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1171&q=80"
690
+ alt="Tesla"
691
+ class="w-full h-56 object-cover car-card-image">
692
+ <div class="absolute top-4 left-4 bg-purple-600 text-white px-3 py-1 rounded-full text-sm font-medium">
693
+ Electric
694
  </div>
 
695
  </div>
696
+ <div class="p-6">
697
+ <div class="flex justify-between items-start mb-2">
698
+ <h3 class="text-xl font-bold">Tesla Model 3</h3>
699
+ <span class="text-blue-600 font-bold text-lg">$40,000</span>
700
+ </div>
701
+ <div class="flex items-center text-gray-600 mb-4">
702
+ <i class="fas fa-calendar-alt mr-2"></i>
703
+ <span class="mr-4">2025</span>
704
+ <i class="fas fa-bolt mr-2"></i>
705
+ <span>Electric</span>
706
+ </div>
707
+ <p class="text-gray-700 mb-4">Tesla is a very good car with autopilot features. Long range battery and premium interior.</p>
708
+ <div class="flex justify-between items-center">
709
+ <span class="text-gray-600">Condition: <span class="font-medium text-green-600">Brand New</span></span>
710
+ <div class="text-red-500">
711
+ <i class="fas fa-lock mr-1"></i>
712
+ <span class="text-sm">Login to Book</span>
713
  </div>
714
  </div>
 
715
  </div>
716
  </div>
717
  </div>
718
+ </section>
719
+
720
+ <!-- Call to Action -->
721
+ <section class="bg-gradient-to-r from-blue-600 to-indigo-700 text-white rounded-2xl p-8 md:p-12 text-center mb-16 fade-in">
722
+ <h2 class="text-3xl font-bold mb-4">Ready to Find Your Dream Car?</h2>
723
+ <p class="text-xl mb-8 max-w-2xl mx-auto">Join thousands of satisfied customers who found their perfect vehicle through Carwala.</p>
724
+ <div class="flex flex-col sm:flex-row justify-center space-y-4 sm:space-y-0 sm:space-x-6">
725
+ <a href="/register" class="bg-white text-blue-600 hover:bg-gray-100 px-8 py-4 rounded-lg font-bold text-lg transition-all duration-300">
726
+ <i class="fas fa-user-plus mr-2"></i>Register Now
727
+ </a>
728
+ <a href="/login" class="bg-transparent border-2 border-white hover:bg-white hover:text-blue-600 px-8 py-4 rounded-lg font-bold text-lg transition-all duration-300">
729
+ <i class="fas fa-sign-in-alt mr-2"></i>Login to Browse
730
+ </a>
731
+ </div>
732
+ </section>
733
  </main>
734
 
735
  <!-- Footer -->
736
+ <footer class="bg-gray-900 text-white py-12 relative z-10">
737
  <div class="container mx-auto px-4">
738
  <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
739
  <div>
740
+ <a href="/" class="text-2xl font-bold flex items-center mb-6">
741
  <i class="fas fa-car text-blue-400 mr-2"></i>
742
  <span class="text-transparent bg-clip-text bg-gradient-to-r from-blue-400 to-cyan-300">Carwala</span>
743
  </a>
 
761
  <div>
762
  <h3 class="text-lg font-bold mb-6">Quick Links</h3>
763
  <ul class="space-y-3">
764
+ <li><a href="/" class="text-gray-400 hover:text-white transition-all duration-300">Home</a></li>
765
+ <li><a href="#search-section" class="text-gray-400 hover:text-white transition-all duration-300">Browse Cars</a></li>
766
+ <li><a href="/register" class="text-gray-400 hover:text-white transition-all duration-300">Sell Your Car</a></li>
767
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">About Us</a></li>
768
  </ul>
769
  </div>
 
771
  <div>
772
  <h3 class="text-lg font-bold mb-6">Account</h3>
773
  <ul class="space-y-3">
774
+ <li><a href="/login" class="text-gray-400 hover:text-white transition-all duration-300">Login</a></li>
775
+ <li><a href="/register" class="text-gray-400 hover:text-white transition-all duration-300">Register</a></li>
 
 
 
 
776
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">My Profile</a></li>
777
  <li><a href="#" class="text-gray-400 hover:text-white transition-all duration-300">My Listings</a></li>
778
  </ul>
 
808
  <script>
809
  // Animation on scroll
810
  document.addEventListener('DOMContentLoaded', function() {
811
+ // Create animated background elements
812
+ createBackgroundAnimations();
813
+
814
  // Fade in elements on scroll
815
  const fadeElements = document.querySelectorAll('.fade-in');
816
  const slideLeftElements = document.querySelectorAll('.slide-in-left');
 
817
 
818
  const observer = new IntersectionObserver((entries) => {
819
  entries.forEach(entry => {
 
825
 
826
  fadeElements.forEach(el => observer.observe(el));
827
  slideLeftElements.forEach(el => observer.observe(el));
 
828
 
829
  // Animated counters
830
  const counters = document.querySelectorAll('.counter');
 
874
  this.style.transform = 'translateY(0)';
875
  });
876
  });
877
+
878
+ // Price range slider
879
+ const priceRange = document.getElementById('price-range');
880
+ const priceValue = document.getElementById('price-value');
881
+
882
+ priceRange.addEventListener('input', function() {
883
+ const value = parseInt(this.value).toLocaleString();
884
+ priceValue.textContent = `$${value}`;
885
+ filterCars();
886
+ });
887
+
888
+ // Car type filter cards
889
+ const filterCards = document.querySelectorAll('.car-filter-card');
890
+ filterCards.forEach(card => {
891
+ card.addEventListener('click', function() {
892
+ // Remove active class from all cards
893
+ filterCards.forEach(c => c.classList.remove('active', 'border-blue-500', 'bg-blue-50'));
894
+ filterCards.forEach(c => c.classList.add('border-gray-200', 'bg-white'));
895
+
896
+ // Add active class to clicked card
897
+ this.classList.remove('border-gray-200', 'bg-white');
898
+ this.classList.add('active', 'border-blue-500', 'bg-blue-50');
899
+
900
+ filterCars();
901
+ });
902
+ });
903
+
904
+ // Year filter
905
+ const yearFilter = document.getElementById('year-filter');
906
+ yearFilter.addEventListener('change', filterCars);
907
+
908
+ // Search input
909
+ const carSearch = document.getElementById('car-search');
910
+ carSearch.addEventListener('keyup', filterCars);
911
+
912
+ // Search button
913
+ const searchButton = document.getElementById('search-button');
914
+ searchButton.addEventListener('click', filterCars);
915
+
916
+ // Filter cars function
917
+ function filterCars() {
918
+ const searchTerm = carSearch.value.toLowerCase();
919
+ const maxPrice = parseInt(priceRange.value);
920
+ const selectedYear = yearFilter.value;
921
+ const activeFilterCard = document.querySelector('.car-filter-card.active');
922
+ const selectedType = activeFilterCard ? activeFilterCard.getAttribute('data-type') : 'all';
923
+
924
+ const carCards = document.querySelectorAll('.car-card');
925
+ let visibleCount = 0;
926
+
927
+ carCards.forEach(card => {
928
+ const carName = card.querySelector('h3').textContent.toLowerCase();
929
+ const carPrice = parseInt(card.getAttribute('data-price'));
930
+ const carYear = parseInt(card.getAttribute('data-year'));
931
+ const carType = card.getAttribute('data-type');
932
+
933
+ // Check search term
934
+ const matchesSearch = carName.includes(searchTerm) || searchTerm === '';
935
+
936
+ // Check price
937
+ const matchesPrice = carPrice <= maxPrice;
938
+
939
+ // Check year
940
+ let matchesYear = true;
941
+ if (selectedYear !== 'all') {
942
+ const yearFilterValue = parseInt(selectedYear);
943
+ if (selectedYear === '2023') {
944
+ matchesYear = carYear >= 2023;
945
+ } else if (selectedYear === '2020') {
946
+ matchesYear = carYear >= 2020 && carYear <= 2022;
947
+ } else if (selectedYear === '2017') {
948
+ matchesYear = carYear >= 2017 && carYear <= 2019;
949
+ } else if (selectedYear === '2014') {
950
+ matchesYear = carYear >= 2014 && carYear <= 2016;
951
+ }
952
+ }
953
+
954
+ // Check type
955
+ const matchesType = selectedType === 'all' || carType === selectedType;
956
+
957
+ // Show or hide card based on filters
958
+ if (matchesSearch && matchesPrice && matchesYear && matchesType) {
959
+ card.style.display = 'block';
960
+ visibleCount++;
961
+
962
+ // Add fade-in animation
963
+ card.classList.add('fade-in');
964
+ setTimeout(() => {
965
+ card.classList.add('visible');
966
+ }, 100);
967
+ } else {
968
+ card.style.display = 'none';
969
+ card.classList.remove('visible');
970
+ }
971
+ });
972
+
973
+ // Update result count
974
+ document.getElementById('result-count').textContent = `(${visibleCount})`;
975
+ }
976
+
977
+ // Initialize filter
978
+ filterCars();
979
  });
980
+
981
+ // Create animated background elements
982
+ function createBackgroundAnimations() {
983
+ const bgAnimation = document.getElementById('bgAnimation');
984
+
985
+ // Create circles
986
+ for (let i = 0; i < 15; i++) {
987
+ const circle = document.createElement('div');
988
+ circle.classList.add('bg-circle');
989
+ const size = Math.random() * 300 + 100;
990
+ const left = Math.random() * 100;
991
+ const top = Math.random() * 100;
992
+ const delay = Math.random() * 5;
993
+
994
+ circle.style.width = `${size}px`;
995
+ circle.style.height = `${size}px`;
996
+ circle.style.left = `${left}%`;
997
+ circle.style.top = `${top}%`;
998
+ circle.style.animationDelay = `${delay}s`;
999
+ circle.style.opacity = Math.random() * 0.1 + 0.05;
1000
+
1001
+ bgAnimation.appendChild(circle);
1002
+ }
1003
+
1004
+ // Create tires
1005
+ for (let i = 0; i < 8; i++) {
1006
+ const tire = document.createElement('div');
1007
+ tire.classList.add('bg-tire');
1008
+ const left = Math.random() * 100;
1009
+ const top = Math.random() * 100;
1010
+ const delay = Math.random() * 10;
1011
+
1012
+ tire.style.left = `${left}%`;
1013
+ tire.style.top = `${top}%`;
1014
+ tire.style.animationDelay = `${delay}s`;
1015
+ tire.style.opacity = Math.random() * 0.1 + 0.05;
1016
+
1017
+ bgAnimation.appendChild(tire);
1018
+ }
1019
+
1020
+ // Create cars
1021
+ for (let i = 0; i < 5; i++) {
1022
+ const car = document.createElement('div');
1023
+ car.classList.add('bg-car');
1024
+ const yPos = Math.random() * 80 + 10;
1025
+ const delay = Math.random() * 20;
1026
+
1027
+ car.style.setProperty('--y-pos', `${yPos / 100}`);
1028
+ car.style.animationDelay = `${delay}s`;
1029
+ car.style.opacity = Math.random() * 0.08 + 0.05;
1030
+
1031
+ bgAnimation.appendChild(car);
1032
+ }
1033
+ }
1034
  </script>
1035
  </body>
1036
  </html>