Bozartify commited on
Commit
5a5dff3
·
verified ·
1 Parent(s): 5436378

NO GENERATING! - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +1435 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Mobile 1
3
- emoji: 🌖
4
- colorFrom: indigo
5
- colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: mobile-1
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1435 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Gourmet Express - Restaurant App</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <script src="https://cdn.jsdelivr.net/npm/qrcode@1.5.1/build/qrcode.min.js"></script>
10
+ <style>
11
+ /* Custom scrollbar */
12
+ ::-webkit-scrollbar {
13
+ width: 5px;
14
+ }
15
+ ::-webkit-scrollbar-track {
16
+ background: #f1f1f1;
17
+ }
18
+ ::-webkit-scrollbar-thumb {
19
+ background: #888;
20
+ border-radius: 5px;
21
+ }
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #555;
24
+ }
25
+
26
+ /* Animation for menu items */
27
+ @keyframes fadeIn {
28
+ from { opacity: 0; transform: translateY(20px); }
29
+ to { opacity: 1; transform: translateY(0); }
30
+ }
31
+
32
+ .menu-item {
33
+ animation: fadeIn 0.5s ease-out forwards;
34
+ opacity: 0;
35
+ }
36
+
37
+ /* Delay animations */
38
+ .menu-item:nth-child(1) { animation-delay: 0.1s; }
39
+ .menu-item:nth-child(2) { animation-delay: 0.2s; }
40
+ .menu-item:nth-child(3) { animation-delay: 0.3s; }
41
+ .menu-item:nth-child(4) { animation-delay: 0.4s; }
42
+ .menu-item:nth-child(5) { animation-delay: 0.5s; }
43
+ .menu-item:nth-child(6) { animation-delay: 0.6s; }
44
+
45
+ /* Pulse animation for active tab */
46
+ @keyframes pulse {
47
+ 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
48
+ 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
49
+ 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
50
+ }
51
+
52
+ .pulse-active {
53
+ animation: pulse 2s infinite;
54
+ }
55
+
56
+ /* Slide transitions for pages */
57
+ .page {
58
+ transition: transform 0.3s ease, opacity 0.3s ease;
59
+ }
60
+
61
+ .page.hidden {
62
+ display: none;
63
+ opacity: 0;
64
+ transform: translateX(100%);
65
+ }
66
+
67
+ .page.active {
68
+ display: block;
69
+ opacity: 1;
70
+ transform: translateX(0);
71
+ }
72
+ </style>
73
+ </head>
74
+ <body class="bg-gray-100 font-sans">
75
+ <!-- App Container -->
76
+ <div class="max-w-md mx-auto bg-white min-h-screen shadow-lg overflow-hidden relative">
77
+ <!-- Status Bar (mock iOS) -->
78
+ <div class="bg-black text-white px-4 py-1 flex justify-between text-xs">
79
+ <span>9:41</span>
80
+ <div class="flex space-x-2">
81
+ <i class="fas fa-signal"></i>
82
+ <i class="fas fa-wifi"></i>
83
+ <i class="fas fa-battery-full"></i>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Header with Restaurant Name -->
88
+ <header class="bg-red-600 text-white p-4 flex justify-between items-center sticky top-0 z-10">
89
+ <h1 class="text-xl font-bold">Gourmet Express</h1>
90
+ <div class="flex space-x-3">
91
+ <button id="searchBtn" class="text-white"><i class="fas fa-search"></i></button>
92
+ <button id="aiAssistantBtn" class="text-white"><i class="fas fa-robot"></i></button>
93
+ <button id="qrGenerateBtn" class="text-white"><i class="fas fa-qrcode"></i></button>
94
+ <button id="cartBtn" class="text-white relative">
95
+ <i class="fas fa-shopping-cart"></i>
96
+ <span id="cartCount" class="absolute -top-2 -right-2 bg-yellow-400 text-black rounded-full w-5 h-5 flex items-center justify-center text-xs hidden">0</span>
97
+ </button>
98
+ </div>
99
+ </header>
100
+
101
+ <!-- AI Assistant Modal -->
102
+ <div id="aiAssistantModal" class="hidden fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4">
103
+ <div class="bg-white rounded-lg w-full max-w-md max-h-[80vh] flex flex-col">
104
+ <div class="p-4 border-b flex justify-between items-center">
105
+ <h3 class="text-lg font-bold">AI Assistant</h3>
106
+ <button id="closeAIModal" class="text-gray-500"><i class="fas fa-times"></i></button>
107
+ </div>
108
+ <div class="p-4 overflow-y-auto flex-grow" id="aiChat">
109
+ <div class="ai-message bg-gray-100 p-3 rounded-lg mb-3">
110
+ <p>Hello! I'm your Gourmet Express assistant. How can I help you today?</p>
111
+ </div>
112
+ </div>
113
+ <div class="p-4 border-t">
114
+ <div class="flex">
115
+ <input type="text" id="aiInput" placeholder="Ask about menu, hours, etc..." class="flex-grow p-2 border rounded-l-lg focus:outline-none">
116
+ <button id="sendAI" class="bg-red-600 text-white px-4 rounded-r-lg"><i class="fas fa-paper-plane"></i></button>
117
+ </div>
118
+ <div class="flex space-x-2 mt-2">
119
+ <button class="ai-quick-question text-xs bg-gray-100 px-2 py-1 rounded">Hours</button>
120
+ <button class="ai-quick-question text-xs bg-gray-100 px-2 py-1 rounded">Delivery</button>
121
+ <button class="ai-quick-question text-xs bg-gray-100 px-2 py-1 rounded">Vegetarian</button>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+
127
+ <!-- Search Bar (hidden by default) -->
128
+ <div id="searchBar" class="hidden bg-white p-3 border-b">
129
+ <div class="relative">
130
+ <input type="text" placeholder="Search menu..." class="w-full p-2 pl-10 rounded-full border focus:outline-none focus:ring-2 focus:ring-red-500">
131
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
132
+ </div>
133
+ </div>
134
+
135
+ <!-- Main Content Area -->
136
+ <main class="pb-16">
137
+ <!-- Authentication Page (default) -->
138
+ <div id="authPage" class="page active p-6">
139
+ <div class="text-center mb-8">
140
+ <img src="https://via.placeholder.com/150" alt="Gourmet Express Logo" class="w-32 h-32 mx-auto rounded-full mb-4 border-4 border-red-500">
141
+ <h2 class="text-2xl font-bold text-gray-800">Welcome to Gourmet Express</h2>
142
+ <p class="text-gray-600">Sign in to order delicious food</p>
143
+ </div>
144
+
145
+ <div class="space-y-4">
146
+ <div>
147
+ <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
148
+ <input type="email" id="email" placeholder="your@email.com" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
149
+ </div>
150
+
151
+ <div>
152
+ <label for="password" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
153
+ <input type="password" id="password" placeholder="••••••••" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
154
+ </div>
155
+
156
+ <button id="loginBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200">Sign In</button>
157
+
158
+ <div class="text-center">
159
+ <p class="text-sm text-gray-600">Don't have an account? <a href="#" id="showRegister" class="text-red-600 font-medium">Register</a></p>
160
+ </div>
161
+
162
+ <div class="flex items-center my-4">
163
+ <div class="flex-grow border-t border-gray-300"></div>
164
+ <span class="mx-4 text-gray-500">or</span>
165
+ <div class="flex-grow border-t border-gray-300"></div>
166
+ </div>
167
+
168
+ <button class="w-full flex items-center justify-center space-x-2 bg-blue-600 text-white py-3 rounded-lg font-medium hover:bg-blue-700 transition duration-200">
169
+ <i class="fab fa-facebook-f"></i>
170
+ <span>Continue with Facebook</span>
171
+ </button>
172
+
173
+ <button class="w-full flex items-center justify-center space-x-2 bg-white text-gray-800 py-3 rounded-lg font-medium border hover:bg-gray-100 transition duration-200">
174
+ <i class="fab fa-google"></i>
175
+ <span>Continue with Google</span>
176
+ </button>
177
+ </div>
178
+ </div>
179
+
180
+ <!-- Registration Page -->
181
+ <div id="registerPage" class="page hidden p-6">
182
+ <div class="flex items-center mb-6">
183
+ <button id="backToLogin" class="text-red-600 mr-2"><i class="fas fa-arrow-left"></i></button>
184
+ <h2 class="text-xl font-bold text-gray-800">Create Account</h2>
185
+ </div>
186
+
187
+ <div class="space-y-4">
188
+ <div>
189
+ <label for="regName" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
190
+ <input type="text" id="regName" placeholder="John Doe" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
191
+ </div>
192
+
193
+ <div>
194
+ <label for="regEmail" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
195
+ <input type="email" id="regEmail" placeholder="your@email.com" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
196
+ </div>
197
+
198
+ <div>
199
+ <label for="regPassword" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
200
+ <input type="password" id="regPassword" placeholder="••••••••" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
201
+ </div>
202
+
203
+ <div>
204
+ <label for="regConfirmPassword" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
205
+ <input type="password" id="regConfirmPassword" placeholder="••••••••" class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500">
206
+ </div>
207
+
208
+ <div class="flex items-start">
209
+ <input type="checkbox" id="terms" class="mt-1 mr-2">
210
+ <label for="terms" class="text-sm text-gray-700">I agree to the <a href="#" class="text-red-600">Terms of Service</a> and <a href="#" class="text-red-600">Privacy Policy</a></label>
211
+ </div>
212
+
213
+ <button id="registerBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200">Create Account</button>
214
+ </div>
215
+ </div>
216
+
217
+ <!-- Home Page (after auth) -->
218
+ <div id="homePage" class="page hidden">
219
+ <!-- Banner Carousel -->
220
+ <div class="relative h-48 overflow-hidden">
221
+ <div id="bannerCarousel" class="flex transition-transform duration-300">
222
+ <div class="min-w-full h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');"></div>
223
+ <div class="min-w-full h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1555396273-367ea4eb4db5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80');"></div>
224
+ <div class="min-w-full h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1546069901-ba9599a7e63c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1480&q=80');"></div>
225
+ </div>
226
+ <div class="absolute bottom-2 left-0 right-0 flex justify-center space-x-1">
227
+ <span class="block w-2 h-2 rounded-full bg-white opacity-50"></span>
228
+ <span class="block w-2 h-2 rounded-full bg-white opacity-50"></span>
229
+ <span class="block w-2 h-2 rounded-full bg-white"></span>
230
+ </div>
231
+ </div>
232
+
233
+ <!-- Categories -->
234
+ <div class="p-4">
235
+ <h2 class="text-lg font-bold mb-3">Categories</h2>
236
+ <div class="grid grid-cols-4 gap-2">
237
+ <button class="category-btn flex flex-col items-center p-2 rounded-lg hover:bg-gray-100 transition" data-category="all">
238
+ <div class="w-12 h-12 bg-red-100 rounded-full flex items-center justify-center text-red-600 mb-1">
239
+ <i class="fas fa-utensils"></i>
240
+ </div>
241
+ <span class="text-xs text-center">All</span>
242
+ </button>
243
+ <button class="category-btn flex flex-col items-center p-2 rounded-lg hover:bg-gray-100 transition" data-category="pizza">
244
+ <div class="w-12 h-12 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mb-1">
245
+ <i class="fas fa-pizza-slice"></i>
246
+ </div>
247
+ <span class="text-xs text-center">Pizza</span>
248
+ </button>
249
+ <button class="category-btn flex flex-col items-center p-2 rounded-lg hover:bg-gray-100 transition" data-category="burger">
250
+ <div class="w-12 h-12 bg-green-100 rounded-full flex items-center justify-center text-green-600 mb-1">
251
+ <i class="fas fa-hamburger"></i>
252
+ </div>
253
+ <span class="text-xs text-center">Burgers</span>
254
+ </button>
255
+ <button class="category-btn flex flex-col items-center p-2 rounded-lg hover:bg-gray-100 transition" data-category="drinks">
256
+ <div class="w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 mb-1">
257
+ <i class="fas fa-glass-martini-alt"></i>
258
+ </div>
259
+ <span class="text-xs text-center">Drinks</span>
260
+ </button>
261
+ </div>
262
+ </div>
263
+
264
+ <!-- Popular Items -->
265
+ <div class="p-4">
266
+ <div class="flex justify-between items-center mb-3">
267
+ <h2 class="text-lg font-bold">Popular Items</h2>
268
+ <a href="#" class="text-sm text-red-600">See all</a>
269
+ </div>
270
+
271
+ <div class="grid grid-cols-2 gap-3">
272
+ <a href="#" class="menu-item-detail block bg-white rounded-lg overflow-hidden shadow-sm border" data-id="1">
273
+ <img src="https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1381&q=80" alt="Burger" class="w-full h-32 object-cover">
274
+ <div class="p-3">
275
+ <h3 class="font-medium">Classic Burger</h3>
276
+ <p class="text-sm text-gray-600 mb-2">Juicy beef patty with cheese</p>
277
+ <div class="flex justify-between items-center">
278
+ <span class="font-bold text-red-600">$8.99</span>
279
+ <button class="add-to-cart text-white bg-red-600 rounded-full w-8 h-8 flex items-center justify-center" data-id="1" data-name="Classic Burger" data-price="8.99">
280
+ <i class="fas fa-plus"></i>
281
+ </button>
282
+ </div>
283
+ </div>
284
+ </a>
285
+
286
+ <div class="menu-item bg-white rounded-lg overflow-hidden shadow-sm border">
287
+ <img src="https://images.unsplash.com/photo-1562059390-a761a084768e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1419&q=80" alt="Pizza" class="w-full h-32 object-cover">
288
+ <div class="p-3">
289
+ <h3 class="font-medium">Margherita Pizza</h3>
290
+ <p class="text-sm text-gray-600 mb-2">Classic tomato and mozzarella</p>
291
+ <div class="flex justify-between items-center">
292
+ <span class="font-bold text-red-600">$12.99</span>
293
+ <button class="add-to-cart text-white bg-red-600 rounded-full w-8 h-8 flex items-center justify-center" data-id="2" data-name="Margherita Pizza" data-price="12.99">
294
+ <i class="fas fa-plus"></i>
295
+ </button>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+
302
+ <!-- Special Offers -->
303
+ <div class="p-4 bg-red-50">
304
+ <div class="flex justify-between items-center mb-3">
305
+ <h2 class="text-lg font-bold">Special Offers</h2>
306
+ <a href="#" class="text-sm text-red-600">See all</a>
307
+ </div>
308
+
309
+ <div class="bg-white rounded-lg overflow-hidden shadow-sm border border-red-200">
310
+ <img src="https://images.unsplash.com/photo-1601050690597-df0568f70950?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" alt="Special Offer" class="w-full h-40 object-cover">
311
+ <div class="p-3">
312
+ <div class="flex justify-between items-start">
313
+ <div>
314
+ <h3 class="font-medium">Family Combo</h3>
315
+ <p class="text-sm text-gray-600 mb-2">2 Pizzas + 2 Drinks + Fries</p>
316
+ </div>
317
+ <span class="bg-red-600 text-white text-xs px-2 py-1 rounded">-20%</span>
318
+ </div>
319
+ <div class="flex justify-between items-center">
320
+ <div>
321
+ <span class="text-sm line-through text-gray-500">$35.99</span>
322
+ <span class="font-bold text-red-600 ml-2">$28.79</span>
323
+ </div>
324
+ <button class="add-to-cart text-white bg-red-600 rounded-full w-8 h-8 flex items-center justify-center" data-id="3" data-name="Family Combo" data-price="28.79">
325
+ <i class="fas fa-plus"></i>
326
+ </button>
327
+ </div>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ </div>
332
+
333
+ <!-- Menu Page -->
334
+ <div id="menuPage" class="page hidden">
335
+ <div class="p-4 sticky top-0 bg-white z-10 border-b flex items-center">
336
+ <button id="backFromMenu" class="text-red-600 mr-2"><i class="fas fa-arrow-left"></i></button>
337
+ <div class="relative flex-grow">
338
+ <input type="text" placeholder="Search menu..." class="w-full p-3 pl-10 rounded-full border focus:outline-none focus:ring-2 focus:ring-red-500">
339
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
340
+ </div>
341
+ </div>
342
+
343
+ <div class="p-4">
344
+ <div class="grid grid-cols-2 gap-3" id="menuItems">
345
+ <!-- Menu items will be loaded here -->
346
+ </div>
347
+ </div>
348
+ </div>
349
+
350
+ <!-- Orders Page -->
351
+ <div id="ordersPage" class="page hidden">
352
+ <div class="p-4">
353
+ <h2 class="text-lg font-bold mb-4">My Orders</h2>
354
+
355
+ <div class="space-y-4">
356
+ <div class="bg-white rounded-lg shadow-sm p-4 border">
357
+ <div class="flex justify-between items-start mb-2">
358
+ <div>
359
+ <h3 class="font-medium">Order #12345</h3>
360
+ <p class="text-sm text-gray-600">June 15, 2023 • 12:30 PM</p>
361
+ </div>
362
+ <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">Delivered</span>
363
+ </div>
364
+ <div class="flex items-center justify-between">
365
+ <div>
366
+ <p class="text-sm">2 items • $21.98</p>
367
+ </div>
368
+ <button class="text-red-600 text-sm font-medium">Reorder</button>
369
+ </div>
370
+ </div>
371
+
372
+ <div class="bg-white rounded-lg shadow-sm p-4 border">
373
+ <div class="flex justify-between items-start mb-2">
374
+ <div>
375
+ <h3 class="font-medium">Order #12344</h3>
376
+ <p class="text-sm text-gray-600">June 10, 2023 • 7:15 PM</p>
377
+ </div>
378
+ <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded">Processing</span>
379
+ </div>
380
+ <div class="flex items-center justify-between">
381
+ <div>
382
+ <p class="text-sm">3 items • $35.97</p>
383
+ </div>
384
+ <button class="text-red-600 text-sm font-medium">Track Order</button>
385
+ </div>
386
+ </div>
387
+
388
+ <div class="bg-white rounded-lg shadow-sm p-4 border">
389
+ <div class="flex justify-between items-start mb-2">
390
+ <div>
391
+ <h3 class="font-medium">Order #12340</h3>
392
+ <p class="text-sm text-gray-600">June 5, 2023 • 6:45 PM</p>
393
+ </div>
394
+ <span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded">Cancelled</span>
395
+ </div>
396
+ <div class="flex items-center justify-between">
397
+ <div>
398
+ <p class="text-sm">1 item • $12.99</p>
399
+ </div>
400
+ <button class="text-red-600 text-sm font-medium">Order Again</button>
401
+ </div>
402
+ </div>
403
+ </div>
404
+ </div>
405
+ </div>
406
+
407
+ <!-- Item Detail Page -->
408
+ <div id="itemDetailPage" class="page hidden">
409
+ <div class="sticky top-0 bg-white z-10 p-4 border-b flex items-center">
410
+ <button id="backFromDetail" class="text-red-600 mr-2"><i class="fas fa-arrow-left"></i></button>
411
+ <h2 class="text-lg font-bold">Item Details</h2>
412
+ </div>
413
+
414
+ <div class="p-4">
415
+ <img id="detailImage" src="" alt="" class="w-full h-64 object-cover rounded-lg mb-4">
416
+ <h1 id="detailName" class="text-2xl font-bold mb-2"></h1>
417
+ <p id="detailPrice" class="text-xl text-red-600 font-bold mb-4"></p>
418
+ <p id="detailDescription" class="text-gray-700 mb-6"></p>
419
+
420
+ <div class="flex items-center justify-between mb-6">
421
+ <div class="flex items-center">
422
+ <button id="decreaseQty" class="text-gray-500 w-10 h-10 flex items-center justify-center border rounded-full">
423
+ <i class="fas fa-minus"></i>
424
+ </button>
425
+ <span id="itemQty" class="mx-4 text-lg">1</span>
426
+ <button id="increaseQty" class="text-red-600 w-10 h-10 flex items-center justify-center border rounded-full">
427
+ <i class="fas fa-plus"></i>
428
+ </button>
429
+ </div>
430
+ <button id="addToCartDetail" class="bg-red-600 text-white px-6 py-2 rounded-lg font-medium">
431
+ Add to Cart - $<span id="detailTotalPrice">0.00</span>
432
+ </button>
433
+ </div>
434
+
435
+ <div class="bg-gray-50 p-4 rounded-lg">
436
+ <h3 class="font-bold mb-2">Nutrition Information</h3>
437
+ <div class="grid grid-cols-2 gap-2 text-sm">
438
+ <div>Calories: <span class="font-medium">650 kcal</span></div>
439
+ <div>Protein: <span class="font-medium">35g</span></div>
440
+ <div>Carbs: <span class="font-medium">45g</span></div>
441
+ <div>Fat: <span class="font-medium">30g</span></div>
442
+ </div>
443
+ </div>
444
+ </div>
445
+ </div>
446
+
447
+ <!-- Profile Page -->
448
+ <div id="profilePage" class="page hidden">
449
+ <div class="p-4">
450
+ <div class="flex flex-col items-center mb-6">
451
+ <img src="https://via.placeholder.com/100" alt="Profile" class="w-24 h-24 rounded-full mb-3 border-4 border-red-500">
452
+ <h2 class="text-xl font-bold">John Doe</h2>
453
+ <p class="text-gray-600">john.doe@example.com</p>
454
+ </div>
455
+
456
+ <div class="space-y-3 mb-6">
457
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
458
+ <div class="w-10 h-10 bg-red-100 rounded-full flex items-center justify-center text-red-600 mr-3">
459
+ <i class="fas fa-user"></i>
460
+ </div>
461
+ <span class="flex-grow">Personal Information</span>
462
+ <i class="fas fa-chevron-right text-gray-400"></i>
463
+ </div>
464
+
465
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
466
+ <div class="w-10 h-10 bg-blue-100 rounded-full flex items-center justify-center text-blue-600 mr-3">
467
+ <i class="fas fa-map-marker-alt"></i>
468
+ </div>
469
+ <span class="flex-grow">Saved Addresses</span>
470
+ <i class="fas fa-chevron-right text-gray-400"></i>
471
+ </div>
472
+
473
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
474
+ <div class="w-10 h-10 bg-purple-100 rounded-full flex items-center justify-center text-purple-600 mr-3">
475
+ <i class="fas fa-credit-card"></i>
476
+ </div>
477
+ <span class="flex-grow">Payment Methods</span>
478
+ <i class="fas fa-chevron-right text-gray-400"></i>
479
+ </div>
480
+
481
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
482
+ <div class="w-10 h-10 bg-yellow-100 rounded-full flex items-center justify-center text-yellow-600 mr-3">
483
+ <i class="fas fa-bell"></i>
484
+ </div>
485
+ <span class="flex-grow">Notifications</span>
486
+ <i class="fas fa-chevron-right text-gray-400"></i>
487
+ </div>
488
+ </div>
489
+
490
+ <div class="space-y-3">
491
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
492
+ <div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center text-green-600 mr-3">
493
+ <i class="fas fa-question-circle"></i>
494
+ </div>
495
+ <span class="flex-grow">Help Center</span>
496
+ <i class="fas fa-chevron-right text-gray-400"></i>
497
+ </div>
498
+
499
+ <div class="bg-white rounded-lg shadow-sm p-4 border flex items-center">
500
+ <div class="w-10 h-10 bg-gray-100 rounded-full flex items-center justify-center text-gray-600 mr-3">
501
+ <i class="fas fa-cog"></i>
502
+ </div>
503
+ <span class="flex-grow">Settings</span>
504
+ <i class="fas fa-chevron-right text-gray-400"></i>
505
+ </div>
506
+
507
+ <button id="logoutBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200 mt-4">
508
+ Log Out
509
+ </button>
510
+ </div>
511
+ </div>
512
+ </div>
513
+
514
+ <!-- Locations Page -->
515
+ <div id="locationsPage" class="page hidden p-4">
516
+ <h2 class="text-lg font-bold mb-4">Our Locations</h2>
517
+ <div class="space-y-4">
518
+ <div class="bg-white rounded-lg shadow-sm p-4 border">
519
+ <h3 class="font-bold mb-2">Downtown</h3>
520
+ <p class="text-gray-600 mb-2">123 Food Street, Culinary City</p>
521
+ <p class="text-sm text-gray-500">Open: 10AM - 10PM Daily</p>
522
+ <button class="mt-2 text-red-600 text-sm font-medium flex items-center">
523
+ <i class="fas fa-phone mr-1"></i> (123) 456-7890
524
+ </button>
525
+ <button class="mt-2 text-red-600 text-sm font-medium flex items-center">
526
+ <i class="fas fa-map-marker-alt mr-1"></i> Get Directions
527
+ </button>
528
+ </div>
529
+ <div class="bg-white rounded-lg shadow-sm p-4 border">
530
+ <h3 class="font-bold mb-2">Uptown</h3>
531
+ <p class="text-gray-600 mb-2">456 Gourmet Ave, Foodville</p>
532
+ <p class="text-sm text-gray-500">Open: 11AM - 11PM Daily</p>
533
+ <button class="mt-2 text-red-600 text-sm font-medium flex items-center">
534
+ <i class="fas fa-phone mr-1"></i> (987) 654-3210
535
+ </button>
536
+ <button class="mt-2 text-red-600 text-sm font-medium flex items-center">
537
+ <i class="fas fa-map-marker-alt mr-1"></i> Get Directions
538
+ </button>
539
+ </div>
540
+ </div>
541
+ </div>
542
+
543
+ <!-- QR Code Page -->
544
+ <div id="qrPage" class="page hidden">
545
+ <div class="p-6 text-center">
546
+ <h2 class="text-xl font-bold mb-2">QR Code Generator</h2>
547
+ <p class="text-gray-600 mb-6">Generate QR codes for any text or URL</p>
548
+
549
+ <div class="mb-4">
550
+ <input type="text" id="qrText" placeholder="Enter text or URL"
551
+ class="w-full p-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-red-500 mb-2">
552
+ <button id="generateQR" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200">
553
+ Generate QR Code
554
+ </button>
555
+ </div>
556
+
557
+ <div class="bg-white p-4 rounded-lg shadow-sm inline-block mb-6">
558
+ <div id="qrcode" class="w-48 h-48 mx-auto flex items-center justify-center">
559
+ <p class="text-gray-400">QR code will appear here</p>
560
+ </div>
561
+ </div>
562
+
563
+ <div class="bg-white rounded-lg shadow-sm p-4 border mb-6 text-left">
564
+ <h3 class="font-medium mb-2">Restaurant Information</h3>
565
+ <div class="space-y-2">
566
+ <div class="flex items-start">
567
+ <i class="fas fa-store text-red-600 mt-1 mr-2"></i>
568
+ <div>
569
+ <p class="font-medium">Gourmet Express</p>
570
+ <p class="text-sm text-gray-600">123 Food Street, Culinary City</p>
571
+ </div>
572
+ </div>
573
+ <div class="flex items-start">
574
+ <i class="fas fa-phone text-red-600 mt-1 mr-2"></i>
575
+ <div>
576
+ <p class="font-medium">Contact</p>
577
+ <p class="text-sm text-gray-600">(123) 456-7890</p>
578
+ </div>
579
+ </div>
580
+ <div class="flex items-start">
581
+ <i class="fas fa-clock text-red-600 mt-1 mr-2"></i>
582
+ <div>
583
+ <p class="font-medium">Opening Hours</p>
584
+ <p class="text-sm text-gray-600">Mon-Fri: 10AM - 10PM<br>Sat-Sun: 11AM - 11PM</p>
585
+ </div>
586
+ </div>
587
+ </div>
588
+ </div>
589
+
590
+ <button class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200 flex items-center justify-center">
591
+ <i class="fas fa-download mr-2"></i>
592
+ <span>Download QR Code</span>
593
+ </button>
594
+ </div>
595
+ </div>
596
+
597
+ <!-- Cart Page -->
598
+ <div id="cartPage" class="page hidden">
599
+ <div class="p-4">
600
+ <h2 class="text-lg font-bold mb-4">Your Cart</h2>
601
+
602
+ <div id="cartItems" class="space-y-3 mb-4">
603
+ <!-- Cart items will be loaded here -->
604
+ <div class="text-center py-10 text-gray-500">
605
+ <i class="fas fa-shopping-cart text-4xl mb-2"></i>
606
+ <p>Your cart is empty</p>
607
+ </div>
608
+ </div>
609
+
610
+ <div class="bg-white rounded-lg shadow-sm p-4 border sticky bottom-16">
611
+ <div class="flex justify-between mb-2">
612
+ <span>Subtotal</span>
613
+ <span id="cartSubtotal">$0.00</span>
614
+ </div>
615
+ <div class="flex justify-between mb-2">
616
+ <span>Delivery Fee</span>
617
+ <span id="deliveryFee">$2.99</span>
618
+ </div>
619
+ <div class="flex justify-between mb-2">
620
+ <span>Tax</span>
621
+ <span id="tax">$0.00</span>
622
+ </div>
623
+ <div class="flex justify-between font-bold text-lg pt-2 border-t mt-2">
624
+ <span>Total</span>
625
+ <span id="cartTotal">$2.99</span>
626
+ </div>
627
+
628
+ <button id="checkoutBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200 mt-4">
629
+ Proceed to Checkout
630
+ </button>
631
+ </div>
632
+ </div>
633
+ </div>
634
+
635
+ <!-- Checkout Page -->
636
+ <div id="checkoutPage" class="page hidden">
637
+ <div class="p-4">
638
+ <h2 class="text-lg font-bold mb-4">Checkout</h2>
639
+
640
+ <div class="bg-white rounded-lg shadow-sm p-4 border mb-4">
641
+ <h3 class="font-medium mb-3 flex items-center">
642
+ <i class="fas fa-map-marker-alt text-red-600 mr-2"></i>
643
+ Delivery Address
644
+ </h3>
645
+
646
+ <div class="flex items-start">
647
+ <input type="radio" name="address" id="homeAddress" checked class="mt-1 mr-2">
648
+ <label for="homeAddress" class="flex-grow">
649
+ <p class="font-medium">Home</p>
650
+ <p class="text-sm text-gray-600">123 Main Street, Apt 4B, New York, NY 10001</p>
651
+ </label>
652
+ <button class="text-red-600 text-sm">Change</button>
653
+ </div>
654
+ </div>
655
+
656
+ <div class="bg-white rounded-lg shadow-sm p-4 border mb-4">
657
+ <h3 class="font-medium mb-3 flex items-center">
658
+ <i class="fas fa-credit-card text-red-600 mr-2"></i>
659
+ Payment Method
660
+ </h3>
661
+
662
+ <div class="space-y-3">
663
+ <div class="flex items-center justify-between">
664
+ <div class="flex items-center">
665
+ <input type="radio" name="payment" id="creditCard" checked class="mr-2">
666
+ <label for="creditCard" class="flex items-center">
667
+ <i class="fab fa-cc-visa text-blue-600 text-xl mr-2"></i>
668
+ <span>•••• •••• •••• 4242</span>
669
+ </label>
670
+ </div>
671
+ <button class="text-red-600 text-sm">Edit</button>
672
+ </div>
673
+
674
+ <div class="flex items-center">
675
+ <input type="radio" name="payment" id="paypal" class="mr-2">
676
+ <label for="paypal" class="flex items-center">
677
+ <i class="fab fa-cc-paypal text-blue-400 text-xl mr-2"></i>
678
+ <span>PayPal</span>
679
+ </label>
680
+ </div>
681
+
682
+ <div class="flex items-center">
683
+ <input type="radio" name="payment" id="cash" class="mr-2">
684
+ <label for="cash" class="flex items-center">
685
+ <i class="fas fa-money-bill-wave text-green-600 text-xl mr-2"></i>
686
+ <span>Cash on Delivery</span>
687
+ </label>
688
+ </div>
689
+ </div>
690
+ </div>
691
+
692
+ <div class="bg-white rounded-lg shadow-sm p-4 border mb-4">
693
+ <h3 class="font-medium mb-3 flex items-center">
694
+ <i class="fas fa-receipt text-red-600 mr-2"></i>
695
+ Order Summary
696
+ </h3>
697
+
698
+ <div id="checkoutItems">
699
+ <!-- Order items will be loaded here -->
700
+ </div>
701
+
702
+ <div class="pt-2 border-t mt-2">
703
+ <div class="flex justify-between mb-1">
704
+ <span class="text-gray-600">Subtotal</span>
705
+ <span id="checkoutSubtotal">$0.00</span>
706
+ </div>
707
+ <div class="flex justify-between mb-1">
708
+ <span class="text-gray-600">Delivery Fee</span>
709
+ <span id="checkoutDelivery">$2.99</span>
710
+ </div>
711
+ <div class="flex justify-between mb-1">
712
+ <span class="text-gray-600">Tax</span>
713
+ <span id="checkoutTax">$0.00</span>
714
+ </div>
715
+ <div class="flex justify-between font-bold text-lg mt-2">
716
+ <span>Total</span>
717
+ <span id="checkoutTotal">$2.99</span>
718
+ </div>
719
+ </div>
720
+ </div>
721
+
722
+ <button id="placeOrderBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200">
723
+ Place Order
724
+ </button>
725
+ </div>
726
+ </div>
727
+
728
+ <!-- Order Confirmation Page -->
729
+ <div id="confirmationPage" class="page hidden">
730
+ <div class="p-6 text-center h-full flex flex-col items-center justify-center">
731
+ <div class="w-20 h-20 bg-green-100 rounded-full flex items-center justify-center text-green-600 mb-4">
732
+ <i class="fas fa-check text-3xl"></i>
733
+ </div>
734
+
735
+ <h2 class="text-xl font-bold mb-2">Order Confirmed!</h2>
736
+ <p class="text-gray-600 mb-6">Your order #12345 has been placed successfully</p>
737
+
738
+ <div class="bg-white rounded-lg shadow-sm p-4 border w-full mb-6">
739
+ <div class="flex justify-between mb-3">
740
+ <span class="text-gray-600">Estimated Delivery</span>
741
+ <span class="font-medium">30-45 mins</span>
742
+ </div>
743
+ <div class="flex justify-between">
744
+ <span class="text-gray-600">Payment Method</span>
745
+ <span class="font-medium">•••• 4242</span>
746
+ </div>
747
+ </div>
748
+
749
+ <div class="w-full bg-white rounded-lg shadow-sm p-4 border mb-6 text-left">
750
+ <h3 class="font-medium mb-3 flex items-center">
751
+ <i class="fas fa-map-marker-alt text-red-600 mr-2"></i>
752
+ Delivery to
753
+ </h3>
754
+ <p class="text-gray-800">123 Main Street, Apt 4B</p>
755
+ <p class="text-gray-600">New York, NY 10001</p>
756
+ </div>
757
+
758
+ <button id="backToHomeBtn" class="w-full bg-red-600 text-white py-3 rounded-lg font-medium hover:bg-red-700 transition duration-200">
759
+ Back to Home
760
+ </button>
761
+ </div>
762
+ </div>
763
+ </main>
764
+
765
+ <!-- Bottom Navigation -->
766
+ <nav class="fixed bottom-0 left-0 right-0 bg-white border-t max-w-md mx-auto flex justify-around py-2">
767
+ <button class="nav-btn flex flex-col items-center text-red-600" data-page="homePage">
768
+ <i class="fas fa-home text-xl"></i>
769
+ <span class="text-xs mt-1">Home</span>
770
+ </button>
771
+ <button class="nav-btn flex flex-col items-center text-gray-500" data-page="menuPage">
772
+ <i class="fas fa-utensils text-xl"></i>
773
+ <span class="text-xs mt-1">Menu</span>
774
+ </button>
775
+ <button class="nav-btn flex flex-col items-center text-gray-500" data-page="ordersPage">
776
+ <i class="fas fa-clipboard-list text-xl"></i>
777
+ <span class="text-xs mt-1">Orders</span>
778
+ </button>
779
+ <button class="nav-btn flex flex-col items-center text-gray-500" data-page="locationsPage">
780
+ <i class="fas fa-map-marker-alt text-xl"></i>
781
+ <span class="text-xs mt-1">Locations</span>
782
+ </button>
783
+ <button class="nav-btn flex flex-col items-center text-gray-500" data-page="qrPage">
784
+ <i class="fas fa-qrcode text-xl"></i>
785
+ <span class="text-xs mt-1">QR Code</span>
786
+ </button>
787
+ <button class="nav-btn flex flex-col items-center text-gray-500" data-page="profilePage">
788
+ <i class="fas fa-user text-xl"></i>
789
+ <span class="text-xs mt-1">Profile</span>
790
+ </button>
791
+ </nav>
792
+ </div>
793
+
794
+ <!-- Fast Scroll Button -->
795
+ <button id="fastScrollBtn" class="fixed bottom-20 right-4 bg-red-600 text-white w-12 h-12 rounded-full shadow-lg flex items-center justify-center z-20 hidden">
796
+ <i class="fas fa-arrow-up"></i>
797
+ </button>
798
+
799
+ <script>
800
+ // DOM Elements
801
+ const authPage = document.getElementById('authPage');
802
+ const registerPage = document.getElementById('registerPage');
803
+ const homePage = document.getElementById('homePage');
804
+ const menuPage = document.getElementById('menuPage');
805
+ const ordersPage = document.getElementById('ordersPage');
806
+ const profilePage = document.getElementById('profilePage');
807
+ const qrPage = document.getElementById('qrPage');
808
+ const cartPage = document.getElementById('cartPage');
809
+ const checkoutPage = document.getElementById('checkoutPage');
810
+ const confirmationPage = document.getElementById('confirmationPage');
811
+
812
+ const loginBtn = document.getElementById('loginBtn');
813
+ const showRegister = document.getElementById('showRegister');
814
+ const backToLogin = document.getElementById('backToLogin');
815
+ const registerBtn = document.getElementById('registerBtn');
816
+ const logoutBtn = document.getElementById('logoutBtn');
817
+ const cartBtn = document.getElementById('cartBtn');
818
+ const checkoutBtn = document.getElementById('checkoutBtn');
819
+ const placeOrderBtn = document.getElementById('placeOrderBtn');
820
+ const backToHomeBtn = document.getElementById('backToHomeBtn');
821
+
822
+ const searchBtn = document.getElementById('searchBtn');
823
+ const searchBar = document.getElementById('searchBar');
824
+
825
+ const navBtns = document.querySelectorAll('.nav-btn');
826
+ const categoryBtns = document.querySelectorAll('.category-btn');
827
+ const addToCartBtns = document.querySelectorAll('.add-to-cart');
828
+
829
+ const cartItems = document.getElementById('cartItems');
830
+ const cartCount = document.getElementById('cartCount');
831
+ const cartSubtotal = document.getElementById('cartSubtotal');
832
+ const cartTotal = document.getElementById('cartTotal');
833
+
834
+ const checkoutItems = document.getElementById('checkoutItems');
835
+ const checkoutSubtotal = document.getElementById('checkoutSubtotal');
836
+ const checkoutTotal = document.getElementById('checkoutTotal');
837
+
838
+ // Menu Data
839
+ const menuData = [
840
+ { id: 1, name: "Classic Burger", description: "Juicy beef patty with cheese", price: 8.99, category: "burger", image: "https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1381&q=80" },
841
+ { id: 2, name: "Margherita Pizza", description: "Classic tomato and mozzarella", price: 12.99, category: "pizza", image: "https://images.unsplash.com/photo-1562059390-a761a084768e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1419&q=80" },
842
+ { id: 3, name: "Family Combo", description: "2 Pizzas + 2 Drinks + Fries", price: 28.79, category: "combo", image: "https://images.unsplash.com/photo-1601050690597-df0568f70950?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" },
843
+ { id: 4, name: "Pepperoni Pizza", description: "Spicy pepperoni with extra cheese", price: 14.99, category: "pizza", image: "https://images.unsplash.com/photo-1620374645498-af6bd681a0bd?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" },
844
+ { id: 5, name: "Cheeseburger", description: "Double beef patty with cheddar", price: 10.99, category: "burger", image: "https://images.unsplash.com/photo-1547584370-2cc978b4e2c5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" },
845
+ { id: 6, name: "Veggie Pizza", description: "Fresh vegetables on thin crust", price: 13.99, category: "pizza", image: "https://images.unsplash.com/photo-1595854341625-f33ee10dbf94?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80" },
846
+ { id: 7, name: "Chicken Wings", description: "Crispy wings with BBQ sauce", price: 9.99, category: "appetizer", image: "https://images.unsplash.com/photo-1567620832903-9fc6debc209f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1480&q=80" },
847
+ { id: 8, name: "Caesar Salad", description: "Fresh romaine with Caesar dressing", price: 7.99, category: "salad", image: "https://images.unsplash.com/photo-1546793665-c74683f339c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1374&q=80" },
848
+ { id: 9, name: "Soda", description: "Coke, Sprite or Fanta", price: 2.49, category: "drinks", image: "https://images.unsplash.com/photo-1554866585-cd94860890b7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1465&q=80" },
849
+ { id: 10, name: "Chocolate Brownie", description: "Warm with ice cream", price: 5.99, category: "dessert", image: "https://images.unsplash.com/photo-1564355808539-22fda35bed7e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1632&q=80" }
850
+ ];
851
+
852
+ // Cart Data
853
+ let cart = [];
854
+
855
+ // Current User
856
+ let currentUser = null;
857
+
858
+ // AI Assistant Responses
859
+ const aiResponses = {
860
+ "hours": "We're open from 10AM to 10PM Monday through Friday, and 11AM to 11PM on weekends.",
861
+ "delivery": "We offer delivery within a 5-mile radius with a $2.99 fee. Delivery time is typically 30-45 minutes.",
862
+ "vegetarian": "We have several vegetarian options including Margherita Pizza, Veggie Pizza, Caesar Salad, and more!",
863
+ "menu": "You can browse our full menu in the Menu section. We offer pizzas, burgers, salads, drinks and desserts.",
864
+ "payment": "We accept all major credit cards, PayPal, and cash on delivery.",
865
+ "default": "I'm sorry, I didn't understand that. You can ask about our hours, menu, delivery options, or payment methods."
866
+ };
867
+
868
+ // Initialize the app
869
+ function initApp() {
870
+ // Back from menu button
871
+ document.getElementById('backFromMenu').addEventListener('click', () => {
872
+ showPage('homePage');
873
+ });
874
+ // Fast scroll button
875
+ const fastScrollBtn = document.getElementById('fastScrollBtn');
876
+ window.addEventListener('scroll', () => {
877
+ if (window.scrollY > 300) {
878
+ fastScrollBtn.classList.remove('hidden');
879
+ } else {
880
+ fastScrollBtn.classList.add('hidden');
881
+ }
882
+ });
883
+
884
+ fastScrollBtn.addEventListener('click', () => {
885
+ window.scrollTo({ top: 0, behavior: 'smooth' });
886
+ });
887
+
888
+ // AI Assistant
889
+ document.getElementById('aiAssistantBtn').addEventListener('click', () => {
890
+ document.getElementById('aiAssistantModal').classList.remove('hidden');
891
+ });
892
+
893
+ document.getElementById('closeAIModal').addEventListener('click', () => {
894
+ document.getElementById('aiAssistantModal').classList.add('hidden');
895
+ });
896
+
897
+ document.getElementById('sendAI').addEventListener('click', processAIInput);
898
+
899
+ document.getElementById('aiInput').addEventListener('keypress', (e) => {
900
+ if (e.key === 'Enter') processAIInput();
901
+ });
902
+
903
+ document.querySelectorAll('.ai-quick-question').forEach(btn => {
904
+ btn.addEventListener('click', (e) => {
905
+ const question = e.target.textContent.toLowerCase();
906
+ document.getElementById('aiInput').value = question;
907
+ processAIInput();
908
+ });
909
+ });
910
+
911
+ // QR Generation
912
+ document.getElementById('qrGenerateBtn').addEventListener('click', () => {
913
+ showPage('qrPage');
914
+ });
915
+
916
+ // Initialize QRCode instance
917
+ let qrcode = new QRCode(document.getElementById("qrcode"), {
918
+ width: 180,
919
+ height: 180,
920
+ colorDark: "#000000",
921
+ colorLight: "#ffffff",
922
+ correctLevel: QRCode.CorrectLevel.H
923
+ });
924
+
925
+ // QR Generation
926
+ document.getElementById('generateQR').addEventListener('click', generateQRCode);
927
+
928
+ function generateQRCode() {
929
+ const qrText = document.getElementById('qrText').value.trim();
930
+ const qrContainer = document.getElementById('qrcode');
931
+
932
+ if (!qrText) {
933
+ alert('Please enter some text or URL');
934
+ return;
935
+ }
936
+
937
+ // Clear previous QR code
938
+ qrContainer.innerHTML = '';
939
+
940
+ try {
941
+ // Create new QRCode instance
942
+ qrcode = new QRCode(qrContainer, {
943
+ text: qrText,
944
+ width: 180,
945
+ height: 180,
946
+ colorDark: "#000000",
947
+ colorLight: "#ffffff",
948
+ correctLevel: QRCode.CorrectLevel.H
949
+ });
950
+ } catch (error) {
951
+ console.error(error);
952
+ qrContainer.innerHTML = '<p class="text-red-500">Error generating QR code</p>';
953
+ }
954
+ }
955
+
956
+
957
+ // Load menu items
958
+ loadMenuItems();
959
+
960
+ // Add click handlers for menu items
961
+ document.addEventListener('click', function(e) {
962
+ if (e.target.closest('.menu-item-detail')) {
963
+ e.preventDefault();
964
+ const itemId = parseInt(e.target.closest('.menu-item-detail').getAttribute('data-id'));
965
+ showItemDetail(itemId);
966
+ }
967
+ });
968
+
969
+ // Back from detail button
970
+ document.getElementById('backFromDetail').addEventListener('click', () => {
971
+ showPage('homePage');
972
+ });
973
+
974
+ // Item detail quantity controls
975
+ document.getElementById('increaseQty').addEventListener('click', () => {
976
+ const qtyEl = document.getElementById('itemQty');
977
+ let qty = parseInt(qtyEl.textContent);
978
+ qtyEl.textContent = qty + 1;
979
+ updateDetailTotalPrice();
980
+ });
981
+
982
+ document.getElementById('decreaseQty').addEventListener('click', () => {
983
+ const qtyEl = document.getElementById('itemQty');
984
+ let qty = parseInt(qtyEl.textContent);
985
+ if (qty > 1) {
986
+ qtyEl.textContent = qty - 1;
987
+ updateDetailTotalPrice();
988
+ }
989
+ });
990
+
991
+ // Add to cart from detail page
992
+ document.getElementById('addToCartDetail').addEventListener('click', addCurrentItemToCart);
993
+ }
994
+
995
+ // Show item detail
996
+ function showItemDetail(itemId) {
997
+ const item = menuData.find(i => i.id === itemId);
998
+ if (item) {
999
+ document.getElementById('detailImage').src = item.image;
1000
+ document.getElementById('detailName').textContent = item.name;
1001
+ document.getElementById('detailPrice').textContent = `${item.price.toFixed(2)}`;
1002
+ document.getElementById('detailDescription').textContent = item.description;
1003
+ document.getElementById('itemQty').textContent = '1';
1004
+ document.getElementById('detailTotalPrice').textContent = item.price.toFixed(2);
1005
+
1006
+ // Store current item data on button
1007
+ const addBtn = document.getElementById('addToCartDetail');
1008
+ addBtn.setAttribute('data-id', item.id);
1009
+ addBtn.setAttribute('data-name', item.name);
1010
+ addBtn.setAttribute('data-price', item.price);
1011
+
1012
+ showPage('itemDetailPage');
1013
+ }
1014
+ }
1015
+
1016
+ // Update total price in detail view
1017
+ function updateDetailTotalPrice() {
1018
+ const qty = parseInt(document.getElementById('itemQty').textContent);
1019
+ const price = parseFloat(document.getElementById('addToCartDetail').getAttribute('data-price'));
1020
+ document.getElementById('detailTotalPrice').textContent = (qty * price).toFixed(2);
1021
+ }
1022
+
1023
+ // Add current item to cart from detail view
1024
+ function addCurrentItemToCart() {
1025
+ const btn = document.getElementById('addToCartDetail');
1026
+ const id = parseInt(btn.getAttribute('data-id'));
1027
+ const name = btn.getAttribute('data-name');
1028
+ const price = parseFloat(btn.getAttribute('data-price'));
1029
+ const quantity = parseInt(document.getElementById('itemQty').textContent);
1030
+
1031
+ // Check if item already in cart
1032
+ const existingItem = cart.find(item => item.id === id);
1033
+
1034
+ if (existingItem) {
1035
+ existingItem.quantity += quantity;
1036
+ } else {
1037
+ cart.push({
1038
+ id,
1039
+ name,
1040
+ price,
1041
+ quantity
1042
+ });
1043
+ }
1044
+
1045
+ updateCart();
1046
+ showPage('cartPage');
1047
+
1048
+ // Show cart count
1049
+ cartCount.textContent = cart.reduce((total, item) => total + item.quantity, 0);
1050
+ cartCount.classList.remove('hidden');
1051
+ }
1052
+
1053
+ // Load menu items
1054
+ function loadMenuItems(filter = 'all') {
1055
+ const menuItemsContainer = document.getElementById('menuItems');
1056
+ menuItemsContainer.innerHTML = '';
1057
+
1058
+ const filteredItems = filter === 'all' ? menuData : menuData.filter(item => item.category === filter);
1059
+
1060
+ filteredItems.forEach(item => {
1061
+ const menuItem = document.createElement('a');
1062
+ menuItem.className = 'menu-item-detail menu-item bg-white rounded-lg overflow-hidden shadow-sm border block';
1063
+ menuItem.href = '#';
1064
+ menuItem.setAttribute('data-id', item.id);
1065
+ menuItem.innerHTML = `
1066
+ <img src="${item.image}" alt="${item.name}" class="w-full h-32 object-cover">
1067
+ <div class="p-3">
1068
+ <h3 class="font-medium">${item.name}</h3>
1069
+ <p class="text-sm text-gray-600 mb-2">${item.description}</p>
1070
+ <div class="flex justify-between items-center">
1071
+ <span class="font-bold text-red-600">$${item.price.toFixed(2)}</span>
1072
+ <button class="add-to-cart text-white bg-red-600 rounded-full w-8 h-8 flex items-center justify-center"
1073
+ data-id="${item.id}" data-name="${item.name}" data-price="${item.price}">
1074
+ <i class="fas fa-plus"></i>
1075
+ </button>
1076
+ </div>
1077
+ </div>
1078
+ `;
1079
+ menuItemsContainer.appendChild(menuItem);
1080
+ });
1081
+
1082
+ // Add event listeners to new add-to-cart buttons
1083
+ document.querySelectorAll('.add-to-cart').forEach(button => {
1084
+ button.addEventListener('click', addToCart);
1085
+ });
1086
+ }
1087
+
1088
+ // Add item to cart
1089
+ function addToCart(e) {
1090
+ const id = parseInt(e.target.closest('button').getAttribute('data-id'));
1091
+ const name = e.target.closest('button').getAttribute('data-name');
1092
+ const price = parseFloat(e.target.closest('button').getAttribute('data-price'));
1093
+
1094
+ // Check if item already in cart
1095
+ const existingItem = cart.find(item => item.id === id);
1096
+
1097
+ if (existingItem) {
1098
+ existingItem.quantity += 1;
1099
+ } else {
1100
+ cart.push({
1101
+ id,
1102
+ name,
1103
+ price,
1104
+ quantity: 1
1105
+ });
1106
+ }
1107
+
1108
+ updateCart();
1109
+
1110
+ // Show cart count
1111
+ cartCount.textContent = cart.reduce((total, item) => total + item.quantity, 0);
1112
+ cartCount.classList.remove('hidden');
1113
+
1114
+ // Add pulse animation to cart button
1115
+ cartBtn.classList.add('pulse-active');
1116
+ setTimeout(() => {
1117
+ cartBtn.classList.remove('pulse-active');
1118
+ }, 2000);
1119
+ }
1120
+
1121
+ // Update cart display
1122
+ function updateCart() {
1123
+ if (cart.length === 0) {
1124
+ cartItems.innerHTML = `
1125
+ <div class="text-center py-10 text-gray-500">
1126
+ <i class="fas fa-shopping-cart text-4xl mb-2"></i>
1127
+ <p>Your cart is empty</p>
1128
+ </div>
1129
+ `;
1130
+ cartCount.classList.add('hidden');
1131
+ } else {
1132
+ cartItems.innerHTML = '';
1133
+ cart.forEach(item => {
1134
+ const cartItem = document.createElement('div');
1135
+ cartItem.className = 'bg-white rounded-lg shadow-sm p-3 border flex items-center';
1136
+ cartItem.innerHTML = `
1137
+ <div class="flex-grow">
1138
+ <h3 class="font-medium">${item.name}</h3>
1139
+ <p class="text-sm text-gray-600">$${item.price.toFixed(2)}</p>
1140
+ </div>
1141
+ <div class="flex items-center">
1142
+ <button class="decrease-quantity text-gray-500 w-8 h-8 flex items-center justify-center border rounded-full" data-id="${item.id}">
1143
+ <i class="fas fa-minus text-xs"></i>
1144
+ </button>
1145
+ <span class="mx-2 w-6 text-center">${item.quantity}</span>
1146
+ <button class="increase-quantity text-red-600 w-8 h-8 flex items-center justify-center border rounded-full" data-id="${item.id}">
1147
+ <i class="fas fa-plus text-xs"></i>
1148
+ </button>
1149
+ </div>
1150
+ `;
1151
+ cartItems.appendChild(cartItem);
1152
+ });
1153
+
1154
+ // Add event listeners to quantity buttons
1155
+ document.querySelectorAll('.increase-quantity').forEach(button => {
1156
+ button.addEventListener('click', increaseQuantity);
1157
+ });
1158
+
1159
+ document.querySelectorAll('.decrease-quantity').forEach(button => {
1160
+ button.addEventListener('click', decreaseQuantity);
1161
+ });
1162
+ }
1163
+
1164
+ // Calculate totals
1165
+ const subtotal = cart.reduce((total, item) => total + (item.price * item.quantity), 0);
1166
+ const tax = subtotal * 0.08; // 8% tax
1167
+ const deliveryFee = 2.99;
1168
+ const total = subtotal + tax + deliveryFee;
1169
+
1170
+ cartSubtotal.textContent = `$${subtotal.toFixed(2)}`;
1171
+ document.getElementById('tax').textContent = `$${tax.toFixed(2)}`;
1172
+ cartTotal.textContent = `$${total.toFixed(2)}`;
1173
+
1174
+ // Update checkout totals
1175
+ updateCheckoutTotals();
1176
+ }
1177
+
1178
+ // Increase item quantity
1179
+ function increaseQuantity(e) {
1180
+ const id = parseInt(e.target.closest('button').getAttribute('data-id'));
1181
+ const item = cart.find(item => item.id === id);
1182
+
1183
+ if (item) {
1184
+ item.quantity += 1;
1185
+ updateCart();
1186
+ }
1187
+ }
1188
+
1189
+ // Decrease item quantity
1190
+ function decreaseQuantity(e) {
1191
+ const id = parseInt(e.target.closest('button').getAttribute('data-id'));
1192
+ const item = cart.find(item => item.id === id);
1193
+
1194
+ if (item) {
1195
+ if (item.quantity > 1) {
1196
+ item.quantity -= 1;
1197
+ } else {
1198
+ // Remove item if quantity is 1
1199
+ cart = cart.filter(item => item.id !== id);
1200
+ }
1201
+ updateCart();
1202
+ }
1203
+ }
1204
+
1205
+ // Process AI Input
1206
+ function processAIInput() {
1207
+ const input = document.getElementById('aiInput').value.toLowerCase();
1208
+ const chatContainer = document.getElementById('aiChat');
1209
+
1210
+ // Add user message
1211
+ const userMsg = document.createElement('div');
1212
+ userMsg.className = 'ai-message bg-blue-100 p-3 rounded-lg mb-3 ml-8';
1213
+ userMsg.innerHTML = `<p>${input}</p>`;
1214
+ chatContainer.appendChild(userMsg);
1215
+
1216
+ // Find response
1217
+ let response = aiResponses.default;
1218
+ for (const [key, value] of Object.entries(aiResponses)) {
1219
+ if (input.includes(key)) {
1220
+ response = value;
1221
+ break;
1222
+ }
1223
+ }
1224
+
1225
+ // Add AI response
1226
+ setTimeout(() => {
1227
+ const aiMsg = document.createElement('div');
1228
+ aiMsg.className = 'ai-message bg-gray-100 p-3 rounded-lg mb-3';
1229
+ aiMsg.innerHTML = `<p>${response}</p>`;
1230
+ chatContainer.appendChild(aiMsg);
1231
+ chatContainer.scrollTop = chatContainer.scrollHeight;
1232
+ }, 500);
1233
+
1234
+ document.getElementById('aiInput').value = '';
1235
+ document.getElementById('aiInput').focus();
1236
+ }
1237
+
1238
+ // Update checkout totals
1239
+ function updateCheckoutTotals() {
1240
+ const subtotal = cart.reduce((total, item) => total + (item.price * item.quantity), 0);
1241
+ const tax = subtotal * 0.08; // 8% tax
1242
+ const deliveryFee = 2.99;
1243
+ const total = subtotal + tax + deliveryFee;
1244
+
1245
+ checkoutSubtotal.textContent = `$${subtotal.toFixed(2)}`;
1246
+ document.getElementById('checkoutTax').textContent = `$${tax.toFixed(2)}`;
1247
+ document.getElementById('checkoutDelivery').textContent = `$${deliveryFee.toFixed(2)}`;
1248
+ checkoutTotal.textContent = `$${total.toFixed(2)}`;
1249
+
1250
+ // Update checkout items
1251
+ checkoutItems.innerHTML = '';
1252
+ cart.forEach(item => {
1253
+ const checkoutItem = document.createElement('div');
1254
+ checkoutItem.className = 'flex justify-between mb-2';
1255
+ checkoutItem.innerHTML = `
1256
+ <div>
1257
+ <p class="font-medium">${item.name} × ${item.quantity}</p>
1258
+ </div>
1259
+ <span>$${(item.price * item.quantity).toFixed(2)}</span>
1260
+ `;
1261
+ checkoutItems.appendChild(checkoutItem);
1262
+ });
1263
+ }
1264
+
1265
+ // Page history stack
1266
+ let pageHistory = ['authPage'];
1267
+
1268
+ // Show page function
1269
+ function showPage(pageId) {
1270
+ // Hide all pages
1271
+ document.querySelectorAll('.page').forEach(page => {
1272
+ page.classList.remove('active');
1273
+ page.classList.add('hidden');
1274
+ });
1275
+
1276
+ // Show selected page
1277
+ const page = document.getElementById(pageId);
1278
+ if (page) {
1279
+ page.classList.remove('hidden');
1280
+ page.classList.add('active');
1281
+ }
1282
+
1283
+ // Add to history if not going back
1284
+ if (pageHistory[pageHistory.length - 1] !== pageId) {
1285
+ pageHistory.push(pageId);
1286
+ }
1287
+
1288
+ // Update active nav button
1289
+ navBtns.forEach(btn => {
1290
+ if (btn.getAttribute('data-page') === pageId) {
1291
+ btn.classList.remove('text-gray-500');
1292
+ btn.classList.add('text-red-600');
1293
+ } else {
1294
+ btn.classList.remove('text-red-600');
1295
+ btn.classList.add('text-gray-500');
1296
+ }
1297
+ });
1298
+ }
1299
+
1300
+ // Event Listeners
1301
+ loginBtn.addEventListener('click', () => {
1302
+ const email = document.getElementById('email').value;
1303
+ const password = document.getElementById('password').value;
1304
+
1305
+ if (email && password) {
1306
+ currentUser = { email, name: "John Doe" };
1307
+ showPage('homePage');
1308
+ } else {
1309
+ alert('Please enter email and password');
1310
+ }
1311
+ });
1312
+
1313
+ showRegister.addEventListener('click', (e) => {
1314
+ e.preventDefault();
1315
+ showPage('registerPage');
1316
+ });
1317
+
1318
+ backToLogin.addEventListener('click', (e) => {
1319
+ e.preventDefault();
1320
+ showPage('authPage');
1321
+ });
1322
+
1323
+ registerBtn.addEventListener('click', () => {
1324
+ const name = document.getElementById('regName').value;
1325
+ const email = document.getElementById('regEmail').value;
1326
+ const password = document.getElementById('regPassword').value;
1327
+ const confirmPassword = document.getElementById('regConfirmPassword').value;
1328
+ const terms = document.getElementById('terms').checked;
1329
+
1330
+ if (!name || !email || !password || !confirmPassword) {
1331
+ alert('Please fill in all fields');
1332
+ return;
1333
+ }
1334
+
1335
+ if (password !== confirmPassword) {
1336
+ alert('Passwords do not match');
1337
+ return;
1338
+ }
1339
+
1340
+ if (!terms) {
1341
+ alert('Please agree to the terms and conditions');
1342
+ return;
1343
+ }
1344
+
1345
+ currentUser = { email, name };
1346
+ showPage('homePage');
1347
+ });
1348
+
1349
+ logoutBtn.addEventListener('click', () => {
1350
+ currentUser = null;
1351
+ cart = [];
1352
+ updateCart();
1353
+ showPage('authPage');
1354
+ });
1355
+
1356
+ cartBtn.addEventListener('click', () => {
1357
+ if (currentUser) {
1358
+ showPage('cartPage');
1359
+ } else {
1360
+ showPage('authPage');
1361
+ }
1362
+ });
1363
+
1364
+ checkoutBtn.addEventListener('click', () => {
1365
+ if (cart.length > 0) {
1366
+ showPage('checkoutPage');
1367
+ }
1368
+ });
1369
+
1370
+ placeOrderBtn.addEventListener('click', () => {
1371
+ if (cart.length > 0) {
1372
+ // In a real app, you would send the order to a server here
1373
+ const orderNumber = Math.floor(Math.random() * 90000) + 10000;
1374
+
1375
+ // Clear cart
1376
+ cart = [];
1377
+ updateCart();
1378
+
1379
+ // Show confirmation
1380
+ showPage('confirmationPage');
1381
+ }
1382
+ });
1383
+
1384
+ backToHomeBtn.addEventListener('click', () => {
1385
+ showPage('homePage');
1386
+ });
1387
+
1388
+ searchBtn.addEventListener('click', () => {
1389
+ searchBar.classList.toggle('hidden');
1390
+ });
1391
+
1392
+ // Navigation buttons
1393
+ navBtns.forEach(btn => {
1394
+ btn.addEventListener('click', () => {
1395
+ const pageId = btn.getAttribute('data-page');
1396
+ if (currentUser || pageId === 'authPage') {
1397
+ showPage(pageId);
1398
+ } else {
1399
+ showPage('authPage');
1400
+ }
1401
+ });
1402
+ });
1403
+
1404
+ // Category buttons
1405
+ categoryBtns.forEach(btn => {
1406
+ btn.addEventListener('click', () => {
1407
+ const category = btn.getAttribute('data-category');
1408
+ loadMenuItems(category);
1409
+ showPage('menuPage');
1410
+ });
1411
+ });
1412
+
1413
+ // Banner carousel
1414
+ let currentBanner = 0;
1415
+ const bannerCarousel = document.getElementById('bannerCarousel');
1416
+
1417
+ setInterval(() => {
1418
+ currentBanner = (currentBanner + 1) % 3;
1419
+ bannerCarousel.style.transform = `translateX(-${currentBanner * 100}%)`;
1420
+
1421
+ // Update indicators
1422
+ document.querySelectorAll('#bannerCarousel + div span').forEach((indicator, index) => {
1423
+ if (index === currentBanner) {
1424
+ indicator.classList.remove('opacity-50');
1425
+ } else {
1426
+ indicator.classList.add('opacity-50');
1427
+ }
1428
+ });
1429
+ }, 5000);
1430
+
1431
+ // Initialize the app
1432
+ window.addEventListener('DOMContentLoaded', initApp);
1433
+ </script>
1434
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Bozartify/mobile-1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1435
+ </html>