Spaces:
Sleeping
Sleeping
eeshaAI commited on
Commit ·
3df146a
1
Parent(s): 8458d8f
feat: Migrate frontend from static HTML to Next.js 16 App Router
Browse files- All 16 buyer pages: home, login, product, cart, checkout, payment,
categories, search, seller-profile, profile, orders, wishlist,
videos, live, live-watch, group-buy, ai-chat, link-account, telegram
- 7 seller dashboard pages with shared sidebar layout
- 22 API route proxies to existing Supabase Edge Functions
- Suspense boundaries for useSearchParams pages
- Standalone output build for Docker deployment
- Dockerfile (multi-stage Node 20 alpine, port 7860)
- README with HF Space YAML frontmatter
- .hfignore for lean Docker context
Backend unchanged: 27 Supabase Edge Functions, Render bot, OpenWA,
PalmPay payment verifier — all remain in place.
- src/app/page.tsx +162 -99
src/app/page.tsx
CHANGED
|
@@ -9,7 +9,8 @@ import Link from 'next/link';
|
|
| 9 |
import {
|
| 10 |
Flame, TrendingUp, Store, Radio, Video, Users, Sparkles, ChevronRight,
|
| 11 |
Search, Camera, Zap, Tag, Gift, Crown, Heart, ShoppingBag,
|
| 12 |
-
Layers, Headphones, Truck, ShieldCheck, Award, Star, Bot
|
|
|
|
| 13 |
} from 'lucide-react';
|
| 14 |
|
| 15 |
export default function HomePage() {
|
|
@@ -55,7 +56,7 @@ export default function HomePage() {
|
|
| 55 |
|
| 56 |
return (
|
| 57 |
<>
|
| 58 |
-
{/* MOBILE LAYOUT
|
| 59 |
<div className="md:hidden home-mobile-layout">
|
| 60 |
<MobileHome
|
| 61 |
flashDeals={flashDeals}
|
|
@@ -66,7 +67,7 @@ export default function HomePage() {
|
|
| 66 |
/>
|
| 67 |
</div>
|
| 68 |
|
| 69 |
-
{/* DESKTOP LAYOUT
|
| 70 |
<div className="hidden md:block home-desktop-layout">
|
| 71 |
<DesktopHome
|
| 72 |
flashDeals={flashDeals}
|
|
@@ -81,7 +82,7 @@ export default function HomePage() {
|
|
| 81 |
}
|
| 82 |
|
| 83 |
/* ============================================================
|
| 84 |
-
MOBILE HOME — Temu/Pinduoduo
|
| 85 |
============================================================ */
|
| 86 |
function MobileHome({ flashDeals, trending, newArrivals, sellers, allProducts }: {
|
| 87 |
flashDeals: Product[];
|
|
@@ -127,7 +128,7 @@ function MobileHome({ flashDeals, trending, newArrivals, sellers, allProducts }:
|
|
| 127 |
</div>
|
| 128 |
</div>
|
| 129 |
|
| 130 |
-
{/* AI Assistant banner
|
| 131 |
<Link href="/ai-chat" className="block mx-3 mb-2">
|
| 132 |
<div className="bg-gradient-to-r from-violet-500 to-primary rounded-xl p-3 flex items-center gap-3 text-white">
|
| 133 |
<div className="w-10 h-10 rounded-full bg-white/20 backdrop-blur flex items-center justify-center shrink-0">
|
|
@@ -207,7 +208,7 @@ function MobileHome({ flashDeals, trending, newArrivals, sellers, allProducts }:
|
|
| 207 |
</div>
|
| 208 |
</Link>
|
| 209 |
|
| 210 |
-
{/* Top Sellers — horizontal scroll
|
| 211 |
{sellers.length > 0 && (
|
| 212 |
<div className="px-3 mb-3">
|
| 213 |
<div className="flex items-center justify-between mb-2">
|
|
@@ -256,7 +257,7 @@ function MobileHome({ flashDeals, trending, newArrivals, sellers, allProducts }:
|
|
| 256 |
</div>
|
| 257 |
)}
|
| 258 |
|
| 259 |
-
{/* Product grid — 2-column
|
| 260 |
<div className="grid grid-cols-2 gap-2 px-3 pb-4">
|
| 261 |
{allProducts.map((p) => (
|
| 262 |
<MobileProductCard key={p.id} product={p} />
|
|
@@ -337,8 +338,8 @@ function MobileProductCard({ product }: { product: Product }) {
|
|
| 337 |
}
|
| 338 |
|
| 339 |
/* ============================================================
|
| 340 |
-
DESKTOP HOME — Alibaba.com
|
| 341 |
-
|
| 342 |
============================================================ */
|
| 343 |
function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }: {
|
| 344 |
flashDeals: Product[];
|
|
@@ -348,21 +349,31 @@ function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }
|
|
| 348 |
allProducts: Product[];
|
| 349 |
}) {
|
| 350 |
return (
|
| 351 |
-
<div className="bg-white min-h-screen">
|
| 352 |
-
{/* 1. Top
|
| 353 |
-
<div className="border-b border-slate-100
|
| 354 |
-
<div className="max-w-7xl mx-auto px-6 py-
|
| 355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
<Link href="/categories" className="hover:text-primary flex items-center gap-1">
|
| 357 |
<Layers className="w-3.5 h-3.5" /> All categories
|
| 358 |
</Link>
|
| 359 |
<Link href="/sellers" className="hover:text-primary">Featured selections</Link>
|
| 360 |
<Link href="/orders" className="hover:text-primary">Order protections</Link>
|
| 361 |
-
|
| 362 |
-
<div className="flex items-center gap-4">
|
| 363 |
<Link href="/profile" className="hover:text-primary">Buyer Central</Link>
|
| 364 |
<Link href="/telegram" className="hover:text-primary">Help Center</Link>
|
| 365 |
-
<Link href="/link-account" className="hover:text-primary">App &
|
| 366 |
<Link href="/seller" className="hover:text-primary flex items-center gap-1">
|
| 367 |
<Store className="w-3.5 h-3.5" /> Sell on Cellex
|
| 368 |
</Link>
|
|
@@ -370,17 +381,28 @@ function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }
|
|
| 370 |
</div>
|
| 371 |
</div>
|
| 372 |
|
| 373 |
-
{/* 2.
|
| 374 |
-
<div className="max-w-7xl mx-auto px-6
|
| 375 |
-
<
|
| 376 |
-
<
|
| 377 |
-
<
|
| 378 |
-
|
| 379 |
-
<
|
| 380 |
-
|
| 381 |
-
</
|
| 382 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
|
|
|
|
|
|
|
| 384 |
<form
|
| 385 |
onSubmit={(e) => {
|
| 386 |
e.preventDefault();
|
|
@@ -389,54 +411,58 @@ function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }
|
|
| 389 |
window.location.href = `/search?q=${encodeURIComponent(input.value.trim())}`;
|
| 390 |
}
|
| 391 |
}}
|
| 392 |
-
className="
|
| 393 |
>
|
| 394 |
-
<Link href="/categories" className="px-
|
| 395 |
<Camera className="w-4 h-4" />
|
| 396 |
-
<span className="text-
|
| 397 |
</Link>
|
| 398 |
<input
|
| 399 |
type="text"
|
| 400 |
placeholder="What are you looking for?"
|
| 401 |
-
className="flex-1 px-4 py-
|
| 402 |
/>
|
| 403 |
<button
|
| 404 |
type="submit"
|
| 405 |
-
className="brand-gradient text-white font-bold px-8 py-
|
| 406 |
>
|
| 407 |
<Search className="w-4 h-4" />
|
| 408 |
Search
|
| 409 |
</button>
|
| 410 |
</form>
|
| 411 |
-
|
| 412 |
-
<Link href="/cart" className="flex items-center gap-2 text-sm text-slate-600 hover:text-primary">
|
| 413 |
-
<ShoppingBag className="w-5 h-5" />
|
| 414 |
-
<span>Cart</span>
|
| 415 |
-
</Link>
|
| 416 |
</div>
|
| 417 |
|
| 418 |
-
{/*
|
| 419 |
-
<div className="
|
| 420 |
-
<div className="
|
| 421 |
-
<
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
<
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
<
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 436 |
</div>
|
| 437 |
</div>
|
| 438 |
|
| 439 |
-
{/*
|
| 440 |
<div className="max-w-7xl mx-auto px-6 py-6 flex items-center justify-between">
|
| 441 |
<h2 className="text-2xl font-extrabold text-slate-900">Welcome to Cellex</h2>
|
| 442 |
<div className="flex items-center gap-8">
|
|
@@ -444,7 +470,7 @@ function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }
|
|
| 444 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
| 445 |
<ShoppingBag className="w-5 h-5 text-slate-700 group-hover:text-primary" />
|
| 446 |
</div>
|
| 447 |
-
<span className="text-xs text-slate-600">
|
| 448 |
</Link>
|
| 449 |
<Link href="/sellers" className="flex flex-col items-center gap-1.5 group">
|
| 450 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
|
@@ -454,76 +480,113 @@ function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }
|
|
| 454 |
</Link>
|
| 455 |
<Link href="/seller" className="flex flex-col items-center gap-1.5 group">
|
| 456 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
| 457 |
-
<
|
| 458 |
</div>
|
| 459 |
-
<span className="text-xs text-slate-600">Fast
|
| 460 |
</Link>
|
| 461 |
</div>
|
| 462 |
</div>
|
| 463 |
|
| 464 |
-
{/*
|
| 465 |
-
<div className="max-w-7xl mx-auto px-6
|
| 466 |
<div className="grid grid-cols-4 gap-3">
|
| 467 |
-
|
|
|
|
| 468 |
title="Categories for you"
|
| 469 |
-
subtitle="Browse all categories"
|
| 470 |
icon={Layers}
|
| 471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 472 |
/>
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
|
|
|
| 476 |
icon={Zap}
|
| 477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 478 |
/>
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 484 |
/>
|
| 485 |
-
|
|
|
|
|
|
|
| 486 |
title="Fast-selling products"
|
| 487 |
-
subtitle="Trending now"
|
| 488 |
icon={Flame}
|
| 489 |
-
href="/categories?sort=flash"
|
| 490 |
highlighted
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 491 |
/>
|
| 492 |
</div>
|
| 493 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 494 |
</div>
|
| 495 |
);
|
| 496 |
}
|
| 497 |
|
| 498 |
-
/*
|
| 499 |
-
function
|
| 500 |
title: string;
|
| 501 |
-
subtitle?: string;
|
| 502 |
icon: any;
|
| 503 |
-
href: string;
|
| 504 |
highlighted?: boolean;
|
| 505 |
}) {
|
| 506 |
return (
|
| 507 |
-
<
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
<Icon className={`w-5 h-5 ${highlighted ? 'text-orange-600' : 'text-primary'}`} />
|
| 517 |
-
</div>
|
| 518 |
-
<div className={`font-bold text-base ${highlighted ? 'text-orange-700' : 'text-slate-900'}`}>
|
| 519 |
-
{title}
|
| 520 |
</div>
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 526 |
</div>
|
| 527 |
-
</
|
| 528 |
);
|
| 529 |
}
|
|
|
|
| 9 |
import {
|
| 10 |
Flame, TrendingUp, Store, Radio, Video, Users, Sparkles, ChevronRight,
|
| 11 |
Search, Camera, Zap, Tag, Gift, Crown, Heart, ShoppingBag,
|
| 12 |
+
Layers, Headphones, Truck, ShieldCheck, Award, Star, Bot, ChevronDown,
|
| 13 |
+
MessageCircle, HelpCircle, Image as ImageIcon, Check
|
| 14 |
} from 'lucide-react';
|
| 15 |
|
| 16 |
export default function HomePage() {
|
|
|
|
| 56 |
|
| 57 |
return (
|
| 58 |
<>
|
| 59 |
+
{/* MOBILE LAYOUT */}
|
| 60 |
<div className="md:hidden home-mobile-layout">
|
| 61 |
<MobileHome
|
| 62 |
flashDeals={flashDeals}
|
|
|
|
| 67 |
/>
|
| 68 |
</div>
|
| 69 |
|
| 70 |
+
{/* DESKTOP LAYOUT — Alibaba.com exact structure, rebranded to Cellex */}
|
| 71 |
<div className="hidden md:block home-desktop-layout">
|
| 72 |
<DesktopHome
|
| 73 |
flashDeals={flashDeals}
|
|
|
|
| 82 |
}
|
| 83 |
|
| 84 |
/* ============================================================
|
| 85 |
+
MOBILE HOME — Temu/Pinduoduo UI + AI banner + sellers
|
| 86 |
============================================================ */
|
| 87 |
function MobileHome({ flashDeals, trending, newArrivals, sellers, allProducts }: {
|
| 88 |
flashDeals: Product[];
|
|
|
|
| 128 |
</div>
|
| 129 |
</div>
|
| 130 |
|
| 131 |
+
{/* AI Assistant banner */}
|
| 132 |
<Link href="/ai-chat" className="block mx-3 mb-2">
|
| 133 |
<div className="bg-gradient-to-r from-violet-500 to-primary rounded-xl p-3 flex items-center gap-3 text-white">
|
| 134 |
<div className="w-10 h-10 rounded-full bg-white/20 backdrop-blur flex items-center justify-center shrink-0">
|
|
|
|
| 208 |
</div>
|
| 209 |
</Link>
|
| 210 |
|
| 211 |
+
{/* Top Sellers — horizontal scroll */}
|
| 212 |
{sellers.length > 0 && (
|
| 213 |
<div className="px-3 mb-3">
|
| 214 |
<div className="flex items-center justify-between mb-2">
|
|
|
|
| 257 |
</div>
|
| 258 |
)}
|
| 259 |
|
| 260 |
+
{/* Product grid — 2-column */}
|
| 261 |
<div className="grid grid-cols-2 gap-2 px-3 pb-4">
|
| 262 |
{allProducts.map((p) => (
|
| 263 |
<MobileProductCard key={p.id} product={p} />
|
|
|
|
| 338 |
}
|
| 339 |
|
| 340 |
/* ============================================================
|
| 341 |
+
DESKTOP HOME — Alibaba.com EXACT structure, rebranded to Cellex
|
| 342 |
+
Reference HTML: Pasted Content_1783816379023.txt
|
| 343 |
============================================================ */
|
| 344 |
function DesktopHome({ flashDeals, trending, newArrivals, sellers, allProducts }: {
|
| 345 |
flashDeals: Product[];
|
|
|
|
| 349 |
allProducts: Product[];
|
| 350 |
}) {
|
| 351 |
return (
|
| 352 |
+
<div className="bg-white min-h-screen pb-12">
|
| 353 |
+
{/* ===== 1. Top nav row: logo + small links ===== */}
|
| 354 |
+
<div className="border-b border-slate-100">
|
| 355 |
+
<div className="max-w-7xl mx-auto px-6 py-2.5 flex items-center justify-between">
|
| 356 |
+
{/* Logo left */}
|
| 357 |
+
<Link href="/" className="flex items-center gap-2 shrink-0">
|
| 358 |
+
<div className="w-9 h-9 rounded-xl brand-gradient flex items-center justify-center glow">
|
| 359 |
+
<span className="text-white font-extrabold text-lg" style={{ fontFamily: 'var(--font-geist-mono)' }}>C</span>
|
| 360 |
+
</div>
|
| 361 |
+
<span className="text-xl font-extrabold brand-text" style={{ fontFamily: 'var(--font-geist-mono)' }}>
|
| 362 |
+
Cellex.com
|
| 363 |
+
</span>
|
| 364 |
+
</Link>
|
| 365 |
+
|
| 366 |
+
{/* Small links */}
|
| 367 |
+
<div className="flex items-center gap-5 text-sm text-slate-600">
|
| 368 |
<Link href="/categories" className="hover:text-primary flex items-center gap-1">
|
| 369 |
<Layers className="w-3.5 h-3.5" /> All categories
|
| 370 |
</Link>
|
| 371 |
<Link href="/sellers" className="hover:text-primary">Featured selections</Link>
|
| 372 |
<Link href="/orders" className="hover:text-primary">Order protections</Link>
|
| 373 |
+
<span className="text-slate-200">|</span>
|
|
|
|
| 374 |
<Link href="/profile" className="hover:text-primary">Buyer Central</Link>
|
| 375 |
<Link href="/telegram" className="hover:text-primary">Help Center</Link>
|
| 376 |
+
<Link href="/link-account" className="hover:text-primary">App & extension</Link>
|
| 377 |
<Link href="/seller" className="hover:text-primary flex items-center gap-1">
|
| 378 |
<Store className="w-3.5 h-3.5" /> Sell on Cellex
|
| 379 |
</Link>
|
|
|
|
| 381 |
</div>
|
| 382 |
</div>
|
| 383 |
|
| 384 |
+
{/* ===== 2. Tabs row (AI Mode | Products | Manufacturers | Worldwide) — ABOVE search ===== */}
|
| 385 |
+
<div className="max-w-7xl mx-auto px-6 pt-6 pb-2">
|
| 386 |
+
<nav className="flex items-center gap-5" aria-label="Search tabs">
|
| 387 |
+
<Link href="/ai-chat" className="flex items-center gap-1.5 text-base font-semibold text-slate-800 hover:text-primary group">
|
| 388 |
+
<Sparkles className="w-4 h-4 text-primary" />
|
| 389 |
+
<span>AI Mode</span>
|
| 390 |
+
</Link>
|
| 391 |
+
<span className="w-px h-5 bg-slate-200" />
|
| 392 |
+
<Link href="/categories" className="text-base font-bold text-primary border-b-2 border-primary pb-1">
|
| 393 |
+
Products
|
| 394 |
+
</Link>
|
| 395 |
+
<Link href="/sellers" className="text-base font-semibold text-slate-800 hover:text-primary">
|
| 396 |
+
Manufacturers
|
| 397 |
+
</Link>
|
| 398 |
+
<Link href="/live" className="text-base font-semibold text-slate-800 hover:text-primary">
|
| 399 |
+
Worldwide
|
| 400 |
+
</Link>
|
| 401 |
+
</nav>
|
| 402 |
+
</div>
|
| 403 |
|
| 404 |
+
{/* ===== 3. Big centered search bar (cyan border, Image Search left, cyan Search button right) ===== */}
|
| 405 |
+
<div className="max-w-7xl mx-auto px-6 py-4">
|
| 406 |
<form
|
| 407 |
onSubmit={(e) => {
|
| 408 |
e.preventDefault();
|
|
|
|
| 411 |
window.location.href = `/search?q=${encodeURIComponent(input.value.trim())}`;
|
| 412 |
}
|
| 413 |
}}
|
| 414 |
+
className="max-w-4xl mx-auto flex items-center border-2 border-primary rounded-full overflow-hidden bg-white"
|
| 415 |
>
|
| 416 |
+
<Link href="/categories" className="px-4 py-3 text-slate-600 hover:text-primary border-r border-slate-200 flex items-center gap-1.5 shrink-0">
|
| 417 |
<Camera className="w-4 h-4" />
|
| 418 |
+
<span className="text-sm">Image Search</span>
|
| 419 |
</Link>
|
| 420 |
<input
|
| 421 |
type="text"
|
| 422 |
placeholder="What are you looking for?"
|
| 423 |
+
className="flex-1 px-4 py-3 outline-none text-base"
|
| 424 |
/>
|
| 425 |
<button
|
| 426 |
type="submit"
|
| 427 |
+
className="brand-gradient text-white font-bold px-8 py-3 flex items-center gap-1.5 shrink-0"
|
| 428 |
>
|
| 429 |
<Search className="w-4 h-4" />
|
| 430 |
Search
|
| 431 |
</button>
|
| 432 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 433 |
</div>
|
| 434 |
|
| 435 |
+
{/* ===== 4. "Connect with verified manufacturers" strip with 3 checkmark features ===== */}
|
| 436 |
+
<div className="max-w-7xl mx-auto px-6 py-4">
|
| 437 |
+
<div className="flex items-center justify-center gap-6 flex-wrap">
|
| 438 |
+
<div className="text-base font-bold text-slate-900 flex items-center gap-2">
|
| 439 |
+
Connect with verified
|
| 440 |
+
<span className="brand-text text-lg">manufacturers</span>
|
| 441 |
+
</div>
|
| 442 |
+
<div className="flex items-center gap-5 text-sm text-slate-600">
|
| 443 |
+
<span className="flex items-center gap-1.5">
|
| 444 |
+
<div className="w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center">
|
| 445 |
+
<Check className="w-3 h-3 text-primary" />
|
| 446 |
+
</div>
|
| 447 |
+
5K+ industries covered
|
| 448 |
+
</span>
|
| 449 |
+
<span className="flex items-center gap-1.5">
|
| 450 |
+
<div className="w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center">
|
| 451 |
+
<Check className="w-3 h-3 text-primary" />
|
| 452 |
+
</div>
|
| 453 |
+
Factory-direct pricing
|
| 454 |
+
</span>
|
| 455 |
+
<span className="flex items-center gap-1.5">
|
| 456 |
+
<div className="w-5 h-5 rounded-full bg-primary/10 flex items-center justify-center">
|
| 457 |
+
<Check className="w-3 h-3 text-primary" />
|
| 458 |
+
</div>
|
| 459 |
+
Sample & customization
|
| 460 |
+
</span>
|
| 461 |
+
</div>
|
| 462 |
</div>
|
| 463 |
</div>
|
| 464 |
|
| 465 |
+
{/* ===== 5. Welcome row (heading left, 3 CTAs right with circular icons) ===== */}
|
| 466 |
<div className="max-w-7xl mx-auto px-6 py-6 flex items-center justify-between">
|
| 467 |
<h2 className="text-2xl font-extrabold text-slate-900">Welcome to Cellex</h2>
|
| 468 |
<div className="flex items-center gap-8">
|
|
|
|
| 470 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
| 471 |
<ShoppingBag className="w-5 h-5 text-slate-700 group-hover:text-primary" />
|
| 472 |
</div>
|
| 473 |
+
<span className="text-xs text-slate-600">Request for Quotation</span>
|
| 474 |
</Link>
|
| 475 |
<Link href="/sellers" className="flex flex-col items-center gap-1.5 group">
|
| 476 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
|
|
|
| 480 |
</Link>
|
| 481 |
<Link href="/seller" className="flex flex-col items-center gap-1.5 group">
|
| 482 |
<div className="w-12 h-12 rounded-full bg-slate-100 flex items-center justify-center group-hover:bg-primary/10">
|
| 483 |
+
<Zap className="w-5 h-5 text-slate-700 group-hover:text-primary" />
|
| 484 |
</div>
|
| 485 |
+
<span className="text-xs text-slate-600">Fast customize</span>
|
| 486 |
</Link>
|
| 487 |
</div>
|
| 488 |
</div>
|
| 489 |
|
| 490 |
+
{/* ===== 6. 4-column category cards with LIST items + right arrows ===== */}
|
| 491 |
+
<div className="max-w-7xl mx-auto px-6">
|
| 492 |
<div className="grid grid-cols-4 gap-3">
|
| 493 |
+
{/* Card 1: Categories for you */}
|
| 494 |
+
<CategoryListCard
|
| 495 |
title="Categories for you"
|
|
|
|
| 496 |
icon={Layers}
|
| 497 |
+
items={[
|
| 498 |
+
{ label: 'Apparel & Accessories', href: '/categories?category=Fashion' },
|
| 499 |
+
{ label: 'Electronics & Phones', href: '/categories?category=Electronics' },
|
| 500 |
+
{ label: 'Home & Kitchen', href: '/categories?category=Home' },
|
| 501 |
+
]}
|
| 502 |
/>
|
| 503 |
+
|
| 504 |
+
{/* Card 2: Frequently searched — Smart Watches */}
|
| 505 |
+
<CategoryListCard
|
| 506 |
+
title="Frequently searched"
|
| 507 |
icon={Zap}
|
| 508 |
+
items={[
|
| 509 |
+
{ label: 'Smart Watches', href: '/categories?category=Electronics' },
|
| 510 |
+
{ label: 'Wireless Earbuds', href: '/categories?category=Electronics' },
|
| 511 |
+
{ label: 'Phone Accessories', href: '/categories?category=Electronics' },
|
| 512 |
+
]}
|
| 513 |
/>
|
| 514 |
+
|
| 515 |
+
{/* Card 3: Frequently searched — Cars (we'll use Motors / Sports) */}
|
| 516 |
+
<CategoryListCard
|
| 517 |
+
title="Frequently searched"
|
| 518 |
+
icon={TrendingUp}
|
| 519 |
+
items={[
|
| 520 |
+
{ label: 'Auto Parts', href: '/categories?category=Sports' },
|
| 521 |
+
{ label: 'Motorcycle Gear', href: '/categories?category=Sports' },
|
| 522 |
+
{ label: 'Bikes & Cycling', href: '/categories?category=Sports' },
|
| 523 |
+
]}
|
| 524 |
/>
|
| 525 |
+
|
| 526 |
+
{/* Card 4: Fast-selling products (orange highlighted) */}
|
| 527 |
+
<CategoryListCard
|
| 528 |
title="Fast-selling products"
|
|
|
|
| 529 |
icon={Flame}
|
|
|
|
| 530 |
highlighted
|
| 531 |
+
items={[
|
| 532 |
+
{ label: 'Flash Deals', href: '/categories?sort=flash' },
|
| 533 |
+
{ label: 'Trending Now', href: '/categories?sort=trending' },
|
| 534 |
+
{ label: 'New Arrivals', href: '/categories?sort=newest' },
|
| 535 |
+
]}
|
| 536 |
/>
|
| 537 |
</div>
|
| 538 |
</div>
|
| 539 |
+
|
| 540 |
+
{/* ===== Floating right-side chat widget (3 vertical icons) ===== */}
|
| 541 |
+
<div className="fixed right-4 bottom-8 z-40 flex flex-col gap-2">
|
| 542 |
+
<button className="w-11 h-11 rounded-full bg-white border border-slate-200 shadow-md flex items-center justify-center hover:border-primary hover:shadow-lg transition-all">
|
| 543 |
+
<MessageCircle className="w-5 h-5 text-slate-600" />
|
| 544 |
+
</button>
|
| 545 |
+
<button className="w-11 h-11 rounded-full bg-white border border-slate-200 shadow-md flex items-center justify-center hover:border-primary hover:shadow-lg transition-all">
|
| 546 |
+
<ImageIcon className="w-5 h-5 text-slate-600" />
|
| 547 |
+
</button>
|
| 548 |
+
<button className="w-11 h-11 rounded-full bg-white border border-slate-200 shadow-md flex items-center justify-center hover:border-primary hover:shadow-lg transition-all">
|
| 549 |
+
<HelpCircle className="w-5 h-5 text-slate-600" />
|
| 550 |
+
</button>
|
| 551 |
+
</div>
|
| 552 |
</div>
|
| 553 |
);
|
| 554 |
}
|
| 555 |
|
| 556 |
+
/* Category card with title + LIST items + right arrows (matches reference exactly) */
|
| 557 |
+
function CategoryListCard({ title, icon: Icon, items, highlighted }: {
|
| 558 |
title: string;
|
|
|
|
| 559 |
icon: any;
|
| 560 |
+
items: { label: string; href: string }[];
|
| 561 |
highlighted?: boolean;
|
| 562 |
}) {
|
| 563 |
return (
|
| 564 |
+
<div className={`rounded-xl p-4 border ${
|
| 565 |
+
highlighted ? 'bg-orange-50 border-orange-200' : 'bg-white border-slate-100'
|
| 566 |
+
}`}>
|
| 567 |
+
{/* Card title with icon */}
|
| 568 |
+
<div className="flex items-center gap-2 mb-3">
|
| 569 |
+
<Icon className={`w-4 h-4 ${highlighted ? 'text-orange-600' : 'text-slate-400'}`} />
|
| 570 |
+
<h3 className={`text-sm font-bold ${highlighted ? 'text-orange-700' : 'text-slate-900'}`}>
|
| 571 |
+
{title}
|
| 572 |
+
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 573 |
</div>
|
| 574 |
+
|
| 575 |
+
{/* List items with right arrows */}
|
| 576 |
+
<div className="space-y-2">
|
| 577 |
+
{items.map((item) => (
|
| 578 |
+
<Link
|
| 579 |
+
key={item.label}
|
| 580 |
+
href={item.href}
|
| 581 |
+
className={`flex items-center justify-between text-sm py-1.5 px-2 rounded-md hover:bg-white ${
|
| 582 |
+
highlighted ? 'text-slate-700 hover:bg-orange-100' : 'text-slate-600 hover:bg-slate-50'
|
| 583 |
+
} transition-colors`}
|
| 584 |
+
>
|
| 585 |
+
<span>{item.label}</span>
|
| 586 |
+
<ChevronRight className="w-3.5 h-3.5 text-slate-400" />
|
| 587 |
+
</Link>
|
| 588 |
+
))}
|
| 589 |
</div>
|
| 590 |
+
</div>
|
| 591 |
);
|
| 592 |
}
|