Spaces:
Running

File size: 25,600 Bytes
3390439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27a11b9
 
d7355b2
27a11b9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3390439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>הקו הלבן | הזמנה דיסקרטית</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');
        
        body {
            font-family: 'Arial', sans-serif;
            background-color: #000;
            color: #fff;
        }
        
        .hebrew-font {
            font-family: 'Arial Hebrew', Arial, sans-serif;
        }
        
        .latin-font {
            font-family: 'Playfair Display', serif;
        }
        
        .gold-text {
            color: #FFD700;
            text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
        }
        
        .neon-glow {
            box-shadow: 0 0 10px rgba(0, 191, 255, 0.7);
        }
        
        .neon-glow:hover {
            box-shadow: 0 0 20px rgba(0, 191, 255, 0.9);
        }
        
        .product-card {
            border: 1px solid #4b5563;
            transition: all 0.3s ease;
        }
        
        .product-card:hover {
            border-color: #60a5fa;
            transform: translateY(-5px);
        }
        
        .btn-primary {
            background: linear-gradient(135deg, #8B0000 0%, #4B0082 100%);
            border: 1px solid #1E90FF;
        }
        
        .btn-primary:hover {
            background: linear-gradient(135deg, #A52A2A 0%, #6A5ACD 100%);
        }
        
        .modal-overlay {
            background-color: rgba(0, 0, 0, 0.8);
        }
        
        .cart-modal {
            border: 1px solid #FFD700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }
        
        @keyframes pulse {
            0% { box-shadow: 0 0 5px rgba(0, 191, 255, 0.7); }
            50% { box-shadow: 0 0 20px rgba(0, 191, 255, 0.9); }
            100% { box-shadow: 0 0 5px rgba(0, 191, 255, 0.7); }
        }
        
        .pulse-animation {
            animation: pulse 2s infinite;
        }
    </style>
</head>
<body class="hebrew-font">
    <!-- Header Section -->
    <header class="py-8 px-4 text-center">
        <h1 class="text-4xl md:text-5xl latin-font gold-text mb-4">הקו הלבן</h1>
        <p class="text-xl text-gray-300 mb-8">דייסקרטיות. איכות. שליטה.</p>
        <button id="startOrderBtn" class="btn-primary text-white font-bold py-3 px-8 rounded-full neon-glow pulse-animation text-lg">
            התחל הזממנה
        </button>
    </header>

    <!-- Main Content -->
    <main class="container mx-auto px-4 pb-20">
        <!-- Product Categories -->
        <section id="productCategories" class="hidden">
            <h2 class="text-2xl latin-font gold-text mb-6 text-center">בחר קטגוריה</h2>
            
            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                <!-- Cocaine -->
                <div class="product-card p-6 rounded-lg bg-gray-900">
                    <h3 class="text-xl latin-font gold-text mb-4">קוקוקאין</h3>
                    <div class="grid grid-cols-1 gap-3">
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="קוקאין" data-amount="1 גרם" data-price="600">
                            1 גרם – ₪600
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="קוקאין" data-amount="3 גרם" data-price="1500">
                            3 גרם –  ₪1500
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="קוקוקאין" data-amount="5 גרם" data-price="2200">
                            5 גרם – ₪2200
                        </button>
                    </div>
                </div>
                
                <!-- Cooked -->
                <div class="product-card p-6 rounded-lg bg-gray-900">
                    <h3 class="text-xl latin-font gold-text mb-4">מבושל</h3>
                    <div class="grid grid-cols-1 gap-3">
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="ממבושל" data-amount="1 יחידה" data-price="600">
                            1 יחידה –  ₪600
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="ממבושל" data-amount="2 יחידות" data-price="1100">
                            2 יחידות –  ₪1100
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="מבושל" data-amount="5 יחידות" data-price="2200">
                            5 יחידות – ₪2200
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="ממבושל" data-amount="10 יחידות" data-price="4000">
                            10 יחידות –  ₪4000
                        </button>
                    </div>
                </div>
                
                <!-- Dosa -->
                <div class="product-card p-6 rounded-lg bg-gray-900">
                    <h3 class="text-xl latin-font gold-text mb-4">דוסה (פסיכדליים)</h3>
                    <div class="grid grid-cols-1 gap-3">
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דוסה" data-amount="2 יחידות" data-price="500">
                            2 יחידות – ₪500
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דוסה" data-amount="5 יחידות" data-price="1000">
                            5 יחידות –  ₪1000
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דוסה" data-amount="10 יחידות" data-price="1600">
                            10 יחידות –  ₪1600
                        </button>
                    </div>
                </div>
                
                <!-- Doctor -->
                <div class="product-card p-6 rounded-lg bg-gray-900">
                    <h3 class="text-xl latin-font gold-text mb-4">דווקטור</h3>
                    <div class="grid grid-cols-1 gap-3">
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דוקטור" data-amount="2 יחידות" data-price="500">
                            2 יחידות – ₪500
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דווקטור" data-amount="5 יחידות" data-price="1000">
                            5 יחידות – ₪1000
                        </button>
                        <button class="product-btn bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded border border-blue-400 neon-glow" 
                                data-product="דוקטור" data-amount="10 יחידות" data-price="1600">
                            10 יחידות –  ₪1600
                        </button>
                    </div>
                </div>
            </div>
        </section>
        
        <!-- Order Form (Hidden by default) -->
        <section id="orderForm" class="hidden max-w-md mx-auto">
            <h2 class="text-2xl latin-font gold-text mb-6 text-center">פרטי הזמנה</h2>
            
            <form id="checkoutForm" class="space-y-4">
                <div>
                    <label for="fullName" class="block text-gray-300 mb-2">שם מלא</label>
                    <input type="text" id="fullName" required class="w-full bg-gray-800 border border-gray-700 rounded py-2 px-4 text-white focus:outline-none focus:border-blue-400">
                </div>
                
                <div>
                    <label for="phone" class="block text-gray-300 mb-2">טלפון</label>
                    <input type="tel" id="phone" required class="w-full bg-gray-800 border border-gray-700 rounded py-2 px-4 text-white focus:outline-none focus:border-blue-400" placeholder="05X-XXXXXXX">
                </div>
                
                <div>
                    <label for="address" class="block text-gray-300 mb-2">כתובת</label>
                    <input type="text" id="address" required class="w-full bg-gray-800 border border-gray-700 rounded py-2 px-4 text-white focus:outline-none focus:border-blue-400" placeholder="לדוגמה: תל אביב - מזרח">
                </div>
                
                <div>
                    <p class="block text-gray-300 mb-2">העדפת תקשורת</p>
                    <div class="flex space-x-4 space-x-reverse">
                        <div class="flex items-center">
                            <input type="radio" id="telegram" name="communication" value="telegram" checked class="mr-2">
                            <label for="telegram" class="text-gray-300">טלגרם</label>
                        </div>
                        <div class="flex items-center">
                            <input type="radio" id="whatsapp" name="communication" value="whatsapp" class="mr-2">
                            <label for="whatsapp" class="text-gray-300">וואטסאפ</label>
                        </div>
                    </div>
                </div>
                
                <div class="pt-4">
                    <button type="submit" class="btn-primary w-full text-white font-bold py-3 px-4 rounded neon-glow">
                        שלח הזממנה
                    </button>
                </div>
            </form>
        </section>
    </main>

    <!-- Floating Cart Button -->
    <button id="cartBtn" class="fixed bottom-6 left-6 bg-gray-900 text-white p-4 rounded-full border border-blue-400 neon-glow hidden">
        <i class="fas fa-shopping-cart text-xl"></i>
        <span id="cartCount" class="absolute -top-2 -right-2 bg-red-500 text-white text-xs font-bold rounded-full h-6 w-6 flex items-center justify-center">0</span>
    </button>

    <!-- Cart Modal -->
    <div id="cartModal" class="fixed inset-0 z-50 flex items-center justify-center modal-overlay hidden">
        <div class="cart-modal bg-gray-900 rounded-lg p-6 w-full max-w-md mx-4">
            <div class="flex justify-between items-center mb-4">
                <h3 class="text-xl latin-font gold-text">עגלת קניות</h3>
                <button id="closeCartBtn" class="text-gray-400 hover:text-white">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            
            <div id="cartItems" class="max-h-96 overflow-y-auto mb-4">
                <!-- Cart items will be added here dynamically -->
                <p id="emptyCartMsg" class="text-gray-400 text-center py-4">העגלה ריקה</p>
            </div>
            
            <div class="border-t border-gray-700 pt-4">
                <div class="flex justify-between mb-4">
                    <span class="text-gray-300">סה"כ:</span>
                    <span id="cartTotal" class="text-xl gold-text">₪0</span>
                </div>
                
                <button id="checkoutBtn" class="btn-primary w-full text-white font-bold py-2 px-4 rounded neon-glow">
                    המשך להזמנה
                </button>
            </div>
        </div>
    </div>

    <!-- Success Modal -->
    <div id="successModal" class="fixed inset-0 z-50 flex items-center justify-center modal-overlay hidden">
        <div class="bg-gray-900 rounded-lg p-6 w-full max-w-md mx-4 text-center border border-green-500">
            <div class="text-green-500 text-5xl mb-4">
                <i class="fas fa-check-circle"></i>
            </div>
            <h3 class="text-xl latin-font gold-text mb-2">ההזמנה נשלחה בהצלחה!</h3>
            <p class="text-gray-300 mb-4">ניצור איתך קשר בהקדם דרך הערוץ שבחרת.</p>
            <p id="contactLink" class="text-blue-400 mb-4"></p>
            <button id="closeSuccessModal" class="bg-gray-800 hover:bg-gray-700 text-white py-2 px-6 rounded border border-blue-400 neon-glow">
                ס סגור
            </button>
        </div>
    </div>

    <script>
        // Cart functionality
        let cart = [];
        
        // DOM Elements
        const startOrderBtn = document.getElementById('startOrderBtn');
        const productCategories = document.getElementById('productCategories');
        const orderForm = document.getElementById('orderForm');
        const cartBtn = document.getElementById('cartBtn');
        const cartCount = document.getElementById('cartCount');
        const cartModal = document.getElementById('cartModal');
        const closeCartBtn = document.getElementById('closeCartBtn');
        const cartItems = document.getElementById('cartItems');
        const emptyCartMsg = document.getElementById('emptyCartMsg');
        const cartTotal = document.getElementById('cartTotal');
        const checkoutBtn = document.getElementById('checkoutBtn');
        const checkoutForm = document.getElementById('checkoutForm');
        const successModal = document.getElementById('successModal');
        const closeSuccessModal = document.getElementById('closeSuccessModal');
        const contactLink = document.getElementById('contactLink');
        
        // Product buttons
        const productBtns = document.querySelectorAll('.product-btn');
        
        // Event Listeners
        startOrderBtn.addEventListener('click', () => {
            productCategories.classList.remove('hidden');
            startOrderBtn.classList.add('hidden');
            cartBtn.classList.remove('hidden');
        });
        
        cartBtn.addEventListener('click', () => {
            cartModal.classList.remove('hidden');
            updateCartModal();
        });
        
        closeCartBtn.addEventListener('click', () => {
            cartModal.classList.add('hidden');
        });
        
        checkoutBtn.addEventListener('click', () => {
            cartModal.classList.add('hidden');
            productCategories.classList.add('hidden');
            orderForm.classList.remove('hidden');
        });
        
        closeSuccessModal.addEventListener('click', () => {
            successModal.classList.add('hidden');
            // Reset the flow
            orderForm.classList.add('hidden');
            productCategories.classList.add('hidden');
            startOrderBtn.classList.remove('hidden');
            cart = [];
            updateCart();
        });
        
        // Add products to cart
        productBtns.forEach(btn => {
            btn.addEventListener('click', () => {
                const product = btn.dataset.product;
                const amount = btn.dataset.amount;
                const price = parseInt(btn.dataset.price);
                
                // Check if product already exists in cart
                const existingItem = cart.find(item => 
                    item.product === product && item.amount === amount
                );
                
                if (existingItem) {
                    existingItem.quantity += 1;
                } else {
                    cart.push({
                        product,
                        amount,
                        price,
                        quantity: 1
                    });
                }
                
                updateCart();
                // Show cart modal when adding first item
                if (cart.length === 1) {
                    cartModal.classList.remove('hidden');
                    updateCartModal();
                }
            });
        });
        
        // Form submission
        checkoutForm.addEventListener('submit', (e) => {
            e.preventDefault();
            
            const fullName = document.getElementById('fullName').value;
            const phone = document.getElementById('phone').value;
            const address = document.getElementById('address').value;
            const communication = document.querySelector('input[name="communication"]:checked').value;
            
            // Validate phone number (simple Israeli format check)
            if (!/^05\d-?\d{7}$/.test(phone)) {
                alert('מספר הטלפון אינו תקין. אנ אנא הזן מספר ישראלי תקין (לדוגמה: 052-1234567)');
                return;
            }
            
            // Format phone for links
            const formattedPhone = phone.replace(/-/g, '');
            const internationalPhone = `972${formattedPhone.substring(1)}`;
            
            // Generate order message
            let orderMessage = `📥 הזמנה חדשה\n\n`;
            orderMessage += `שם: ${fullName}\n`;
            orderMessage += `טללפון: ${phone}\n`;
            orderMessage += `כתוובת: ${address}\n\n`;
            orderMessage += `🧾 מו מוצרים:\n`;
            
            cart.forEach(item => {
                orderMessage += `- ${item.product} ${item.amount} –  ₪${item.price * item.quantity}\n`;
            });
            
            const total = cart.reduce((sum, item) => sum + (item.price * item.quantity), 0);
            orderMessage += `\nסה"כ לת לתשלום:  ₪${total}\n`;
            orderMessage += `ההעדפה: ${communication === 'telegram' ? 'טלגרם' : 'וואטסאפ'}\n`;
            
            // Generate contact link based on preference
            let link;
            if (communication === 'telegram') {
                link = `https://t.me/+${internationalPhone}`;
                orderMessage += `קישור: ${link}`;
            } else {
                link = `https://wa.me/${internationalPhone}`;
                orderMessage += `קישור: ${link}`;
            }
            
            // Send order to Telegram bot
            const botToken = '7843978096:AAEUFbN50jDn0k1IJErqYmZ9hM22L8J3woc';
            const chatId = '4943695366'; // Your chat ID
            const telegramUrl = `https://api.telegram.org/bot${botToken}/sendMessage`;
            
            fetch(telegramUrl, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify({
                    chat_id: chatId,
                    text: orderMessage
                })
            })
            .then(response => response.json())
            .then(data => {
                console.log('Message sent to Telegram:', data);
            })
            .catch(error => {
                console.error('Error sending to Telegram:', error);
            });
            
            // Show success message with appropriate contact link
            contactLink.innerHTML = communication === 'telegram' 
                ? `ללחץ <a href="${link}" target="_blank" class="underline">ככאן</a> כדי ל לפתוח את הטלגרם` 
                : `לחץ <a href="${link}" target="_blank" class="underline">ככאן</a> כדי ל לפתוח את הוואואטסאפ`;
            
            orderForm.classList.add('hidden');
            successModal.classList.remove('hidden');
        });
        
        // Update cart count
        function updateCart() {
            const totalItems = cart.reduce((sum, item) => sum + item.quantity, 0);
            cartCount.textContent = totalItems;
            
            if (totalItems > 0) {
                cartBtn.classList.remove('hidden');
            } else {
                cartBtn.classList.add('hidden');
            }
        }
        
        // Update cart modal content
        function updateCartModal() {
            if (cart.length === 0) {
                emptyCartMsg.classList.remove('hidden');
                cartItems.innerHTML = '';
                cartTotal.textContent = '₪0';
                checkoutBtn.disabled = true;
                return;
            }
            
            emptyCartMsg.classList.add('hidden');
            checkoutBtn.disabled = false;
            
            let itemsHTML = '';
            let total = 0;
            
            cart.forEach((item, index) => {
                const itemTotal = item.price * item.quantity;
                total += itemTotal;
                
                itemsHTML += `
                    <div class="flex justify-between items-center py-3 border-b border-gray-800">
                        <div>
                            <h4 class="text-gray-200">${item.product} ${item.amount}</h4>
                            <p class="text-gray-400 text-sm">₪${item.price} ליחידה</p>
                        </div>
                        <div class="flex items-center">
                            <button class="decrease-btn text-gray-400 hover:text-white px-2" data-index="${index}">
                                <i class="fas fa-minus"></i>
                            </button>
                            <span class="mx-2 text-gray-200">${item.quantity}</span>
                            <button class="increase-btn text-gray-400 hover:text-white px-2" data-index="${index}">
                                <i class="fas fa-plus"></i>
                            </button>
                            <span class="ml-4 text-gray-200 w-16 text-right">₪${itemTotal}</span>
                            <button class="remove-btn text-red-400 hover:text-red-300 ml-2" data-index="${index}">
                                <i class="fas fa-trash"></i>
                            </button>
                        </div>
                    </div>
                `;
            });
            
            cartItems.innerHTML = itemsHTML;
            cartTotal.textContent = `₪${total}`;
            
            // Add event listeners to the new buttons
            document.querySelectorAll('.decrease-btn').forEach(btn => {
                btn.addEventListener('click', (e) => {
                    const index = parseInt(e.target.closest('button').dataset.index);
                    if (cart[index].quantity > 1) {
                        cart[index].quantity -= 1;
                    } else {
                        cart.splice(index, 1);
                    }
                    updateCart();
                    updateCartModal();
                });
            });
            
            document.querySelectorAll('.increase-btn').forEach(btn => {
                btn.addEventListener('click', (e) => {
                    const index = parseInt(e.target.closest('button').dataset.index);
                    cart[index].quantity += 1;
                    updateCart();
                    updateCartModal();
                });
            });
            
            document.querySelectorAll('.remove-btn').forEach(btn => {
                btn.addEventListener('click', (e) => {
                    const index = parseInt(e.target.closest('button').dataset.index);
                    cart.splice(index, 1);
                    updateCart();
                    updateCartModal();
                });
            });
        }
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=dr770/ddddd" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>