.category-section .container {
  max-width: 1168px;
  width: 100%;
}

.product-related {
  padding-top: 100px;
  padding-bottom: 100px;
}

.product-related .related-ttl-container {
  position: relative;
  height: 38px;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-related .related-ttl {
  height: 100%;
  object-fit: contain;
}

.category-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 35px;
  margin-bottom: 35px;
  min-height: 75px;
  padding: 0 34px;
}

.category-info .category-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-info .category-header .category-image {
  width: 75px;
  height: 75px;
  min-width: 75px;
  min-height: 75px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-info .category-header .category-image img {
  height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.category-info .category-header .category-name {
  font-size: 39px;
  font-weight: 800;
  color: #000;
  padding-right: 35px;
  white-space: nowrap;
  line-height: 1;
  padding-right: 0 !important; /* 一時的に追加 */
  border-right: none !important; /* 一時的に追加 */
}

.category-info .category-description {
  font-size: 18px;
}

.related-products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 35px;
  padding: 34px;
  border-radius: 10px;
}

.related-products .related-product-item {
  width: 22.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  background: #fff;
  border-radius: 10px;
  padding: 33px 30px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

@media screen and (min-width: 1168px) {
  .related-products .related-product-item:nth-of-type(4) ~ .related-product-item:last-of-type {
    margin-right: auto;
  }
}

.related-products .related-product-item .product-image {
  aspect-ratio: 396/387;
  max-height: 187px;
  min-height: 187px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 90%;
}

.related-products .related-product-item .product-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.related-products .related-product-item .product-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  gap: 20px;
}

.related-products .related-product-item .product-info .product-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #000;
}

.related-products .related-product-item .product-info .product-link {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #004097;
  border: 2px solid #004097;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 87%;
  border-radius: 36px;
  transition: all 0.3s ease;
}

@media screen and (max-width: 1167px) {
  .page-content > .container {
    max-width: calc(100vw - 64px);
  }
  .category-section .container {
    max-width: 100%;
  }
  .related-roductsp .related-product-item {
    padding: 2.8vw 2.6vw;
    width: 22%;
  }
  .related-products .related-product-item .product-image {
    aspect-ratio: 396/387;
    max-height: unset;
    min-height: unset;
    width: 80%;
    max-width: 80%;
  }
  .related-products .related-product-item .product-info .product-title {
    font-size: 16px;
  }
  .related-products .related-product-item .product-info .product-link {
    font-size: 12px;
    height: 30px;
  }
}

@media screen and (max-width: 1167px) and (min-width: 768px) {
  .related-products .related-product-item:nth-of-type(3) ~ .related-product-item:last-of-type {
    margin-right: auto;
  }
}

@media screen and (max-width: 979px) {
  .related-products {
    column-gap: 5%;
  }

  .related-products .related-product-item {
    padding: 2.8vw 2.6vw;
    width: 30%;
  }

  .related-products .related-product-item .product-info .product-title {
    font-size: 18px;
  }
  .related-products .related-product-item .product-info .product-link {
    font-size: 14px;
    height: 36px;
  }
}

@media (max-width: 767px) {
  .page-content > .container {
    max-width: 86.6vw;
  }

  .product-related {
    padding-top: 16vw;
    padding-bottom: 7vw;
  }

  .product-related .container {
    max-width: 86.6%;
  }

  .product-related .related-ttl-container {
    height: 6.9vw;
    margin-bottom: 7vw;
  }

  .category-info {
    gap: 1.5vw;
    margin-bottom: 2.5vw;
    flex-direction: column;
  }

  .category-info .category-header {
    gap: 2vw;
    min-height: 12.2vw;
  }

  .category-info .category-header .category-image {
    width: 12.2vw;
    height: 12.2vw;
    min-width: 12.2vw;
    min-height: 12.2vw;
  }

  .category-info .category-header .category-image img {
    height: 7.2vw;
  }

  .category-info .category-header .category-name {
    font-size: 7.7vw;
    border-right: none !important;
    padding-right: 0 !important;
  }

  .category-info .category-description {
    font-size: 4.2vw;
    text-align: center;
    line-height: 1.65;
    text-align: left;
  }

  .related-products {
    gap: 4vw;
    padding: 6.7vw;
    border-radius: 0;
  }

  .related-products .related-product-item {
    width: 47.5%;
    gap: 4vw;
    padding: 4.2vw 4.2vw;
  }

  .related-products .related-product-item:nth-of-type(2) ~ .related-product-item:last-of-type {
    margin-right: auto;
  }

  .related-products .related-product-item .product-image {
    aspect-ratio: 396/387;
    max-height: 30.4vw;
    min-height: 30.4vw;
    width: auto;
  }

  .related-products .related-product-item .product-info {
    gap: 4vw;
  }

  .related-products .related-product-item .product-info .product-title {
    font-size: 4.2vw;
    text-align: center;
  }

  .related-products .related-product-item .product-info .product-link {
    font-size: 3.7vw;
    height: 7.5vw;
    border-radius: 5vw;
  }
}

