/* products__search */
.products__searchContainer {
  background: linear-gradient(90deg, #F6F6F5 0%, #F0F0F0 100%);
  border-radius: 1rem;
  padding: 3.5rem 3.75rem 4rem 3.95rem;
  margin-top: 5rem;
}

.products__searchTitleWrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.products__searchTitleWrap hgroup {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.products__searchTitle {
  font-size: 2rem;
  font-weight: 800;
  font-family: "Nunito Sans", sans-serif;
  color: var(--colorMain);
  line-height: 130%;
}

.products__searchTitle--ja {
  font-size: 0.875rem;
  font-weight: 700;
}

.products__searchLeadText {
  color: var(--colorGray);
  letter-spacing: 6.5%;
}

.products__searchInput {
  position: relative;
  background-color: var(--colorWhite);
  border-radius: 0.25rem;
  overflow: hidden;
  margin-top: 1.4375rem;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
}

.products__searchKeywordInput {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 1rem;
  font-size: 0.9375rem;
  color: var(--colorDark, #1A1A1A);
  background: transparent;
  line-height: 150%;
}

.products__searchKeywordInput::placeholder {
  color: #CCC;
}

.products__searchIconBtn {
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--colorMain);
  background-color: var(--colorMain);
  border-radius: 0 0.25rem 0.25rem 0;
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.35s ease-out;
  aspect-ratio: 1/ 1;
}

.products__searchIconBtn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  background-image: url(../../images/common/icon-search.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 2rem;
  height: 2rem;
}

@media (hover: hover) {
  .products__searchIconBtn:hover {
    background-color: var(--colorWhite);
    border: 1px solid var(--colorMain);
  }

  .products__searchIconBtn:hover::after {
    background-image: url(../../images/common/icon-search-red.png);
  }
}

.products__searchKeywordWrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.products__searchKeywordText {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 9%;
}

.products__searchKeyword {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.5rem;
  column-gap: 1rem;
}

.products__searchKeywordItem a {
  color: var(--colorGray);
  text-decoration: underline;
  cursor: pointer;
  transition: 0.35s ease-out;
}

/* 検索結果エリア */
.products__searchResult {
  padding-block: 3rem 4rem;
}

.products__searchResultMeta {
  font-size: 0.875rem;
  color: var(--colorGray);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.products__searchResultEmpty {
  text-align: center;
  padding: 3rem 0;
  color: var(--colorGray);
  font-size: 0.9375rem;
  transition: color 0.35s ease-out;
}

@media (hover: hover) {
  .products__searchKeywordItem a:hover {
    color: var(--colorMain);
    text-decoration: unset;
  }
}

@media screen and (max-width:767px) {
  .products__searchContainer {
    padding: 2rem 1rem 2.5rem;
    margin-top: 3.35rem;
  }

  .products__searchTitleWrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .products__searchTitle {
    font-size: 1.75rem;
  }

  .products__searchTitle--ja {
    font-size: 0.75rem;
  }

  .products__searchLeadText {
    font-size: 0.875rem;
    margin-top: 0.125rem;
  }

  .products__searchInput {
    margin-top: 1.125rem;
  }

  .products__searchKeywordWrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .products__searchKeyword {
    row-gap: 0.15rem;
    column-gap: 0.5rem;
  }
  
  .products__searchKeywordItem a {
    font-size: 0.875rem;
  }
}

/* products */
/* #product-group03 の背景を100vwで画面端まで広げているが、100vwはスクロールバーの幅を含むため、その分が横にはみ出してスクロールが出る。はみ出した分を切る */
.products {
  overflow-x: clip;
}

.products__linkWrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.zh-TW .products__linkWrap {
  grid-template-columns: repeat(2, 1fr);
}

.products__link {
  border: 1px solid var(--colorMediumLightGray);
  border-radius: 0.5rem;
}

.products__link a {
  position: relative;
  display: flex;
  align-items: center;
  font-weight: 700;
  transition: color 0.35s ease-out;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
}

.products__link a .product__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translate(100%, -50%) rotate(90deg);
  display: block;
  background-image: url(../../images/common/img-arrow-red.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 1.5rem;
  height: 1.5rem;
}

.products__link .product__arrow {
  position: absolute;
  top: 50%;
  right: 3rem;
  transform: translate(100%, -50%);
  overflow: hidden;
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) {
  .products__link a:hover {
    color: var(--colorMain);
  }

  .products__link a:hover .product__arrow::after {
    animation: link-hover 0.5s forwards;
  }
}

.products__linkNum {
  font-size: 0.875rem;
  font-family: "Nunito Sans", sans-serif;
  color: var(--colorMain);
  line-height: 130%;
}

.products__content {
  margin-top: 5.5rem;
}

.products__contentTitleNum {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: "Nunito Sans", sans-serif;
  color: var(--colorMain);
  line-height: 130%;
}

.products__contentTitle {
  display: flex;
  align-items: center;
  font-size: 2rem;
  letter-spacing: 2%;
  gap: 1rem;
}

.products__group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 2.5rem;
  row-gap: 1.5rem;
  margin-top: 3.5rem;
}

.products__groupItem {
  display: grid;
  grid-template-columns: 10rem 1fr;
  border-bottom: 1px solid var(--colorMediumLightGray);
  gap: 1.5rem;
  padding-bottom: 1.5rem;
}

.products__groupItem.for-sp {
  display: none;
}

.products__groupItemImg {
  flex-shrink: 0;
  border-radius: 0.625rem;
  overflow: hidden;
}

/* 画像クリックでも「詳しく見る」と同じページへ遷移 */
.products__groupItemImgLink {
  display: block;
}

.products__groupItemImg img {
  border-radius: 0.625rem;
  aspect-ratio: 1 / 1;
  width: 100%;
  transition: transform 0.35s ease-out;
  max-width: 10rem;
}

.products__groupItemTextWrap {
  display: flex;
  flex-direction: column;
  margin-top: 0.25rem;
}

.products__groupItemTitle {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5rem;
  letter-spacing: 8%;
  transition: color 0.35s ease-out;
}

/* タイトルクリックでも「詳しく見る」と同じページへ遷移 */
.products__groupItemTitleLink {
  color: inherit;
  text-decoration: none;
}

.products__groupItemTextContent {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.products__groupItemTextContent.for-sp {
  display: none;
}

.products__groupItemTextList {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1rem;
  row-gap: 0.25rem;
  margin-top: 0.25rem;
}

.products__groupItemTextListItem a {
  font-size: 0.875rem;
  color: var(--colorGray);
  text-decoration: underline;
  transition: color 0.35s ease-out;
}

@media (hover: hover) {
  .products__groupItemTextListItem a:hover {
    color: var(--colorMain);
    text-decoration: unset;
  }
}

.products__groupItemText {
  font-size: 0.875rem;
  color: var(--colorGray);
}

.products__groupItemBtn {
  margin: auto 1.5rem 0 0;
}

.products__groupItemBtn a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.875rem;
  font-weight: 700;
  transition: color 0.35s ease-out;
  gap: 1rem;
}

.products__groupItemBtn span {
  letter-spacing: 8%;
}

.products__groupItemBtn a .product__arrow {
  position: relative;
  display: block;
  overflow: hidden;
  width: 1.5rem;
  height: 1.5rem;
}

.products__groupItemBtn a .product__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translate(100%, -50%);
  display: block;
  background-image: url(../../images/common/img-arrow-red.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) {
  .products__groupItemBtn a:hover,
  .products__groupItem:has(.products__groupItemImgLink:hover, .products__groupItemTitleLink:hover) .products__groupItemBtn a {
    color: var(--colorMain);
  }

  .products__groupItem:has(.products__groupItemBtn a:hover) .products__groupItemTitle,
  .products__groupItem:has(.products__groupItemImgLink:hover, .products__groupItemTitleLink:hover) .products__groupItemTitle {
    color: var(--colorMain);
  }

  .products__groupItem:has(.products__groupItemBtn a:hover) img,
  .products__groupItem:has(.products__groupItemImgLink:hover, .products__groupItemTitleLink:hover) img {
    transform: scale(110%);
  }

  .products__groupItemBtn a:hover .product__arrow::after,
  .products__groupItem:has(.products__groupItemImgLink:hover, .products__groupItemTitleLink:hover) .products__groupItemBtn .product__arrow::after {
    animation: product-hover 0.5s forwards;
  }
}

#product-group02 {
  padding-bottom: 5rem;
}

.product__industry {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 1fr;
  margin-top: 3rem;
}

@media screen and (min-width:768px) and (max-width:1023px) {
  .product__industry {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product__industryItemTitle {
  font-size: 1.125rem;
  letter-spacing: 13%;
  text-align: center;
  line-height: 1.5;
  word-break: keep-all;
  margin-top: 0.5rem;
}

@media (hover: hover) {
  .product__industry .product__industryItem a:hover {
    color: var(--colorMain);
  }
}

.product__industry .product__arrow {
  position: relative;
  transform: translateY(-25%);
  overflow: hidden;
  margin-left: auto;
  width: 1.5rem;
  height: 1.5rem;
}

.product__industry .product__arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translate(100%, -50%);
  display: block;
  background-image: url(../../images/common/img-arrow-red.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  width: 1.5rem;
  height: 1.5rem;
}

@media (hover: hover) {
  .product__industry .product__industryItem a:hover .product__arrow::after {
    animation: product-hover 0.5s forwards;
  }
}

.product__industry .product__industryItem a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  font-weight: 700;
  color: var(--colorBlack);
  border-right: 1px solid var(--colorMediumLightGray);
  border-bottom: 1px solid var(--colorMediumLightGray);
  transition: color 0.35s ease-out;
  padding: 2.15625rem 1rem 0.5rem;
}

/* 外枠と角丸は列数に応じてアイテム側で描画する（親のoverflow:hiddenで切ると角の線が途切れるため） */
.product__industry .product__industryItem:first-child a {
  border-top-left-radius: 1rem;
}

/* 5列（PC） */
@media screen and (min-width:1024px) {
  .product__industry .product__industryItem:nth-child(-n+5) a {
    border-top: 1px solid var(--colorMediumLightGray);
  }

  .product__industry .product__industryItem:nth-child(5n+1) a {
    border-left: 1px solid var(--colorMediumLightGray);
  }

  /* 1行目の右端 */
  .product__industry .product__industryItem:nth-child(5) a,
  .product__industry .product__industryItem:last-child:nth-child(-n+5) a {
    border-top-right-radius: 1rem;
  }

  /* 最終行の左端 */
  .product__industry .product__industryItem:nth-child(5n+1):nth-last-child(-n+5) a {
    border-bottom-left-radius: 1rem;
  }

  /* 最終行が埋まっている場合の右下 */
  .product__industry .product__industryItem:nth-child(5n):last-child a {
    border-bottom-right-radius: 1rem;
  }
}

/* 3列（タブレット） */
@media screen and (min-width:768px) and (max-width:1023px) {
  .product__industry .product__industryItem:nth-child(-n+3) a {
    border-top: 1px solid var(--colorMediumLightGray);
  }

  .product__industry .product__industryItem:nth-child(3n+1) a {
    border-left: 1px solid var(--colorMediumLightGray);
  }

  .product__industry .product__industryItem:nth-child(3) a,
  .product__industry .product__industryItem:last-child:nth-child(-n+3) a {
    border-top-right-radius: 1rem;
  }

  .product__industry .product__industryItem:nth-child(3n+1):nth-last-child(-n+3) a {
    border-bottom-left-radius: 1rem;
  }

  .product__industry .product__industryItem:nth-child(3n):last-child a {
    border-bottom-right-radius: 1rem;
  }
}

/* 2列（SP） */
@media screen and (max-width:767px) {
  .product__industry .product__industryItem:nth-child(-n+2) a {
    border-top: 1px solid var(--colorMediumLightGray);
  }

  .product__industry .product__industryItem:nth-child(2n+1) a {
    border-left: 1px solid var(--colorMediumLightGray);
  }

  .product__industry .product__industryItem:nth-child(2) a,
  .product__industry .product__industryItem:last-child:nth-child(-n+2) a {
    border-top-right-radius: 1rem;
  }

  .product__industry .product__industryItem:nth-child(2n+1):nth-last-child(-n+2) a {
    border-bottom-left-radius: 1rem;
  }

  .product__industry .product__industryItem:nth-child(2n):last-child a {
    border-bottom-right-radius: 1rem;
  }
}

#product-group03 {
  background-color: var(--colorLightGray);
  margin: 0 calc(50% - 50vw) 7.5rem;
  padding: 6rem 3.125vw;
  width: 100vw;
}

.products__contentInner {
  margin-inline: auto;
  max-width: 100rem;
}

.products__serviceLeadText {
  color: var(--colorGray);
  letter-spacing: 10%;
  margin-top: 1.1rem;
}

.service__list {
  margin-top: 3.125rem;
}

.service__itemText {
  margin-top: 1.25rem;
}

.service__itemMakerLink {
  margin-block: 0.25rem 1rem;
}

.products__content .service__listItem {
  background-color: var(--colorWhite);
}

#product-group03 .detail__btn {
  margin: 2rem 2.5rem 0 auto;
  width: fit-content;
}

