html {
  font-family: "Lato", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --main-beige: hsl(0, 0%, 97%);
  --faded-green: #fefefe;
  --light-green: #ebf1f0;
  --darker-green: #78928c;
  --green-hover: #26a399;
  /* --green-hover: hsla(165, 40%, 50%, 0.8); */

  --green-button: #20847c;
  --dark-grey: hsla(0, 0%, 0%, 0.8);
}

body {
  font-family: "Lato", sans-serif;
  color: var(--dark-grey);
  background-color: var(--main-beige);
}

.wrapper {
  max-width: 1650px;
  width: 100%;
  margin: 0 auto;
}
/*-------- cookie banner --------*/

#cookie-banner {
  position: fixed;
  top: 0;
  max-width: 1650px;
  width: 100%;
  height: 80px;
  background-color: var(--green-button);
  color: var(--faded-green);
  transform: translateY(0);
  transition: transform 1s;
  z-index: 1;
  transition-delay: 0.5s;
}

.cookieblock-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  margin-left: 2rem;
  padding: 2rem;
  height: 100%;
}

.close-cookies {
  color: var(--light-green);
  margin: 0 2.5rem;
  font-size: 1.5rem;
}

.close-cookies:hover {
  cursor: pointer;
  color: var(--faded-green);
  transition: color 0.5s ease-in;
}

/*-------- header --------*/

/* logo */
img[id="header-img"] {
  height: 90px;
  width: auto;
}
.logo {
  margin: 0 1.5rem;
  z-index: 2;
}

header a,
footer a {
  color: var(--dark-grey);
  text-decoration: none;
  padding: 0 1.5rem;
}

header {
  position: fixed;
  top: 0px;
  z-index: 1;
  display: flex;
  align-items: center;
  background-color: white;
  font-size: 1.15rem;
  width: 100%;
  max-width: 1650px;
  transform: translateY(0);
  transition: transform 1s;
  transition-delay: 0.5s;
  box-shadow: 0 0.0625rem 0.25rem 0 rgba(61, 66, 80, 0.18);
}

.nav-link:hover {
  cursor: pointer;
}

nav {
  display: flex;
  justify-content: space-around;
  flex-direction: row;
  padding: 1rem;
  width: fit-content;
}

/*-------- Hamburger menu --------*/
.hamburger {
  display: none;
  margin: 0 1.25rem;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #101010;
}

/*-------- Hamburger menu --------*/

@media only screen and (max-width: 767px) {
  #nav-bar {
    position: fixed;
    left: -100%;
    top: 80px;
    flex-direction: column;
    background-color: white;
    width: 100vw;
    height: 250px;
    text-align: left;
    transition: 0.5s ease-out;
    overflow: hidden;
  }
  #nav-bar.active {
    left: 0;
  }
  .nav-link {
    margin-left: 0.75rem;
    font-size: 1.25rem;
  }
  .hamburger {
    display: block;
    cursor: pointer;
  }

  /* -- X animation -- */
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/*-------- Dropdwon menu --------*/

/* dropdown content - hidden by default */

.dropdown-content {
  left: 0;
  display: flex;
  justify-content: space-between;
  visibility: hidden;
  padding: 1rem;
  background-color: white;
  position: absolute;
  width: 100vw;
  z-index: 1;
  opacity: 0;
  white-space: nowrap;
  transition: 0.5s ease-out;
  max-width: 1650px;
}
.dropdown-content img {
  height: 250px;
  width: auto;
  display: block;
}

@media (min-width: 768px) {
  .dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transition: 0.5s ease-out;
  }
}

.dropdown-content a:hover {
  color: var(--green-button);
}

/*-------- links inside the dropdown without img --------*/

.dropdown-links {
  padding: 2rem 3rem;
  width: max-content;
}

.dropdown-links a {
  padding: 0.75rem 1rem;
  text-decoration: none;
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  font-size: 1.1rem;
}

