.products-page {
  background: var(--cream);
}

.products-hero {
  position: relative;
  height: 229px;
  margin-top: 4px;
  overflow: hidden;
}

.products-hero::after {
  position: absolute;
  inset: 0;
  background: rgb(255 250 250 / 28%);
  content: "";
}

.products-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  opacity: 0.6;
}

.products-hero h1 {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  margin: 0;
  color: var(--red);
  font-size: 40px;
  transform: translate(-50%, -50%);
}

.products-layout {
  display: grid;
  min-height: 1422px;
  grid-template-columns: 289px minmax(0, 1fr);
}

.category-sidebar {
  position: relative;
  background: var(--cream);
}

.category-sidebar nav {
  position: sticky;
  top: 20px;
  display: flex;
  width: 117px;
  margin: 61px auto 0;
  padding: 50px 0;
  flex-direction: column;
  gap: 50px;
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
}

.category-sidebar button {
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.category-sidebar button:hover,
.category-sidebar button:focus-visible,
.category-sidebar button.active {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.product-catalog {
  min-width: 0;
  padding: 27px 40px 70px;
  background: rgb(255 204 211 / 50%);
}

.product-catalog h2 {
  margin: 0;
  color: var(--red);
  font-size: 35px;
  text-align: center;
}

.order-grid {
  display: grid;
  max-width: 910px;
  margin: 55px auto 0;
  grid-template-columns: minmax(0, 401px) minmax(0, 404px);
  justify-content: space-between;
  gap: 74px 70px;
}

.order-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.order-card > img {
  width: 100%;
  height: 432px;
  border-radius: 30px;
  object-fit: cover;
}

.order-card:first-child > img {
  object-position: center 51%;
}

.order-card:nth-child(3n + 2) > img {
  object-position: center 54%;
}

.order-card h3 {
  margin: 35px 0 0;
  color: var(--red);
  font-size: 25px;
  text-align: center;
}

.order-card a {
  display: inline-flex;
  width: 175px;
  min-height: 50px;
  margin-top: 35px;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  color: #ffffff;
  background: var(--green);
  font-size: 18px;
  font-weight: 700;
  transition: filter 160ms ease, transform 160ms ease;
}

.order-card a:hover,
.order-card a:focus-visible {
  filter: brightness(0.94);
  transform: translateY(-2px);
}

@media (max-width: 1180px) {
  .products-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .order-grid {
    gap: 70px 45px;
  }
}

@media (max-width: 900px) {
  .products-hero {
    height: 205px;
    margin-top: 0;
  }

  .products-hero h1 {
    font-size: 35px;
  }

  .products-layout {
    display: block;
    min-height: 0;
  }

  .category-sidebar {
    position: sticky;
    z-index: 4;
    top: 0;
    overflow-x: auto;
  }

  .category-sidebar nav {
    position: static;
    width: max-content;
    margin: 0;
    padding: 24px 32px;
    flex-direction: row;
    gap: 36px;
  }

  .product-catalog {
    padding: 52px 44px 100px;
  }

  .order-grid {
    margin-top: 45px;
    gap: 70px 34px;
  }

  .order-card > img {
    height: 43vw;
    max-height: 432px;
  }
}

@media (max-width: 620px) {
  .products-hero {
    height: 175px;
  }

  .products-hero h1 {
    width: 100%;
    font-size: 31px;
    text-align: center;
  }

  .category-sidebar nav {
    display: grid;
    width: 100%;
    padding: 18px 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 10px;
    font-size: 14px;
  }

  .category-sidebar button {
    text-align: center;
  }

  .product-catalog {
    padding: 44px 20px 80px;
  }

  .product-catalog h2 {
    font-size: 31px;
  }

  .order-grid {
    max-width: 404px;
    grid-template-columns: 1fr;
    gap: 70px;
  }

  .order-card > img {
    height: min(108vw, 432px);
  }
}
