:root {
  --avocado-green: #b2c248;
  --beige: #fdf4e3;
  --red: #cb4154;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Rubik", sans-serif;
  scroll-behavior: smooth;
  text-decoration: none;
  color: black;
}

html,
body {
  scroll-snap-type: mandatory;
  scroll-snap-type: y mandatory;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  height: 200vh;
  width: 100%;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100px;
  padding: 0 20px;
  scroll-snap-align: start;
}

section {
  min-width: 1200px;
  min-height: 600px;
}

button {
  background: inherit;
  border: none;
  cursor: pointer;
  transition: 1s;
}

a {
  display: inline-block;
  width: 100%;
}

#logo {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#logo img {
  height: 100%;
}

#navigation button {
  margin: 0 8px;
  padding: 4px 0;
  font-size: 1.1rem;
}

#navigation button:hover {
  border-bottom: 1px solid black;
}

#navigation button a {
  color: black;
}

#about-section {
  width: 100%;
}

.about {
  display: flex;
  align-items: center;
  gap: 8%;
  width: 100%;
  height: 100vh;
  min-width: 1000px;
  min-height: 600px;
}

.about-description p {
  margin: 8px 0;
  width: 400px;
  text-justify: inter-word;
}

#about-one {
  justify-content: right;
  height: calc(100vh - 100px);
  padding-right: 16%;
  background-color: var(--beige);
}

#about-two {
  justify-content: left;
  height: 100vh;
  padding-left: 16%;
  scroll-snap-align: start;
}

#about-three {
  justify-content: right;
  height: 100vh;
  padding-right: 16%;
  background-color: var(--beige);
  scroll-snap-align: start;
}

.about-image {
  width: 38%;
  max-width: 100vh;
  max-height: 80%;
  margin: 20px;
}

.about-image img {
  height: 100%;
  max-width: 100%;
}

.about button {
  width: 80px;
  height: 40px;
  margin-top: 8px;
  font-size: 1.1rem;
  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.about button:hover {
  background-color: var(--avocado-green);
}

.about button a {
  height: 100%;
  line-height: 40px;
}

#products {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
}

.product {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 25%;
}

.product > * {
  text-align: center;
  margin-top: 8px;
}

.product-img {
  width: 250px;
  box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
}

.product-name {
  width: 100%;
}

.product-button {
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 1rem;
}

.product-button:hover span {
  display: none;
  transition: 5s;
}

.product-button:hover:before {
  content: "+ Add to Cart";
  border-bottom: 1px solid black;
}

@keyframes slide-added {
  0% {
    transform: translate(-50%, 100px);
  }
  100% {
    transform: translateY(-50%, 0px);
  }
}

#product-added {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 100px;
  background-color: white;
  box-shadow: rgba(0, 0, 0, 0.18) 0px 4px 4px;
  animation-name: slide-added;
  animation-duration: 1s;
}

#product-added button {
  width: 200px;
  margin: 4px;
  padding: 8px;
  border: 1px solid black;
}

#product-added span {
  width: 100%;
  text-align: center;
}

#product-added button:hover {
  background-color: var(--avocado-green);
}

@keyframes slide-cart {
  0% {
    transform: translate(100%, 0);
  }
  100% {
    transform: translateY(0, 0);
  }
}

#cart {
  position: fixed;
  top: 0;
  right: 0;
  min-width: 380px;
  height: 620px;
  padding: 28px;
  background-color: white;
  box-shadow: rgba(0, 0, 0, 0.18) 0px 2px 4px;
  animation-name: slide-cart;
  animation-duration: 1.5s;
}

.cart-exit {
  display: flex;
  justify-content: end;
  width: 100%;
  padding-bottom: 16px;
}

.cart-exit-button {
  font-size: 1.6rem;
}

#up {
  border-bottom: 1px solid black;
}

#up,
#down {
  padding: 8px;
  font-size: 1.4rem;
}

#up-button,
#down-button {
  font-size: 1.2rem;
}

#up-button:hover,
#down-button:hover,
.cart-exit-button:hover {
  color: var(--red);
}

#cart-products {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 36px;
  min-width: 380px;
  max-height: 600px;
}

.cart-product {
  display: flex;
  position: relative;
  height: 150px;
  width: 380px;
  padding: 16px 0;
  border-bottom: 1px solid black;
}

.cart-product-image {
  height: 100%;
}

.cart-product-details {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  row-gap: 8px;
  align-self: start;
  margin-left: 16px;
}

.cart-product-plus,
.cart-product-minus {
  font-size: 1.6rem;
  margin-right: 8px;
}

.cart-product-delete {
  position: absolute;
  top: calc(top - 16px);
  right: 0;
  font-size: 1.6rem;
}

.cart-product-delete:hover {
  color: var(--red);
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 16px;
}

.cart-summary-button {
  width: 100%;
  margin: 16px 0;
  padding: 8px 0;
  border: 1px solid black;
  font-size: 1.2rem;
}

.cart-summary-button:hover {
  color: white;
  background-color: black;
}

.hide {
  display: none !important;
}

@media only screen and (min-width: 1824px) {
  .product-img {
    width: 320px;
  }
}

@media only screen and (max-width: 1278px) {
  html,
  body {
    scroll-snap-type: none;
  }

  section {
    min-width: 400px;
    min-height: 200px;
  }

  .about {
    gap: 0%;
  }

  #about-one {
    height: 100vh;
  }

  #about-one,
  #about-two,
  #about-three {
    flex-wrap: wrap;
    width: 100%;
    min-width: 200px;
    min-height: 200px;
    justify-content: center;
    align-items: center;
    padding-right: 0;
    padding-left: 0;
  }

  .about-image {
    width: 500px;
    margin: 20px;
  }

  .product {
    width: 50%;
  }

  #products {
    height: 150vh;
  }

  .product-button {
    padding: 16px 36px;
    border: 1px solid black;
  }

  #product-added {
    bottom: 16px;
    width: 95%;
    height: 25vh;
    border: 1px solid black;
  }

  #product-added button {
    width: 200px;
    margin: 4px;
    padding: 16px;
    border: 1px solid black;
    font-size: 1rem;
  }

  #cart {
    width: 100%;
    height: 100vh;
  }

  #cart-products {
    height: 340px;
  }

  .cart-product {
    height: 140px;
    width: 300px;
    padding: 16px 0;
  }
}

@media only screen and (max-width: 768px) {
  section {
    min-width: 200px;
  }

  #about-one,
  #about-two,
  #about-three {
    height: 120vh;
    flex-wrap: wrap;
    width: 100%;
  }

  .about-description h2 {
    width: 250px;
  }

  .about-description p {
    width: 250px;
  }

  .about-image {
    width: 280px;
    margin: 20px;
  }

  #products {
    height: 500vh;
  }

  .product {
    width: 100%;
  }

  #product-added {
    bottom: 4px;
    height: 40vh;
  }

  #cart {
    min-width: 0;
  }

  .cart-product {
    height: 130px;
  }
}

@media only screen and (max-height: 550px) and (orientation: landscape) {
  #cart-products {
    grid-template-columns: 1fr 1fr;
    max-height: 160px;
  }

  .cart-product {
    width: 50vw;
  }

  #up {
    position: absolute;
    top: 32px;
    left: 36px;
    border: none;
  }

  #down {
    position: absolute;
    top: 32px;
    left: 132px;
  }
}
