-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
792 lines (726 loc) · 47.7 KB
/
Copy pathindex.html
File metadata and controls
792 lines (726 loc) · 47.7 KB
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
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bite Me — Best Burgers in Town</title>
<meta name="description" content="Bite Me — juicy, stacked, made-to-order burgers. Order straight to WhatsApp.">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#E2452B">
<link rel="icon" href="images/icon.png">
<link rel="apple-touch-icon" href="images/icon.png">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Bite Me">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,500;0,600;0,700;0,900;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<script>
// Silence the Tailwind CDN production-use console warning (cosmetic only, safe for this single-file build)
(function(){
const originalWarn = console.warn;
console.warn = function(...args){
if(typeof args[0] === 'string' && args[0].includes('cdn.tailwindcss.com')) return;
originalWarn.apply(console, args);
};
})();
</script>
<script src="https://cdn.tailwindcss.com"></script>
<style>
:root{
--cream:#FFF7EC;
--cream-2:#FCEFDC;
--char:#2B1B12;
--red:#E2452B;
--red-dark:#C23319;
--mustard:#F2A93B;
--pickle:#7C9A5B;
--pickle-dark:#5E7A41;
}
*{box-sizing:border-box}
body{font-family:'Plus Jakarta Sans',sans-serif;background:var(--cream);color:var(--char);overflow-x:hidden}
.font-display{font-family:'Fraunces',serif}
::selection{background:var(--mustard);color:var(--char)}
/* scrollbar */
::-webkit-scrollbar{width:10px}
::-webkit-scrollbar-track{background:var(--cream)}
::-webkit-scrollbar-thumb{background:var(--red);border-radius:10px}
.grain::before{
content:"";position:absolute;inset:0;pointer-events:none;opacity:.05;
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* navbar */
#navbar{transition:all .35s ease}
#navbar.scrolled{background:rgba(255,247,236,.92);backdrop-filter:blur(10px);box-shadow:0 6px 24px rgba(43,27,18,.08)}
.btn-primary{
background:var(--red);color:#fff;font-weight:700;border-radius:999px;
box-shadow:0 6px 0 var(--red-dark);transition:transform .15s ease, box-shadow .15s ease;
}
.btn-primary:active{transform:translateY(6px);box-shadow:0 0 0 var(--red-dark)}
.btn-primary:hover{transform:translateY(-2px)}
.btn-outline{
border:2px solid var(--char);border-radius:999px;font-weight:700;
transition:all .2s ease;
}
.btn-outline:hover{background:var(--char);color:var(--cream)}
/* floating bits */
@keyframes float-y{0%,100%{transform:translateY(0) rotate(var(--r,0deg))}50%{transform:translateY(-18px) rotate(var(--r,0deg))}}
.float{animation:float-y 5s ease-in-out infinite}
/* burger assembly (signature element) */
.stack-layer{opacity:0;transform:translateY(-140px) rotate(var(--rot,0deg));animation:drop .7s cubic-bezier(.34,1.56,.64,1) forwards;animation-delay:var(--d,0s)}
@keyframes drop{to{opacity:1;transform:translateY(0) rotate(var(--rot,0deg))}}
/* menu card */
.menu-card{transition:transform .25s ease, box-shadow .25s ease}
.menu-card:hover{transform:translateY(-8px) rotate(-.6deg);box-shadow:0 20px 40px rgba(43,27,18,.15)}
.menu-card .thumb{transition:transform .35s ease}
.menu-card:hover .thumb{transform:scale(1.08) rotate(3deg)}
.add-btn{transition:transform .15s ease, background .15s ease}
.add-btn:active{transform:scale(.85)}
/* reveal on scroll */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .7s ease, transform .7s ease}
.reveal.in{opacity:1;transform:translateY(0)}
/* ticket-style divider */
.ticket-edge{
-webkit-mask-image: radial-gradient(circle 8px at 8px 8px, transparent 8px, black 9px);
-webkit-mask-position:left top;-webkit-mask-repeat:repeat-y;-webkit-mask-size:16px 16px;
mask-image: radial-gradient(circle 8px at 8px 8px, transparent 8px, black 9px);
mask-position:left top;mask-repeat:repeat-y;mask-size:16px 16px;
}
/* cart drawer */
#cartDrawer{transition:transform .4s cubic-bezier(.7,0,.3,1)}
#cartDrawer.closed{transform:translateX(100%)}
#cartOverlay{transition:opacity .3s ease}
/* chip */
.chip{transition:all .2s ease}
.chip.active{background:var(--char);color:var(--cream)}
.marquee-track{animation:marquee 22s linear infinite}
@keyframes marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.wiggle:hover{animation:wiggle .5s ease}
@keyframes wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-4deg)}75%{transform:rotate(4deg)}}
/* pointy hanging tag */
.tag-flag{
position:relative;
clip-path:polygon(0 50%, 16px 0, 100% 0, 100% 100%, 16px 100%);
padding-left:26px;
}
.tag-flag .tag-pin{
position:absolute;left:8px;top:50%;transform:translateY(-50%);
width:5px;height:5px;border-radius:50%;background:var(--char);opacity:.5;
}
.seeds{display:inline-flex;gap:2px;align-items:center}
.seeds span{display:block;width:5px;height:8px;border-radius:50%;background:#F6E3B4;border:1px solid #d9b876;transform:rotate(var(--sr,0deg))}
/* scalloped bun-edge divider */
.bun-divider{
width:100%;height:26px;
background-repeat:repeat-x;background-size:34px 26px;
background-image:radial-gradient(circle at 17px 0, transparent 17px, var(--edge-color,var(--cream)) 17.5px);
}
.spinner{border:3px solid rgba(43,27,18,.15);border-top-color:var(--red);border-radius:50%;width:22px;height:22px;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
/* Funky unparallel heading highlight band */
.funky-h2, .funky-h3 {
position: relative;
display: inline-block;
z-index: 1;
}
.funky-h2::after, .funky-h3::after {
content: "";
position: absolute;
left: -12px;
right: -12px;
bottom: 0px;
height: 38%;
background: var(--mustard);
z-index: -1;
transform: rotate(-2deg) skewX(-10deg);
opacity: 0.85;
border-radius: 4px;
}
.funky-h3::after {
background: var(--pickle);
height: 12%;
bottom: 2px;
transform: rotate(1.5deg) skewX(8deg);
}
</style>
</head>
<body class="antialiased">
<!-- ===== NAVBAR ===== -->
<nav id="navbar" class="fixed top-0 inset-x-0 z-40 py-4">
<div class="max-w-7xl mx-auto px-5 md:px-8 flex items-center justify-between">
<a href="#home" class="flex items-center gap-2">
<img src="images/icon.png" alt="Bite Me Logo" class="w-9 h-9 object-contain rounded-full shadow-sm">
<span class="font-display font-800 text-xl" style="font-weight:800">Bite Me</span>
</a>
<div class="hidden md:flex items-center gap-8 font-semibold text-sm">
<a href="#home" class="hover:text-[var(--red)] transition">Home</a>
<a href="#menu" class="hover:text-[var(--red)] transition">Menu</a>
<a href="#offer" class="hover:text-[var(--red)] transition">Offers</a>
<a href="#how" class="hover:text-[var(--red)] transition">How it works</a>
<a href="#contact" class="hover:text-[var(--red)] transition">Contact</a>
<button onclick="triggerAppInstall()" class="bg-[var(--red)] text-white hover:bg-[var(--red-dark)] px-3.5 py-1.5 rounded-full text-xs font-bold transition flex items-center gap-1 shadow-sm border border-[var(--char)]/5">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
Download App
</button>
</div>
<div class="flex items-center gap-3">
<!-- Download App Button (Mobile view only) -->
<button onclick="triggerAppInstall()" class="md:hidden bg-[var(--red)] text-white hover:bg-[var(--red-dark)] px-3.5 py-1.5 rounded-full text-xs font-bold transition flex items-center gap-1 shadow-sm border border-[var(--char)]/5">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
Download App
</button>
<button onclick="openCart()" class="relative w-11 h-11 rounded-full bg-white/70 border-2 border-[var(--char)] flex items-center justify-center hover:bg-[var(--char)] hover:text-white transition group" aria-label="Open cart">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6"/></svg>
<span id="cartCount" class="absolute -top-1.5 -right-1.5 bg-[var(--red)] text-white text-[11px] font-bold w-5 h-5 rounded-full flex items-center justify-center hidden">0</span>
</button>
<a href="#menu" class="hidden sm:inline-block btn-primary px-5 py-2.5 text-sm">Order Now</a>
</div>
</div>
</nav>
<!-- ===== HERO ===== -->
<header id="home" class="relative pt-32 pb-20 md:pt-44 md:pb-28 overflow-hidden">
<!-- Base background gradient -->
<div class="absolute inset-0 -z-30" style="background:radial-gradient(circle at 15% 20%, var(--cream-2), var(--cream) 55%)"></div>
<!-- Right fading flame burger image -->
<div class="absolute right-0 top-0 bottom-0 w-full md:w-[48%] -z-20 bg-cover bg-center opacity-30 md:opacity-100 transition-opacity" style="background-image: url('images/burger-flame.jpg');">
<div class="absolute inset-0" style="background: linear-gradient(to right, var(--cream) 0%, rgba(255, 247, 236, 0.2) 20%, transparent 65%);"></div>
</div>
<!-- floating blobs -->
<div class="absolute -top-10 -left-16 w-72 h-72 rounded-full opacity-40 -z-10" style="background:var(--mustard);filter:blur(50px)"></div>
<div class="absolute bottom-0 right-0 w-96 h-96 rounded-full opacity-20 -z-10" style="background:var(--pickle);filter:blur(60px)"></div>
<div class="absolute top-1/3 right-1/4 w-56 h-56 rounded-full opacity-10 -z-10" style="background:var(--red);filter:blur(70px)"></div>
<!-- dotted texture -->
<div class="absolute inset-0 -z-10 opacity-[.35]" style="background-image:radial-gradient(var(--char) 1.4px, transparent 1.4px);background-size:26px 26px;-webkit-mask-image:radial-gradient(ellipse 70% 60% at 50% 0%, black 0%, transparent 70%);mask-image:radial-gradient(ellipse 70% 60% at 50% 0%, black 0%, transparent 70%)"></div>
<!-- sesame speckle -->
<svg class="absolute top-16 right-1/3 opacity-30 -z-10" width="120" height="60" viewBox="0 0 120 60"><ellipse cx="10" cy="10" rx="3" ry="5" fill="#F6E3B4" transform="rotate(20 10 10)"/><ellipse cx="60" cy="30" rx="3" ry="5" fill="#F6E3B4" transform="rotate(-15 60 30)"/><ellipse cx="100" cy="5" rx="3" ry="5" fill="#F6E3B4" transform="rotate(40 100 5)"/><ellipse cx="35" cy="50" rx="3" ry="5" fill="#F6E3B4" transform="rotate(-30 35 50)"/></svg>
<!-- floating condiments -->
<svg class="absolute top-28 left-[6%] float" style="--r:-8deg;animation-delay:.2s" width="46" height="46" viewBox="0 0 46 46"><circle cx="23" cy="23" r="23" fill="#F2A93B"/><path d="M13 26c3 5 17 5 20 0" stroke="#2B1B12" stroke-width="2.5" stroke-linecap="round" fill="none"/></svg>
<svg class="absolute top-1/2 left-[3%] float" style="--r:6deg;animation-delay:1.1s" width="34" height="34" viewBox="0 0 34 34"><rect x="4" y="10" width="26" height="14" rx="7" fill="#7C9A5B"/></svg>
<svg class="absolute top-24 right-[8%] float" style="--r:10deg;animation-delay:.6s" width="52" height="52" viewBox="0 0 52 52"><ellipse cx="26" cy="26" rx="24" ry="18" fill="#E2452B"/></svg>
<div class="max-w-7xl mx-auto px-5 md:px-8 grid md:grid-cols-2 gap-14 items-center">
<div class="reveal in">
<span class="tag-flag inline-flex items-center gap-2 pr-4 py-2 text-xs font-bold tracking-wide bg-white shadow-md -rotate-2 -ml-1">
<span class="tag-pin"></span>
<span class="seeds"><span style="--sr:-10deg"></span><span style="--sr:8deg"></span><span style="--sr:-4deg"></span></span>
100% Beef · Grilled Fresh Daily
</span>
<h1 class="font-display mt-5 text-5xl sm:text-6xl lg:text-[4.2rem] leading-[0.98]" style="font-weight:900">
We Make <span class="relative inline-block">
Best Burger
<svg class="absolute left-0 -bottom-2 w-full" height="14" viewBox="0 0 300 14" preserveAspectRatio="none"><path d="M2 10 C 80 2, 220 2, 298 10" stroke="#F2A93B" stroke-width="7" fill="none" stroke-linecap="round"/></svg>
</span> In Town.
</h1>
<p class="mt-6 text-lg text-[var(--char)]/70 max-w-md">Stacked buns, melted cheese, and a grill that never stops. Order in two taps, straight to WhatsApp.</p>
<div class="mt-8 flex flex-wrap gap-4">
<a href="#menu" class="btn-primary px-8 py-4 inline-flex items-center gap-2">
See the Menu
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
</a>
<a href="https://wa.me/923399989928" target="_blank" class="btn-outline px-8 py-4 inline-flex items-center gap-2">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M17.5 14.4c-.3-.2-1.8-.9-2-1-.3-.1-.5-.2-.7.2s-.8 1-.9 1.1c-.2.2-.3.2-.6.1-.3-.2-1.2-.5-2.3-1.5-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6l.4-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5C10 9 9.5 7.8 9.3 7.3c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.2.2-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.5-.1 1.8-.7 2-1.4.3-.7.3-1.3.2-1.4-.1-.1-.3-.2-.6-.4z"/><path d="M12 2C6.5 2 2 6.5 2 12c0 1.9.5 3.6 1.4 5.1L2 22l5-1.3c1.4.8 3.1 1.2 5 1.2 5.5 0 10-4.5 10-10S17.5 2 12 2zm0 18.2c-1.7 0-3.3-.5-4.6-1.3l-.3-.2-3 .8.8-2.9-.2-.3C4 15 3.5 13.5 3.5 12c0-4.7 3.8-8.5 8.5-8.5s8.5 3.8 8.5 8.5-3.8 8.7-8.5 8.7z"/></svg>
Order on WhatsApp
</a>
</div>
<div class="mt-10 flex items-center gap-6 text-sm font-semibold text-[var(--char)]/60">
<span>⏱ 25 min average</span>
<span class="w-1 h-1 rounded-full bg-[var(--char)]/30"></span>
<span>🔥 500+ grilled today</span>
</div>
</div>
<!-- Right column spacer so background flame burger shows through on desktop -->
<div class="hidden md:block h-[420px]"></div>
</div>
</header>
<!-- marquee -->
<div class="bun-divider" style="--edge-color:var(--char)"></div>
<div class="bg-[var(--char)] text-[var(--cream)] py-3 overflow-hidden">
<div class="flex whitespace-nowrap marquee-track font-display text-lg" style="font-weight:600">
<span class="mx-6">Beef Smash Burgers</span>•<span class="mx-6">Grilled Not Fried</span>•<span class="mx-6">WhatsApp Ordering</span>•<span class="mx-6">Cheesy Every Time</span>•
<span class="mx-6">Beef Smash Burgers</span>•<span class="mx-6">Grilled Not Fried</span>•<span class="mx-6">WhatsApp Ordering</span>•<span class="mx-6">Cheesy Every Time</span>•
</div>
</div>
<!-- ===== MENU ===== -->
<section id="menu" class="py-20 md:py-28 max-w-7xl mx-auto px-5 md:px-8">
<div class="text-center max-w-xl mx-auto reveal">
<span class="tag-flag inline-flex items-center pr-4 py-1.5 text-xs font-bold text-[var(--char)] tracking-wide bg-[var(--mustard)]/40 rotate-1">THE LINE-UP</span>
<h2 class="font-display text-4xl md:text-5xl mt-2 funky-h2" style="font-weight:800">Pick your bite</h2>
<p class="mt-3 text-[var(--char)]/60">Every burger, one grill, zero shortcuts. Tap + to add to your order.</p>
</div>
<!-- filter chips -->
<div class="flex flex-wrap justify-center gap-3 mt-10 reveal">
<button class="chip active px-5 py-2 rounded-full border-2 border-[var(--char)] font-semibold text-sm" data-filter="all">All</button>
<button class="chip px-5 py-2 rounded-full border-2 border-[var(--char)] font-semibold text-sm" data-filter="classic">Classic</button>
<button class="chip px-5 py-2 rounded-full border-2 border-[var(--char)] font-semibold text-sm" data-filter="cheesy">Cheesy</button>
<button class="chip px-5 py-2 rounded-full border-2 border-[var(--char)] font-semibold text-sm" data-filter="spicy">Spicy</button>
<button class="chip px-5 py-2 rounded-full border-2 border-[var(--char)] font-semibold text-sm" data-filter="combo">Combos</button>
</div>
<div id="menuGrid" class="grid sm:grid-cols-2 lg:grid-cols-3 gap-7 mt-12"></div>
</section>
<!-- ===== OFFER BANNER ===== -->
<section id="offer" class="max-w-7xl mx-auto px-5 md:px-8 py-6">
<div class="relative rounded-[32px] overflow-hidden reveal" style="background:linear-gradient(120deg, var(--pickle-dark), var(--pickle))">
<div class="absolute inset-0 opacity-10" style="background-image:radial-gradient(circle,#fff 2px,transparent 2px);background-size:22px 22px"></div>
<div class="relative grid md:grid-cols-[1fr_auto] items-center gap-8 px-8 md:px-14 py-12">
<div class="text-white">
<span class="inline-block bg-white/20 px-4 py-1 rounded-full text-xs font-bold tracking-wide">TODAY ONLY</span>
<h3 class="font-display text-4xl md:text-5xl mt-3" style="font-weight:800">Get 20% off <br class="hidden md:block">on orders above Rs. 1500</h3>
<p class="mt-2 text-white/80">Use code <span class="font-bold text-white">BITEME20</span> when you message us on WhatsApp.</p>
</div>
<a href="https://wa.me/923399989928?text=Hi!%20I%20want%20to%20use%20code%20BITEME20" target="_blank" class="btn-primary px-8 py-4 whitespace-nowrap self-start md:self-center" style="background:var(--char);box-shadow:0 6px 0 #14100c">Claim Offer</a>
</div>
<svg class="absolute -right-6 -bottom-10 opacity-90 wiggle" width="180" height="180" viewBox="0 0 180 180"><circle cx="90" cy="90" r="80" fill="#E2452B"/><circle cx="90" cy="90" r="80" fill="none" stroke="#F2A93B" stroke-width="6" stroke-dasharray="4 8"/></svg>
</div>
</section>
<!-- ===== WHY US ===== -->
<section class="relative max-w-7xl mx-auto px-5 md:px-8 py-20 md:py-28 rounded-[32px] overflow-hidden">
<!-- Subtly faded floating patties background image -->
<div class="absolute inset-0 bg-cover bg-center -z-10 opacity-[0.3]" style="background-image: url('images/burger-patties.jpg');"></div>
<div class="text-center max-w-xl mx-auto reveal">
<span class="tag-flag inline-flex items-center pr-4 py-1.5 text-xs font-bold text-[var(--char)] tracking-wide bg-[var(--pickle)]/25 -rotate-1">WHY BITE ME</span>
<h2 class="font-display text-4xl md:text-5xl mt-2 funky-h2" style="font-weight:800">Built like a good burger</h2>
</div>
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-12">
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition">
<div class="w-12 h-12 rounded-2xl bg-[var(--red)]/10 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#E2452B" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="M12 6v6l4 2"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">25-min delivery</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">From grill to your door, fast and fresh.</p>
</div>
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition" style="transition-delay:.05s">
<div class="w-12 h-12 rounded-2xl bg-[var(--pickle)]/15 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#5E7A41" stroke-width="2"><path d="M12 2a7 7 0 0 0-7 7c0 5 7 13 7 13s7-8 7-13a7 7 0 0 0-7-7z"/><circle cx="12" cy="9" r="2.5"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">100% beef patties</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">Hand-formed, never frozen-thin.</p>
</div>
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition" style="transition-delay:.1s">
<div class="w-12 h-12 rounded-2xl bg-[var(--mustard)]/20 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#B9791E" stroke-width="2"><path d="M12 2l3 7h7l-5.5 4.5L18 21l-6-4-6 4 1.5-7.5L2 9h7z"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">Grilled, not fried</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">Char-grilled for real flavour, less grease.</p>
</div>
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition" style="transition-delay:.15s">
<div class="w-12 h-12 rounded-2xl bg-[var(--red)]/10 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#E2452B" stroke-width="2"><path d="M21 11.5a8.38 8.38 0 0 1-9 8.4A8.5 8.5 0 1 1 12.6 3a8.38 8.38 0 0 1 8.4 8.5z"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">Order on WhatsApp</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">No apps, no signup — just chat and eat.</p>
</div>
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition" style="transition-delay:.2s">
<div class="w-12 h-12 rounded-2xl bg-[var(--pickle)]/15 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#5E7A41" stroke-width="2"><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M16 3H8v4h8V3z"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">Fixed fair prices</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">What you see on the menu is what you pay.</p>
</div>
<div class="reveal bg-white rounded-3xl p-7 border border-[var(--char)]/5 shadow-sm hover:shadow-lg transition" style="transition-delay:.25s">
<div class="w-12 h-12 rounded-2xl bg-[var(--mustard)]/20 flex items-center justify-center mb-4"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#B9791E" stroke-width="2"><path d="M20 12V8a2 2 0 0 0-2-2h-3l-2-2H9L7 6H4a2 2 0 0 0-2 2v4"/><path d="M2 12l4 8h12l4-8"/></svg></div>
<h3 class="font-display text-xl" style="font-weight:700">Daily specials</h3>
<p class="text-[var(--char)]/60 mt-2 text-sm">New combo drops every week.</p>
</div>
</div>
</section>
<!-- ===== HOW IT WORKS ===== -->
<div class="bun-divider" style="--edge-color:var(--cream-2)"></div>
<section id="how" class="py-20 md:py-28" style="background:var(--cream-2)">
<div class="max-w-7xl mx-auto px-5 md:px-8">
<div class="text-center max-w-xl mx-auto reveal">
<span class="tag-flag inline-flex items-center pr-4 py-1.5 text-xs font-bold text-[var(--char)] tracking-wide bg-[var(--red)]/15 rotate-1">THE PROCESS</span>
<h2 class="font-display text-4xl md:text-5xl mt-2 funky-h2" style="font-weight:800">Bun to doorstep</h2>
</div>
<div class="grid md:grid-cols-4 gap-6 mt-14 relative">
<div class="hidden md:block absolute top-8 left-0 right-0 h-0.5 bg-[var(--char)]/15"></div>
<div class="reveal relative text-center">
<div class="w-16 h-16 mx-auto rounded-full bg-[var(--red)] text-white font-display flex items-center justify-center text-2xl relative z-10" style="font-weight:700">1</div>
<h3 class="font-display text-lg mt-4" style="font-weight:700">Pick your burger</h3>
<p class="text-sm text-[var(--char)]/60 mt-1">Browse the menu, add extras.</p>
</div>
<div class="reveal relative text-center" style="transition-delay:.08s">
<div class="w-16 h-16 mx-auto rounded-full bg-[var(--mustard)] text-[var(--char)] font-display flex items-center justify-center text-2xl relative z-10" style="font-weight:700">2</div>
<h3 class="font-display text-lg mt-4" style="font-weight:700">Fill your cart</h3>
<p class="text-sm text-[var(--char)]/60 mt-1">Tap + on each item you want.</p>
</div>
<div class="reveal relative text-center" style="transition-delay:.16s">
<div class="w-16 h-16 mx-auto rounded-full bg-[var(--pickle)] text-white font-display flex items-center justify-center text-2xl relative z-10" style="font-weight:700">3</div>
<h3 class="font-display text-lg mt-4" style="font-weight:700">Send on WhatsApp</h3>
<p class="text-sm text-[var(--char)]/60 mt-1">One tap sends your full order.</p>
</div>
<div class="reveal relative text-center" style="transition-delay:.24s">
<div class="w-16 h-16 mx-auto rounded-full bg-[var(--char)] text-white font-display flex items-center justify-center text-2xl relative z-10" style="font-weight:700">4</div>
<h3 class="font-display text-lg mt-4" style="font-weight:700">Grilled & delivered</h3>
<p class="text-sm text-[var(--char)]/60 mt-1">Hot, fresh, in about 25 minutes.</p>
</div>
</div>
</div>
</section>
<div class="bun-divider rotate-180" style="--edge-color:var(--cream)"></div>
<!-- ===== CONTACT / CTA ===== -->
<section id="contact" class="max-w-7xl mx-auto px-5 md:px-8 py-20 md:py-28">
<div class="rounded-[32px] bg-[var(--char)] text-[var(--cream)] px-8 md:px-16 py-16 text-center relative overflow-hidden reveal">
<svg class="absolute top-6 left-6 opacity-20" width="60" height="60" viewBox="0 0 24 24" fill="var(--mustard)"><circle cx="12" cy="12" r="12"/></svg>
<svg class="absolute bottom-6 right-10 opacity-20" width="40" height="40" viewBox="0 0 24 24" fill="var(--red)"><circle cx="12" cy="12" r="12"/></svg>
<h2 class="font-display text-4xl md:text-5xl relative" style="font-weight:800">Hungry already?</h2>
<p class="mt-3 text-[var(--cream)]/70 relative">Message us directly — no forms, no waiting.</p>
<a href="https://wa.me/923399989928?text=Hi%20Bite%20Me!%20I'd%20like%20to%20order." target="_blank" class="btn-primary inline-flex items-center gap-2 px-9 py-4 mt-8 relative">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M17.5 14.4c-.3-.2-1.8-.9-2-1-.3-.1-.5-.2-.7.2s-.8 1-.9 1.1c-.2.2-.3.2-.6.1-.3-.2-1.2-.5-2.3-1.5-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6l.4-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5C10 9 9.5 7.8 9.3 7.3c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.2.2-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.5-.1 1.8-.7 2-1.4.3-.7.3-1.3.2-1.4-.1-.1-.3-.2-.6-.4z"/><path d="M12 2C6.5 2 2 6.5 2 12c0 1.9.5 3.6 1.4 5.1L2 22l5-1.3c1.4.8 3.1 1.2 5 1.2 5.5 0 10-4.5 10-10S17.5 2 12 2zm0 18.2c-1.7 0-3.3-.5-4.6-1.3l-.3-.2-3 .8.8-2.9-.2-.3C4 15 3.5 13.5 3.5 12c0-4.7 3.8-8.5 8.5-8.5s8.5 3.8 8.5 8.5-3.8 8.7-8.5 8.7z"/></svg>
+92 339 9989928
</a>
</div>
</section>
<!-- ===== FOOTER ===== -->
<footer class="border-t border-[var(--char)]/10 py-10">
<div class="max-w-7xl mx-auto px-5 md:px-8 flex flex-col md:flex-row items-center justify-between gap-4">
<div class="flex items-center gap-2">
<img src="images/icon.png" alt="Bite Me Logo" class="w-6 h-6 object-contain rounded-full shadow-sm">
<span class="font-display font-800" style="font-weight:800">Bite Me</span>
</div>
<p class="text-sm text-[var(--char)]/50">© 2026 Bite Me. All rights reserved. Made by Muhammad Zain</p>
<a href="https://wa.me/923399989928" target="_blank" class="text-sm font-semibold hover:text-[var(--red)] transition">WhatsApp: +92 339 9989928</a>
</div>
</footer>
<!-- ===== CART DRAWER ===== -->
<div id="cartOverlay" onclick="closeCart()" class="fixed inset-0 bg-black/40 z-40 opacity-0 pointer-events-none"></div>
<aside id="cartDrawer" class="closed fixed top-0 right-0 h-full w-full sm:w-[420px] bg-[var(--cream)] z-50 shadow-2xl flex flex-col">
<div class="flex items-center justify-between px-6 py-5 border-b border-[var(--char)]/10">
<h3 class="font-display text-2xl" style="font-weight:800">Your Order</h3>
<button onclick="closeCart()" class="w-9 h-9 rounded-full hover:bg-[var(--char)]/10 flex items-center justify-center">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></svg>
</button>
</div>
<div class="px-6 pt-4">
<div id="detailsSummary" class="hidden bg-white rounded-2xl px-4 py-3 border border-[var(--char)]/10 flex items-start justify-between gap-3 mb-1">
<div class="text-sm min-w-0">
<p class="font-semibold truncate" id="detailsName">—</p>
<p class="text-[var(--char)]/60 truncate" id="detailsAddress">—</p>
<p class="text-[var(--char)]/60" id="detailsPhone">—</p>
</div>
<button onclick="openDetails()" class="shrink-0 text-xs font-bold text-[var(--red)] hover:underline">Edit</button>
</div>
<button id="addDetailsBtn" onclick="openDetails()" class="w-full flex items-center gap-2 justify-center border-2 border-dashed border-[var(--char)]/25 rounded-2xl px-4 py-3 text-sm font-semibold text-[var(--char)]/60 hover:border-[var(--red)] hover:text-[var(--red)] transition mb-1">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
Add delivery details
</button>
</div>
<div id="cartItems" class="flex-1 overflow-y-auto px-6 py-4 space-y-4"></div>
<div id="cartEmpty" class="flex-1 flex flex-col items-center justify-center text-center px-6 text-[var(--char)]/50">
<svg width="56" height="56" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6"/></svg>
<p class="mt-3 font-semibold">Your cart is empty</p>
<p class="text-sm mt-1">Add a burger to get started.</p>
</div>
<div id="cartFooter" class="border-t border-[var(--char)]/10 px-6 py-5 hidden">
<div class="flex justify-between text-sm font-semibold text-[var(--char)]/60 mb-1">
<span>Subtotal</span><span id="cartSubtotal">Rs. 0</span>
</div>
<div class="flex justify-between text-lg font-display mb-4" style="font-weight:800">
<span>Total</span><span id="cartTotal">Rs. 0</span>
</div>
<button onclick="sendWhatsAppOrder()" class="btn-primary w-full py-4 flex items-center justify-center gap-2">
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><path d="M17.5 14.4c-.3-.2-1.8-.9-2-1-.3-.1-.5-.2-.7.2s-.8 1-.9 1.1c-.2.2-.3.2-.6.1-.3-.2-1.2-.5-2.3-1.5-.9-.8-1.4-1.7-1.6-2-.2-.3 0-.5.1-.6l.4-.5c.1-.2.2-.3.3-.5.1-.2 0-.4 0-.5C10 9 9.5 7.8 9.3 7.3c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.2.2-1 1-1 2.4s1 2.8 1.1 3c.1.2 2 3.1 4.9 4.3.7.3 1.2.5 1.6.6.7.2 1.3.2 1.8.1.5-.1 1.8-.7 2-1.4.3-.7.3-1.3.2-1.4-.1-.1-.3-.2-.6-.4z"/><path d="M12 2C6.5 2 2 6.5 2 12c0 1.9.5 3.6 1.4 5.1L2 22l5-1.3c1.4.8 3.1 1.2 5 1.2 5.5 0 10-4.5 10-10S17.5 2 12 2zm0 18.2c-1.7 0-3.3-.5-4.6-1.3l-.3-.2-3 .8.8-2.9-.2-.3C4 15 3.5 13.5 3.5 12c0-4.7 3.8-8.5 8.5-8.5s8.5 3.8 8.5 8.5-3.8 8.7-8.5 8.7z"/></svg>
Send Order on WhatsApp
</button>
</div>
</aside>
<!-- ===== DELIVERY DETAILS MODAL ===== -->
<div id="detailsOverlay" onclick="closeDetails()" class="fixed inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300"></div>
<div id="detailsModal" class="fixed inset-0 z-[70] flex items-center justify-center p-5 opacity-0 pointer-events-none scale-95 transition-all duration-300">
<div class="bg-[var(--cream)] rounded-3xl w-full max-w-sm shadow-2xl relative overflow-hidden">
<div class="absolute top-3 right-3">
<button onclick="closeDetails()" class="w-9 h-9 rounded-full bg-white/70 hover:bg-[var(--char)] hover:text-white flex items-center justify-center transition" aria-label="Close">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></svg>
</button>
</div>
<div class="px-7 pt-8 pb-7">
<span class="tag-flag inline-flex items-center pr-4 py-1.5 text-xs font-bold text-[var(--char)] tracking-wide bg-[var(--mustard)]/40 -rotate-2">DELIVERY DETAILS</span>
<h3 class="font-display text-2xl mt-3" style="font-weight:800">Where's it headed?</h3>
<p class="text-sm text-[var(--char)]/60 mt-1">Save this once — it'll auto-fill your WhatsApp order every time.</p>
<form id="detailsForm" class="mt-5 space-y-3" onsubmit="saveDetails(event)">
<div>
<label class="text-xs font-bold text-[var(--char)]/60">Full Name</label>
<input required id="inputName" type="text" placeholder="e.g. Ahmed Khan" class="w-full mt-1 px-4 py-3 rounded-xl border-2 border-[var(--char)]/15 bg-white focus:border-[var(--red)] outline-none text-sm">
</div>
<div>
<label class="text-xs font-bold text-[var(--char)]/60">Delivery Address</label>
<textarea required id="inputAddress" rows="2" placeholder="House #, street, area, city" class="w-full mt-1 px-4 py-3 rounded-xl border-2 border-[var(--char)]/15 bg-white focus:border-[var(--red)] outline-none text-sm resize-none"></textarea>
</div>
<div>
<label class="text-xs font-bold text-[var(--char)]/60">Phone Number</label>
<input required id="inputPhone" type="tel" placeholder="03XX XXXXXXX" class="w-full mt-1 px-4 py-3 rounded-xl border-2 border-[var(--char)]/15 bg-white focus:border-[var(--red)] outline-none text-sm">
</div>
<div>
<label class="text-xs font-bold text-[var(--char)]/60">Alternative Phone <span class="font-normal opacity-60">(optional)</span></label>
<input id="inputAltPhone" type="tel" placeholder="03XX XXXXXXX" class="w-full mt-1 px-4 py-3 rounded-xl border-2 border-[var(--char)]/15 bg-white focus:border-[var(--red)] outline-none text-sm">
</div>
<button type="submit" class="btn-primary w-full py-3.5 mt-2">Save Details</button>
</form>
</div>
</div>
</div>
<!-- ===== DOWNLOAD APP MODAL ===== -->
<div id="installOverlay" onclick="closeInstallModal()" class="fixed inset-0 bg-black/50 z-[60] opacity-0 pointer-events-none transition-opacity duration-300"></div>
<div id="installModal" class="fixed inset-0 z-[70] flex items-center justify-center p-5 opacity-0 pointer-events-none scale-95 transition-all duration-300">
<div class="bg-[var(--cream)] rounded-3xl w-full max-w-sm shadow-2xl relative overflow-hidden border border-[var(--char)]/10">
<div class="absolute top-3 right-3">
<button onclick="closeInstallModal()" class="w-9 h-9 rounded-full bg-white/70 hover:bg-[var(--char)] hover:text-white flex items-center justify-center transition" aria-label="Close">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M18 6L6 18M6 6l12 12"/></svg>
</button>
</div>
<div class="px-7 pt-8 pb-7 text-center">
<div class="w-16 h-16 mx-auto bg-white rounded-2xl shadow-md flex items-center justify-center border border-[var(--char)]/5 mb-4">
<img src="images/icon.png" alt="Bite Me Icon" class="w-12 h-12 object-contain rounded-xl">
</div>
<h3 class="font-display text-2xl font-800" style="font-weight:800">Install Bite Me</h3>
<p class="text-sm text-[var(--char)]/70 mt-2">Get our app on your device for fast access and offline ordering.</p>
<div class="mt-5 space-y-3 text-left bg-white/60 p-4 rounded-2xl border border-[var(--char)]/5 text-xs">
<p class="font-bold flex items-center gap-1.5 text-[var(--char)]">
<span>🖥️</span> Desktop / PC:
</p>
<p class="text-[var(--char)]/70 pl-6">Click the install icon in your browser's address bar (next to bookmark star) or use the button below.</p>
<div class="border-t border-[var(--char)]/5 my-2"></div>
<p class="font-bold flex items-center gap-1.5 text-[var(--char)]">
<span>📱</span> Mobile Devices:
</p>
<p class="text-[var(--char)]/70 pl-6"><strong>Android:</strong> Tap the install prompt or selection in Chrome menu.</p>
<p class="text-[var(--char)]/70 pl-6"><strong>iOS Safari:</strong> Tap Share then select "Add to Home Screen".</p>
</div>
<button onclick="triggerNativeInstall()" class="btn-primary w-full py-3.5 mt-5">Install Now</button>
</div>
</div>
</div>
<script>
const WHATSAPP_NUMBER = "923399989928";
const menu = [
{id:1, name:"Classic Smash", desc:"Beef patty, cheddar, house sauce, pickles", price:650, cat:"classic", image:"images/burger 1.jpg"},
{id:2, name:"Double Cheese Stack", desc:"Double patty, double cheddar, caramel onions", price:950, cat:"cheesy", image:"images/burger-texas.jpg"},
{id:3, name:"Smoky BBQ Burger", desc:"Beef patty, smoked BBQ glaze, crispy onions", price:750, cat:"classic", image:"images/burger-bacon.jpg"},
{id:4, name:"Inferno Beef", desc:"Beef patty, jalapenos, spicy mayo, pepper jack", price:800, cat:"spicy", image:"images/burger-hawaii.jpg"},
{id:5, name:"Mozzarella Melt", desc:"Beef patty, molten mozzarella, garlic aioli", price:850, cat:"cheesy", image:"images/burger-mushroom.jpg"},
{id:6, name:"Ghost Pepper Stack", desc:"Double patty, ghost pepper sauce, cheddar", price:1050, cat:"spicy", image:"images/burger-teriyaki.jpg"},
{id:7, name:"Bite Me Combo", desc:"Classic Smash + fries + drink", price:1200, cat:"combo", image:"images/burger-rib.jpg"},
{id:8, name:"Double Trouble Combo", desc:"Double Cheese Stack + fries + drink", price:1450, cat:"combo", image:"images/burger-lamb.jpg"},
{id:9, name:"Mushroom Swiss", desc:"Beef patty, sauteed mushrooms, swiss cheese", price:800, cat:"cheesy", image:"images/burger-egg.jpg"},
];
function burgerThumb(imgUrl){
return `<img src="${imgUrl}" alt="Burger Image" class="w-full h-full object-cover rounded-xl" loading="lazy" decoding="async">`;
}
// PWA: register service worker + handle "Add to Home Screen"
let deferredInstallPrompt = null;
if('serviceWorker' in navigator){
window.addEventListener('load', () => {
navigator.serviceWorker.register('sw.js').catch(() => {});
});
}
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredInstallPrompt = e;
document.getElementById('installBtn')?.classList.remove('hidden');
});
window.addEventListener('appinstalled', () => {
document.getElementById('installBtn')?.classList.add('hidden');
deferredInstallPrompt = null;
});
function triggerAppInstall() {
const overlay = document.getElementById('installOverlay');
const modal = document.getElementById('installModal');
overlay.classList.remove('opacity-0','pointer-events-none');
modal.classList.remove('opacity-0','pointer-events-none','scale-95');
}
function closeInstallModal() {
const overlay = document.getElementById('installOverlay');
const modal = document.getElementById('installModal');
overlay.classList.add('opacity-0','pointer-events-none');
modal.classList.add('opacity-0','pointer-events-none','scale-95');
}
async function triggerNativeInstall() {
closeInstallModal();
if(deferredInstallPrompt){
deferredInstallPrompt.prompt();
await deferredInstallPrompt.userChoice;
deferredInstallPrompt = null;
document.getElementById('installBtn')?.classList.add('hidden');
} else {
alert('To download/install Bite Me:\n\n1. On Desktop Chrome/Edge: Look for the install icon 🖥️ in the URL bar (right-side).\n2. On Android: Tap browser options (three dots) -> "Add to Home screen" or "Install App".\n3. On iPhone: Tap the Share button -> "Add to Home Screen".');
}
}
// iOS Safari never fires beforeinstallprompt — show the button anyway so the tap opens instructions
if(/iphone|ipad|ipod/i.test(navigator.userAgent)){
document.addEventListener('DOMContentLoaded', () => document.getElementById('installBtn')?.classList.remove('hidden'));
}
let cart = {}; // id -> qty
let customerDetails = null; // {name, address, phone, altPhone}
function openDetails(){
document.getElementById('inputName').value = customerDetails?.name || '';
document.getElementById('inputAddress').value = customerDetails?.address || '';
document.getElementById('inputPhone').value = customerDetails?.phone || '';
document.getElementById('inputAltPhone').value = customerDetails?.altPhone || '';
const overlay = document.getElementById('detailsOverlay');
const modal = document.getElementById('detailsModal');
overlay.classList.remove('opacity-0','pointer-events-none');
modal.classList.remove('opacity-0','pointer-events-none','scale-95');
}
function closeDetails(){
const overlay = document.getElementById('detailsOverlay');
const modal = document.getElementById('detailsModal');
overlay.classList.add('opacity-0','pointer-events-none');
modal.classList.add('opacity-0','pointer-events-none','scale-95');
}
function saveDetails(e){
e.preventDefault();
customerDetails = {
name: document.getElementById('inputName').value.trim(),
address: document.getElementById('inputAddress').value.trim(),
phone: document.getElementById('inputPhone').value.trim(),
altPhone: document.getElementById('inputAltPhone').value.trim()
};
renderDetailsSummary();
closeDetails();
}
function renderDetailsSummary(){
const summary = document.getElementById('detailsSummary');
const addBtn = document.getElementById('addDetailsBtn');
if(customerDetails && customerDetails.name){
document.getElementById('detailsName').textContent = customerDetails.name;
document.getElementById('detailsAddress').textContent = customerDetails.address;
document.getElementById('detailsPhone').textContent = customerDetails.phone + (customerDetails.altPhone ? ' / ' + customerDetails.altPhone : '');
summary.classList.remove('hidden');
addBtn.classList.add('hidden');
} else {
summary.classList.add('hidden');
addBtn.classList.remove('hidden');
}
}
// details popup is loaded on demand
function renderMenu(filter='all'){
const grid = document.getElementById('menuGrid');
const items = menu.filter(m => filter==='all' || m.cat===filter);
grid.innerHTML = items.map((m,i) => `
<div class="menu-card reveal in bg-white rounded-3xl p-5 border border-[var(--char)]/5 shadow-sm" style="transition-delay:${(i%3)*0.06}s">
<div class="thumb h-48 flex items-center justify-center bg-[var(--cream-2)] rounded-2xl mb-4 overflow-hidden shadow-sm">${burgerThumb(m.image)}</div>
<div class="flex items-start justify-between gap-2">
<div>
<h3 class="font-display text-lg funky-h3" style="font-weight:700">${m.name}</h3>
<p class="text-sm text-[var(--char)]/55 mt-1 leading-snug">${m.desc}</p>
</div>
</div>
<div class="flex items-center justify-between mt-4">
<span class="font-display text-lg" style="font-weight:800">Rs. ${m.price}</span>
<button onclick="addToCart(${m.id})" class="add-btn w-10 h-10 rounded-full bg-[var(--red)] text-white flex items-center justify-center hover:bg-[var(--red-dark)]" aria-label="Add ${m.name}">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M12 5v14M5 12h14"/></svg>
</button>
</div>
</div>
`).join('');
}
renderMenu();
document.querySelectorAll('.chip').forEach(chip => {
chip.addEventListener('click', () => {
document.querySelectorAll('.chip').forEach(c => c.classList.remove('active'));
chip.classList.add('active');
renderMenu(chip.dataset.filter);
});
});
function addToCart(id){
cart[id] = (cart[id] || 0) + 1;
updateCartUI();
openCart();
}
function changeQty(id, delta){
if(!cart[id]) return;
cart[id] += delta;
if(cart[id] <= 0) delete cart[id];
updateCartUI();
}
function updateCartUI(){
const ids = Object.keys(cart);
const countEl = document.getElementById('cartCount');
const totalCount = ids.reduce((s,id)=>s+cart[id],0);
countEl.textContent = totalCount;
countEl.classList.toggle('hidden', totalCount===0);
const itemsEl = document.getElementById('cartItems');
const emptyEl = document.getElementById('cartEmpty');
const footerEl = document.getElementById('cartFooter');
if(ids.length === 0){
itemsEl.innerHTML = '';
emptyEl.classList.remove('hidden');
footerEl.classList.add('hidden');
return;
}
emptyEl.classList.add('hidden');
footerEl.classList.remove('hidden');
let subtotal = 0;
itemsEl.innerHTML = ids.map(id => {
const item = menu.find(m => m.id == id);
const qty = cart[id];
subtotal += item.price * qty;
return `
<div class="flex items-center gap-3 bg-white rounded-2xl p-3 border border-[var(--char)]/5">
<div class="w-14 h-14 bg-[var(--cream-2)] rounded-xl flex items-center justify-center shrink-0 overflow-hidden shadow-sm">${burgerThumb(item.image)}</div>
<div class="flex-1 min-w-0">
<p class="font-semibold text-sm truncate">${item.name}</p>
<p class="text-xs text-[var(--char)]/50">Rs. ${item.price}</p>
</div>
<div class="flex items-center gap-2">
<button onclick="changeQty(${id},-1)" class="w-7 h-7 rounded-full border border-[var(--char)]/20 flex items-center justify-center hover:bg-[var(--char)]/10">−</button>
<span class="w-5 text-center text-sm font-bold">${qty}</span>
<button onclick="changeQty(${id},1)" class="w-7 h-7 rounded-full border border-[var(--char)]/20 flex items-center justify-center hover:bg-[var(--char)]/10">+</button>
</div>
</div>`;
}).join('');
document.getElementById('cartSubtotal').textContent = 'Rs. ' + subtotal;
document.getElementById('cartTotal').textContent = 'Rs. ' + subtotal;
}
function openCart(){
document.getElementById('cartDrawer').classList.remove('closed');
const ov = document.getElementById('cartOverlay');
ov.classList.remove('pointer-events-none');
ov.classList.remove('opacity-0');
}
function closeCart(){
document.getElementById('cartDrawer').classList.add('closed');
const ov = document.getElementById('cartOverlay');
ov.classList.add('opacity-0');
setTimeout(()=>ov.classList.add('pointer-events-none'), 300);
}
function sendWhatsAppOrder(){
const ids = Object.keys(cart);
if(ids.length === 0) return;
if(!customerDetails || !customerDetails.name){
// Highlight the addDetailsBtn to call attention
const btn = document.getElementById('addDetailsBtn');
btn.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
btn.classList.add('border-red-500', 'text-red-500', 'bg-red-50', 'scale-[1.02]');
setTimeout(() => {
btn.classList.remove('border-red-500', 'text-red-500', 'bg-red-50', 'scale-[1.02]');
}, 1500);
// Open details modal automatically
openDetails();
return;
}
let lines = ["Hi Bite Me! I'd like to order:"];
lines.push("");
lines.push(`Name: ${customerDetails.name}`);
lines.push(`Address: ${customerDetails.address}`);
lines.push(`Phone: ${customerDetails.phone}`);
if(customerDetails.altPhone) lines.push(`Alt Phone: ${customerDetails.altPhone}`);
lines.push("");
let total = 0;
ids.forEach(id => {
const item = menu.find(m => m.id == id);
const qty = cart[id];
total += item.price * qty;
lines.push(`- ${item.name} x${qty} (Rs. ${item.price * qty})`);
});
lines.push(`Total: Rs. ${total}`);
const text = encodeURIComponent(lines.join('\n'));
window.open(`https://wa.me/${WHATSAPP_NUMBER}?text=${text}`, '_blank');
}
// navbar scroll
window.addEventListener('scroll', () => {
document.getElementById('navbar').classList.toggle('scrolled', window.scrollY > 30);
});
// reveal on scroll
const io = new IntersectionObserver(entries => {
entries.forEach(e => { if(e.isIntersecting) e.target.classList.add('in'); });
}, {threshold:.15});
document.querySelectorAll('.reveal').forEach(el => io.observe(el));
// smooth scroll
document.querySelectorAll('a[href^="#"]').forEach(a => {
a.addEventListener('click', e => {
const target = document.querySelector(a.getAttribute('href'));
if(target){ e.preventDefault(); target.scrollIntoView({behavior:'smooth', block:'start'}); }
});
});
</script>
</body>
</html>