311 lines
No EOL
5.7 KiB
CSS
Executable file
311 lines
No EOL
5.7 KiB
CSS
Executable file
@import url('https://fonts.googleapis.com/css2?family=Cormorant:wght@300;400;500;600;700&family=Waterfall&display=swap');
|
|
*{
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: 'Cormorant', serif;
|
|
}
|
|
img{
|
|
width: 100%;
|
|
}
|
|
header{
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 100;
|
|
background-color: white;
|
|
box-shadow: 0 1px 4px hsla(0, 0%, 98%, 0.3);
|
|
}
|
|
.nav-menu{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 20px 0;
|
|
}
|
|
.container-menu{
|
|
max-width: 80%;
|
|
margin: auto;
|
|
width: 100%;
|
|
}
|
|
.menu-logo{
|
|
color: black;
|
|
font-size: 66px;
|
|
font-weight: 500;
|
|
letter-spacing: 2px;
|
|
font-family: 'Waterfall';
|
|
text-decoration: none;
|
|
}
|
|
#cart-icon{
|
|
position: relative;
|
|
font-size: 26px;
|
|
color: black;
|
|
cursor: pointer;
|
|
}
|
|
#cart-icon[data-quantity='0']::after{
|
|
contain: '';
|
|
}
|
|
#cart-icon[data-quantity]::after{
|
|
content: attr(data-quantity);
|
|
position: absolute;
|
|
top: 0;
|
|
right: -12px;
|
|
width: 20px;
|
|
height: 20px;
|
|
background-color: white;
|
|
border: 1px solid black;
|
|
border-radius: 50%;
|
|
color: black;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.cart{
|
|
position: fixed;
|
|
top: 0;
|
|
right: -100%;
|
|
width: 360px;
|
|
min-height: 100vh;
|
|
padding: 50px;
|
|
background-color: whitesmoke;
|
|
box-shadow: -2px 0 4px hsl(0, 4%, 15% / 10%);
|
|
transition: 0.3 cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
}
|
|
.cart.active{
|
|
right: 0;
|
|
transition: 0.3 cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
}
|
|
.cart-title{
|
|
text-align: center;
|
|
font-size: 24px;
|
|
margin-top: 20px;
|
|
}
|
|
.total{
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
margin-top: 30px;
|
|
border-top: 1px solid #B0A695;
|
|
}
|
|
.total-title{
|
|
font-size: 18px;
|
|
margin-top: 22px;
|
|
}
|
|
.total-price{
|
|
font-size: 20px;
|
|
margin: 20px 0 0 20px;
|
|
}
|
|
.btn-buy{
|
|
display: flex;
|
|
justify-content: center;
|
|
margin: 30px auto 0 auto;
|
|
padding: 8px 10px;
|
|
width: 50%;
|
|
text-align: center;
|
|
border: 1px solid black;
|
|
background-color: transparent;
|
|
font-size: 18px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
}
|
|
#close-cart{
|
|
position: absolute;
|
|
top: 20px;
|
|
right: 20px;
|
|
font-size: 30px;
|
|
cursor: pointer;
|
|
}
|
|
.cart-box{
|
|
display: grid;
|
|
grid-template-columns: 35% 40% 15%;
|
|
align-items: center;
|
|
gap: 20px;
|
|
margin-top: 30px;
|
|
}
|
|
.cart-img{
|
|
width: 90px;
|
|
height: 90px;
|
|
object-fit: contain;
|
|
object-position: center;
|
|
padding: 10px;
|
|
}
|
|
.detail-box{
|
|
display: grid;
|
|
row-gap: 10px;
|
|
}
|
|
.cart-product-title{
|
|
font-size: 16px;
|
|
text-transform: capitalize;
|
|
}
|
|
.cart-price{
|
|
font-weight: 600;
|
|
}
|
|
.cart-quantity{
|
|
border: 1px solid black;
|
|
outline-color: black;
|
|
width: 50px;
|
|
text-align: center;
|
|
font-size: 18px;
|
|
border-radius: 5px;
|
|
}
|
|
.cart-remove{
|
|
font-size: 20px;
|
|
color: #6C5F5B;
|
|
cursor: pointer;
|
|
}
|
|
/*-------------------- product --------------------*/
|
|
.shop{
|
|
margin-top: 50px;
|
|
padding: 4rem 0 3rem ;
|
|
}
|
|
.container-shop{
|
|
max-width: 60%;
|
|
margin: auto;
|
|
width: 100%;
|
|
margin-top: 100px;
|
|
}
|
|
.section-title{
|
|
font-size: 26px;
|
|
font-weight: 600;
|
|
text-align: center;
|
|
text-transform: uppercase;
|
|
letter-spacing: 4px;
|
|
margin-bottom: 50px;
|
|
}
|
|
.shop-content{
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, auto));
|
|
gap: 20px;
|
|
}
|
|
.product-box{
|
|
position: relative;
|
|
background-color: white;
|
|
padding: 10px;
|
|
border-radius: 5px;
|
|
transition: 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
}
|
|
.product-box:hover{
|
|
border: 1px solid black;
|
|
box-shadow: 0 8px 32px hsla(0.75, 0.82, 0.165, 1);
|
|
transition: 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
}
|
|
.product-img{
|
|
width: 100%;
|
|
height: 70%;
|
|
object-fit: cover;
|
|
margin-bottom: 10px;
|
|
}
|
|
.product-title{
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
text-transform: capitalize;
|
|
margin-bottom: 10px;
|
|
}
|
|
.price{
|
|
font-weight: 500;
|
|
}
|
|
.add-cart{
|
|
position: absolute;
|
|
bottom: 10px;
|
|
right: 10px;
|
|
background-color: white;
|
|
border: 1px solid black;
|
|
color: black;
|
|
padding: 10px;
|
|
font-size: 16px;
|
|
border-radius: 50%;
|
|
cursor: pointer;
|
|
}
|
|
.add-cart:hover{
|
|
background-color: black;
|
|
color: white;
|
|
}
|
|
/*-------------------- payment successful --------------------*/
|
|
.sc-container{
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.sc-container img{
|
|
width: 200px;
|
|
margin: 50px 0;
|
|
}
|
|
.sc-container h1{
|
|
font-size: 38px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.sc-container p{
|
|
font-size: 18px;
|
|
max-width: 600px;
|
|
text-align: center;
|
|
margin: 10px;
|
|
}
|
|
.sc-btn{
|
|
padding: 12px 20px;
|
|
background-color: lightgrey;
|
|
border: 1px solid grey;
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
text-decoration: none;
|
|
color: black;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@media (width < 1380px) {
|
|
.container-shop{
|
|
max-width: 80%;
|
|
}
|
|
}
|
|
|
|
@media (width < 950px) {
|
|
.container-shop{
|
|
max-width: 70%;
|
|
}
|
|
}
|
|
|
|
@media (width < 750px) {
|
|
.container-shop{
|
|
max-width: 90%;
|
|
}
|
|
}
|
|
|
|
@media (width < 590px) {
|
|
.container-shop{
|
|
max-width: 50%;
|
|
}
|
|
.shop-content{
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, auto));
|
|
}
|
|
.menu-logo{
|
|
font-size: 48px;
|
|
}
|
|
.cart{
|
|
width: 320px;
|
|
}
|
|
}
|
|
|
|
@media (width < 390px) {
|
|
.container-shop{
|
|
max-width: 60%;
|
|
}
|
|
.shop-content{
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, auto));
|
|
}
|
|
.menu-logo{
|
|
font-size: 48px;
|
|
}
|
|
.cart{
|
|
width: 100%;
|
|
}
|
|
} |