Untitled

mail@pastecode.io avatar
unknown
css
2 months ago
6.1 kB
7
Indexable
Never
body {
    background-color: #c4ddbdef;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/*Styling for the header element*/
header {
    background-color: #f8f5dd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    padding: 25px 150px;
}

#logo {
    width: 250px;
    height: 100px;
    border-radius: 50px;;
}

header .shopping {
    position: relative;
    text-align: right;
    margin-left: 40px;
}

header .shopping img {
    width: 40px;
    cursor: pointer;
}

header .shopping div {
    display: flex;
    justify-content: center;
    align-items: center;
    background: red;
    position: absolute;
    border: 1px solid black;
    border-radius: 50%;
    height: 22px;
    top: -16px;
    right: -15px;
    padding: 3px 10px;
}

header .shopping .quantity {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

/*Styling for all products*/
.wrapper {
    width: 1000px;
    margin: auto;
    transition: 0.5s;
}

.list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 50px;
}

.list .item {
    text-align: center;
    background-color: white;
    padding: 20px;
    box-shadow: 0 50px 50px gray;
    letter-spacing: 1px;
    margin-bottom: 20px;
    border-radius: 10px;
}

.list .item img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.list .item .title {
    font-weight: 700;
    margin-top: 10px;
}

.list .item .price {
    margin: 10px;

}

.list .item button,
.modal-content button {
    width: 160px;
    padding: 10px;
    border-radius: 10px;
    background-color: green;
    color: white;
    cursor: pointer;
    font-weight: bold;
}

/*Styling for the modal element*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: white;
    width: 600px;
    height: 600px;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    margin: 15vh auto;
}

.modal-content img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.arrow-left {
    position: absolute;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-right: 30px solid gray;
    left: 90px;
    top: 25%;
    cursor: pointer;
}

.arrow-right {
    position: absolute;
    border-top: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-left: 30px solid gray;
    right: 90px; 
    top: 25%;
    cursor: pointer;
}

.arrow-left:hover {
    border-color: transparent orange transparent transparent;
}

.arrow-right:hover {
    border-color: transparent transparent transparent orange;
}

.modal-content #modalTitle {
    margin: 15px;
    font-size: 25px;
    font-weight: bold;
}

.modal-content #modalDescription {
    font-size: small;

}

.modal-content #modalPrice {
    margin: 25px auto;
    font-size: medium;

}

.quantity-input {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.quantity-input button {
    background-color: black;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 15px;
    font-size: 13px;
}

.quantity-input input {
    font-size: 14px;
    margin: 10px;
    width: 30px;
    text-align: center;
}

#quantityValue {
    padding: 10px;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

/*Styling for shopping cart*/
.shoppingCart {
    position: fixed;
    top: 0;
    left: 100%;
    width: 500px;
    background-color: darkgreen;
    height: 100vh;
    transition: 0.5s;
}

/*What makes the shopping cart appear from the side*/
.active .shoppingCart {
    left: calc(100% - 500px);
}

.shoppingCart h1 {
    color: #f8f5dd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 100;
    margin: 0;
    padding: 0 20px;
    height: 80px;
    font-size: 45px;
}

.totalWrapper {
    position: absolute;
    bottom: 80px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
}

.totalWrapper .total {
    font-size: 25px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: lighter;
}

.shoppingCart .checkOut {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.shoppingCart .checkOut div {
    background-color: #f3e99b;
    width: 150px;
    height: 40px;
    font-weight: light;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    cursor: pointer;
    background-color: white;
    border: 1px solid black;
}

.listCart li img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
}

.listCart li {
    display: grid;
    grid-template-columns: 100px repeat(3, 1fr);
    color: white;
    margin-bottom: 20px;
}

.listCart li div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.listCart li button {
    background-color: #fff5;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    height: 25%;
    width: 15%;
}

.listCart .count {
    margin: 0 10px;
}
Leave a Comment