:root {
    --primary-color: black;
    --secondary-color: white;
    --bg-color: rgb(87, 87, 87);
    --product-color: rgb(46, 46, 46);
}

@media (prefers-color-scheme: light) {
    :root {
        --primary-color: white;
        --secondary-color: black;
        --bg-color: lightgray;
        --product-color: gray;
    }
}

body {
    margin: 0;
    background-color: var(--bg-color);
}

header {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

p, h1, a, h3 {
    color: var(--secondary-color);
    font-family: Arial, Helvetica, sans-serif;
    margin: 10px;
}

a {
    text-decoration: none;
    position: absolute;
}
a:hover {
    text-decoration: underline;
    cursor: pointer;
}

body > p {
    color: black;
}

#menuLines {
    width: 2em;
    height: 2em;
    fill: var(--secondary-color);
    margin: 5px;
    margin-bottom: 2px;
}
#menuLines:hover {
    cursor: pointer;
}

#toggle {
    display: none;
}
#toggle ~ label #menuLines, #toggle ~ #menuBarIcon {
    transform: translate(0em);
    transition: all .515s ease;
}
#toggle ~ label #rect1 {
    transform: rotate(0deg);
    transition: all .5s ease;
    transform-origin: center;
}
#toggle ~ label #rect2 {
    transform-origin: center;
    transform: scale(1, 1);
    transform: translate(0px);
    transition-delay: .2s;
}
#toggle ~ label #rect3 {
    transform: rotate(0deg);
    transition: all .5s ease;
    transform-origin: center;
}
#toggle ~ #menu {
    transform: translate(0em);
    transition: all .5s ease;
}

#toggle:checked ~ label #menuLines, #toggle:checked ~ #menuBarIcon {
    transform: translate(12.1em);
    transition: all .51s ease;
    transition-delay: .2s;
}
#toggle:checked ~ label #rect1 {
    transform: rotate(20deg);
    transition: all .15s ease;
    transform-origin: center;
}
#toggle:checked ~ label #rect2 {
    transform-origin: center;
    transform: scale(1.5, 1);
    transform: translate(10px);
    transition: all .15s ease;
}
#toggle:checked ~ label #rect3 {
    transform: rotate(-20deg);
    transition: all .15s ease;
    transform-origin: center;

}
#toggle:checked ~ #menu {
    transform: translate(15em);
    transition: all .5s ease;
    transition-delay: .2s;
}

@keyframes ROTATION {
    from {transform: rotate(0deg);}
    to {transform: rotate(90deg);}
}

#menuBarIcon {
    margin-top: 6px;
    margin-left: 4px;
}

#menu {
    position: absolute;
    height: 100vh;
    left: -15em;
    width: 15em;
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
}

.menuItem {
    font-size: x-large;
}

#products {
    align-items: flex-start;
    flex-direction: row;
    display: flex;
    flex-wrap: wrap;
}

.product {
    background-color: var(--product-color);
    margin: 10px;
    border-radius: 10px;
    width: 10.64em;
}
.product img {
    margin: 5px;
    height: 10em;
    width: 10em;
    border-radius: 10px;
    object-fit: contain;
}
.product p {
    margin-top: 2px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4em;
    margin-bottom: 0px;
}
.product .addToCart {
    user-select: none;
    background-color: green;
    border-radius: 4px;
    text-align: center;
    width: 9em;
    line-height: 1.4em;
    display: inline-block;
    position: relative;
    /* this is a dumb way to center */
    margin-left: 13px;
}
.product .addToCart:hover {
    background-color: rgb(0, 160, 0);
}
.product h3 {
    margin-top: 0px;
    margin-bottom: 0px;
}

#cart {
    position: fixed;
    right: 10px;
    top: 10px;
}
#cart g path, #cart text {
    fill: var(--secondary-color);
}

.clickProduct {
    margin: 0px;
    width: 10.6em;
    height: 17.41em;
    border-radius: 10px;
    position: fixed;
}

#productHolder {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#productImages {
    background-color: var(--product-color);
    margin: 10px;
    width: 34em;
    height: 28em;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    position: relative;
    justify-content: center;
}
#productImages img {
    margin: 10px;
    width: 25em;
    height: 20em;
    object-fit: contain;
}

#images {
    position: absolute;
    bottom: 0em;
}
#images img {
    width: 5em;
    height: 5em;
}
#images .active {
    border: 2px solid blue;
}

#back, #forward {
    position: absolute;
    height: 25px;
    width: 30px;
    top: 29em;
}
#back {
    left: 1em;
}
#forward {
    right: 1em;
}

button:hover {
    cursor: pointer;
}