/*------------------------------------------------------------ product others ----------------------------------------------------------------*/

.product-others {
  background: #fff;
  padding-top: 100px;
  padding-bottom: 180px;
}

.product-others .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 1168px;
}

.product-others .others-ttl-container {
  position: relative;
  height: 38px;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-others .others-ttl {
  height: 100%;
  object-fit: contain;
}

@media (max-width: 767px) {
  .product-others {
    padding-top: 16vw;
    padding-bottom: 13.6vw;
  }

  .product-others .container {
    max-width: 86.6%;
  }

  .product-others .others-ttl-container {
    height: 6.9vw;
    margin-bottom: 7vw;
  }
}

/*------------------------------------------------------------ category tabs ----------------------------------------------------------------*/

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 15px;
  margin-bottom: 20px;
  margin-top: 116px;
}

.category-tab {
  border: 2px solid #ccc;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  border-radius: 34px;
  padding: 15px 15px;
  width: calc((100% - (15px * 3)) / 4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  position: relative;
}

.category-tab::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  top: 50%;
  right: 18.9%;
  transform: translateY(-70%) rotate(135deg);
}

.category-tab:hover {
  transform: translateY(-4px);
}

.category-tab[style*="border-color"] {
  background: var(--border-color);
}

.category-tab img {
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.category-section {
  padding: 60px 0 0;
  border-radius: 10px;
  margin-bottom: 20px;
}

.category-section:last-of-type {
  margin-bottom: 180px;
}

.category-section .container {
  margin: 0 auto;
}

.product-others .all-products-link {
  background: #004097;
  color: #fff;
  padding: 23px 50px;
  min-width: 310px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-others .all-products-link::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  top: 50%;
  right: 35px;
  transform: translateY(-50%) rotate(45deg);
}

@media screen and (max-width: 1167px) and (min-width: 768px) {
  .category-tab::before {
    right: calc(50px - ((1168px - 100vw) / 10));
  }
}

@media (max-width: 767px) {
  .category-tabs {
    gap: 2.6vw;
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    margin-top: 13vw;
  }

  .category-tab {
    width: 41.2vw;
    min-width: 41.2vw;
    max-width: 41.2vw;
    border-width: 0.5vw;
    border-radius: 6.1vw;
    padding: 1.7vw 4.2vw;
    gap: 1.3vw;
    font-size: 4.8vw;
  }

  .category-tab img {
    height: 4.8vw;
    width: 6.5vw;
    margin-left: -4vw;
  }

  .category-section {
    padding: 8vw 0 6.1vw;
    border-radius: 0vw;
    margin-bottom: 0vw;
  }

  .category-section:last-of-type {
    margin-bottom: 13.6vw;
  }

  .category-section .container {
    padding: 0;
  }

  .product-others .all-products-link {
    padding: 4.2vw 5.5vw;
    min-width: 56vw;
    border-radius: 2.6vw;
    font-size: 4.2vw;
  }

  .product-others .all-products-link::before {
    width: 2.5vw;
    height: 2.5vw;
    right: 6vw;
    border-width: 0.6vw;
  }
  .category-tab::before {
    right: 4vw;
    width: 2.5vw;
    height: 2.5vw;
    border-width: 0.6vw;
  }
}

@media (hover: hover) {
  .related-products .related-product-item:hover .product-info .product-link {
    background: #004097;
    color: #fff;
  }
}
