-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
143 lines (124 loc) · 2.62 KB
/
style.css
File metadata and controls
143 lines (124 loc) · 2.62 KB
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
/* ✅ Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Montserrat', 'Roboto', sans-serif;
}
/* ✅ Background and page padding */
body {
background: linear-gradient(to right, #cbe2e93a, #c3d2e691);
padding: 40px 20px;
}
/* ✅ Grid layout for product cards */
.product-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 30px;
justify-content: center;
max-width: 1200px;
margin: auto;
}
/* ✅ Individual product card */
.card {
position: relative;
background: #fff;
border-radius: 30px;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
padding: 20px;
transition: 0.4s ease;
}
/* ✅ Scale effect on hover */
.card:hover {
transform: scale(1.05);
}
/* ✅ Star icon style (default = gray) */
.favorite-icon {
position: absolute;
top: 20px;
right: 30px;
font-size: 24px;
color: #ccc;
/* gray */
cursor: pointer;
z-index: 1;
transition: color 0.3s ease;
}
/* ✅ Star icon after click = yellow */
.favorite-icon.active {
color: #ffae00;
}
/* ✅ Product image container */
.card-image {
width: 100%;
aspect-ratio: 1 / 1;
background: #f4f7f8;
border-radius: 12px;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
/* ✅ Product image itself */
.card-image img {
width: 90%;
height: 90%;
object-fit: cover;
border-radius: 12px;
transition: 0.4s ease;
}
/* ✅ Slight image animation on hover */
.card:hover .card-image img {
transform: scale(1.02) rotate(-3deg) translateX(-5px);
}
/* ✅ Product text content */
.card-content {
padding-top: 15px;
}
.card-content h3 {
font-size: 20px;
margin-bottom: 8px;
color: #333;
}
.card-content p {
font-size: 14px;
color: #666;
margin-bottom: 16px;
line-height: 1.5;
}
/* ✅ Add to Cart button */
.add-to-cart {
padding: 10px 20px;
background: #0f8b8d;
color: #fff;
border-radius: 10px;
cursor: pointer;
transition: background 0.3s ease;
font-weight: bold;
border: none;
}
.add-to-cart:hover {
background: #0c6c6e;
}
/* ✅ Media queries for responsiveness */
@media (max-width: 768px) {
.product-grid {
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 20px;
}
.card-content h3 {
font-size: 20px;
}
.card-content p {
font-size: 13px;
}
.add-to-cart {
padding: 8px 20px;
font-size: 14px;
}
}
@media (max-width: 480px) {
.product-grid {
grid-template-columns: 1fr;
}
}