.service__link a {
  border: unset;
}

@media screen and (max-width:767px) {
  .products__linkWrap {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .zh-TW .products__linkWrap {
    grid-template-columns: 1fr;
  }

  .products__link a {
    font-size: 0.875rem;
    padding: 1.09375rem 1rem 0.9rem;
  }

  .products__link a::after {
    right: 1rem;
  }

  .products__linkNum {
    font-size: 0.75rem;
  }

  .products__content {
    margin-top: 3.65rem;
  }

  .products__contentTitleNum {
    font-size: 1.25rem;
  }

  .products__contentTitle {
    font-size: min(7.18vw, 1.75rem);
  }

  .products__group {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .products__groupItem.for-sp  {
    display: block;
  }

  .products__groupItem.for-pc {
    display: none;
  }

  .products__groupItemLink a {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0 1.5rem;
  }

  .products__groupItemImg img {
    max-width: 9rem;
  }

  .products__groupItemTextWrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .products__groupItemTextContent.for-pc {
    display: none;
  }

  .products__groupItemTextContent.for-sp {
    display: flex;
  }

  .products__groupItemTextContent {
    grid-column: 1 / 3;
    margin-top: 0.75rem;
  }

  .products__groupItemTextListItem a {
    font-size: 0.75rem;
    letter-spacing: 5%;
  }

  .products__groupItemText {
    font-size: 0.75rem;
  }

  .products__groupItemBtn {
    flex-shrink: 0;
    margin: 0 0.5rem 0 0;
  }

  .products__groupItemBtn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.875rem;
    font-weight: 700;
    transition: color 0.35s ease-out;
    gap: 1rem;
  }

  .products__groupItemBtn span {
    letter-spacing: 8%;
  }

  .products__groupItemBtn .product__arrow {
    position: relative;
    display: block;
    overflow: hidden;
    width: 1.5rem;
    height: 1.5rem;
  }

  .products__groupItemBtn .product__arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translate(100%, -50%);
    display: block;
    background-image: url(../../images/common/img-arrow-red.png);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 1.5rem;
    height: 1.5rem;
  }

  #product-group02 {
    padding-bottom: 3.5rem;
  }

  .product__industry {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2.5rem;
  }

  .product__industry .product__industryItem a {
    gap: 0.3rem;
    padding-block: 2.5rem 0.75rem;
  }

  .product__industryItemTitle {
    font-size: 1rem;
    margin-top: 0;
  }

  .product__industryItemImg img {
    max-width: 3rem;
  }

  .product__industry .product__arrow {
    transform: translate(31%, 15%);
  }

  #product-group03 {
    padding-block: 4rem;
    /* -4.1%は親コンテナ幅基準になり100vwと合わず右にはみ出すため、PCと同じくビューポート基準で広げる */
    margin: 0 calc(50% - 50vw) 6rem;
  }

  .products__serviceLeadText {
    font-size: 0.875rem;
    line-height: 175%;
  }

  .service__list {
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  #product-group03 .detail__btn {
    margin-top: 2.35rem;
  }
}