Skip to content

Commit 3b60f7a

Browse files
naheel0LuksFP
andcommitted
Update UI colors and styling for product pages
Switch primary accent to a warmer brown (#3D1A12) and refine component styling across the products UI. Changes include: header typography and subtitle color in ProductsPage; pagination button/indicator colors and hover states; ProductFilters text, active state and availability checkbox styling; ProductCard background, badges, placeholders, hover overlay and CTA button styles (no behavioral changes); ProductGrid empty-state border/text; ProductToolbar border, view-button states and responsive filter button; SearchBar icon/input colors and placeholder color; SortSelect text and chevron color. These are visual polish updates only—no data or business logic changes. Co-Authored-By: Lucas <149438171+luksfp@users.noreply.github.com>
1 parent 8b59813 commit 3b60f7a

8 files changed

Lines changed: 62 additions & 37 deletions

File tree

src/features/products/components/Page/ProductsPage.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@ const ProductsPage: React.FC = () => {
3232
return (
3333
<div className="min-h-screen bg-[#F6F4F1] px-6 py-12 md:py-24">
3434
<div className="max-w-7xl mx-auto">
35+
{/* Header Section */}
3536
<div className="mb-20 text-center md:text-left">
36-
<h1 className="text-6xl md:text-8xl font-black text-[#111111] tracking-tight">
37-
ZAYQ<span className="text-[#8F8F8F]">CASE</span>
37+
<h1 className="text-6xl md:text-8xl font-black text-[#3D1A12] tracking-tight">
38+
ZAYQ<span className="text-[#3D1A12]/30">CASE</span>
3839
</h1>
39-
<p className="mt-4 text-[#8F8F8F] font-bold uppercase tracking-[0.4em] text-xs">Essential Protection Series</p>
40+
<p className="mt-4 text-[#3D1A12]/50 font-bold uppercase tracking-[0.4em] text-xs">
41+
Essential Protection Series
42+
</p>
4043
</div>
4144

4245
<ProductToolbar />
@@ -48,8 +51,8 @@ const ProductsPage: React.FC = () => {
4851
<div className="flex-1">
4952
{filteredData.length === 0 ? (
5053
<div className="flex flex-col items-center justify-center py-20 text-center">
51-
<p className="text-xl font-bold text-[#111111]">No cases found</p>
52-
<p className="text-[#8F8F8F]">Try adjusting your filters or search.</p>
54+
<p className="text-xl font-bold text-[#3D1A12]">No cases found</p>
55+
<p className="text-[#3D1A12]/40">Try adjusting your filters or search.</p>
5356
</div>
5457
) : (
5558
<>

src/features/products/components/Pagination/Pagination.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const Pagination: React.FC = () => {
1717
setCurrentPage(Math.max(1, currentPage - 1));
1818
window.scrollTo({ top: 0, behavior: 'smooth' });
1919
}}
20-
className="w-14 h-14 flex items-center justify-center rounded-full bg-white border border-[#E6E3DF] text-[#111111] transition-all hover:bg-[#111111] hover:text-white disabled:opacity-20"
20+
className="w-14 h-14 flex items-center justify-center rounded-full bg-white border border-[#3D1A12]/10 text-[#3D1A12] transition-all hover:bg-[#3D1A12] hover:text-white disabled:opacity-20"
2121
disabled={currentPage === 1}
2222
aria-label="left"
2323
>
@@ -32,7 +32,7 @@ const Pagination: React.FC = () => {
3232
setCurrentPage(n);
3333
window.scrollTo({ top: 0, behavior: 'smooth' });
3434
}}
35-
className={`transition-all duration-500 rounded-full ${n === currentPage ? 'bg-[#111111] w-8 h-2.5' : 'bg-[#E6E3DF] w-2.5 h-2.5'
35+
className={`transition-all duration-500 rounded-full ${n === currentPage ? 'bg-[#3D1A12] w-8 h-2.5' : 'bg-[#3D1A12]/20 w-2.5 h-2.5'
3636
}`}
3737
aria-label="button"
3838
/>
@@ -44,7 +44,7 @@ const Pagination: React.FC = () => {
4444
setCurrentPage(Math.min(totalPages, currentPage + 1));
4545
window.scrollTo({ top: 0, behavior: 'smooth' });
4646
}}
47-
className="w-14 h-14 flex items-center justify-center rounded-full bg-white border border-[#E6E3DF] text-[#111111] transition-all hover:bg-[#111111] hover:text-white disabled:opacity-20"
47+
className="w-14 h-14 flex items-center justify-center rounded-full bg-white border border-[#3D1A12]/10 text-[#3D1A12] transition-all hover:bg-[#3D1A12] hover:text-white disabled:opacity-20"
4848
disabled={currentPage === totalPages}
4949
aria-label="rigth"
5050
>
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
import React from "react";
22
import { useProductStore } from "../../../../store/product.store";
3+
34
const ProductFilters: React.FC = () => {
45
const { selectedCategory, setSelectedCategory } = useProductStore();
56
const categories = ['All', 'iPhone 15 Pro', 'iPhone 15', 'iPhone 14'];
67

78
return (
89
<div className="hidden lg:flex flex-col gap-10 w-64 shrink-0 sticky top-12 h-fit">
910
<div>
10-
<h4 className="text-[10px] font-black uppercase tracking-[0.25em] text-[#8F8F8F] mb-6">Device Model</h4>
11+
<h4 className="text-[10px] font-black uppercase tracking-[0.25em] text-[#3D1A12]/50 mb-6">Device Model</h4>
1112
<div className="flex flex-col gap-3">
1213
{categories.map(cat => (
1314
<button
1415
key={cat}
1516
onClick={() => setSelectedCategory(cat)}
1617
className={`text-left text-sm font-bold transition-all ${
17-
selectedCategory === cat ? 'text-[#111111] translate-x-2' : 'text-[#8F8F8F] hover:text-[#111111]'
18+
selectedCategory === cat ? 'text-[#3D1A12] translate-x-2' : 'text-[#3D1A12]/40 hover:text-[#3D1A12]'
1819
}`}
1920
>
2021
{cat}
@@ -24,13 +25,18 @@ const ProductFilters: React.FC = () => {
2425
</div>
2526

2627
<div>
27-
<h4 className="text-[10px] font-black uppercase tracking-[0.25em] text-[#8F8F8F] mb-6">Availability</h4>
28-
<label className="flex items-center gap-3 text-sm font-bold text-[#111111] cursor-pointer">
29-
<input type="checkbox" className="w-4 h-4 accent-[#111111] rounded border-[#E6E3DF]" defaultChecked />
28+
<h4 className="text-[10px] font-black uppercase tracking-[0.25em] text-[#3D1A12]/50 mb-6">Availability</h4>
29+
<label className="flex items-center gap-3 text-sm font-bold text-[#3D1A12] cursor-pointer">
30+
<input
31+
type="checkbox"
32+
className="w-4 h-4 accent-[#3D1A12] rounded border-[#3D1A12]/20"
33+
defaultChecked
34+
/>
3035
In Stock Only
3136
</label>
3237
</div>
3338
</div>
3439
);
3540
};
41+
3642
export default ProductFilters;

src/features/products/components/ProductGrid/ProductCard.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ const ProductCard: React.FC<{ product: Product }> = ({ product }) => {
88
const handleBuyNow = () => {
99
if (isComingSoon || isOutOfStock) return;
1010
const message = encodeURIComponent(`Hi ZAYQ! I'm interested in the ${product.name} (₹${product.price}). Is it in stock?`);
11-
window.open(`https://wa.me/917306912910?text=${message}`, '_blank'); // Replace with your WhatsApp number
11+
window.open(`https://wa.me/917306912910?text=${message}`, '_blank');
1212
};
1313

1414
return (
1515
<div className="flex flex-col group">
16-
{/* Image Wrapper */}
17-
<div className="relative aspect-4/5 rounded-2xl bg-[#E6E3DF] overflow-hidden transition-all duration-500 group-hover:bg-[#EFECE8]">
16+
{/* Image Wrapper - Using a warmer brand-compatible gray */}
17+
<div className="relative aspect-4/5 rounded-2xl bg-[#EFEBE9] overflow-hidden transition-all duration-500 group-hover:bg-[#EAE4E1]">
1818

1919
{/* Status Badge */}
2020
{(isComingSoon || isOutOfStock) && (
2121
<div className="absolute top-4 left-4 z-20 px-3 py-1 bg-white/90 backdrop-blur-md rounded-full shadow-sm">
22-
<p className="text-[9px] font-black uppercase tracking-widest text-black">
22+
<p className="text-[9px] font-black uppercase tracking-widest text-[#3D1A12]">
2323
{isComingSoon ? 'Coming Soon' : 'Sold Out'}
2424
</p>
2525
</div>
@@ -34,31 +34,31 @@ const ProductCard: React.FC<{ product: Product }> = ({ product }) => {
3434
className="w-full h-full object-cover"
3535
/>
3636
) : (
37-
<div className="w-full h-full flex items-center justify-center text-gray-400 text-xs">
37+
<div className="w-full h-full flex items-center justify-center text-[#3D1A12]/30 text-xs font-medium">
3838
No Image Available
3939
</div>
4040
)}
4141
</div>
4242

43-
{/* Hover Overlay for In-Stock items */}
43+
{/* Hover Overlay */}
4444
{!isComingSoon && !isOutOfStock && (
45-
<div className="absolute inset-0 bg-black/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
45+
<div className="absolute inset-0 bg-[#3D1A12]/5 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
4646
)}
4747
</div>
4848

4949
{/* Details Section */}
5050
<div className="mt-5 flex flex-col items-center text-center">
51-
<h3 className="text-base font-bold text-[#111111] tracking-tight">{product.name}</h3>
52-
<p className="text-[#8F8F8F] text-xs font-medium uppercase tracking-wider mt-1">{product.category}</p>
53-
<p className="text-[#111111] font-semibold mt-2">{product.price.toLocaleString()}</p>
51+
<h3 className="text-base font-bold text-[#3D1A12] tracking-tight">{product.name}</h3>
52+
<p className="text-[#3D1A12]/50 text-xs font-medium uppercase tracking-wider mt-1">{product.category}</p>
53+
<p className="text-[#3D1A12] font-semibold mt-2">{product.price.toLocaleString()}</p>
5454

5555
<button
5656
onClick={handleBuyNow}
5757
disabled={isComingSoon || isOutOfStock}
5858
className={`mt-4 w-full py-3 text-[10px] font-bold uppercase tracking-[0.2em] rounded-xl transition-all duration-300
5959
${isComingSoon || isOutOfStock
60-
? 'bg-gray-200 text-gray-400 cursor-not-allowed'
61-
: 'bg-[#111111] text-white hover:bg-black active:scale-95'}`}
60+
? 'bg-[#3D1A12]/10 text-[#3D1A12]/40 cursor-not-allowed'
61+
: 'bg-[#3D1A12] text-white hover:opacity-90 active:scale-95 shadow-sm'}`}
6262
>
6363
{isComingSoon ? 'Coming Soon' : isOutOfStock ? 'Sold Out' : 'Order via WhatsApp'}
6464
</button>
@@ -67,4 +67,4 @@ const ProductCard: React.FC<{ product: Product }> = ({ product }) => {
6767
);
6868
};
6969

70-
export default ProductCard;
70+
export default ProductCard;
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
import React from "react";
22
import type { Product } from "../../../../store/product.store";
33
import ProductCard from "./ProductCard";
4+
45
const ProductGrid: React.FC<{ products: Product[] }> = ({ products }) => {
56
if (products.length === 0) {
67
return (
7-
<div className="flex flex-col items-center justify-center py-40 bg-white/50 rounded-3xl border-2 border-dashed border-[#E6E3DF]">
8-
<p className="text-[#8F8F8F] font-medium italic">No cases match your filter.</p>
8+
<div className="flex flex-col items-center justify-center py-40 bg-white/50 rounded-3xl border-2 border-dashed border-[#3D1A12]/10">
9+
<p className="text-[#3D1A12]/40 font-medium italic">No cases match your filter.</p>
910
</div>
1011
);
1112
}
13+
1214
return (
1315
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-12 gap-y-24">
1416
{products.map(p => <ProductCard key={p.id} product={p} />)}
1517
</div>
1618
);
1719
};
20+
1821
export default ProductGrid;

src/features/products/components/ProductToolbar/ProductToolbar.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,31 @@ import {
66
Menu,
77
SlidersHorizontal
88
} from "lucide-react";
9+
910
const ProductToolbar: React.FC = () => {
1011
return (
11-
<div className="flex flex-col md:flex-row gap-4 items-center justify-between mb-20 pb-8 border-b border-[#E6E3DF]">
12+
<div className="flex flex-col md:flex-row gap-4 items-center justify-between mb-20 pb-8 border-b border-[#3D1A12]/10">
1213
<div className="flex items-center gap-4 w-full md:w-auto">
1314
<SearchBar />
14-
<button className="p-4 bg-white rounded-2xl text-[#111111] hover:bg-[#EFECE8] transition-colors md:hidden" aria-label="Filter products">
15+
<button className="p-4 bg-white rounded-2xl text-[#3D1A12] hover:bg-[#EFEBE9] transition-colors md:hidden" aria-label="Filter products">
1516
<SlidersHorizontal size={18} />
1617
</button>
1718
</div>
1819
<div className="flex items-center gap-4 w-full md:w-auto">
1920
<div className="hidden md:flex bg-white p-1 rounded-xl gap-1">
20-
<button className="p-2 bg-[#F6F4F1] rounded-lg text-[#111111]" aria-label="Grid view"><LayoutGrid size={16} /></button>
21-
<button className="p-2 text-[#8F8F8F] hover:text-[#111111]" aria-label="List view"><Menu size={16} /></button>
21+
{/* Active state using a light brown tint */}
22+
<button className="p-2 bg-[#EFEBE9] rounded-lg text-[#3D1A12]" aria-label="Grid view">
23+
<LayoutGrid size={16} />
24+
</button>
25+
{/* Inactive state using muted brown */}
26+
<button className="p-2 text-[#3D1A12]/40 hover:text-[#3D1A12]" aria-label="List view">
27+
<Menu size={16} />
28+
</button>
2229
</div>
2330
<SortSelect />
2431
</div>
2532
</div>
2633
);
2734
};
35+
2836
export default ProductToolbar;
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
import React from "react";
22
import { Search } from "lucide-react";
33
import { useProductStore } from "../../../../store/product.store";
4+
45
const SearchBar: React.FC = () => {
56
const { searchQuery, setSearchQuery } = useProductStore();
67
return (
78
<div className="relative w-full md:w-80 group">
8-
<Search className="absolute left-4 top-1/2 -translate-y-1/2 text-[#8F8F8F] group-focus-within:text-[#111111] transition-colors" size={16} />
9+
<Search
10+
className="absolute left-4 top-1/2 -translate-y-1/2 text-[#3D1A12]/40 group-focus-within:text-[#3D1A12] transition-colors"
11+
size={16}
12+
/>
913
<input
1014
type="text"
1115
placeholder="Find your model..."
1216
value={searchQuery}
1317
onChange={(e) => setSearchQuery(e.target.value)}
14-
className="w-full bg-[#FFFFFF] border-none rounded-2xl py-4 pl-12 pr-6 text-sm focus:ring-1 focus:ring-[#E6E3DF] outline-none transition-all placeholder:text-[#8F8F8F]"
18+
className="w-full bg-[#FFFFFF] border-none rounded-2xl py-4 pl-12 pr-6 text-sm focus:ring-1 focus:ring-[#3D1A12]/20 outline-none transition-all placeholder:text-[#3D1A12]/40 text-[#3D1A12]"
1519
/>
1620
</div>
1721
);
1822
};
23+
1924
export default SearchBar;

src/features/products/components/ProductToolbar/SortSelect.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ const SortSelect: React.FC = () => {
1212
id="sortSelect"
1313
value={sortBy}
1414
onChange={(e) => setSortBy(e.target.value as 'featured' | 'price-asc' | 'price-desc')}
15-
className="appearance-none bg-[#FFFFFF] border-none rounded-2xl py-4 pl-6 pr-12 text-xs font-bold uppercase tracking-widest focus:ring-1 focus:ring-[#E6E3DF] outline-none cursor-pointer"
15+
className="appearance-none bg-[#FFFFFF] border-none rounded-2xl py-4 pl-6 pr-12 text-xs font-bold uppercase tracking-widest text-[#3D1A12] focus:ring-1 focus:ring-[#3D1A12]/20 outline-none cursor-pointer"
1616
>
1717
<option value="featured">Featured</option>
1818
<option value="price-asc">Price: Low</option>
1919
<option value="price-desc">Price: High</option>
2020
</select>
21-
<ChevronDown className="absolute right-4 top-1/2 -translate-y-1/2 text-[#8F8F8F] pointer-events-none" size={14} />
21+
<ChevronDown className="absolute right-4 top-1/2 -translate-y-1/2 text-[#3D1A12]/40 pointer-events-none" size={14} />
2222
</div>
2323
)
2424
}
2525

26-
export default SortSelect
26+
export default SortSelect

0 commit comments

Comments
 (0)