.custom-peptides-catalog-page {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.custom-peptides-catalog-page::after {
  position: absolute;
  bottom: 800px;
  left: 0;
  z-index: -1;
  width: 100%;
  background: url("../../images/home-decor-2.webp") center top / 100% auto
    no-repeat;
  content: "";
  aspect-ratio: 1440 / 2307;
  opacity: 0.16;
  pointer-events: none;
}

.catalog-page {
  padding: 9.5rem 0 0;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat)
  a.button.button--header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.75rem 2rem;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--primary-gradient);
  box-shadow: none;
  color: var(--color-white);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
}

:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat)
  a.button.button--header:hover,
:is(body.woocommerce-shop, body.post-type-archive-product, body.tax-product_cat)
  a.button.button--header:focus-visible {
  background: var(--primary-gradient);
  color: var(--color-white);
}

@media (max-width: 992px) {
  :is(
      body.woocommerce-shop,
      body.post-type-archive-product,
      body.tax-product_cat
    )
    .site-header__actions
    > a.button.button--header {
    display: none;
  }

  :is(
      body.woocommerce-shop,
      body.post-type-archive-product,
      body.tax-product_cat
    )
    .site-navigation__plan
    a.button.button--header {
    display: flex;
  }
}

.product-catalog {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.product-catalog__header {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.9375rem;
  text-align: center;
}

.product-catalog__title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-variation-settings:
    "wdth" 100,
    "wght" 500;
  font-weight: 500;
  line-height: 1.2;
}

.product-catalog__subtitle {
  font-size: 1.125rem;
  line-height: 1.2;
}

.catalog-filters {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 46px;
  margin-top: 24px;
}

.catalog-categories {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.catalog-category {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 60%);
  box-shadow: 0 0.125rem 0.25rem rgb(0 0 0 / 7%);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.catalog-category img,
.catalog-category svg {
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  filter: brightness(0) saturate(100%) invert(50%) sepia(82%) saturate(2682%)
    hue-rotate(281deg) brightness(92%) contrast(86%);
}

.catalog-category svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.catalog-category.is-active {
  background: var(--primary-gradient);
  box-shadow: 0 0.125rem 0.125rem rgb(0 0 0 / 7%);
  color: var(--color-white);
}

.catalog-category.is-active img,
.catalog-category.is-active svg {
  filter: brightness(0) invert(1);
}

.catalog-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.catalog-search,
.catalog-sort {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 12px 0.75rem;
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 60%);
  box-shadow: 0 0.125rem 0.25rem rgb(0 0 0 / 7%);
}

.catalog-search {
  width: min(28.375rem, 100%);
}

.catalog-search > img,
.catalog-sort > img {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 1.125rem;
}

.catalog-search input,
.catalog-sort select {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  outline: none;
}

.catalog-search input {
  width: 100%;
}

.catalog-search input::placeholder,
.catalog-sort__prefix {
  color: var(--color-text-secondary);
}

.catalog-sort {
  position: relative;
  gap: 0.75rem;
}

.catalog-sort::after {
  width: 0.4375rem;
  height: 0.4375rem;
  flex: 0 0 0.4375rem;
  border-right: 0.125rem solid var(--color-secondary);
  border-bottom: 0.125rem solid var(--color-secondary);
  content: "";
  transform: rotate(45deg) translateY(-0.125rem);
  pointer-events: none;
}

.catalog-sort select {
  padding-right: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.catalog-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-top: 24px;
}

.product-catalog .recommended-product-card {
  width: 100%;
  max-width: none;
  flex-basis: auto;
}

.catalog-products.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.catalog-empty {
  width: 100%;
  margin-top: 24px;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  text-align: center;
}

.product-catalog button.catalog-load-more.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-width: 18.125rem;
  min-height: 3.5rem;
  margin-top: 32px;
  padding: 1rem 3rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--color-white);
  box-shadow: 0 0.125rem 0.21875rem rgb(0 0 0 / 7%);
  color: var(--color-primary);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
}

.product-catalog button.catalog-load-more.button img {
  width: 0.6875rem;
  height: 0.3125rem;
  transform: none;
}

