Skip to content

Commit 32c650d

Browse files
committed
Adding some features
1 parent c40f0ee commit 32c650d

File tree

4 files changed

+469
-10
lines changed

4 files changed

+469
-10
lines changed

css/style.css

Lines changed: 259 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,94 @@ body {
8585
display: none;
8686
}
8787

88+
/* Navbar Search form */
89+
.navbar .search-form {
90+
position: absolute;
91+
top: 115%;
92+
right: 7%;
93+
background-color: #fff;
94+
width: 50rem;
95+
height: 5rem;
96+
display: flex;
97+
align-items: center;
98+
transform: scaleY(0);
99+
transform-origin: top;
100+
transition: 0.3s;
101+
}
102+
103+
.navbar .search-form.active {
104+
transform: scaleY(1);
105+
}
106+
107+
.navbar .search-form input {
108+
height: 100%;
109+
width: 100%;
110+
font-size: 1.6rem;
111+
color: var(--bg);
112+
padding: 1rem;
113+
}
114+
115+
.navbar .search-form label {
116+
cursor: pointer;
117+
font-size: 2rem;
118+
margin-right: 1.5rem;
119+
color: var(--bg);
120+
}
121+
122+
/* Shopping Cart */
123+
.shopping-cart {
124+
position: absolute;
125+
top: 100%;
126+
right: -100%;
127+
height: 100vh;
128+
width: 35rem;
129+
padding: 0 1.5rem;
130+
background-color: #fff;
131+
color: var(--bg);
132+
transition: 0.3s;
133+
}
134+
135+
.shopping-cart.active {
136+
right: 0;
137+
}
138+
139+
.shopping-cart .cart-item {
140+
margin: 2rem 0;
141+
display: flex;
142+
align-items: center;
143+
gap: 1.5rem;
144+
padding-bottom: 1rem;
145+
border-bottom: 1px dashed #666;
146+
position: relative;
147+
}
148+
149+
.shopping-cart img {
150+
height: 6rem;
151+
border-radius: 50%;
152+
}
153+
154+
.shopping-cart h3 {
155+
font-size: 1.4rem;
156+
padding-bottom: 0.5rem;
157+
}
158+
159+
.shopping-cart .item-price {
160+
font-size: 1rem;
161+
}
162+
163+
.shopping-cart .remove-item {
164+
position: absolute;
165+
right: 1rem;
166+
font-size: 1.2rem;
167+
cursor: pointer;
168+
color: var(--bg);
169+
transition: 0.3s;
170+
}
171+
172+
.shopping-cart .remove-item:hover {
173+
color: var(--primary);
174+
}
175+
88176
/* Hero Section */
89177
.hero {
90178
min-height: 100vh;
@@ -150,12 +238,14 @@ body {
150238
/* About Section */
151239
.about,
152240
.menu,
241+
.products,
153242
.contact {
154243
padding: 6rem 7% 1.4rem;
155244
}
156245

157246
.about h2,
158247
.menu h2,
248+
.products h2,
159249
.contact h2 {
160250
text-align: center;
161251
font-size: 2rem;
@@ -164,6 +254,7 @@ body {
164254

165255
.about h2 span,
166256
.menu h2 span,
257+
.products h2 span,
167258
.contact h2 span {
168259
color: var(--primary);
169260
}
@@ -199,11 +290,13 @@ body {
199290

200291
/* Menu Section */
201292
.menu h2,
293+
.products h2,
202294
.contact h2 {
203295
margin-bottom: 1rem;
204296
}
205297

206298
.menu p,
299+
.products p,
207300
.contact p {
208301
text-align: center;
209302
max-width: 30rem;
@@ -237,6 +330,79 @@ body {
237330
font-size: 0.8rem;
238331
}
239332

333+
/* Products Section */
334+
.products .row {
335+
display: grid;
336+
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
337+
gap: 1.5rem;
338+
margin-top: 4rem;
339+
}
340+
341+
.products .product-card {
342+
text-align: center;
343+
border: 1px solid #666;
344+
padding: 2rem;
345+
border-radius: 0.5rem;
346+
}
347+
348+
.products .product-icons {
349+
display: flex;
350+
justify-content: center;
351+
gap: 0.5rem;
352+
}
353+
354+
.products .product-icons a {
355+
width: 4rem;
356+
height: 4rem;
357+
color: #fff;
358+
margin: 0.3rem;
359+
border: 1px solid #fff;
360+
border-radius: 50%;
361+
display: flex;
362+
justify-content: center;
363+
align-items: center;
364+
text-decoration: none;
365+
transition: 0.4s;
366+
}
367+
368+
.products .product-icons a:hover {
369+
background-color: var(--primary);
370+
border: 1px solid var(--primary);
371+
}
372+
373+
.products .product-image {
374+
padding: 0.5rem 0;
375+
}
376+
377+
.products .product-image img {
378+
height: 18rem;
379+
}
380+
381+
.products .product-content h3 {
382+
font-size: 2rem;
383+
}
384+
385+
.products .product-stars {
386+
font-size: 1.7rem;
387+
padding: 0.5rem;
388+
color: var(--primary);
389+
}
390+
391+
.products .product-stars .star-full {
392+
fill: var(--primary);
393+
}
394+
395+
.products .product-price {
396+
font-size: 1.2rem;
397+
font-weight: 700;
398+
}
399+
400+
.products .product-price span {
401+
text-decoration: line-through;
402+
font-weight: lighter;
403+
font-size: 1rem;
404+
}
405+
240406
/* Contact Section */
241407
.contact .row {
242408
display: flex;
@@ -251,8 +417,8 @@ body {
251417
}
252418

253419
.contact .row form {
254-
flex: 1 1 45rem;
255-
padding: 5rem 2rem;
420+
flex: 1 1 30rem;
421+
padding: 2rem 4rem;
256422
text-align: center;
257423
}
258424

@@ -268,7 +434,7 @@ body {
268434
.contact .row form .input-group input {
269435
width: 100%;
270436
padding: 2rem;
271-
font-size: 1.7rem;
437+
font-size: 1rem;
272438
background: none;
273439
color: #fff;
274440
}
@@ -277,10 +443,16 @@ body {
277443
margin-top: 3rem;
278444
display: inline-block;
279445
padding: 1rem 3rem;
280-
font-size: 1.7rem;
446+
font-size: 1rem;
281447
color: #fff;
282448
background-color: var(--primary);
449+
border-radius: 0.5rem;
283450
cursor: pointer;
451+
transition: 0.3s;
452+
}
453+
454+
.contact .row form .btn:hover {
455+
background-color: var(--bg);
284456
}
285457

286458
/* Footer */
@@ -323,6 +495,80 @@ footer .credit a {
323495
font-weight: 700;
324496
}
325497

498+
/* Modal Box */
499+
/* Item Detail */
500+
.modal {
501+
display: none;
502+
position: fixed;
503+
z-index: 9999;
504+
left: 0;
505+
top: 0;
506+
width: 100%;
507+
height: 100%;
508+
overflow: auto;
509+
background-color: rgba(0, 0, 0, 0.7);
510+
}
511+
512+
.modal-container {
513+
position: relative;
514+
background-color: #fefefe;
515+
color: var(--bg);
516+
margin: 15% auto;
517+
padding: 1.2rem;
518+
border: 1px solid #666;
519+
width: 80%;
520+
animation: animateModal 0.5s;
521+
}
522+
523+
/* Modal Animation */
524+
@keyframes animateModal {
525+
from {
526+
top: -300px;
527+
opacity: 0;
528+
}
529+
530+
to {
531+
top: 0px;
532+
opacity: 1;
533+
}
534+
}
535+
536+
.modal-container .close-icon {
537+
position: absolute;
538+
top: 0.5rem;
539+
right: 1rem;
540+
cursor: pointer;
541+
}
542+
543+
.modal-content {
544+
display: flex;
545+
flex-wrap: nowrap;
546+
}
547+
548+
.modal-content img {
549+
height: 15.5rem;
550+
margin-right: 2rem;
551+
margin-bottom: 2rem;
552+
}
553+
554+
.modal-content p {
555+
font-size: 0.9rem;
556+
line-height: 1.5;
557+
margin-top: 1rem;
558+
}
559+
560+
.modal-content a {
561+
display: flex;
562+
gap: 1rem;
563+
width: 12rem;
564+
background-color: var(--primary);
565+
color: #fff;
566+
margin-top: 1rem;
567+
padding: 1rem 1.6rem;
568+
border-radius: 0.5rem;
569+
text-decoration: none;
570+
}
571+
326572
/* Media Queries */
327573
/* Laptop */
328574
@media (max-width: 1366px) {
@@ -371,6 +617,11 @@ footer .credit a {
371617
transform: scaleX(0.2);
372618
}
373619

620+
.navbar .search-form {
621+
width: 90%;
622+
right: 2rem;
623+
}
624+
374625
.about .row {
375626
flex-wrap: wrap;
376627
}
@@ -411,6 +662,10 @@ footer .credit a {
411662
padding-top: 0;
412663
}
413664

665+
.modal-content img {
666+
flex-wrap: wrap;
667+
}
668+
414669
/* Mobile Phone */
415670
@media (max-width: 450px) {
416671
html {

img/products/1.jpg

84.2 KB
Loading

0 commit comments

Comments
 (0)