.catalog-hero {
  margin-bottom: 40px;
  padding: 160px 0 40px;
  background-color: #ecf4f2;
  text-align: center;

  @media (max-width: 480px) {
    margin-bottom: 24px;
    padding: 10px 0;
  }

  .haba {
    @media (max-width: 480px) {
      box-sizing: border-box;
      width: 100%;
      padding-right: 16px;
      padding-left: 16px;
    }
  }

  h1 {
    font-family: "Roboto Condensed", sans-serif;
    letter-spacing: 2px;
    color: #2a4064;
    margin: 0;
    padding: 30px 0 20px;
    font-size: 32px;

    @media (max-width: 480px) {
      padding: 18px 0 10px;
      font-size: 26px;
    }

    span {
      font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "メイリオ", sans-serif;
      display: block;
      font-size: 13px;
      padding: 10px;

      @media (max-width: 480px) {
        padding: 6px 0 0;
        font-size: 12px;
      }
    }
  }
}

.catalog-form {
  color: #172f52;
  letter-spacing: 0.125em;

  .catalog-form__inner {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;

    @media (max-width: 767px) {
      width: calc(100% - 24px);
    }
  }
}

.catalog-group {
  padding-top: 64px;

  @media (max-width: 767px) {
    padding-top: 40px;
  }

  &:last-child {
    padding-bottom: 75px;

    @media (max-width: 767px) {
      padding-bottom: 45px;
    }
  }

  .catalog-group__title {
    margin-bottom: 44px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d5dadd;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2em;

    @media (max-width: 767px) {
      margin-bottom: 25px;
      font-size: 18px;
    }
  }
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 38px;

  @media (max-width: 767px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }
}

.catalog-card {
  text-wrap: pretty;
  display: flex;
  min-width: 0;
  flex-direction: column;

  h3 {
    min-height: 44px;
    margin-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;

    @media (max-width: 767px) {
      min-height: 38px;
      font-size: 15px;
    }
  }

  > img {
    width: 128px;
    height: 180px;
    margin: 0 auto 20px;
    object-fit: cover;

    @media (max-width: 767px) {
      width: min(100%, 110px);
      height: 150px;
    }
  }

  > p {
    margin-bottom: 36px;
    color: #111;
    font-size: 16px;
    line-height: 1.7;

    @media (max-width: 767px) {
      margin-bottom: 15px;
      font-size: 14px;
    }
  }

  .catalog-card__sample {
    display: grid;
    min-height: 40px;
    margin-top: auto;
    place-items: center;
    border: 1px solid #29476e;
    color: #29476e;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;

    @media (max-width: 767px) {
      min-height: 36px;
    }

    @media (hover: hover) {
      &:hover {
        background-color: #29476e;
        color: #fff;
        transform: translateY(-2px);
      }
    }

    &:focus-visible {
      background-color: #29476e;
      color: #fff;
      outline: 2px solid #29476e;
      outline-offset: 3px;
    }
  }

  .catalog-card__select {
    display: grid;
    min-height: 40px;
    margin-top: 8px;
    place-items: center;
    background: #29476e;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;

    @media (max-width: 767px) {
      min-height: 36px;
    }

    input {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
    }

    span::before {
      content: "■";
      margin-right: 5px;
    }

    input:checked + span::before {
      content: "☑";
      color: #42bca7;
    }
  }
}

.catalog-sample-dialog {
  box-sizing: border-box;
  width: min(1000px, calc(100% - 64px));
  max-width: none;
  max-height: calc(100dvh - 64px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #172f52;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .2);
  overflow: visible;
  opacity: 0;
  transition: opacity .2s ease;

  @media (prefers-reduced-motion: reduce) {
    transition: none;
  }

  @media (max-width: 767px) {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
  }

  .catalog-sample-dialog__content {
    box-sizing: border-box;
    max-height: calc(100dvh - 64px);
    padding: 32px;
    overflow: auto;
    border-radius: inherit;

    @media (max-width: 767px) {
      max-height: calc(100dvh - 24px);
      padding: 24px 16px;
    }
  }

  &::backdrop {
    background: rgba(15, 25, 40, .6);
    opacity: 0;
    transition: opacity .2s ease;

    @media (prefers-reduced-motion: reduce) {
      transition: none;
    }
  }

  &.is-visible {
    opacity: 1;

    &::backdrop {
      opacity: 1;
    }
  }

  .catalog-sample-dialog__close {
    position: absolute;
    top: -22px;
    right: -22px;
    z-index: 1;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f2f5f6;
    color: #29476e;
    cursor: pointer;
    font: inherit;
    font-size: 28px;
    line-height: 1;


    @media (max-width: 767px) {
      top: 12px;
      right: 12px;
    }

    &:focus-visible {
      outline: 2px solid #29476e;
      outline-offset: 3px;
    }
    span{
      transform: translateY(2px);
    }
  }

  h2 {
    margin: 0 40px 6px 0;
    font-size: 18px;
    line-height: 1.5;
  }

  p {
    margin: 0 40px 24px 0;
    color: #707d89;
    font-size: 12px;
  }

  .catalog-sample-dialog__image {
    display: block;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 210px);
    object-fit: contain;
  }
}

.catalog-request {
  padding: 70px 20px 65px;
  background: #edf7f5;
  text-align: center;

  @media (max-width: 767px) {
    padding: 45px 12px 40px;
  }

  button {
    position: relative;
    width: min(780px, 100%);
    min-height: 80px;
    border: 0;
    background: #4db69e;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .08em;

    @media (max-width: 767px) {
      min-height: 64px;
      padding: 0 45px 0 15px;
      font-size: 15px;
    }

    @media (hover: hover) {
      &:hover .catalog-request__arrow {
        transform: translateY(-50%) translateX(8px);
      }
    }

    .catalog-request__arrow {
      position: absolute;
      top: 50%;
      right: 18%;
      width: 54px;
      height: 1px;
      background-color: #fff;
      transform: translateY(-50%);
      transition: transform .35s ease;

      @media (max-width: 767px) {
        right: 15px;
        width: 42px;
      }

      &::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 8px;
        height: 1px;
        background-color: #fff;
        transform: rotate(35deg);
        transform-origin: right center;
      }
    }
  }

  p {
    margin-top: 22px;
    color: #111;
    font-size: 14px;
    line-height: 1.8;

    @media (max-width: 767px) {
      font-size: 12px;
    }

    a {
      color: inherit;
      text-decoration: none;
    }
  }
}

.catalog-floating-request {
  position: fixed;
  z-index: 1000;
  right: auto;
  bottom: 20px;
  left: 50%;
  width: min(780px, calc(100% - 40px));
  min-height: 80px;
  border: 0;
  background: #4db69e;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition: opacity .35s ease, transform .35s ease, visibility .35s ease;

  @media (max-width: 767px) {
    bottom: 12px;
    width: calc(100% - 24px);
    min-height: 64px;
    padding: 0 45px 0 15px;
    font-size: 15px;
  }

  &.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  @media (hover: hover) {
    &:hover .catalog-request__arrow {
      transform: translateY(-50%) translateX(8px);
    }
  }

  .catalog-request__arrow {
    position: absolute;
    top: 50%;
    right: 18%;
    width: 54px;
    height: 1px;
    background-color: #fff;
    transform: translateY(-50%);
    transition: transform .35s ease;

    @media (max-width: 767px) {
      right: 15px;
      width: 42px;
    }

    &::after {
      content: "";
      position: absolute;
      right: 0;
      bottom: 0;
      width: 8px;
      height: 1px;
      background-color: #fff;
      transform: rotate(35deg);
      transform-origin: right center;
    }
  }
}
