-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
794 lines (758 loc) · 17 KB
/
style.css
File metadata and controls
794 lines (758 loc) · 17 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
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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
*{
font-family: 'Poppins', sans-serif;
margin: 0;
padding: 0;
scroll-padding-top: 1rem;
scroll-behavior: smooth;
list-style: none;
text-decoration: none;
box-sizing: border-box;
}
:root {
--main-color:#d90429;
--text-color:#020102;
--bg-color:#fff;
}
html::-webkit-scrollbar{
width: 0.5rem; /* Corrected from 0,5rem */
background: transparent;
}
html::-webkit-scrollbar-thumb{
border-radius: 5rem;
background: var(--text-color);
}
section {
padding: 4rem 0 2rem;
}
img{
width: 100%;
}
body{
color: var(--text-color);
}
.container{
max-width: 1068px;
margin-left: auto;
margin-right: auto;
}
header{
display: block;
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
header.shadow {
background: var(--bg-color);
box-shadow: 4px 4px 20px rgb(15 54 55 / 20%);
transition: 0.5s ease; /* Corrected from 0,5s */
}
header.shadow #search-icon, header.shadow #cart-icon { /* Ensure cart icon color changes too */
color: var(--text-color);
}
.nav{
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 35px;
}
#menu-icon {
font-size: 24px; /* Corrected from 24 */
cursor: pointer;
color: var(--text-color);
display: none;
}
.logo{
font-size: 1.2rem;
font-weight: 700;
color: var(--text-color)
}
.logo span{
color: var(--main-color);
}
.navbar{
display: flex;
column-gap: 2rem;
}
.navbar a{
color: var(--text-color);
font-size: 1rem; /* Corrected from font: 1rem */
text-transform: uppercase;
font-weight: 500;
}
.navbar a:hover,
.navbar .active{
color: var(--main-color);
border-bottom: 3px solid var(--main-color);
}
.header-icons {
display: flex;
align-items: center;
gap: 1rem; /* Space between search and cart icon */
}
#search-icon, #cart-icon { /* Grouped common styles */
font-size: 24px;
cursor: pointer;
color:var(--text-color);
}
#cart-icon {
position: relative; /* For positioning the count */
}
#cart-count {
position: absolute;
top: -8px;
right: -8px;
background-color: var(--main-color);
color: white;
border-radius: 50%;
padding: 2px 6px;
font-size: 0.75rem;
font-weight: 500;
line-height: 1; /* Ensure consistent height */
}
.search-box{
position: absolute;
top: 110%;
right: 0;
left: 0;
background: var(--bg-color);
box-shadow: 4px 4px 20px rgb(15 54 55 / 10%);
border: 1px solid var(--main-color);
border-radius: 0.5rem;
clip-path: circle(0% at 100% 0% );
}
.search-box.active{
clip-path: circle(144% at 100% 0% );
transition: 0.4s;
}
.search-box input{
width: 100%;
padding: 20px;
border: none;
outline: none;
background: transparent;
font-size: 1rem;
}
.home {
max-width: 1300px;
margin: auto;
width: 100%;
min-height: 640px;
display: flex;
align-items: center;
background : url(foto/home.png); /* Ensure this path is correct */
background-repeat: no-repeat;
background-size: cover;
background-position: center left;
}
.home-text {
padding-left: 130px;
}
.home-text h1{
font-size: 2.4rem;
}
.home-text span {
color: var(--main-color);
}
.home-text p {
font-size: 0.938rem;
font-weight: 300;
margin: 0.5rem 0 1.2rem;
}
.btn {
padding: 10px 22px;
background: var(--main-color);
color: var(--bg-color);
font-weight: 400;
border-radius: 0.3rem; /* Added for consistency */
cursor: pointer; /* Added for better UX */
border: none; /* Ensure buttons look consistent */
}
.btn:hover{
background: #fd052f;
}
.heading{
text-align: center;
}
.heading span{
font-weight: 500;
color: var(--main-color);
}
.heading p{
font-size: 0.938rem;
font-weight: 300;
}
.cars-container {
display: flex;
flex-wrap: wrap;
gap: 2rem;
margin-top: 2rem;
}
.cars-container .box {
flex: 1 1 17rem;
position: relative;
height: 200px;
border-radius: 0.5rem;
overflow: hidden;
}
.cars-container .box img{
width: 100%;
height: 100%;
object-fit: cover;
overflow: hidden;
}
.cars-container .box img:hover{
transform: scale(1.1);
transition: 0.5s;
}
.cars-container .box h2{
position: absolute;
bottom: 1rem;
left: 1rem;
font-weight: 400;
font-size: 1rem;
background: var(--bg-color);
padding: 8px;
border-radius: 0.5rem; /* Corrected from 0.05rem */
}
.cars-container .box:hover h2{
background: var(--main-color);
color: var(--bg-color);
}
.about{
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 1.5rem;
}
.about-img{
flex: 1 1 21rem;
}
.about-text{
flex: 1 1 21rem;
}
.about-text span{
font-weight: 500;
color: var(--main-color);
}
.about-text h2{
font-size: 1.7rem;
}
.about-text p{
font-size: 0.938rem;
margin: 0.5rem 0 1.4rem;
}
.parts-container{
display: flex;
flex-wrap: wrap;
gap: 2rem;
margin-top: 2rem;
}
.parts-container .box{
flex: 1 1 17rem;
position: relative;
padding: 20px;
display: flex;
flex-direction: column;
background: #f6f6f6;
border-radius: 0.5rem;
}
.parts-container .box img{
width: 100%;
height: 150px; /* Corrected from 150% to a fixed height for consistency */
object-fit: contain;
object-position: center;
margin-bottom: 1rem;
}
.parts-container .box h3{
font-size: 1.1rem;
font-weight: 600;
}
.parts-container .box span.price { /* Be more specific for price span */
font-size: 1.1rem;
font-weight: 600;
color: var(--main-color);
}
.parts-container .box .bx.bxs-star { /* More specific selector */
color: var(--main-color);
margin: 0.8rem 0;
}
.parts-container .box .btn{
max-width: 120px;
}
.parts-container .box .details{
display: flex;
align-items: center;
position: absolute;
bottom: 1.8rem;
right: 1rem;
font-size: 1rem;
color: var(--text-color);
}
.parts-container .box .details:hover{
color: var(--main-color);
text-decoration: underline;
}
.blog-container {
display: flex;
flex-wrap: wrap;
gap: 2rem;
margin-top: 2rem;
}
.blog-container .box {
flex: 1 1 13rem;
/* position: relative; */ /* Not needed if padding is sufficient */
padding: 20px;
}
.blog-container .box:hover {
background: #f6f6f6;
}
.blog-container .box span {
font-size: 0.8rem;
color: var(--main-color);
}
.blog-container .box h3 { /* Changed from .blog-container h3 */
font-size: 1.2rem;
}
.blog-container .box p {
font-size: 0.938rem;
margin: 4px 0;
}
.blog-container .box .blog-btn {
display: flex;
align-items: center;
column-gap: 4px;
color: var(--text-color);
}
.blog-container .box .blog-btn .bx {
font-size: 20px;
}
.blog-container .box .blog-btn:hover {
color: var(--main-color);
column-gap: 0.7rem;
transition: 0.4s;
}
/* Cart Section Styles */
.cart-section {
position: fixed;
top: 0;
right: -100%; /* Initially hidden */
width: 360px; /* A bit wider for content */
height: 100vh;
background: var(--bg-color);
box-shadow: -3px 0 10px rgba(0,0,0,0.15);
padding: 20px;
z-index: 1001; /* Above header potentially */
transition: right 0.4s ease-in-out;
display: flex;
flex-direction: column;
}
.cart-section.active {
right: 0; /* Slide in */
}
.cart-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
padding-bottom: 1rem;
margin-bottom: 1rem;
}
.cart-header h2 {
font-size: 1.5rem;
margin: 0; /* Reset margin if any */
}
#close-cart-btn {
font-size: 2rem;
color: var(--text-color);
cursor: pointer;
}
#close-cart-btn:hover {
color: var(--main-color);
}
.cart-items-container {
flex-grow: 1; /* Allows this area to take up available space */
overflow-y: auto; /* Scroll for many items */
padding-right: 10px; /* For scrollbar space */
}
.cart-items-container p { /* For "cart is empty" message */
text-align: center;
font-size: 1rem;
margin-top: 2rem;
color: #777;
}
.cart-item {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem; /* More spacing */
border-bottom: 1px solid #f0f0f0;
padding-bottom: 1.5rem; /* More spacing */
}
.cart-item:last-child {
border-bottom: none; /* No border for the last item */
margin-bottom: 0;
}
.cart-item img {
width: 80px; /* Slightly larger image */
height: 80px;
object-fit: contain;
border-radius: 0.5rem;
border: 1px solid #eee;
}
.cart-item-details {
flex-grow: 1; /* Allow details to take up remaining space */
}
.cart-item-details h4 {
font-size: 1rem;
font-weight: 500;
margin-bottom: 0.3rem;
}
.cart-item-details .price {
color: var(--main-color);
font-weight: 600; /* Bolder price */
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
.cart-item-details .quantity {
margin-bottom: 0.75rem; /* Space before remove button */
display: flex;
align-items: center;
gap: 0.5rem;
}
.cart-item-details .quantity label {
font-size: 0.9rem;
}
.cart-item-details .quantity input {
width: 50px;
padding: 5px 8px;
text-align: center;
border: 1px solid #ddd;
border-radius: 0.3rem;
font-size: 0.9rem;
}
.remove-from-cart-btn {
background: #ff6b6b; /* Softer red */
color: white;
border: none;
padding: 6px 12px;
border-radius: 0.3rem;
cursor: pointer;
font-size: 0.8rem;
font-weight: 500;
transition: background 0.3s;
}
.remove-from-cart-btn:hover {
background: #e74c3c; /* Darker red on hover */
}
.cart-summary {
margin-top: auto; /* Push to the bottom */
padding-top: 1.5rem;
border-top: 1px solid #eee;
text-align: right;
}
.cart-summary p {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 1rem;
}
.cart-summary #checkout-btn {
width: 100%; /* Full width checkout button */
padding: 12px;
font-size: 1rem;
}
/* End Cart Section Styles */
.footer {
background: var(--text-color);
color: #f6f6f6;
border-top: 2px solid var(--main-color);
}
.footer-container {
display: flex;
justify-content: space-between;
gap: 1rem; /* Corrected from 1em */
}
.footer-container .logo {
color: var(--bg-color);
margin-bottom: 1rem;
}
.footer-container .footer-box {
display: flex;
flex-direction: column;
}
.social {
display: flex;
align-items: center;
}
.social a {
font-size: 24px;
color: var(--bg-color);
margin-right: 1rem;
}
.social a:hover {
color: var(--main-color);
}
.footer-box h3 {
font-size: 1.1rem;
font-weight: 400;
margin-bottom: 1rem;
}
.footer-box a,
.footer-box p {
color: #818181;
margin-bottom: 10px;
}
.footer-box a:hover {
color: var(--main-color);
}
.copyright {
text-align: center;
padding: 20px;
color: var(--bg-color);
background: var(--text-color);
}
@media (max-width: 1080px) {
.container {
margin-left: 1rem;
margin-right: 1rem;
}
}
@media (max-width: 991px) {
.nav {
padding: 15px 20px;
}
section {
padding: 3rem 0 1rem;
}
.home-text {
padding-left: 2rem;
}
.home-text h1 {
font-size: 2.1rem;
}
}
@media (max-width: 920px) {
#search-icon, #cart-icon { /* Apply to cart icon as well */
color: var(--text-color);
}
}
@media (max-width: 768px) {
.search-box input {
padding: 15px;
}
.nav {
padding: 10px 0; /* Adjust padding as needed */
}
#menu-icon {
display: initial;
color: var(--text-color); /* Ensure it's visible if header bg changes */
}
.navbar {
position: absolute;
top: 100%;
left: 0;
right: 0;
display: flex; /* Changed from display: column; */
flex-direction: column;
background: var(--bg-color);
row-gap: 0.5rem; /* Corrected from 0,5rem */
text-align: center;
box-shadow: 4px 4px 20px rgb(15 54 55 / 20%);
clip-path: circle(0% at 0% 0%);
transition: 0.6s ease-in-out; /* Corrected from 0,5s */
}
.navbar a {
display: block;
padding: 15px;
}
.navbar a:hover,
.navbar .active {
border-bottom: none;
background: var(--main-color);
color: var(--bg-color);
}
.navbar.active {
clip-path: circle(144% at 0% 0%);
}
.blog-container .box {
padding: 4px;
}
.cart-section { /* Adjust cart for smaller screens */
width: 300px;
}
}
@media (max-width:727px) { /* Typo: was max-width:727px, assuming 767px or similar */
.heading span {
font-size: 0.9rem;
}
.heading h2 { /* Was .home-text h2, likely meant .heading h2 for sections */
font-size: 1.4rem;
}
.about {
flex-direction: column-reverse;
}
.about-text {
text-align: center;
}
.about-text h2 {
font-size: 1.4rem;
}
}
@media (max-width: 607px) {
.footer-container {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
@media (max-width: 420px) { /* Slightly wider breakpoint for cart on small mobile */
.cart-section {
width: 100%; /* Full width on very small screens */
max-width: 280px; /* But not too wide */
}
}
@media (max-width: 360px) {
.search-box input {
padding: 11px;
}
.home {
min-height: 500px;
}
.home-text h1 {
font-size: 2rem;
}
.home-text p br {
display: contents;
}
}
.custom-alert {
position: fixed;
bottom: 20px; /* Position at the bottom */
left: 50%;
transform: translateX(-50%) translateY(150%); /* Initially off-screen below */
background-color: var(--main-color); /* Theme color! */
color: var(--bg-color);
padding: 15px 25px;
border-radius: 0.5rem; /* Consistent border radius */
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
z-index: 1002; /* Above cart and header */
opacity: 0;
transition: opacity 0.4s ease, transform 0.4s ease;
font-family: 'Poppins', sans-serif;
font-size: 0.95rem;
text-align: center;
min-width: 250px; /* Ensure it's wide enough for messages */
max-width: 90%;
}
.custom-alert.show {
opacity: 1;
transform: translateX(-50%) translateY(0); /* Slide in from bottom */
}
.custom-alert p {
margin: 0;
font-weight: 500;
}
.custom-alert p::before {
content: '\eb7f';
font-family: 'boxicons' !important;
margin-right: 10px;
font-size: 1.2rem;
vertical-align: middle;
}
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1003; /* Above everything else, including custom alert */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgba(0,0,0,0.6); /* Black w/ opacity for overlay */
font-family: 'Poppins', sans-serif;
}
.modal-content {
background-color: var(--bg-color);
margin: 10% auto; /* 10% from the top and centered */
padding: 25px;
border: 1px solid var(--medium-gray-color);
border-radius: 0.5rem;
width: 80%; /* Could be more or less, depending on screen size */
max-width: 600px; /* Maximum width */
box-shadow: 0 5px 20px rgba(0,0,0,0.3);
position: relative;
animation: fadeInModal 0.5s ease-out;
}
@keyframes fadeInModal {
from {opacity: 0; transform: translateY(-30px);}
to {opacity: 1; transform: translateY(0);}
}
.close-modal-btn {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
line-height: 1;
}
.close-modal-btn:hover,
.close-modal-btn:focus {
color: var(--text-color);
text-decoration: none;
cursor: pointer;
}
.modal-content h2 {
color: var(--main-color);
margin-top: 0;
margin-bottom: 1rem;
font-weight: 600;
border-bottom: 2px solid var(--light-gray-color);
padding-bottom: 0.5rem;
}
.modal-content p {
margin-bottom: 0.75rem;
line-height: 1.6;
color: var(--text-color);
}
.modal-content p strong {
font-weight: 600;
}
#modal-description p {
font-size: 0.95rem;
}
#modal-buy-now-btn { /* Tombol Buy Now di dalam modal */
display: inline-block; /* Agar margin-top berfungsi */
background-color: var(--main-color);
color: var(--bg-color);
}
#modal-buy-now-btn:hover {
background-color: #fd052f;
}
/* Responsif untuk modal */
@media (max-width: 768px) {
.modal-content {
width: 90%;
margin: 15% auto;
}
.modal-content h2 {
font-size: 1.5rem;
}
#modal-img {
width: 150px;
}
}
/* Tambahkan ini ke style.css Anda */
#logout-icon {
font-size: 24px; /* Samakan dengan ikon lain */
cursor: pointer;
color: var(--text-color);
vertical-align: middle; /* Untuk alignment yang lebih baik jika di dalam <a> */
}
/* Jika header memiliki bayangan, pastikan warna ikon logout juga berubah */
header.shadow #logout-icon {
color: var(--text-color);
}
/* Atur tampilan <a> jika menggunakan ikon di dalamnya */
.header-icons a {
display: inline-flex; /* Agar ikon di tengah */
align-items: center;
}