* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style-type: none;
}


/* Typography */

h1 {
    text-align: center;
    font-family: 'Lucida Sans', Geneva, Verdana, sans-serif;
    color: #4BE2FF;
    margin: 1rem 0 0;
}

h2 {
    color: blueviolet;
    text-align: center;
    margin: 0.5rem auto 2rem;
    border-bottom: 2px ridge grey;
    width: 80%;
    text-shadow: 1px 5px 20px #ccc;
    letter-spacing: 0.3rem;
    font-size: 2.2rem;
}


/* layout */

html,
body {
    overflow-x: hidden;
    height: 100vh;
}

body {
    font-family: 'Gill Sans', sans-serif;
    background-color: black;
}

main {
    width: 90%;
    max-width: 1500px;
    margin: 2rem auto;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.cart {
    height: 600px;
    border: 4px solid purple;
    position: absolute;
    right: 0;
    background: black;
    width: 23rem;
    z-index: 2;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    text-align: center;
}

.inner-cart {
    margin-bottom: auto;
    overflow-y: auto;
}

.cart-menu-button-div {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 5;
}


/* the body of each item */

.products {
    width: 40%;
    margin: 0 auto;
    height: 500px;
    border: 4px solid purple;
    overflow-y: scroll;
    scroll-behavior: smooth;
    z-index: 1;
}

.product {
    width: 90%;
    border: 1px solid green;
    margin: 0 auto 2rem;
    background-color: lightblue;
}

.product-in-cart {
    width: 90%;
    border: 2px solid green;
    margin: 0 auto;
    margin-bottom: 1rem;
    background-color: rgb(90, 178, 207);
}


/* the h2: thei item name both in cart and in stock */

.item-name {
    text-align: left;
    color: royalblue;
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: none;
    text-shadow: 0px 5px 15px royalblue;
    border: none;
    margin: 0.2rem 0 1rem 0.5rem;
    letter-spacing: normal;
    cursor: pointer;
}

.item-name-in-cart {
    text-align: left;
    margin: 0 0 0 0.2rem;
    letter-spacing: normal;
    font-size: 1.4rem;
    border: none;
}


/* the details of each product */

.items-details {
    display: flex;
    justify-content: space-evenly;
    font-size: 1.1rem;
}

.items-details-in-cart {
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-evenly;
    align-items: flex-start;
    font-size: 1.4rem;
}


/* the lis, each item name, price, etc. */

.item-in-cart {
    padding: 0.2rem;
}

.item-in-cart::before {
    content: ".";
}


/* the total in the cart */

.total {
    border-top: 3px solid purple;
    background-color: #add8e6;
}

.total p {
    margin: 0.5rem 0;
    text-align: center;
    word-spacing: 1rem;
    font-weight: 700;
}

.total span {
    margin: 0 1rem;
}

.out-of-stock {
    background-color: grey;
    cursor: not-allowed;
}

.out-of-stock-name {
    cursor: not-allowed;
}


/* search menu */

.search {
    border: 4px solid purple;
    height: 600px;
    position: absolute;
    background: black;
    width: 23rem;
    z-index: 2;
}

.search-menu-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 30rem;
    width: 100%;
}

.search-menu-button-div {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
}

.search-menu {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.categories-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 10rem;
}

.categories-menu option {
    background-color: black;
    color: purple;
}

.categories-menu button {
    width: 50%;
    margin: 0 auto;
    background-color: black;
    color: purple;
    padding: 2px 0;
    border: 1px solid purple;
}

label {
    color: purple;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 900;
}

input {
    outline: none;
    border: none;
    box-shadow: 3px 5px 5px purple;
}

input[type="text"] {
    width: 50%;
    margin: 0 auto;
    height: 1.5rem;
    border-radius: 0.4rem;
}

.range-menu {
    margin-top: 3rem;
    width: 100%;
    text-align: center;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: center;
}

input[type="range"] {
    margin: 0 auto;
    display: block;
}

.show {
    display: block;
    border: 3px double purple;
}

.hide {
    display: none;
}

.side-menu {
    color: black;
    font-weight: bold;
    font-size: 1.4rem;
    background-color: rebeccapurple;
    box-shadow: 3px 3px 10px 5px rebeccapurple;
    border-radius: 0.4rem;
    padding: 1px 5px;
    display: none;
    transition: all 0.5ms ease-in-out;
}

.side-menu:hover {
    background-color: rgb(151, 79, 223);
    cursor: pointer;
}


/* to prevent the annoying text selection when pressing the cart/search buttons (becuase they are just paragraphs made look like buttons with css */

.no-select {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}


/* media qs */

@media (max-width: 1125px) {
    /* the hidden menus offset class */
    .toggle-side-menu {
        margin-inline: -45rem;
    }
    .cart {
        right: 0;
    }
    .side-menu {
        display: block;
    }
    .products {
        width: 60%;
    }
}

@media (max-width:675px) {
    .products {
        width: 94%;
    }
    .products h2 {
        margin-left: 0;
        margin-top: 0;
    }
    .side-menu {
        bottom: -10px;
    }
    .search-menu-button-div,
    .cart-menu-button-div {
        top: -35px;
    }
    .search,
    .cart {
        width: 18rem;
    }
}