.all-category {
  width: 25%;
  display: block;
  font-size: 1.75rem;
  padding-top: 2.5rem;
  text-align: center;
}

.dropdown-container {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin-left: 1rem;
}

.cart-btn {
  color: var(--green-button);
  cursor: pointer;
  position: relative;
  font-size: 25px;
  margin-left: auto;
  margin-right: 75px;
}

.cart-items {
  position: absolute;
  top: -12.5px;
  left: 17.5px;
  background-color: var(--green-hover);
  border-radius: 30%;
  padding: 0 5px;
  color: var(--faded-green);
  font-size: 1.25rem;
}
/*-------- content --------*/
.container {
  position: relative;
  top: 90px;
  width: 100%;
  background-color: var(--light-green);
}

#overlay {
  content: "";
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  background-color: black;
  opacity: 1;
  z-index: -1;
  transition: opacity 0.5s;
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 2.25rem;
}

h2 {
  font-size: 1.75rem;
  padding: 2rem 1rem 3rem 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

h3 {
  font-size: 1.5rem;
  text-align: center;
  padding: 1.25rem;
}

h4 {
  font-size: 1.3rem;
  padding-bottom: 10px;
}

/*-------- main page --------*/

#main-page {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  height: calc(100vh - 80px);
  flex-direction: row;
  width: 100%;
  background-color: var(--light-green);
}

.box-one {
  align-self: center;
  width: 50%;
  padding-left: 4rem;
  margin: 2rem 0;
}

.link-box {
  display: inline-block;
  margin: 1rem 0;
  text-align: center;
  font-size: 1.25rem;
  width: fit-content;
}

.shop-button {
  text-decoration: none;
  padding: 1rem 3rem;
  margin: 0.75rem 0;
  line-height: 2rem;
  background-color: var(--green-button);
  display: block;
  width: 15rem;
  color: var(--light-green);
  border-radius: 5px;
}

.shop-button:hover {
  transition: 0.25s ease-out;
  background-color: var(--green-hover);
  transition: background-color 0.25s linear;
}

.box-two {
  width: 50%;
  position: relative;
}

.box-two img {
  position: absolute;
  left: 0;
  object-fit: cover;
  height: 100%;
  width: 100%;
  transition: opacity 1s ease-in-out;
}

@keyframes toggleMainImg {
  0% {
    opacity: 1;
  }
  11% {
    opacity: 1;
  }
  17% {
    opacity: 0;
  }
  30% {
    opacity: 0;
  }
  94% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#box-two img:nth-of-type(1) {
  animation-delay: 15s;
}
#box-two img:nth-of-type(2) {
  animation-delay: 12s;
}
#box-two img:nth-of-type(3) {
  animation-delay: 9s;
}
#box-two img:nth-of-type(4) {
  animation-delay: 6s;
}

#box-two img:nth-of-type(5) {
  animation-delay: 3s;
}

#box-two img:nth-of-type(6) {
  animation-delay: 0s;
}
.box-two img {
  animation-name: toggleMainImg;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: 18s;
}

/*-------- Plant & Pots section --------*/

.grid-plants,
.grid-pots {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0;
}

#pots,
#plants {
  text-align: center;
  padding: 1rem 0;
}

#plants {
  background-color: var(--faded-green);
}

#pots {
  background-color: var(--light-green);
}
.plant,
.pot {
  border: solid 1px var(--darker-green);
  border-radius: 15px;
  padding: 1rem 1rem;
  margin: 1rem;
  line-height: 25px;
  max-width: 19.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.crossfade {
  position: relative;
  margin: 0.75rem auto;
  height: 300px;
  width: 270px;
}
.pot-img,
.plant-img {
  position: absolute;
  left: 0;
  transition: opacity 0.75s linear;
  height: 300px;
  width: 270px;
}
.pot-img.top:hover,
.plant-img.top:hover {
  opacity: 0;
}

#plants a,
#pots a {
  display: inline-block;
  color: var(--green-button);
  font-size: 1.75rem;
  padding: 0.5rem 0;
  margin: 1.5rem;
  text-decoration: none;
}

