-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
121 lines (108 loc) · 3 KB
/
style.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
/* Global reset for margin, padding, and box-sizing */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
height: 100%;
}
/* Body styling */
body {
background-color: hsl(30, 38%, 92%); /* Background color */
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
/* Main product container */
.product-container {
width: 36rem;
display: flex;
background-color: hsl(0, 0%, 100%); /* White background */
border-radius: 0.75rem; /* Rounded corners */
}
/* Product image styling */
.product-picture {
width: 18rem;
border-bottom-left-radius: 0.75rem; /* Rounded bottom-left corner */
border-top-left-radius: 0.75rem; /* Rounded top-left corner */
}
/* Media query for smaller screens */
@media (max-width: 600px) {
/* Adjust product container layout on smaller screens */
.product-container {
width: 18rem;
flex-direction: column; /* Stack elements vertically */
margin: 3rem 0;
}
/* Adjust product image on smaller screens */
.product-picture {
object-fit: cover; /* Cover the area */
object-position: center; /* Center the image */
height: 14rem;
border-top-right-radius: 0.75rem; /* Rounded top-right corner */
border-top-left-radius: 0.75rem; /* Rounded top-left corner */
border-bottom-left-radius: 0; /* Remove bottom-left corner rounding */
}
html {
height: fit-content;
}
}
/* Product info section */
.product-info {
width: 18rem;
padding: 2rem; /* Padding around the content */
display: flex;
flex-direction: column; /* Stack elements vertically */
row-gap: 1rem; /* Space between rows */
font-family: "Montserrat"; /* Font for text */
font-weight: 500;
font-size: 0.875rem; /* Text size */
color: hsl(228, 12%, 48%); /* Text color */
}
/* Perfume name styling */
.perfume-name {
font-family: "Fraunces"; /* Font for the name */
font-weight: 700; /* Bold text */
font-size: 26px;
color: hsl(212, 21%, 14%); /* Dark color for the name */
width: 12rem; /* Limit width */
}
/* Perfume description styling */
.perfume-description {
line-height: 1.5rem; /* Space between lines of text */
}
/* Price information layout */
.price-info {
display: flex;
justify-content: space-between;
align-items: center;
width: 11.5rem; /* Width of the price section */
}
/* Current price styling */
.current-price {
color: hsl(158, 36%, 37%); /* Green color for current price */
font-family: "Fraunces"; /* Font for price */
font-weight: 700; /* Bold text */
font-size: 26px;
}
/* Button styling */
button {
background-color: hsl(158, 36%, 37%); /* Green background */
border: none;
color: hsl(0, 0%, 100%); /* White text */
padding: 1rem;
margin-top: 0.5rem;
border-radius: 0.75rem; /* Rounded corners */
cursor: pointer; /* Pointer cursor on hover */
font-weight: 700; /* Bold text */
}
/* Button hover effect */
button:hover {
background-color: hsl(158, 36%, 20%); /* Darker green on hover */
}
/* SVG icon margin */
svg {
margin-right: 1rem; /* Space between the icon and the text */
}