-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstore.css
160 lines (138 loc) · 3.24 KB
/
store.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
.store-container {
display: flex;
width: 78%;
justify-content: flex-start;
flex-wrap: wrap;
gap: 20px;
padding: 20px;
}
.tile {
flex: 1 1 calc(25% - 20px);
max-width: 320px; /* Prevent tiles from growing too large */
min-width: 250px; /* Prevent tiles from shrinking too much */
border: 1px solid #ccc;
border-radius: 8px;
overflow: hidden;
width: 300px;
height: 475px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.3s;
cursor: pointer;
}
.store-container::after {
content: "";
flex: auto; /* Fills the remaining space in the row */
}
store-container > .tile {
margin-bottom: 20px; /* Ensure consistent vertical spacing */
}
.tile:hover {
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.tile img {
width: 100%;
height: 55%;
object-fit: cover;
object-position: center;
}
.tile-content {
position: relative;
padding: 15px;
height: 195px;
}
.tile-title {
font-size: 1.2em;
margin: 0;
}
.tile-author {
color: #555;
font-size: 0.9em;
margin-bottom: 10px;
}
.tile-description {
font-size: 0.95em;
margin: 10px 0;
}
.price {
position: absolute;
bottom: 0px; /* 5px from the bottom of the parent */
font-size: 1em;
font-weight: bold;
color: #333;
}
body {
display: flex; /* Use flexbox to align children */
justify-content: center; /* Horizontally center children */
align-items: center; /* Optionally center children vertically */
min-height: 100vh; /* Ensure the body fills the viewport height */
margin: 0; /* Remove default body margin */
}
.carousel-container {
width: 78%;
overflow: hidden;
position: relative;
}
.carousel {
display: flex;
transition: transform 0.5s ease-in-out;
}
.slide {
flex: 0 0 100%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
text-align: center;
padding: 20px;
box-sizing: border-box;
}
.slide img {
width: 100%;
height: 480px;
border-radius: 10px;
margin-bottom: 20px;
object-fit: cover;
object-position: center;
}
.carousel-nav {
position: absolute;
top: 50%;
width: 56px;
height: 56px;
transform: translateY(-100%);
background: rgba(0, 0, 0, 0); /* Semi-transparent background */
color: white;
border: none;
font-size: 14px;
cursor: pointer;
z-index: 100; /* Ensure it's above the slides */
padding: 17px 17px;
border-radius: 100%;
}
.carousel-nav:focus {
outline: none; /* Ensure no focus outline is visible */
box-shadow: none; /* Disable any focus-related box shadow */
}
/* Position for the previous button */
.carousel-nav.prev {
left: 10px; /* Move it to the left of the carousel */
}
/* Position for the next button */
.carousel-nav.next {
right: 10px; /* Move it to the right of the carousel */
}
/* Ensure slides are clickable */
.carousel .slide {
pointer-events: auto; /* Allow slides to capture clicks */
z-index: 1; /* Place slides below nav buttons */
}
/* Optional: add hover effects for nav buttons */
.carousel-nav:hover {
background: rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
.slide img {
width: 100%;
height: 100%;
}
}