@import url("https://fonts.googleapis.com/css2?family=Calistoga&family=Inter:wght@100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  font-family: "Inter";
  font-size: 1.125rem;
  background-color: #141414;
  color: #fff;
}

.container {
  width: 100%;
  margin: auto;
  max-width: 75rem;
  padding: 0 1.25rem;
}

.logo {
  a {
    font-family: "Calistoga";
    font-size: 2.25rem;
    color: #fff;
    text-decoration: none;

    span {
      color: #fe6a0f;
    }
  }
}

/* HEADER */
header {
  .container {
    display: flex;
    align-items: center;
    padding: 2.8125rem 1.25rem;
    gap: 3.125rem;
  }

  nav {
    flex: 1;
    display: flex;
    align-items: center;

    .leftside {
      display: flex;
      flex: 1;
    }

    li {
      margin: 0 1.875rem;
      a {
        text-decoration: none;
        color: #fff;
        transition: 1s;
        &:hover {
          color: #999;
        }
      }
    }

    .button {
      display: block;
      border: 0.0625rem solid #fff;
      border-radius: 0.3125rem;
      padding: 0.9375rem 1.875rem;
      color: #fff;
      text-decoration: none;
      transition: 1s;
      &:hover {
        border-color: #999;
        color: #999;
      }
    }
  }

  .menu {
    display: none;
    flex: 1;
    justify-content: end;
  }

  .menu-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;

    div {
      width: 2rem;
      height: 0.375rem;
      background-color: #fff;
    }
  }
}

/* HERO */
.hero {
  .container {
    display: flex;
  }

  .leftside,
  .rightside {
    flex: 1;
  }

  .leftside {
    padding-bottom: 9.375rem;
  }

  .rightside {
    text-align: center;

    img {
      width: auto;
      height: 600px;
    }
  }

  h1 {
    font-family: "Calistoga";
    font-size: 4.375rem;
    line-height: 4.625rem;
    margin-top: 3.125rem;
  }

  p {
    font-size: 1.25rem;
    line-height: 1.625rem;
    margin: 2.5rem 0;
  }

  .button {
    display: inline-block;
    background-color: #fe6a0f;
    font-weight: 500;
    color: #fff;
    padding: 0.9375rem 5rem;
    border-radius: 0.3125rem;
    text-decoration: none;
    transition: 0.5s;

    &:hover {
      opacity: 0.6;
    }
  }
}

/* SEARCH  */
.search {
  background-color: #1f1f1f;
  padding: 3.125rem 0;
  margin-top: -6.25rem;

  .title {
    font-size: 2rem;
    font-weight: 500;
  }

  .sides {
    display: flex;
    margin-top: 1.875rem;
    gap: 6.25rem;
  }

  .leftside,
  .rightside {
    flex: 1;
  }

  input,
  select {
    width: 100%;
    background-color: #2b2b2b;
    font-size: 1.5rem;
    line-height: 2.1rem;
    color: #fff;
    outline: none;
    padding: 1.25rem;
    border: 0;
    border-radius: 0.3125rem;
  }

  input {
    background-image: url(./searchIcon.png);
    background-repeat: no-repeat;
    background-position: 1.25rem center;
    padding-left: 3.75rem;
  }

  select {
    border-right: 1.25rem solid transparent;
  }
}

/* PRODUCTS */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 5rem 0;
}

.product-item {
  display: block;
  border-radius: 0.625rem;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  transition: 0.5s;

  &:hover {
    opacity: 0.6;
  }

  .warning {
    position: absolute;
    top: 1.875rem;
    left: 1.875rem;
    background-color: #fe6a0f;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    padding: 0.625rem 0.9375rem;
    border-radius: 0.3125rem;
  }

  .photo {
    text-align: center;
    background-color: #2b2b2b;
    padding-top: 1.875rem;
    max-width: 100%;
  }

  .info {
    background-color: #1f1f1f;
    padding: 3.75rem 1.875rem;
    margin-top: -3.125rem;
  }

  .product-category {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 500;
  }

  .product-name {
    font-family: "Calistoga";
    font-size: 2rem;
    color: #fff;
    margin: 0.625rem 0;
  }

  .product-price {
    font-size: 2rem;
    font-weight: bold;
    color: #fe6a0f;
  }
}

/* FOOTER */
footer {
  background-color: #1f1f1f;

  .container {
    padding-top: 3.125rem;
    padding-bottom: 3.125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .copyrights {
    font-size: 1.5rem;
    color: #5f5f5f;

    a {
      color: #5f5f5f;

      text-decoration: none;

      &:hover {
        color: #fe6a0f;
      }
    }
  }
}

@media (max-width: 51.25rem) {
  header {
    nav {
      display: none;
    }

    .menu {
      display: flex;
    }
  }

  .hero {
    .container {
      flex-direction: column;
    }

    .leftside {
      text-align: center;
      padding-bottom: 2.5rem;
    }

    .rightside {
      padding-bottom: 3.125rem;

      img {
        height: 18.75rem;
      }
    }

    h1 {
      font-size: 2.75rem;
      line-height: 3.125rem;
    }
  }

  .search {
    padding-bottom: 2.5rem;

    .title {
      text-align: center;
    }

    .sides {
      flex-direction: column;
      gap: 1.25rem;
    }
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);

    .warning {
      top: 0.9375rem;
      left: 0.9375rem;
    }
  }

  footer {
    .container {
      flex-direction: column;
      gap: 1.25rem;
      text-align: center;
    }
  }
}

@media (max-width: 31.25rem) {
  .products-grid {
    grid-template-columns: repeat(1, 1fr);
  }
}