#plants h3,
#pots h3 {
  font-size: 1.5rem;
  max-width: 80%;
  margin: 0 auto;
  width: 100%;
  border-radius: 10px;
  text-transform: capitalize;
  letter-spacing: 1px;
}

#plants h3 {
  background-color: var(--light-green);
}

#pots h3 {
  background-color: var(--faded-green);
}

.plant h4,
.pot h4 {
  text-transform: capitalize;
  grid-column: 1/4;
  grid-row: 1/2;
  justify-self: start;
  padding-bottom: 0;
  font-size: 1.15rem;
}
.plant:hover h4,
.pot:hover h4 {
  transition: color 0.25s;
  color: var(--green-button);
}

.plant:hover,
.pot:hover {
  cursor: pointer;
}

.item-details {
  width: 280px;
  display: grid;
  padding: 0 5px;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 30px;
}

.price {
  font-size: 1.15rem;
  font-weight: 900;
  grid-column: 4/5;
  grid-row: 1/2;
  justify-self: end;
}

.size {
  grid-column: 1/3;
  grid-row: 2/3;
  justify-self: start;
}

/*-------- Button --------*/

.bag-btn {
  background-color: var(--green-button);
  border: none;
  display: flex;
  flex-direction: row;
  margin: 0.5rem auto;
  width: 280px;
  font-size: 1rem;
  font-weight: 500;
  height: 2.25rem;
  text-transform: uppercase;
  color: white;
  border-radius: 5px;
  align-items: center;
  justify-content: center;
}

.bag-btn img {
  height: 20px;
  margin-right: 0.5rem;
}

.bag-btn:hover {
  transition: background-color 0.25s linear;
  background-color: var(--green-hover);
  cursor: pointer;
}

/*-------- cart --------*/
.cart-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.8);
  transition: visibility 0.5s;
  visibility: hidden;
}

.cart {
  position: fixed;
  top: 80px;
  right: 0;
  width: 100%;
  height: calc(100% - 80px);
  overflow: scroll;
  background-color: var(--faded-green);
  z-index: 3;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.5s linear;
}

@media (min-width: 1650px) {
  .cart {
    right: calc((100vw - 1650px) * 0.5);
  }
}
@media screen and (min-width: 768px) {
  .cart {
    width: 30vw;
    min-width: 450px;
  }
}

.close-cart {
  font-size: 1.75rem;
  cursor: pointer;
  color: black;
}
.cart h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
}
.cart-content {
  margin: 0 1em;
  border-bottom: rgb(199, 194, 194) 1px solid;
}
.bag-plant img {
  height: 100px;
  margin: 0 auto;
  display: block;
  padding-bottom: 2rem;
}

/*-------- cart item --------*/

.cart-item {
  display: grid;
  align-items: center;
  grid-template-columns: auto 1fr auto;
  grid-column-gap: 1.75rem;
  margin: 1.5rem 0;
}
.cart-item img {
  width: 75px;
  height: 75px;
}
.cart-item h4 {
  font-size: 1rem;
  text-transform: capitalize;
  letter-spacing: var(--mainSpacing);
  color: var(--green-button);
  text-align: left;
  padding: 0;
}
.cart-item h5 {
  margin: 0.5rem 0;
  font-size: 1rem;
  letter-spacing: var(--mainSpacing);
  text-align: left;
}
.item-amount {
  text-align: center;
  font-size: 1rem;
}
.remove-item {
  color: grey;
  cursor: pointer;
  font-size: 1.125rem;
  text-align: left;
  display: block;
}
.fa-chevron-up,
.fa-chevron-down {
  color: var(--primaryColor);
  cursor: pointer;
  font-size: 1.125rem;
}
/*-------- end of cart item --------*/
.clear-cart {
  background-color: var(--green-button);
  border: none;
  margin: auto;
  margin-top: 0.5rem;
  width: 160px;
  font-size: 1rem;
  font-weight: 500;
  height: 2.5rem;
  text-transform: capitalize;
  color: white;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
}

