-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProductList.css
252 lines (223 loc) · 5.34 KB
/
ProductList.css
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
/* Reset some default styles */
body, h1, ul {
margin: 0;
padding: 0;
}
/* Set a background color */
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
}
/* Navbar */
.navbar {
background-color: #4CAF50;
color: #fff!important;
padding: 15px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20px;
}
.navbar .ul {
display: flex;
justify-content: space-between;
align-items: center;
width: 1100px;
}
.navbar li {
margin-right: 30px;
}
.navbar .ul div a {
color: white;
font-size: 30px;
text-decoration: none;
}
/* Product Grid */
.product-grid {
display:flex;
flex-direction: column;
width: 100vw;
align-items: center;
justify-content: center;
}
.product-list {
display: flex;
flex-wrap: wrap;
gap: 50px;
/* background-color: pink; */
/* justify-content: space-between; */
padding: 20px;
width: 100%;
align-items: center;
justify-content: center;
}
/* Product Card */
.product-card {
flex: 0 0 calc(33.33% - 20px); /* Adjust width for 3 cards per row with 20px gap */
max-width: calc(26.33% - 20px); /* Adjust max-width for 3 cards per row with 20px gap */
margin-bottom: 20px;
padding: 20px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 5px;
text-align: center;
position: relative;
gap: 20px;
}
/* Pseudo-classes - Hover effect on product button */
.product-card:hover {
transform: scale(1.05);
transition: transform 0.3s ease-in-out;
z-index: 1;
}
.product-title {
font-weight: bold;
margin-bottom: 10px;
}
.product-price {
color: #e74c3c;
font-size: 1.2rem;
margin-bottom: 10px;
}
.product-image {
max-width: 100%;
height: 200px; /* Adjust height for better consistency */
}
.product-button {
background-color: #e74c3c;
color: #fff;
border: none;
padding: 10px 20px;
cursor: pointer;
transition: background-color 0.3s ease-in-out;
margin-top: 10px;
}
.product-button:hover {
background-color: #c0392b;
}
/* Pseudo-elements - Sale badge */
.product-card::before {
content: "SALE";
background-color: #e74c3c;
color: #fff;
position: absolute;
top: 0;
right: 0;
padding: 5px 10px;
border-radius: 0 0 0 5px;
}
.tag_home_link{
display: flex;
/* background-color: red; */
flex-direction: column;
align-items: center;
justify-content: center;
margin-left: 50px;
color: white;
text-decoration: none;
font-size: 20px;
}
.tag_home_link h3{
font-size: 30px;
}
.tag a{
text-decoration: none;
}
.tag {
width: 400px;
display: flex;
align-items: center;
justify-content: center;
}
.tag img {
height: 70px;
width: 70px;
border-radius: 70%;
}
.luxury {
display: flex;
align-items: center;
justify-content: center;
width: 650px;
font-size: 19px;
}
.cart{
color: white;
display: flex;
}
.cart_quantity_count{
margin-top: 16px;
/* background-color: red; */
margin-left: 27px;
position: absolute;
font-size: 29px;
}
.plantname_heading{
display: flex;
align-items: center;
justify-content: center;
/* background-color: yellow; */
}
.plant_heading{
width: 400px;
text-align: center;
margin: 20px;
border: 1px solid rgb(5, 4, 4);
border-left: none;
border-right: none;
}
/* Add Media Query for responsiveness */
@media (max-width: 768px) {
.product-card {
flex: 1 1 calc(50% - 20px); /* Adjust width for 2 cards per row with 20px gap on smaller screens */
max-width: calc(50% - 20px); /* Adjust max-width for 2 cards per row with 20px gap on smaller screens */
}
}
/* ProductList.css */
.product-button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
transition-duration: 0.4s;
cursor: pointer;
}
.product-button:hover {
background-color: #45a049;
}
.product-button.added-to-cart {
background-color: grey; /* Grey when product is added */
}
@media (max-width: 1200px) {
.product-card {
flex: 1 1 calc(33.33% - 20px); /* Adjust width for 3 cards per row with 20px gap on medium screens */
max-width: calc(33.33% - 20px); /* Adjust max-width for 3 cards per row with 20px gap on medium screens */
}
}
@media (max-width: 768px) {
.product-card {
flex: 1 1 calc(50% - 20px); /* Adjust width for 2 cards per row with 20px gap on small screens */
max-width: calc(50% - 20px); /* Adjust max-width for 2 cards per row with 20px gap on small screens */
}
.navbar {
flex-direction: column; /* Change flex direction to stack items vertically */
align-items: center; /* Align items to the center of the container */
}
.tag {
margin-bottom: 20px; /* Add margin bottom for spacing */
text-align: center; /* Align text to the center */
}
.ul {
display: flex; /* Set display to flex */
flex-direction: column; /* Change flex direction to stack items vertically */
gap: 10px; /* Add gap between items */
}
.ul div {
text-align: center; /* Align text to the center */
}
}