File size: 30,912 Bytes
b9f66b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="ar" 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=Tajawal:wght@400;500;700;900&display=swap');
        body {
            font-family: 'Tajawal', sans-serif;
        }
        .sidebar {
            transition: all 0.3s ease;
        }
        .sidebar.collapsed {
            width: 80px;
        }
        .sidebar.collapsed .sidebar-text {
            display: none;
        }
        .main-content {
            transition: all 0.3s ease;
        }
        .main-content.expanded {
            margin-right: 80px;
        }
        .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-800">
    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <div class="sidebar bg-blue-800 text-white w-64 flex flex-col">
            <!-- Logo -->
            <div class="p-4 flex items-center justify-between border-b border-blue-700">
                <div class="flex items-center">
                    <i class="fas fa-store text-2xl ml-2"></i>
                    <span class="sidebar-text text-xl font-bold">متجرنا الإلكتروني</span>
                </div>
                <button id="toggleSidebar" class="text-white focus:outline-none">
                    <i class="fas fa-bars"></i>
                </button>
            </div>
            
            <!-- User Profile -->
            <div class="p-4 flex items-center border-b border-blue-700">
                <img src="https://via.placeholder.com/40" alt="صورة المستخدم" class="rounded-full w-10 h-10">
                <div class="sidebar-text mr-3">
                    <p class="font-medium">محمد أحمد</p>
                    <p class="text-xs text-blue-200">مدير المتجر</p>
                </div>
            </div>
            
            <!-- Navigation -->
            <nav class="flex-1 overflow-y-auto">
                <ul>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-tachometer-alt ml-2"></i>
                            <span class="sidebar-text">لوحة التحكم</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 bg-blue-700 text-white">
                            <i class="fas fa-box-open ml-2"></i>
                            <span class="sidebar-text">المنتجات</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-shopping-cart ml-2"></i>
                            <span class="sidebar-text">الطلبات</span>
                            <span class="sidebar-text bg-blue-600 text-xs px-2 py-1 rounded-full mr-auto">15</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-users ml-2"></i>
                            <span class="sidebar-text">العملاء</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-chart-line ml-2"></i>
                            <span class="sidebar-text">التقارير</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-tags ml-2"></i>
                            <span class="sidebar-text">التخفيضات</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="flex items-center p-4 hover:bg-blue-700 text-blue-100">
                            <i class="fas fa-cog ml-2"></i>
                            <span class="sidebar-text">الإعدادات</span>
                        </a>
                    </li>
                </ul>
            </nav>
            
            <!-- Logout -->
            <div class="p-4 border-t border-blue-700">
                <a href="#" class="flex items-center text-blue-200 hover:text-white">
                    <i class="fas fa-sign-out-alt ml-2"></i>
                    <span class="sidebar-text">تسجيل الخروج</span>
                </a>
            </div>
        </div>
        
        <!-- Main Content -->
        <div class="main-content flex-1 overflow-auto">
            <!-- Header -->
            <header class="bg-white shadow-sm p-4 flex items-center justify-between">
                <h1 class="text-2xl font-bold text-gray-800">إدارة المنتجات</h1>
                
                <div class="flex items-center space-x-4 space-x-reverse">
                    <div class="relative">
                        <input type="text" placeholder="بحث..." class="border border-gray-300 rounded-lg py-2 px-4 pr-10 focus:outline-none focus:ring-2 focus:ring-blue-500">
                        <i class="fas fa-search absolute right-3 top-3 text-gray-400"></i>
                    </div>
                    
                    <div class="relative">
                        <button class="text-gray-600 hover:text-gray-800 focus:outline-none">
                            <i class="fas fa-bell text-xl"></i>
                            <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">3</span>
                        </button>
                    </div>
                </div>
            </header>
            
            <!-- Content -->
            <main class="p-6">
                <!-- Stats Cards -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="bg-white rounded-lg shadow p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">إجمالي المنتجات</p>
                                <h3 class="text-2xl font-bold">245</h3>
                            </div>
                            <div class="bg-blue-100 text-blue-600 p-3 rounded-full">
                                <i class="fas fa-box-open text-xl"></i>
                            </div>
                        </div>
                        <p class="text-green-500 text-sm mt-2"><i class="fas fa-arrow-up ml-1"></i> 12% عن الشهر الماضي</p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">الطلبات اليوم</p>
                                <h3 class="text-2xl font-bold">32</h3>
                            </div>
                            <div class="bg-green-100 text-green-600 p-3 rounded-full">
                                <i class="fas fa-shopping-cart text-xl"></i>
                            </div>
                        </div>
                        <p class="text-green-500 text-sm mt-2"><i class="fas fa-arrow-up ml-1"></i> 8% عن الأمس</p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">إجمالي المبيعات</p>
                                <h3 class="text-2xl font-bold">24,500 ر.س</h3>
                            </div>
                            <div class="bg-purple-100 text-purple-600 p-3 rounded-full">
                                <i class="fas fa-money-bill-wave text-xl"></i>
                            </div>
                        </div>
                        <p class="text-red-500 text-sm mt-2"><i class="fas fa-arrow-down ml-1"></i> 5% عن الشهر الماضي</p>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow p-6">
                        <div class="flex items-center justify-between">
                            <div>
                                <p class="text-gray-500">عملاء جدد</p>
                                <h3 class="text-2xl font-bold">18</h3>
                            </div>
                            <div class="bg-yellow-100 text-yellow-600 p-3 rounded-full">
                                <i class="fas fa-user-plus text-xl"></i>
                            </div>
                        </div>
                        <p class="text-green-500 text-sm mt-2"><i class="fas fa-arrow-up ml-1"></i> 20% عن الأسبوع الماضي</p>
                    </div>
                </div>
                
                <!-- Products Section -->
                <div class="bg-white rounded-lg shadow overflow-hidden mb-8">
                    <div class="p-6 border-b border-gray-200 flex items-center justify-between">
                        <h2 class="text-xl font-bold">قائمة المنتجات</h2>
                        <button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg flex items-center">
                            <i class="fas fa-plus ml-2"></i>
                            <span>إضافة منتج جديد</span>
                        </button>
                    </div>
                    
                    <div class="overflow-x-auto">
                        <table class="min-w-full divide-y divide-gray-200">
                            <thead class="bg-gray-50">
                                <tr>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">الصورة</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">اسم المنتج</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">السعر</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">الكمية</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">التصنيف</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">الحالة</th>
                                    <th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">الإجراءات</th>
                                </tr>
                            </thead>
                            <tbody class="bg-white divide-y divide-gray-200">
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <img src="https://via.placeholder.com/40" alt="صورة المنتج" class="w-10 h-10 rounded">
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm font-medium text-gray-900">هاتف سامسونج جالكسي S22</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">3,499 ر.س</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">45</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800">إلكترونيات</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">متوفر</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                        <button class="text-blue-600 hover:text-blue-900 ml-3"><i class="fas fa-edit"></i></button>
                                        <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash-alt"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <img src="https://via.placeholder.com/40" alt="صورة المنتج" class="w-10 h-10 rounded">
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm font-medium text-gray-900">حذاء رياضي نايكي</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">499 ر.س</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">32</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-purple-100 text-purple-800">أحذية</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">متوفر</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                        <button class="text-blue-600 hover:text-blue-900 ml-3"><i class="fas fa-edit"></i></button>
                                        <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash-alt"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <img src="https://via.placeholder.com/40" alt="صورة المنتج" class="w-10 h-10 rounded">
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm font-medium text-gray-900">ساعة ذكية هواوي</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">799 ر.س</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">0</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800">إلكترونيات</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">غير متوفر</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                        <button class="text-blue-600 hover:text-blue-900 ml-3"><i class="fas fa-edit"></i></button>
                                        <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash-alt"></i></button>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <img src="https://via.placeholder.com/40" alt="صورة المنتج" class="w-10 h-10 rounded">
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm font-medium text-gray-900">حقيبة ظهر</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">199 ر.س</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <div class="text-sm text-gray-900">15</div>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">أكسسوارات</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap">
                                        <span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">متوفر</span>
                                    </td>
                                    <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                        <button class="text-blue-600 hover:text-blue-900 ml-3"><i class="fas fa-edit"></i></button>
                                        <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash-alt"></i></button>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    
                    <div class="px-6 py-4 border-t border-gray-200 flex items-center justify-between">
                        <div class="text-sm text-gray-500">
                            عرض <span class="font-medium">1</span> إلى <span class="font-medium">4</span> من <span class="font-medium">245</span> منتج
                        </div>
                        <div class="flex space-x-2 space-x-reverse">
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                                السابق
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-white bg-blue-600 hover:bg-blue-700">
                                1
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                                2
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                                3
                            </button>
                            <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50">
                                التالي
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- Recent Orders -->
                <div class="bg-white rounded-lg shadow overflow-hidden">
                    <div class="p-6 border-b border-gray-200">
                        <h2 class="text-xl font-bold">أحدث الطلبات</h2>
                    </div>
                    
                    <div class="divide-y divide-gray-200">
                        <div class="p-4 flex items-center justify-between hover:bg-gray-50">
                            <div class="flex items-center">
                                <div class="bg-blue-100 text-blue-600 p-3 rounded-full">
                                    <i class="fas fa-shopping-cart"></i>
                                </div>
                                <div class="mr-4">
                                    <p class="font-medium">طلب #ORD-2023-0012</p>
                                    <p class="text-sm text-gray-500">محمد علي - 12/05/2023</p>
                                </div>
                            </div>
                            <div>
                                <span class="px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800">قيد المعالجة</span>
                                <span class="text-sm font-medium">1,250 ر.س</span>
                            </div>
                        </div>
                        
                        <div class="p-4 flex items-center justify-between hover:bg-gray-50">
                            <div class="flex items-center">
                                <div class="bg-green-100 text-green-600 p-3 rounded-full">
                                    <i class="fas fa-shopping-cart"></i>
                                </div>
                                <div class="mr-4">
                                    <p class="font-medium">طلب #ORD-2023-0011</p>
                                    <p class="text-sm text-gray-500">أحمد محمد - 11/05/2023</p>
                                </div>
                            </div>
                            <div>
                                <span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">مكتمل</span>
                                <span class="text-sm font-medium">899 ر.س</span>
                            </div>
                        </div>
                        
                        <div class="p-4 flex items-center justify-between hover:bg-gray-50">
                            <div class="flex items-center">
                                <div class="bg-purple-100 text-purple-600 p-3 rounded-full">
                                    <i class="fas fa-shopping-cart"></i>
                                </div>
                                <div class="mr-4">
                                    <p class="font-medium">طلب #ORD-2023-0010</p>
                                    <p class="text-sm text-gray-500">سارة خالد - 10/05/2023</p>
                                </div>
                            </div>
                            <div>
                                <span class="px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800">تم الشحن</span>
                                <span class="text-sm font-medium">2,450 ر.س</span>
                            </div>
                        </div>
                    </div>
                    
                    <div class="p-4 border-t border-gray-200 text-center">
                        <a href="#" class="text-blue-600 hover:text-blue-800 font-medium">عرض جميع الطلبات</a>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <!-- AI Assistant -->
    <div class="fixed bottom-6 left-6 z-50">
        <button id="toggleAssistant" class="bg-blue-600 text-white w-14 h-14 rounded-full shadow-lg hover:bg-blue-700 transition-all flex items-center justify-center">
            <i class="fas fa-robot text-2xl"></i>
        </button>
        <div id="assistantContainer" class="hidden bg-white rounded-lg shadow-xl w-80 h-96 mt-2 overflow-hidden flex flex-col">
            <div class="bg-blue-600 text-white p-3 flex items-center justify-between">
                <h3 class="font-bold">مساعد المتجر الذكي</h3>
                <button id="closeAssistant" class="text-white hover:text-blue-200">
                    <i class="fas fa-times"></i>
                </button>
            </div>
            <div id="assistantMessages" class="flex-1 p-4 overflow-y-auto bg-gray-50">
                <div class="mb-4">
                    <div class="bg-blue-100 text-gray-800 p-3 rounded-lg max-w-xs">
                        مرحبا! كيف يمكنني مساعدتك اليوم؟
                    </div>
                </div>
            </div>
            <div class="p-3 border-t border-gray-200">
                <div class="flex items-center">
                    <input type="text" id="assistantInput" placeholder="اكتب رسالتك..." class="flex-1 border border-gray-300 rounded-l-lg py-2 px-3 focus:outline-none focus:ring-1 focus:ring-blue-500">
                    <button id="sendMessage" class="bg-blue-600 text-white py-2 px-4 rounded-r-lg hover:bg-blue-700">
                        <i class="fas fa-paper-plane"></i>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Toggle sidebar
        document.getElementById('toggleSidebar').addEventListener('click', function() {
            const sidebar = document.querySelector('.sidebar');
            const mainContent = document.querySelector('.main-content');
            
            sidebar.classList.toggle('collapsed');
            mainContent.classList.toggle('expanded');
        });
        
        // Responsive adjustments
        function handleResize() {
            const sidebar = document.querySelector('.sidebar');
            const mainContent = document.querySelector('.main-content');
            
            if (window.innerWidth < 768) {
                sidebar.classList.add('collapsed');
                mainContent.classList.add('expanded');
            } else {
                sidebar.classList.remove('collapsed');
                mainContent.classList.remove('expanded');
            }
        }
        
        window.addEventListener('resize', handleResize);
        handleResize(); // Run on initial load

        // AI Assistant functionality
        const toggleAssistant = document.getElementById('toggleAssistant');
        const closeAssistant = document.getElementById('closeAssistant');
        const assistantContainer = document.getElementById('assistantContainer');
        const assistantInput = document.getElementById('assistantInput');
        const sendMessage = document.getElementById('sendMessage');
        const assistantMessages = document.getElementById('assistantMessages');

        toggleAssistant.addEventListener('click', () => {
            assistantContainer.classList.toggle('hidden');
        });

        closeAssistant.addEventListener('click', () => {
            assistantContainer.classList.add('hidden');
        });

        function addMessage(message, isUser = false) {
            const messageDiv = document.createElement('div');
            messageDiv.className = 'mb-4 flex ' + (isUser ? 'justify-end' : 'justify-start');
            
            const contentDiv = document.createElement('div');
            contentDiv.className = isUser 
                ? 'bg-blue-600 text-white p-3 rounded-lg max-w-xs'
                : 'bg-blue-100 text-gray-800 p-3 rounded-lg max-w-xs';
            contentDiv.textContent = message;
            
            messageDiv.appendChild(contentDiv);
            assistantMessages.appendChild(messageDiv);
            assistantMessages.scrollTop = assistantMessages.scrollHeight;
        }

        sendMessage.addEventListener('click', () => {
            const message = assistantInput.value.trim();
            if (message) {
                addMessage(message, true);
                assistantInput.value = '';
                
                // Simulate AI response after a short delay
                setTimeout(() => {
                    const responses = [
                        "لقد تلقيت طلبك وسأساعدك في ذلك",
                        "هل يمكنك توضيح سؤالك أكثر؟",
                        "لدي هذه المعلومات المتاحة لك...",
                        "سأقوم بالبحث عن ذلك من أجلك"
                    ];
                    const randomResponse = responses[Math.floor(Math.random() * responses.length)];
                    addMessage(randomResponse);
                }, 1000);
            }
        });

        assistantInput.addEventListener('keypress', (e) => {
            if (e.key === 'Enter') {
                sendMessage.click();
            }
        });
    </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=muflhi001/my-store" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>