.clear-cart:hover {
  transition: background-color 0.25s linear;
  background-color: var(--green-hover);
}
.clear-cart i {
  margin-right: 0.5rem;
}
.cart-footer {
  margin-top: 1.5rem;
  text-align: center;
  text-transform: capitalize;
}

/*-------- end of cart --------*/

/*-------- delivery banner --------*/

.delivery-banner {
  text-align: center;
  padding: 1rem 0;
  background-color: var(--faded-green);
  font-size: 1.75rem;
  font-weight: 900;
}

.delivery-banner img {
  display: inline;
  vertical-align: middle;
}

.delivery {
  display: inline-block;
  vertical-align: middle;
  margin: 2rem;
}

/*-------- newsletter --------*/

#newsletter {
  text-align: center;
  background-image: url("./images/thomas-verbruggen-5A06OWU6Wuc-unsplash copy.jpg");
  height: 100vh;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-form {
  display: flex;
  position: relative;
  bottom: 75px;
  padding: 30px 30px 50px 30px;
  align-items: center;
  justify-content: center;
  border-color: var(--green-button);
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  width: 600px;
}
.submit-form h3 {
  font-size: 1.75rem;
}
.submit-form p {
  font-size: 1.125rem;
  margin-bottom: 30px;
}

#newsletter input[type="email"] {
  height: 2.75rem;
  padding: 1rem;
  font-size: 1.1rem;
  max-width: 400px;
  width: 100%;
  display: block;
  margin: auto;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

#newsletter input[type="submit"] {
  display: block;
  padding: 1rem;
  margin: auto;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  max-width: 400px;
  width: 100%;
  color: white;
  background-color: var(--green-button);
}

#newsletter input[type="submit"]:hover {
  background-color: var(--green-hover);
  transition: 0.25s;
}

/*-------- About us --------*/
#about-us {
  text-align: center;
  background-color: var(--light-green);
}

#about-us h2 {
  margin: 0;
  padding: 3.5rem 2rem;
}

.why-us-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.why-us-box {
  width: 25%;
  margin-bottom: 4rem;
  font-size: 1.125rem;
  line-height: 1.5rem;
}

.why-us-box a {
  display: inline;
  padding: 0;
}

.why-us-box img {
  width: 70px;
  height: auto;
}

#about-us a {
  color: var(--green-button);
}

footer {
  display: flex;
  justify-content: flex-end;
  background-color: white;
  align-items: center;
  padding: 0 50px;
  text-decoration: none;
  height: 80px;
}

footer > ul {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-direction: row;
}

footer li {
  list-style: none;
  font-size: 1rem;
}

@media (orientation: portrait) and (max-width: 1023px) {
  /*-------- main page --------*/

  h1 {
    font-size: 2rem;
    margin: 1.5rem 0.5rem;
  }

  .container {
    top: 5rem;
  }

  #main-page {
    align-items: center;
    flex-direction: column-reverse;
  }

  .box-one {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    width: 100vw;
    margin: 0;
    height: 55%;
    text-align: center;
  }

  .box-two {
    width: 100vw;
    height: 45%;
  }

  .link-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
  }

  .shop-button {
    margin: 0.5rem;
    font-size: 1.25rem;
    padding: 1rem;
    width: 275px;
  }
  #plants h3,
  #pots h3 {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  header {
    justify-content: space-evenly;
  }

  .logo {
    margin: 0;
  }
  .cart-btn {
    margin-left: 0;
    margin-right: 15px;
  }
}