.product-catalog button.catalog-load-more.button:hover,
.product-catalog button.catalog-load-more.button:focus-visible {
  background: var(--color-white);
  color: var(--color-primary);
}

.catalog-load-more.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.catalog-load-more[hidden],
.catalog-empty[hidden] {
  display: none !important;
}

.catalog-page a.science__button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3.25rem;
  margin: 0;
  padding: 1rem 3rem;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--color-white);
  box-shadow: 0 0.125rem 0.21875rem rgb(0 0 0 / 7%);
  color: var(--color-primary);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
}

.catalog-page a.science__button.button:hover,
.catalog-page a.science__button.button:focus-visible {
  background: var(--color-white);
  color: var(--color-primary);
}

.catalog-page a.start-cta__consultation.button,
.catalog-page a.quiz__button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 3.25rem;
  margin: 0;
  padding: 1rem 3rem;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--color-primary);
  box-shadow:
    inset 0.25rem 0.25rem 0.875rem rgb(0 0 0 / 25%),
    inset -0.25rem -0.25rem 0.875rem rgb(255 255 255 / 25%);
  color: var(--color-white);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
}

.catalog-page a.start-cta__consultation.button:hover,
.catalog-page a.start-cta__consultation.button:focus-visible,
.catalog-page a.quiz__button.button:hover,
.catalog-page a.quiz__button.button:focus-visible {
  background: var(--color-primary);
  color: var(--color-white);
}

.catalog-page a.start-cta__catalog.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 3.25rem;
  margin: 0;
  padding: 1rem 3rem;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--color-white);
  box-shadow: 0 0.125rem 0.21875rem rgb(0 0 0 / 7%);
  color: var(--color-primary);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: none;
}

.catalog-page a.start-cta__catalog.button:hover,
.catalog-page a.start-cta__catalog.button:focus-visible {
  background: var(--color-white);
  color: var(--color-primary);
}

@media (max-width: 1100px) {
  .catalog-products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .catalog-page {
    padding: 6.25rem 0 20px;
  }

  .product-catalog__header {
    gap: 1.5rem;
  }

  .product-catalog__title {
    font-size: 2rem;
  }

  .product-catalog__subtitle {
    max-width: 21rem;
    font-size: 1.125rem;
  }

  .catalog-filters {
    gap: 16px;
    margin-top: 14px;
  }

  .catalog-categories {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.375rem;
    width: calc(100% + var(--page-gutter));
    margin-right: calc(-1 * var(--page-gutter));
    overflow-x: auto;
    padding: 0.125rem var(--page-gutter) 0.375rem 0;
    scrollbar-width: none;
  }

  .catalog-categories::-webkit-scrollbar {
    display: none;
  }

  .catalog-category {
    gap: 0.625rem;
    width: auto;
    min-height: 2.125rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
  }

  .catalog-category img,
  .catalog-category svg {
    width: 0.8125rem;
    height: 0.8125rem;
    flex-basis: 0.8125rem;
  }

  .catalog-controls {
    gap: 0.75rem;
  }

  .catalog-search,
  .catalog-sort {
    padding: 12px 0.75rem;
  }

  .catalog-search {
    width: auto;
    flex: 1;
  }

  .catalog-search input {
    font-size: 0.75rem;
  }

  .catalog-sort {
    position: relative;
    width: 2.75rem;
    flex: 0 0 2.75rem;
    justify-content: center;
  }

  .catalog-sort__prefix {
    display: none;
  }

  .catalog-sort::after {
    display: none;
  }

  .catalog-sort select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  .catalog-products {
    grid-template-columns: repeat(2, minmax(0, 300px));
    justify-content: center;
    gap: 0.75rem;
    margin-top: 16px;
  }

  .product-catalog button.catalog-load-more.button {
    width: 100%;
    min-width: 0;
    margin-top: 2rem;
  }

  .catalog-page a.science__button.button {
    width: 100%;
    padding-inline: 1.5rem;
  }

  .catalog-page a.start-cta__consultation.button,
  .catalog-page a.start-cta__catalog.button,
  .catalog-page a.quiz__button.button {
    width: 100%;
    padding-inline: 1.5rem;
  }
}
