.page-categories {
  padding-bottom: 16px;

  @media screen and (min-width: 750px) {
    width: 680px;
    margin: 0 auto;
    padding-bottom: 40px;
    position: relative;
    inset-inline-start: calc((100vw - 100%) / 2);
  }
  & .page-categories__header {
    padding: 16px 16px 24px;

    @media screen and (min-width: 750px) {
      padding: 40px 0 24px;
    }
    & .page-categories__header-heading {
      margin: 0;

      color: var(--fm-neutral-foreground);

      font-family: var(--fm-base-font-family);
      font-size: var(--fm-font-size-xl);
      font-weight: var(--fm-font-weight-bold);
      line-height: 140%;

      @media screen and (min-width: 750px) {
        font-size: var(--fm-font-size-2xl);
      }
    }
  }
  & .page-categories__groups {
    display: flex;
    flex-direction: column;
    gap: 16px;

    @media screen and (min-width: 750px) {
      gap: 24px;
    }
  }
  & .page-categories__state {
    padding: 0 16px;

    @media screen and (min-width: 750px) {
      padding: 0;
    }
  }
}

.page-categories-group {
  & .page-categories-group__heading {
    display: flex;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    align-items: center;

    @media screen and (min-width: 750px) {
      padding: 0;
    }
  }
  & .page-categories-group__heading-text {
    overflow: hidden;

    color: var(--fm-neutral-foreground);

    font-family: var(--fm-base-font-family);
    font-size: var(--fm-font-size-l);
    font-weight: var(--fm-font-weight-bold);
    line-height: 140%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  & .page-categories-group__list {
    display: grid;
    margin: 0;
    padding: 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    list-style: none;

    @media screen and (min-width: 750px) {
      padding: 0;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }
  & .page-categories-group__list-item {
    display: flex;
  }
}

.page-categories-link {
  display: flex;
  width: 100%;
  height: 49px;
  padding: 0 16px;
  align-items: center;
  border: 1px solid var(--fm-neutral-border);
  border-radius: 8px;
  background: var(--fm-neutral-background);

  color: var(--fm-neutral-foreground);

  font-family: var(--fm-base-font-family);
  font-size: var(--fm-font-size-s);
  font-weight: var(--fm-font-weight-bold);
  line-height: 140%;
  transition: opacity var(--animation-speed) var(--animation-easing);
}

.page-categories-link:hover {
  opacity: 0.7;
}