@media (max-width: 576px) {
  /*-------- cookie banner --------*/

  #cookie-banner {
    max-width: 100vw;
    height: 80px;
  }

  .cookieblock-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1.5rem;
    margin-left: 0;
  }

  /*-------- navbar --------*/

  header {
    max-width: 100vw;
  }

  nav {
    flex-direction: column;
  }

  header a {
    padding-left: 0;
    font-size: smaller;
  }
  img[id="header-img"] {
    height: 5rem;
    width: auto;
  }

  .logo {
    margin-left: 0;
  }

  h2 {
    font-size: 1.25rem;
  }
  h3 {
    font-size: 1.125rem;
    padding: 1rem;
  }

  .cart {
    top: 5rem;
  }
  /*-------- plants section --------*/

  #plants h3,
  #pots h3 {
    border-radius: 0;
    padding: 1rem 0.5rem;
    max-width: 80%;
  }

  .grid-plants,
  .grid-pots {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .plant,
  .pot {
    font-size: 1rem;
    line-height: 1.25rem;
    max-width: 100%;
    margin: 0;
    padding: 0.5rem;
    justify-content: center;
    align-items: center;
    border: none;
    border-radius: none;
  }
  .plant h4,
  .pot h4 {
    font-size: 1.25rem;
  }
  .crossfade {
    height: 300px;
    width: 270px;
  }

  .pot-img,
  .plant-img {
    height: 300px;
    width: 270px;
  }

  #plants a,
  #pots a {
    font-size: 1.25rem;
  }

  .price {
    font-size: 1.25rem;
    padding: 0;
  }

  .size {
    font-size: 1.15rem;
    padding: 0;
  }

  .bag-btn {
    width: 270px;
    margin: 1.5rem;
    font-size: 1.25rem;
    height: 2.5rem;
  }

  /*-------- delivery banner --------*/

  .delivery-banner {
    font-size: 1.25rem;
    padding: 0.5rem;
  }

  .delivery-banner img {
    height: 60px;
    margin-left: 0.5rem;
  }

  .delivery {
    margin: 0.5rem;
  }

  /*-------- newsletter --------*/

  #newsletter {
    height: auto;
  }

  .submit-form {
    margin: 0rem;
    border-radius: 0;
    bottom: 0;
    width: auto;
  }
  .submit-form h3 {
    font-size: 1.5rem;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
    margin: 1rem 0;
  }
  .submit-form p {
    font-size: 1.15rem;
    padding: 0.25rem;
  }

  #newsletter input[type="email"] {
    max-width: 90%;
  }

  #newsletter input[type="submit"] {
    max-width: 90%;
    border-radius: 0;
  }

  #newsletter input[type="submit"]:hover {
    background-color: var(--green-hover);
    transition: 0.25s;
  }

  /*-------- About us --------*/

  .why-us-container {
    flex-direction: column;
  }

  .why-us-box {
    width: 80%;
    margin-bottom: 2rem;
    font-size: 1rem;
  }

  .why-us-box img {
    width: 60px;
  }

  /*-------- About us --------*/
  footer {
    justify-content: center;
    padding: 0 5px;
  }
  footer > ul {
    white-space: nowrap;
    width: 100%;
    margin: 1rem 0.5rem;
  }

  footer li {
    font-size: 1rem;
  }
  footer a {
    padding: 0.25rem;
  }
}

@media (max-width: 280px) {
  .shop-button {
    width: 90vw;
  }

  .crossfade {
    height: 230px;
  }

  .pot-img,
  .plant-img {
    height: 230px;
  }

  .bag-btn {
    width: 90vw;
    margin: 0.5rem;
  }
  .item-details {
    width: 100vw;
  }

  .submit-form {
    bottom: 0;
  }
  footer > ul {
    flex-direction: column;
  }
  footer li {
    white-space: pre-wrap;
    margin: 0.25rem 0;
    font-size: 1rem;
  }
}

@media (orientation: landscape) and (max-width: 1000px) {
  #main-page {
    height: auto;
  }

  #newsletter {
    height: auto;
  }

  .submit-form {
    bottom: 0;
    margin: 2rem 1rem;
  }
}
