-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
161 lines (155 loc) · 2.88 KB
/
style.css
File metadata and controls
161 lines (155 loc) · 2.88 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/* Reset + Base */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', sans-serif;
background-color: #f2f2f2;
color: #333;
}
/* Header */
header {
background-color: #1f2937;
color: #fff;
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky;
top: 0;
z-index: 10;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
header h1 {
font-size: 1.8rem;
}
.cart {
cursor: pointer;
background-color: #10b981;
padding: 0.5rem 1rem;
border-radius: 20px;
font-weight: bold;
}
/* Filters */
.filters {
display: flex;
justify-content: center;
gap: 1rem;
padding: 1rem;
background-color: white;
flex-wrap: wrap;
}
.filters select {
padding: 0.5rem 1rem;
border: 1px solid #ccc;
border-radius: 6px;
background-color: #f9f9f9;
}
/* Product Cards */
.product-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 1.5rem;
padding: 2rem;
}
.card {
background-color: white;
padding: 1rem;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
transition: transform 0.3s ease, box-shadow 0.3s ease;
animation: fadeIn 0.4s ease-in;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.card img {
width: 100%;
height: 160px;
object-fit: cover;
border-radius: 8px;
}
.card h3 {
margin: 0.8rem 0 0.3rem;
font-size: 1.1rem;
}
.card p {
margin: 0.2rem 0 1rem;
font-weight: bold;
color: #10b981;
}
.card button {
padding: 0.5rem;
background: #3b82f6;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: bold;
transition: background 0.2s;
width: 100%;
}
.card button:hover {
background-color: #2563eb;
}
.card button:active {
transform: scale(0.96);
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Cart Popup */
.cart-popup {
position: fixed;
top: 20%;
right: 20px;
width: 300px;
background: white;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
padding: 1.2rem;
border-radius: 10px;
z-index: 1000;
animation: fadeIn 0.4s ease;
}
.cart-popup.hidden {
display: none;
}
.cart-popup h2 {
margin-bottom: 1rem;
}
.cart-popup ul {
list-style: none;
padding: 0;
margin: 0;
max-height: 200px;
overflow-y: auto;
}
.cart-popup ul li {
margin-bottom: 0.5rem;
border-bottom: 1px solid #eee;
padding-bottom: 0.5rem;
}
.cart-popup button {
margin-top: 1rem;
background-color: crimson;
color: white;
width: 100%;
padding: 0.6rem;
border: none;
border-radius: 6px;
font-weight: bold;
cursor: pointer;
}
.cart-popup button:hover {
background-color: #b91c1c;
}