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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fa" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>دیجیشاپ | فروشگاه مدرن</title>
|
| 7 |
+
<!-- Fonts -->
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
|
| 9 |
+
<!-- Icons -->
|
| 10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 11 |
+
|
| 12 |
+
<style>
|
| 13 |
+
:root {
|
| 14 |
+
--bg-dark: #121212;
|
| 15 |
+
--bg-card: #1e1e1e;
|
| 16 |
+
--bg-input: #2c2c2c;
|
| 17 |
+
--primary: #ff9800; /* Orange Accent */
|
| 18 |
+
--primary-hover: #e68900;
|
| 19 |
+
--text-main: #ffffff;
|
| 20 |
+
--text-sec: #b0b0b0;
|
| 21 |
+
--danger: #ff5252;
|
| 22 |
+
--success: #4caf50;
|
| 23 |
+
--border: #333;
|
| 24 |
+
--shadow: 0 4px 6px rgba(0,0,0,0.3);
|
| 25 |
+
--radius: 12px;
|
| 26 |
+
--header-height: 60px;
|
| 27 |
+
--nav-height: 65px;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
* {
|
| 31 |
+
box-sizing: border-box;
|
| 32 |
+
margin: 0;
|
| 33 |
+
padding: 0;
|
| 34 |
+
-webkit-tap-highlight-color: transparent;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
font-family: 'Vazirmatn', sans-serif;
|
| 39 |
+
background-color: var(--bg-dark);
|
| 40 |
+
color: var(--text-main);
|
| 41 |
+
overflow-x: hidden;
|
| 42 |
+
padding-bottom: calc(var(--nav-height) + 20px);
|
| 43 |
+
padding-top: var(--header-height);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
/* --- Utilities --- */
|
| 47 |
+
.hidden { display: none !important; }
|
| 48 |
+
.flex { display: flex; }
|
| 49 |
+
.flex-col { flex-direction: column; }
|
| 50 |
+
.items-center { align-items: center; }
|
| 51 |
+
.justify-between { justify-content: space-between; }
|
| 52 |
+
.justify-center { justify-content: center; }
|
| 53 |
+
.gap-1 { gap: 0.5rem; }
|
| 54 |
+
.gap-2 { gap: 1rem; }
|
| 55 |
+
.text-sm { font-size: 0.875rem; }
|
| 56 |
+
.text-xs { font-size: 0.75rem; }
|
| 57 |
+
.text-primary { color: var(--primary); }
|
| 58 |
+
.font-bold { font-weight: 700; }
|
| 59 |
+
.w-full { width: 100%; }
|
| 60 |
+
.h-full { height: 100%; }
|
| 61 |
+
|
| 62 |
+
/* --- Scrollbar --- */
|
| 63 |
+
::-webkit-scrollbar { width: 6px; }
|
| 64 |
+
::-webkit-scrollbar-track { background: var(--bg-dark); }
|
| 65 |
+
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
| 66 |
+
|
| 67 |
+
/* --- Header --- */
|
| 68 |
+
header {
|
| 69 |
+
position: fixed;
|
| 70 |
+
top: 0;
|
| 71 |
+
left: 0;
|
| 72 |
+
right: 0;
|
| 73 |
+
height: var(--header-height);
|
| 74 |
+
background: rgba(18, 18, 18, 0.95);
|
| 75 |
+
backdrop-filter: blur(10px);
|
| 76 |
+
border-bottom: 1px solid var(--border);
|
| 77 |
+
z-index: 100;
|
| 78 |
+
padding: 0 15px;
|
| 79 |
+
display: flex;
|
| 80 |
+
align-items: center;
|
| 81 |
+
justify-content: space-between;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.brand {
|
| 85 |
+
font-size: 1.2rem;
|
| 86 |
+
font-weight: 900;
|
| 87 |
+
color: var(--primary);
|
| 88 |
+
text-decoration: none;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.search-container {
|
| 92 |
+
flex: 1;
|
| 93 |
+
margin: 0 15px;
|
| 94 |
+
position: relative;
|
| 95 |
+
max-width: 500px;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
.search-input {
|
| 99 |
+
width: 100%;
|
| 100 |
+
background: var(--bg-input);
|
| 101 |
+
border: 1px solid var(--border);
|
| 102 |
+
border-radius: 20px;
|
| 103 |
+
padding: 8px 15px 8px 35px;
|
| 104 |
+
color: var(--text-main);
|
| 105 |
+
font-family: inherit;
|
| 106 |
+
outline: none;
|
| 107 |
+
transition: 0.3s;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.search-input:focus { border-color: var(--primary); }
|
| 111 |
+
.search-icon {
|
| 112 |
+
position: absolute;
|
| 113 |
+
right: 12px;
|
| 114 |
+
top: 50%;
|
| 115 |
+
transform: translateY(-50%);
|
| 116 |
+
color: var(--text-sec);
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.search-history {
|
| 120 |
+
position: absolute;
|
| 121 |
+
top: 100%;
|
| 122 |
+
right: 0;
|
| 123 |
+
width: 100%;
|
| 124 |
+
background: var(--bg-card);
|
| 125 |
+
border: 1px solid var(--border);
|
| 126 |
+
border-radius: var(--radius);
|
| 127 |
+
margin-top: 5px;
|
| 128 |
+
max-height: 200px;
|
| 129 |
+
overflow-y: auto;
|
| 130 |
+
z-index: 101;
|
| 131 |
+
display: none;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
.search-history.active { display: block; }
|
| 135 |
+
.history-item {
|
| 136 |
+
padding: 10px;
|
| 137 |
+
border-bottom: 1px solid var(--border);
|
| 138 |
+
cursor: pointer;
|
| 139 |
+
font-size: 0.9rem;
|
| 140 |
+
}
|
| 141 |
+
.history-item:hover { background: rgba(255,255,255,0.05); }
|
| 142 |
+
|
| 143 |
+
.profile-btn {
|
| 144 |
+
width: 35px;
|
| 145 |
+
height: 35px;
|
| 146 |
+
border-radius: 50%;
|
| 147 |
+
overflow: hidden;
|
| 148 |
+
border: 2px solid var(--primary);
|
| 149 |
+
cursor: pointer;
|
| 150 |
+
position: relative;
|
| 151 |
+
}
|
| 152 |
+
.profile-btn img { width: 100%; height: 100%; object-fit: cover; }
|
| 153 |
+
|
| 154 |
+
.user-menu {
|
| 155 |
+
position: absolute;
|
| 156 |
+
top: 50px;
|
| 157 |
+
left: 10px;
|
| 158 |
+
background: var(--bg-card);
|
| 159 |
+
border: 1px solid var(--border);
|
| 160 |
+
border-radius: var(--radius);
|
| 161 |
+
width: 200px;
|
| 162 |
+
padding: 10px 0;
|
| 163 |
+
display: none;
|
| 164 |
+
z-index: 101;
|
| 165 |
+
box-shadow: var(--shadow);
|
| 166 |
+
}
|
| 167 |
+
.user-menu.active { display: block; }
|
| 168 |
+
.menu-item {
|
| 169 |
+
padding: 10px 15px;
|
| 170 |
+
display: flex;
|
| 171 |
+
align-items: center;
|
| 172 |
+
gap: 10px;
|
| 173 |
+
color: var(--text-main);
|
| 174 |
+
text-decoration: none;
|
| 175 |
+
cursor: pointer;
|
| 176 |
+
transition: 0.2s;
|
| 177 |
+
}
|
| 178 |
+
.menu-item:hover { background: rgba(255,255,255,0.05); }
|
| 179 |
+
|
| 180 |
+
/* --- Main Content --- */
|
| 181 |
+
main {
|
| 182 |
+
padding: 15px;
|
| 183 |
+
max-width: 1200px;
|
| 184 |
+
margin: 0 auto;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/* Stories */
|
| 188 |
+
.stories-container {
|
| 189 |
+
display: flex;
|
| 190 |
+
gap: 15px;
|
| 191 |
+
overflow-x: auto;
|
| 192 |
+
padding: 10px 0;
|
| 193 |
+
margin-bottom: 20px;
|
| 194 |
+
}
|
| 195 |
+
.story-item {
|
| 196 |
+
display: flex;
|
| 197 |
+
flex-direction: column;
|
| 198 |
+
align-items: center;
|
| 199 |
+
cursor: pointer;
|
| 200 |
+
min-width: 70px;
|
| 201 |
+
}
|
| 202 |
+
.story-ring {
|
| 203 |
+
width: 65px;
|
| 204 |
+
height: 65px;
|
| 205 |
+
border-radius: 50%;
|
| 206 |
+
padding: 3px;
|
| 207 |
+
background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
|
| 208 |
+
margin-bottom: 5px;
|
| 209 |
+
}
|
| 210 |
+
.story-img {
|
| 211 |
+
width: 100%;
|
| 212 |
+
height: 100%;
|
| 213 |
+
border-radius: 50%;
|
| 214 |
+
border: 2px solid var(--bg-dark);
|
| 215 |
+
object-fit: cover;
|
| 216 |
+
}
|
| 217 |
+
.story-name { font-size: 0.75rem; color: var(--text-sec); text-align: center; }
|
| 218 |
+
|
| 219 |
+
/* Chips */
|
| 220 |
+
.chips-container {
|
| 221 |
+
display: flex;
|
| 222 |
+
gap: 10px;
|
| 223 |
+
overflow-x: auto;
|
| 224 |
+
margin-bottom: 20px;
|
| 225 |
+
padding-bottom: 5px;
|
| 226 |
+
}
|
| 227 |
+
.chip {
|
| 228 |
+
background: var(--bg-card);
|
| 229 |
+
border: 1px solid var(--border);
|
| 230 |
+
padding: 8px 16px;
|
| 231 |
+
border-radius: 20px;
|
| 232 |
+
font-size: 0.9rem;
|
| 233 |
+
white-space: nowrap;
|
| 234 |
+
cursor: pointer;
|
| 235 |
+
transition: 0.3s;
|
| 236 |
+
}
|
| 237 |
+
.chip.active { background: var(--primary); color: #000; border-color: var(--primary); }
|
| 238 |
+
|
| 239 |
+
/* Product Grid */
|
| 240 |
+
.grid-products {
|
| 241 |
+
display: grid;
|
| 242 |
+
grid-template-columns: repeat(2, 1fr);
|
| 243 |
+
gap: 15px;
|
| 244 |
+
}
|
| 245 |
+
@media (min-width: 768px) {
|
| 246 |
+
.grid-products { grid-template-columns: repeat(4, 1fr); }
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.product-card {
|
| 250 |
+
background: var(--bg-card);
|
| 251 |
+
border-radius: var(--radius);
|
| 252 |
+
overflow: hidden;
|
| 253 |
+
position: relative;
|
| 254 |
+
transition: transform 0.2s;
|
| 255 |
+
border: 1px solid transparent;
|
| 256 |
+
}
|
| 257 |
+
.product-card:hover { border-color: var(--primary); }
|
| 258 |
+
|
| 259 |
+
.product-img-wrapper {
|
| 260 |
+
position: relative;
|
| 261 |
+
padding-top: 100%; /* 1:1 Aspect Ratio */
|
| 262 |
+
overflow: hidden;
|
| 263 |
+
}
|
| 264 |
+
.product-img {
|
| 265 |
+
position: absolute;
|
| 266 |
+
top: 0; left: 0;
|
| 267 |
+
width: 100%; height: 100%;
|
| 268 |
+
object-fit: cover;
|
| 269 |
+
}
|
| 270 |
+
.discount-badge {
|
| 271 |
+
position: absolute;
|
| 272 |
+
top: 10px; right: 10px;
|
| 273 |
+
background: var(--danger);
|
| 274 |
+
color: white;
|
| 275 |
+
padding: 2px 6px;
|
| 276 |
+
border-radius: 4px;
|
| 277 |
+
font-size: 0.7rem;
|
| 278 |
+
font-weight: bold;
|
| 279 |
+
}
|
| 280 |
+
.like-btn {
|
| 281 |
+
position: absolute;
|
| 282 |
+
bottom: 10px; left: 10px;
|
| 283 |
+
background: rgba(0,0,0,0.6);
|
| 284 |
+
color: white;
|
| 285 |
+
width: 30px; height: 30px;
|
| 286 |
+
border-radius: 50%;
|
| 287 |
+
display: flex;
|
| 288 |
+
align-items: center;
|
| 289 |
+
justify-content: center;
|
| 290 |
+
cursor: pointer;
|
| 291 |
+
border: none;
|
| 292 |
+
}
|
| 293 |
+
.like-btn.active { color: var(--danger); }
|
| 294 |
+
|
| 295 |
+
.product-info { padding: 10px; }
|
| 296 |
+
.product-title {
|
| 297 |
+
font-size: 0.9rem;
|
| 298 |
+
margin-bottom: 5px;
|
| 299 |
+
white-space: nowrap;
|
| 300 |
+
overflow: hidden;
|
| 301 |
+
text-overflow: ellipsis;
|
| 302 |
+
}
|
| 303 |
+
.rating { color: #ffc107; font-size: 0.75rem; margin-bottom: 5px; }
|
| 304 |
+
.price-row { display: flex; align-items: center; justify-content: space-between; }
|
| 305 |
+
.price { font-weight: bold; color: var(--text-main); }
|
| 306 |
+
.old-price { font-size: 0.75rem; text-decoration: line-through; color: var(--text-sec); margin-left: 5px; }
|
| 307 |
+
|
| 308 |
+
.add-cart-btn {
|
| 309 |
+
background: var(--primary);
|
| 310 |
+
color: #000;
|
| 311 |
+
border: none;
|
| 312 |
+
width: 100%;
|
| 313 |
+
padding: 8px;
|
| 314 |
+
border-radius: 6px;
|
| 315 |
+
margin-top: 10px;
|
| 316 |
+
cursor: pointer;
|
| 317 |
+
font-family: inherit;
|
| 318 |
+
font-weight: 600;
|
| 319 |
+
display: flex;
|
| 320 |
+
align-items: center;
|
| 321 |
+
justify-content: center;
|
| 322 |
+
gap: 5px;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
/* Video Grid */
|
| 326 |
+
.video-card {
|
| 327 |
+
background: var(--bg-card);
|
| 328 |
+
border-radius: var(--radius);
|
| 329 |
+
overflow: hidden;
|
| 330 |
+
margin-bottom: 15px;
|
| 331 |
+
cursor: pointer;
|
| 332 |
+
}
|
| 333 |
+
.video-thumb {
|
| 334 |
+
width: 100%;
|
| 335 |
+
aspect-ratio: 16/9;
|
| 336 |
+
object-fit: cover;
|
| 337 |
+
position: relative;
|
| 338 |
+
}
|
| 339 |
+
.play-icon {
|
| 340 |
+
position: absolute;
|
| 341 |
+
top: 50%; left: 50%;
|
| 342 |
+
transform: translate(-50%, -50%);
|
| 343 |
+
font-size: 2rem;
|
| 344 |
+
color: rgba(255,255,255,0.8);
|
| 345 |
+
}
|
| 346 |
+
.video-details { padding: 10px; }
|
| 347 |
+
.video-stats { display: flex; gap: 10px; color: var(--text-sec); font-size: 0.8rem; margin-top: 5px; }
|
| 348 |
+
|
| 349 |
+
/* Bottom Nav */
|
| 350 |
+
.bottom-nav {
|
| 351 |
+
position: fixed;
|
| 352 |
+
bottom: 0;
|
| 353 |
+
left: 0;
|
| 354 |
+
right: 0;
|
| 355 |
+
height: var(--nav-height);
|
| 356 |
+
background: rgba(30, 30, 30, 0.95);
|
| 357 |
+
backdrop-filter: blur(10px);
|
| 358 |
+
border-top: 1px solid var(--border);
|
| 359 |
+
display: flex;
|
| 360 |
+
justify-content: space-around;
|
| 361 |
+
align-items: center;
|
| 362 |
+
z-index: 100;
|
| 363 |
+
}
|
| 364 |
+
.nav-item {
|
| 365 |
+
display: flex;
|
| 366 |
+
flex-direction: column;
|
| 367 |
+
align-items: center;
|
| 368 |
+
color: var(--text-sec);
|
| 369 |
+
text-decoration: none;
|
| 370 |
+
font-size: 0.75rem;
|
| 371 |
+
gap: 4px;
|
| 372 |
+
position: relative;
|
| 373 |
+
cursor: pointer;
|
| 374 |
+
}
|
| 375 |
+
.nav-item i { font-size: 1.2rem; }
|
| 376 |
+
.nav-item.active { color: var(--primary); }
|
| 377 |
+
.nav-badge {
|
| 378 |
+
position: absolute;
|
| 379 |
+
top: -5px;
|
| 380 |
+
right: -5px;
|
| 381 |
+
background: var(--danger);
|
| 382 |
+
color: white;
|
| 383 |
+
font-size: 0.6rem;
|
| 384 |
+
width: 16px; height: 16px;
|
| 385 |
+
border-radius: 50%;
|
| 386 |
+
display: flex;
|
| 387 |
+
align-items: center;
|
| 388 |
+
justify-content: center;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
/* --- Modals --- */
|
| 392 |
+
.modal-overlay {
|
| 393 |
+
position: fixed;
|
| 394 |
+
top: 0; left: 0; right: 0; bottom: 0;
|
| 395 |
+
background: rgba(0,0,0,0.8);
|
| 396 |
+
z-index: 200;
|
| 397 |
+
display: flex;
|
| 398 |
+
align-items: center;
|
| 399 |
+
justify-content: center;
|
| 400 |
+
opacity: 0;
|
| 401 |
+
pointer-events: none;
|
| 402 |
+
transition: opacity 0.3s;
|
| 403 |
+
}
|
| 404 |
+
.modal-overlay.active { opacity: 1; pointer-events: all; }
|
| 405 |
+
|
| 406 |
+
.modal-content {
|
| 407 |
+
background: var(--bg-card);
|
| 408 |
+
width: 90%;
|
| 409 |
+
max-width: 500px;
|
| 410 |
+
border-radius: var(--radius);
|
| 411 |
+
padding: 20px;
|
| 412 |
+
max-height: 90vh;
|
| 413 |
+
overflow-y: auto;
|
| 414 |
+
position: relative;
|
| 415 |
+
transform: translateY(20px);
|
| 416 |
+
transition: transform 0.3s;
|
| 417 |
+
}
|
| 418 |
+
.modal-overlay.active .modal-content { transform: translateY(0); }
|
| 419 |
+
|
| 420 |
+
.close-modal {
|
| 421 |
+
position: absolute;
|
| 422 |
+
top: 15px; left: 15px;
|
| 423 |
+
background: none; border: none;
|
| 424 |
+
color: var(--text-sec);
|
| 425 |
+
font-size: 1.2rem;
|
| 426 |
+
cursor: pointer;
|
| 427 |
+
}
|
| 428 |
+
|
| 429 |
+
/* Story Modal Specifics */
|
| 430 |
+
.story-modal-content {
|
| 431 |
+
width: 100%;
|
| 432 |
+
height: 100%;
|
| 433 |
+
max-width: 450px;
|
| 434 |
+
background: #000;
|
| 435 |
+
border-radius: 0;
|
| 436 |
+
padding: 0;
|
| 437 |
+
position: relative;
|
| 438 |
+
}
|
| 439 |
+
.story-progress-bar {
|
| 440 |
+
position: absolute;
|
| 441 |
+
top: 10px; left: 10px; right: 10px;
|
| 442 |
+
height: 3px;
|
| 443 |
+
background: rgba(255,255,255,0.3);
|
| 444 |
+
border-radius: 2px;
|
| 445 |
+
overflow: hidden;
|
| 446 |
+
z-index: 10;
|
| 447 |
+
}
|
| 448 |
+
.story-progress-fill {
|
| 449 |
+
height: 100%;
|
| 450 |
+
background: white;
|
| 451 |
+
width: 0%;
|
| 452 |
+
}
|
| 453 |
+
.story-img-full { width: 100%; height: 100%; object-fit: cover; }
|
| 454 |
+
|
| 455 |
+
/* Video Modal */
|
| 456 |
+
.video-player {
|
| 457 |
+
width: 100%;
|
| 458 |
+
aspect-ratio: 16/9;
|
| 459 |
+
background: #000;
|
| 460 |
+
display: flex;
|
| 461 |
+
align-items: center;
|
| 462 |
+
justify-content: center;
|
| 463 |
+
margin-bottom: 15px;
|
| 464 |
+
border-radius: 8px;
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
/* Forms */
|
| 468 |
+
.form-group { margin-bottom: 15px; }
|
| 469 |
+
.form-label { display: block; margin-bottom: 5px; color: var(--text-sec); font-size: 0.9rem; }
|
| 470 |
+
.form-input {
|
| 471 |
+
width: 100%;
|
| 472 |
+
background: var(--bg-input);
|
| 473 |
+
border: 1px solid var(--border);
|
| 474 |
+
padding: 10px;
|
| 475 |
+
border-radius: 8px;
|
| 476 |
+
color: var(--text-main);
|
| 477 |
+
font-family: inherit;
|
| 478 |
+
}
|
| 479 |
+
.btn-primary {
|
| 480 |
+
width: 100%;
|
| 481 |
+
background: var(--primary);
|
| 482 |
+
color: #000;
|
| 483 |
+
border: none;
|
| 484 |
+
padding: 12px;
|
| 485 |
+
border-radius: 8px;
|
| 486 |
+
font-weight: bold;
|
| 487 |
+
cursor: pointer;
|
| 488 |
+
font-family: inherit;
|
| 489 |
+
}
|
| 490 |
+
.btn-outline {
|
| 491 |
+
background: transparent;
|
| 492 |
+
border: 1px solid var(--border);
|
| 493 |
+
color: var(--text-main);
|
| 494 |
+
padding: 8px 15px;
|
| 495 |
+
border-radius: 8px;
|
| 496 |
+
cursor: pointer;
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
/* Toast */
|
| 500 |
+
.toast {
|
| 501 |
+
position: fixed;
|
| 502 |
+
bottom: 80px;
|
| 503 |
+
left: 50%;
|
| 504 |
+
transform: translateX(-50%) translateY(20px);
|
| 505 |
+
background: #333;
|
| 506 |
+
color: white;
|
| 507 |
+
padding: 10px 20px;
|
| 508 |
+
border-radius: 20px;
|
| 509 |
+
z-index: 300;
|
| 510 |
+
opacity: 0;
|
| 511 |
+
transition: 0.3s;
|
| 512 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
|
| 513 |
+
white-space: nowrap;
|
| 514 |
+
}
|
| 515 |
+
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
|
| 516 |
+
|
| 517 |
+
/* Avatar Upload */
|
| 518 |
+
.avatar-upload {
|
| 519 |
+
width: 100px; height: 100px;
|
| 520 |
+
border-radius: 50%;
|
| 521 |
+
overflow: hidden;
|
| 522 |
+
margin: 0 auto 15px;
|
| 523 |
+
border: 2px solid var(--border);
|
| 524 |
+
position: relative;
|
| 525 |
+
cursor: pointer;
|
| 526 |
+
}
|
| 527 |
+
.avatar-upload img { width: 100%; height: 100%; object-fit: cover; }
|
| 528 |
+
.avatar-overlay {
|
| 529 |
+
position: absolute;
|
| 530 |
+
top:0; left:0; width:100%; height:100%;
|
| 531 |
+
background: rgba(0,0,0,0.5);
|
| 532 |
+
display: flex;
|
| 533 |
+
align-items: center;
|
| 534 |
+
justify-content: center;
|
| 535 |
+
opacity: 0;
|
| 536 |
+
transition: 0.3s;
|
| 537 |
+
}
|
| 538 |
+
.avatar-upload:hover .avatar-overlay { opacity: 1; }
|
| 539 |
+
|
| 540 |
+
</style>
|
| 541 |
+
</head>
|
| 542 |
+
<body>
|
| 543 |
+
|
| 544 |
+
<!-- Header -->
|
| 545 |
+
<header>
|
| 546 |
+
<a href="#" class="brand" onclick="app.navigate('home')">دیجیشاپ</a>
|
| 547 |
+
|
| 548 |
+
<div class="search-container">
|
| 549 |
+
<i class="fas fa-search search-icon"></i>
|
| 550 |
+
<input type="text" class="search-input" placeholder="جستجو در محصولات..." id="searchInput">
|
| 551 |
+
<div class="search-history" id="searchHistory"></div>
|
| 552 |
+
</div>
|
| 553 |
+
|
| 554 |
+
<div style="position: relative;">
|
| 555 |
+
<div class="profile-btn" onclick="app.toggleUserMenu()">
|
| 556 |
+
<img src="https://placehold.co/100x100/333/fff?text=User" id="headerAvatar" alt="Profile">
|
| 557 |
+
</div>
|
| 558 |
+
<div class="user-menu" id="userMenu">
|
| 559 |
+
<div class="menu-item" onclick="app.navigate('profile')"><i class="fas fa-user"></i> پروفایل من</div>
|
| 560 |
+
<div class="menu-item" onclick="app.navigate('orders')"><i class="fas fa-box"></i> سفارشها</div>
|
| 561 |
+
<div class="menu-item" onclick="app.navigate('wishlist')"><i class="fas fa-heart"></i> علاقهمندیها</div>
|
| 562 |
+
<div class="menu-item" onclick="app.openModal('settingsModal')"><i class="fas fa-cog"></i> تنظیمات</div>
|
| 563 |
+
<div class="menu-item" id="logoutBtn" onclick="app.logout()" style="color: var(--danger);"><i class="fas fa-sign-out-alt"></i> خروج</div>
|
| 564 |
+
</div>
|
| 565 |
+
</div>
|
| 566 |
+
</header>
|
| 567 |
+
|
| 568 |
+
<!-- Main Content -->
|
| 569 |
+
<main id="app">
|
| 570 |
+
|
| 571 |
+
<!-- Home Page -->
|
| 572 |
+
<section id="home-page" class="page-section">
|
| 573 |
+
<!-- Stories -->
|
| 574 |
+
<div class="stories-container" id="storiesContainer">
|
| 575 |
+
<!-- JS will populate -->
|
| 576 |
+
</div>
|
| 577 |
+
|
| 578 |
+
<h2 class="text-primary font-bold" style="margin-bottom: 15px;">پیشنهادات ویژه</h2>
|
| 579 |
+
<div class="grid-products" id="featuredProducts">
|
| 580 |
+
<!-- JS will populate -->
|
| 581 |
+
</div>
|
| 582 |
+
</section>
|
| 583 |
+
|
| 584 |
+
<!-- Shop Page -->
|
| 585 |
+
<section id="shop-page" class="page-section hidden">
|
| 586 |
+
<div class="chips-container" id="categoryChips">
|
| 587 |
+
<div class="chip active" data-cat="all">همه</div>
|
| 588 |
+
<div class="chip" data-cat="mobile">موبایل</div>
|
| 589 |
+
<div class="chip" data-cat="laptop">لپتاپ</div>
|
| 590 |
+
<div class="chip" data-cat="headphone">هدفون</div>
|
| 591 |
+
<div class="chip" data-cat="watch">ساعت</div>
|
| 592 |
+
</div>
|
| 593 |
+
<div class="grid-products" id="shopProducts">
|
| 594 |
+
<!-- JS will populate -->
|
| 595 |
+
</div>
|
| 596 |
+
</section>
|
| 597 |
+
|
| 598 |
+
<!-- Videos Page -->
|
| 599 |
+
<section id="videos-page" class="page-section hidden">
|
| 600 |
+
<h2 class="font-bold" style="margin-bottom: 15px;">ویدیوهای آموزشی و بررسی</h2>
|
| 601 |
+
<div id="videosGrid">
|
| 602 |
+
<!-- JS will populate -->
|
| 603 |
+
</div>
|
| 604 |
+
</section>
|
| 605 |
+
|
| 606 |
+
<!-- Profile Page -->
|
| 607 |
+
<section id="profile-page" class="page-section hidden">
|
| 608 |
+
<div class="flex flex-col items-center" style="margin-bottom: 30px;">
|
| 609 |
+
<div class="avatar-upload" onclick="document.getElementById('avatarInput').click()">
|
| 610 |
+
<img src="" id="profileAvatarDisplay">
|
| 611 |
+
<div class="avatar-overlay"><i class="fas fa-camera text-white"></i></div>
|
| 612 |
+
<input type="file" id="avatarInput" hidden accept="image/*" onchange="app.handleAvatarUpload(this)">
|
| 613 |
+
</div>
|
| 614 |
+
<h2 id="profileName" class="font-bold text-lg">کاربر مهمان</h2>
|
| 615 |
+
<p id="profileBio" class="text-sec text-sm">بدون بیوگرافی</p>
|
| 616 |
+
<button class="btn-outline text-xs" style="margin-top: 10px;" onclick="app.openModal('editProfileModal')">ویرایش پروفایل</button>
|
| 617 |
+
</div>
|
| 618 |
+
|
| 619 |
+
<div class="flex flex-col gap-2">
|
| 620 |
+
<div class="menu-item justify-between" onclick="app.navigate('orders')">
|
| 621 |
+
<span><i class="fas fa-box text-primary gap-1"></i> سفارشهای من</span>
|
| 622 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 623 |
+
</div>
|
| 624 |
+
<div class="menu-item justify-between" onclick="app.navigate('wishlist')">
|
| 625 |
+
<span><i class="fas fa-heart text-danger gap-1"></i> لیست علاقهمندیها</span>
|
| 626 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 627 |
+
</div>
|
| 628 |
+
<div class="menu-item justify-between" onclick="app.openModal('settingsModal')">
|
| 629 |
+
<span><i class="fas fa-moon text-info gap-1"></i> تنظیمات</span>
|
| 630 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 631 |
+
</div>
|
| 632 |
+
</div>
|
| 633 |
+
</section>
|
| 634 |
+
|
| 635 |
+
<!-- Cart Page (Modal-like behavior but separate section for mobile) -->
|
| 636 |
+
<section id="cart-page" class="page-section hidden">
|
| 637 |
+
<h2 class="font-bold mb-4">سبد خرید</h2>
|
| 638 |
+
<div id="cartItemsContainer" class="flex flex-col gap-2">
|
| 639 |
+
<!-- Items -->
|
| 640 |
+
</div>
|
| 641 |
+
<div style="margin-top: 20px; border-top: 1px solid var(--border); padding-top: 15px;">
|
| 642 |
+
<div class="flex justify-between font-bold text-lg mb-4">
|
| 643 |
+
<span>جمع کل:</span>
|
| 644 |
+
<span id="cartTotal">0 تومان</span>
|
| 645 |
+
</div>
|
| 646 |
+
<button class="btn-primary" onclick="app.openModal('paymentModal')">نهایی کردن خرید</button>
|
| 647 |
+
</div>
|
| 648 |
+
</section>
|
| 649 |
+
|
| 650 |
+
</main>
|
| 651 |
+
|
| 652 |
+
<!-- Bottom Navigation -->
|
| 653 |
+
<nav class="bottom-nav">
|
| 654 |
+
<div class="nav-item active" onclick="app.navigate('home')" data-target="home">
|
| 655 |
+
<i class="fas fa-home"></i>
|
| 656 |
+
<span>خانه</span>
|
| 657 |
+
</div>
|
| 658 |
+
<div class="nav-item" onclick="app.navigate('shop')" data-target="shop">
|
| 659 |
+
<i class="fas fa-store"></i>
|
| 660 |
+
<span>فروشگاه</span>
|
| 661 |
+
</div>
|
| 662 |
+
<div class="nav-item" onclick="app.navigate('videos')" data-target="videos">
|
| 663 |
+
<i class="fas fa-video"></i>
|
| 664 |
+
<span>ویدیوها</span>
|
| 665 |
+
</div>
|
| 666 |
+
<div class="nav-item" onclick="app.navigate('cart')" data-target="cart">
|
| 667 |
+
<i class="fas fa-shopping-cart"></i>
|
| 668 |
+
<span>سبد</span>
|
| 669 |
+
<div class="nav-badge hidden" id="cartBadge">0</div>
|
| 670 |
+
</div>
|
| 671 |
+
<div class="nav-item" onclick="app.navigate('profile')" data-target="profile">
|
| 672 |
+
<i class="fas fa-user"></i>
|
| 673 |
+
<span>پروفایل</span>
|
| 674 |
+
</div>
|
| 675 |
+
</nav>
|
| 676 |
+
|
| 677 |
+
<!-- Modals -->
|
| 678 |
+
|
| 679 |
+
<!-- Auth Modal -->
|
| 680 |
+
<div class="modal-overlay" id="authModal">
|
| 681 |
+
<div class="modal-content">
|
| 682 |
+
<button class="close-modal" onclick="app.closeModal('authModal')">×</button>
|
| 683 |
+
<h2 class="text-center font-bold mb-4">ورود / ثبت نام</h2>
|
| 684 |
+
<div class="form-group">
|
| 685 |
+
<label class="form-label">شماره موبایل</label>
|
| 686 |
+
<input type="tel" class="form-input" placeholder="0912...">
|
| 687 |
+
</div>
|
| 688 |
+
<div class="form-group">
|
| 689 |
+
<label class="form-label">رمز عبور</label>
|
| 690 |
+
<input type="password" class="form-input" placeholder="******">
|
| 691 |
+
</div>
|
| 692 |
+
<button class="btn-primary" onclick="app.login()">ورود</button>
|
| 693 |
+
<p class="text-center text-sm mt-3 text-sec">حساب ندارید؟ <a href="#" class="text-primary">ثبت نام کنید</a></p>
|
| 694 |
+
</div>
|
| 695 |
+
</div>
|
| 696 |
+
|
| 697 |
+
<!-- Product Detail Modal -->
|
| 698 |
+
<div class="modal-overlay" id="productModal">
|
| 699 |
+
<div class="modal-content">
|
| 700 |
+
<button class="close-modal" onclick="app.closeModal('productModal')">×</button>
|
| 701 |
+
<div id="productDetailContent"></div>
|
| 702 |
+
</div>
|
| 703 |
+
</div>
|
| 704 |
+
|
| 705 |
+
<!-- Video Modal -->
|
| 706 |
+
<div class="modal-overlay" id="videoModal">
|
| 707 |
+
<div class="modal-content" style="max-width: 800px;">
|
| 708 |
+
<button class="close-modal" onclick="app.closeModal('videoModal')">×</button>
|
| 709 |
+
<div class="video-player">
|
| 710 |
+
<i class="fas fa-play-circle text-primary" style="font-size: 3rem;"></i>
|
| 711 |
+
</div>
|
| 712 |
+
<h3 id="videoTitle" class="font-bold mb-2">عنوان ویدیو</h3>
|
| 713 |
+
<div class="flex justify-between items-center mb-4">
|
| 714 |
+
<div class="video-stats">
|
| 715 |
+
<span><i class="fas fa-eye"></i> 1.2K</span>
|
| 716 |
+
<span><i class="fas fa-thumbs-up"></i> 300</span>
|
| 717 |
+
</div>
|
| 718 |
+
<button class="btn-outline text-sm" onclick="app.openModal('commentsModal')">
|
| 719 |
+
<i class="fas fa-comment"></i> نظرات
|
| 720 |
+
</button>
|
| 721 |
+
</div>
|
| 722 |
+
<div class="flex gap-2">
|
| 723 |
+
<button class="btn-outline flex-1"><i class="fas fa-share"></i> اشتراک</button>
|
| 724 |
+
<button class="btn-outline flex-1"><i class="fas fa-download"></i> دانلود</button>
|
| 725 |
+
</div>
|
| 726 |
+
</div>
|
| 727 |
+
</div>
|
| 728 |
+
|
| 729 |
+
<!-- Comments Modal -->
|
| 730 |
+
<div class="modal-overlay" id="commentsModal">
|
| 731 |
+
<div class="modal-content">
|
| 732 |
+
<button class="close-modal" onclick="app.closeModal('commentsModal')">×</button>
|
| 733 |
+
<h3 class="font-bold mb-4">نظرات کاربران</h3>
|
| 734 |
+
<div id="commentsList" style="max-height: 300px; overflow-y: auto; margin-bottom: 15px;">
|
| 735 |
+
<!-- Comments -->
|
| 736 |
+
</div>
|
| 737 |
+
<div class="flex gap-2">
|
| 738 |
+
<input type="text" class="form-input" placeholder="نظر خود را بنویسید...">
|
| 739 |
+
<button class="btn-primary" style="width: auto;"><i class="fas fa-paper-plane"></i></button>
|
| 740 |
+
</div>
|
| 741 |
+
</div>
|
| 742 |
+
</div>
|
| 743 |
+
|
| 744 |
+
<!-- Cart Modal (Desktop) / Page (Mobile) -->
|
| 745 |
+
<!-- Using section for mobile, logic handles display -->
|
| 746 |
+
|
| 747 |
+
<!-- Payment Modal -->
|
| 748 |
+
<div class="modal-overlay" id="paymentModal">
|
| 749 |
+
<div class="modal-content text-center">
|
| 750 |
+
<button class="close-modal" onclick="app.closeModal('paymentModal')">×</button>
|
| 751 |
+
<div id="paymentStep1">
|
| 752 |
+
<i class="fas fa-credit-card text-primary" style="font-size: 3rem; margin-bottom: 20px;"></i>
|
| 753 |
+
<h3 class="font-bold mb-4">درگاه پرداخت</h3>
|
| 754 |
+
<p class="text-sec mb-4">شما در حال پرداخت مبلغ <span class="text-primary font-bold" id="payAmount"></span> هستید.</p>
|
| 755 |
+
<button class="btn-primary" onclick="app.processPayment()">پرداخت امن</button>
|
| 756 |
+
</div>
|
| 757 |
+
<div id="paymentStep2" class="hidden">
|
| 758 |
+
<i class="fas fa-spinner fa-spin text-primary" style="font-size: 3rem; margin-bottom: 20px;"></i>
|
| 759 |
+
<p>در حال اتصال به بانک...</p>
|
| 760 |
+
</div>
|
| 761 |
+
<div id="paymentStep3" class="hidden">
|
| 762 |
+
<i class="fas fa-check-circle text-success" style="font-size: 3rem; margin-bottom: 20px;"></i>
|
| 763 |
+
<h3 class="font-bold mb-4">پرداخت موفق!</h3>
|
| 764 |
+
<p class="text-sec mb-4">سفارش شما ثبت شد.</p>
|
| 765 |
+
<button class="btn-primary" onclick="app.closeModal('paymentModal'); app.navigate('home'); app.clearCart();">بازگشت به خانه</button>
|
| 766 |
+
</div>
|
| 767 |
+
</div>
|
| 768 |
+
</div>
|
| 769 |
+
|
| 770 |
+
<!-- Settings Modal -->
|
| 771 |
+
<div class="modal-overlay" id="settingsModal">
|
| 772 |
+
<div class="modal-content">
|
| 773 |
+
<button class="close-modal" onclick="app.closeModal('settingsModal')">×</button>
|
| 774 |
+
<h3 class="font-bold mb-4">تنظیمات</h3>
|
| 775 |
+
<div class="flex justify-between items-center mb-4">
|
| 776 |
+
<span>حالت شب</span>
|
| 777 |
+
<i class="fas fa-toggle-on text-primary text-xl"></i>
|
| 778 |
+
</div>
|
| 779 |
+
<div class="flex justify-between items-center mb-4">
|
| 780 |
+
<span>اعلانها</span>
|
| 781 |
+
<i class="fas fa-toggle-on text-primary text-xl"></i>
|
| 782 |
+
</div>
|
| 783 |
+
<div class="text-center mt-4">
|
| 784 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="text-xs text-sec">Built with anycoder</a>
|
| 785 |
+
</div>
|
| 786 |
+
</div>
|
| 787 |
+
</div>
|
| 788 |
+
|
| 789 |
+
<!-- Edit Profile Modal -->
|
| 790 |
+
<div class="modal-overlay" id="editProfileModal">
|
| 791 |
+
<div class="modal-content">
|
| 792 |
+
<button class="close-modal" onclick="app.closeModal('editProfileModal')">×</button>
|
| 793 |
+
<h3 class="font-bold mb-4">ویرایش اطلاعات</h3>
|
| 794 |
+
<div class="form-group">
|
| 795 |
+
<label class="form-label">نام نمایشی</label>
|
| 796 |
+
<input type="text" id="editName" class="form-input">
|
| 797 |
+
</div>
|
| 798 |
+
<div class="form-group">
|
| 799 |
+
<label class="form-label">بیوگرافی</label>
|
| 800 |
+
<textarea id="editBio" class="form-input" rows="3"></textarea>
|
| 801 |
+
</div>
|
| 802 |
+
<button class="btn-primary" onclick="app.saveProfile()">ذخیره تغییرات</button>
|
| 803 |
+
</div>
|
| 804 |
+
</div>
|
| 805 |
+
|
| 806 |
+
<!-- Toast Notification -->
|
| 807 |
+
<div id="toast" class="toast">پیام سیستم</div>
|
| 808 |
+
|
| 809 |
+
<script>
|
| 810 |
+
// --- Data & State ---
|
| 811 |
+
const state = {
|
| 812 |
+
user: JSON.parse(localStorage.getItem('user')) || null,
|
| 813 |
+
cart: JSON.parse(localStorage.getItem('cart')) || [],
|
| 814 |
+
wishlist: JSON.parse(localStorage.getItem('wishlist')) || [],
|
| 815 |
+
searchHistory: JSON.parse(localStorage.getItem('searchHistory')) || [],
|
| 816 |
+
products: [
|
| 817 |
+
{ id: 1, title: "آیفون 13 پرو مکس", price: 55000000, oldPrice: 60000000, img: "https://images.unsplash.com/photo-1632661674596-df8be070a5c5?auto=format&fit=crop&w=400&q=80", cat: "mobile", rating: 4.8 },
|
| 818 |
+
{ id: 2, title: "مک بوک پرو M2", price: 85000000, oldPrice: 90000000, img: "https://images.unsplash.com/photo-1517336714731-489689fd1ca4?auto=format&fit=crop&w=400&q=80", cat: "laptop", rating: 4.9 },
|
| 819 |
+
{ id: 3, title: "هدفون سونی WH-1000XM5", price: 12000000, oldPrice: 14000000, img: "https://images.unsplash.com/photo-1618366712010-f4ae9c647dcb?auto=format&fit=crop&w=400&q=80", cat: "headphone", rating: 4.7 },
|
| 820 |
+
{ id: 4, title: "اپل واچ اولترا", price: 35000000, oldPrice: 38000000, img: "https://images.unsplash.com/photo-1664478546384-d57ffe74a771?auto=format&fit=crop&w=400&q=80", cat: "watch", rating: 4.6 },
|
| 821 |
+
{ id: 5, title: "سامسونگ S23 Ultra", price: 48000000, oldPrice: 52000000, img: "https://images.unsplash.com/photo-1610945415295-d9bbf067e59c?auto=format&fit=crop&w=400&q=80", cat: "mobile", rating: 4.5 },
|
| 822 |
+
{ id: 6, title: "ایرپاد پرو 2", price: 9500000, oldPrice: 11000000, img: "https://images.unsplash.com/photo-1603351154351-5cf99bc75423?auto=format&fit=crop&w=400&q=80", cat: "headphone", rating: 4.8 },
|
| 823 |
+
{ id: 7, title: "لپ تاپ ایسوس ROG", price: 70000000, oldPrice: 75000000, img: "https://images.unsplash.com/photo-1593640408182-31c70c8268f5?auto=format&fit=crop&w=400&q=80", cat: "laptop", rating: 4.7 },
|
| 824 |
+
{ id: 8, title: "ساعت هوشمند شیائومی", price: 2500000, oldPrice: 3000000, img: "https://images.unsplash.com/photo-1579586337278-3befd40fd17a?auto=format&fit=crop&w=400&q=80", cat: "watch", rating: 4.2 },
|
| 825 |
+
],
|
| 826 |
+
videos: [
|
| 827 |
+
{ id: 1, title: "بررسی کامل آیفون 15", views: "12K", likes: "800", img: "https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?auto=format&fit=crop&w=600&q=80" },
|
| 828 |
+
{ id: 2, title: "آموزش فتوشاپ 2024", views: "5K", likes: "300", img: "https://images.unsplash.com/photo-1542744173-8e7e53415bb0?auto=format&fit=crop&w=600&q=80" },
|
| 829 |
+
{ id: 3, title: "آنباکس کنسول PS5", views: "25K", likes: "1.5K", img: "https://images.unsplash.com/photo-1606144042614-b2417e99c4e3?auto=format&fit=crop&w=600&q=80" },
|
| 830 |
+
],
|
| 831 |
+
stories: [
|
| 832 |
+
{ id: 1, name: "تخفیف ویژه", img: "https://images.unsplash.com/photo-1607082348824-0a96f2a4b9da?auto=format&fit=crop&w=150&q=80" },
|
| 833 |
+
{ id: 2, name: "محصولات جدید", img: "https://images.unsplash.com/photo-1556742049-0cfed4f7a07d?auto=format&fit=crop&w=150&q=80" },
|
| 834 |
+
{ id: 3, name: "ارسال رایگان", img: "https://images.unsplash.com/photo-1586769852044-692d6e3703f0?auto=format&fit=crop&w=150&q=80" },
|
| 835 |
+
{ id: 4, name: "پشتیبانی", img: "https://images.unsplash.com/photo-1556761175-5973dc0f32e7?auto=format&fit=crop&w=150&q=80" },
|
| 836 |
+
]
|
| 837 |
+
};
|
| 838 |
+
|
| 839 |
+
// --- App Logic ---
|
| 840 |
+
const app = {
|
| 841 |
+
init: () => {
|
| 842 |
+
app.renderHeader();
|
| 843 |
+
app.renderStories();
|
| 844 |
+
app.renderProducts(state.products, 'featuredProducts');
|
| 845 |
+
app.renderProducts(state.products, 'shopProducts');
|
| 846 |
+
app.renderVideos();
|
| 847 |
+
app.updateCartUI();
|
| 848 |
+
app.setupSearch();
|
| 849 |
+
app.setupFilters();
|
| 850 |
+
app.setupNav();
|
| 851 |
+
|
| 852 |
+
// If user not logged in, show auth modal after delay (simulated)
|
| 853 |
+
if(!state.user) {
|
| 854 |
+
// setTimeout(() => app.openModal('authModal'), 1000);
|
| 855 |
+
// For better UX in demo, we won't force login immediately
|
| 856 |
+
}
|
| 857 |
+
},
|
| 858 |
+
|
| 859 |
+
// Navigation
|
| 860 |
+
navigate: (pageId) => {
|
| 861 |
+
document.querySelectorAll('.page-section').forEach(el => el.classList.add('hidden'));
|
| 862 |
+
document.querySelectorAll('.nav-item').forEach(el => el.classList.remove('active'));
|
| 863 |
+
|
| 864 |
+
const target = document.getElementById(pageId + '-page');
|
| 865 |
+
if(target) target.classList.remove('hidden');
|
| 866 |
+
|
| 867 |
+
const navBtn = document.querySelector(`.nav-item[data-target="${pageId}"]`);
|
| 868 |
+
if(navBtn) navBtn.classList.add('active');
|
| 869 |
+
|
| 870 |
+
window.scrollTo(0,0);
|
| 871 |
+
|
| 872 |
+
if(pageId === 'cart') app.renderCart();
|
| 873 |
+
if(pageId === 'profile') app.renderProfile();
|
| 874 |
+
},
|
| 875 |
+
|
| 876 |
+
setupNav: () => {
|
| 877 |
+
// Handled in
|