/* ------------------------------
  製品詳細ページ共通スタイル
  ACFフレキシブルコンテンツの各レイアウト（layout name）に対応
  すべての製品でこの1ファイルを共用する
------------------------------ */

/* 製品ページのヒーローはラベル・タイトル・リード文・ボタン2つを含み情報量が多いため、
   他の下層ページより少し高さを確保する */
.single-product .sub-hero {
  height: 17rem;
}

@media screen and (min-width: 768px) and (max-width: 959px) {
  .single-product .sub-hero {
    height: 21rem;
  }
}

@media screen and (max-width: 767px) {
  .single-product .sub-hero {
    height: 15rem;
  }
}

.sub-hero__cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0 1.25rem;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-size: max(0.8125rem, 12px);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
}

.sub-hero__cta svg {
  flex-shrink: 0;
  fill: currentcolor;
}

.sub-hero__cta--outline {
  color: var(--color-primary);
  background-color: #fff;
}

.sub-hero__cta--primary {
  color: #fff;
  background-color: var(--color-primary);
}

@media (any-hover: hover) {
  .sub-hero__cta--outline:hover {
    background-color: #eef4fb;
    opacity: 1;
  }

  .sub-hero__cta--primary:hover {
    background-color: var(--color-primary-dark);
    opacity: 1;
  }
}

/* ページ内ナビゲーション（フレキシブルコンテンツの見出しから自動生成） */
.product-page-nav {
  position: sticky;
  top: 6.25rem;
  z-index: 40;
  margin-top: 1.5rem;
  background-color: #fff;
  border-bottom: 1px solid #dbe5ee;
}

.product-page-nav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  max-width: 84rem;
  margin: 0 auto;
  padding: 0 3rem;
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.product-page-nav__list::-webkit-scrollbar {
  display: none;
}

.product-page-nav__list li {
  flex-shrink: 0;
}

.product-page-nav__list a {
  display: flex;
  align-items: center;
  height: 3.5rem;
  padding: 0 0.125rem;
  border-bottom: 2px solid transparent;
  font-size: max(0.875rem, 12px);
  font-weight: 600;
  color: var(--color-text-light);
  transition: color 0.3s, border-color 0.3s;
}

@media (any-hover: hover) {
  .product-page-nav__list a:hover {
    color: var(--color-primary);
    opacity: 1;
  }
}

/* 冒頭リード文・商品写真 */
.product-intro {
  max-width: 84rem;
  margin: 3rem auto 1.5rem;
  padding: 0 3rem;
  font-size: max(0.875rem, 12px);
  font-weight: 500;
  line-height: 1.9;
  color: var(--color-text-light);
}

.product-photo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 84rem;
  margin: 3rem auto 0;
  padding: 0 3rem;
}

.product-photo img {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  border: 1px solid #dbe5ee;
  border-radius: 0.75rem;
  cursor: zoom-in;
}

/* セクション共通 */
.product-section {
  padding: 5rem 3rem;
  scroll-margin-top: 9.75rem;
}

.product-section:nth-of-type(even) {
  background-color: #f2f7fc;
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: max(1.75rem, 24px);
  font-weight: 700;
  text-align: center;
  color: var(--color-primary-dark);
}

.section-heading::after {
  width: 2.75rem;
  height: 0.1875rem;
  margin-top: 1rem;
  border-radius: 0.125rem;
  background-color: var(--color-primary);
  content: "";
}

.section-heading--left {
  align-items: flex-start;
  text-align: left;
}

.section-heading--left::after {
  margin-left: 0;
}

/* 特長カード（layout: feature_cards） */
.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 84rem;
  margin: 3rem auto 0;
}

.feature-card {
  padding: 2.25rem 1.75rem;
  border: 1px solid #dbe5ee;
  border-radius: 0.75rem;
  background-color: #fff;
  text-align: center;
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto;
  border-radius: 50%;
  background-color: #eef4fb;
}

.feature-card__icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.feature-card__title {
  margin-top: 1.25rem;
  font-size: max(1.0625rem, 15px);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.feature-card__text {
  margin-top: 0.875rem;
  font-size: max(0.8125rem, 12px);
  font-weight: 500;
  line-height: 1.85;
  color: var(--color-text-light);
}

/* 原文引用（layout: source_quote） */
.source-quote {
  max-width: 84rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--color-primary-light);
  background-color: #f7fafd;
}

.source-quote p {
  font-size: max(0.8125rem, 12px);
  font-weight: 500;
  line-height: 1.9;
  color: var(--color-text);
}

.source-quote p + p {
  margin-top: 0.75rem;
}

.source-quote__cite {
  display: block;
  margin-top: 0.75rem;
  font-size: max(0.75rem, 11px);
  font-style: normal;
  color: #91a2b3;
}

/* 手順・工程カード（layout: process_list） */
.process-list {
  max-width: 84rem;
  margin: 1.75rem auto 0;
  display: grid;
  gap: 1.25rem;
}

.process-item {
  padding: 1.5rem 1.75rem;
  border: 1px solid #dbe5ee;
  border-radius: 0.75rem;
  background-color: #fff;
}

.process-item__title {
  font-size: max(0.9375rem, 13px);
  font-weight: 700;
  color: var(--color-primary-dark);
}

.process-item__text {
  margin-top: 0.5rem;
  font-size: max(0.8125rem, 12px);
  font-weight: 500;
  line-height: 1.85;
  color: var(--color-text-light);
}

.process-item__gallery {
  margin-top: 1.25rem;
}

/* 資料画像ギャラリー（layout: figure_gallery） */
.figure-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 84rem;
  margin: 2.5rem auto 0;
}

.figure-item {
  margin: 0;
  max-width: 40rem;
  width: 100%;
}

.figure-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #dbe5ee;
  border-radius: 0.5rem;
  cursor: zoom-in;
}

.figure-item figcaption {
  margin-top: 0.625rem;
  font-size: max(0.75rem, 11px);
  font-weight: 500;
  line-height: 1.6;
  color: #91a2b3;
  text-align: center;
}

/* 箇条書きリスト（layout: usage_list） */
.usage-list {
  max-width: 84rem;
  margin: 1.75rem auto 0;
  display: grid;
  gap: 1rem;
}

.usage-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: max(0.9375rem, 13px);
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-text);
}

.usage-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background-color: var(--color-primary);
}

/* 見出し・注記 */
.test-note {
  max-width: 84rem;
  margin: 1rem auto 0;
  font-size: max(0.8125rem, 12px);
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-text-light);
}

.test-subheading {
  max-width: 84rem;
  margin: 2.5rem auto 0;
  font-size: max(1rem, 14px);
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* 仕様テーブル（layout: spec_table） */
.test-table-wrap {
  max-width: 84rem;
  margin: 1.5rem auto 0;
  overflow-x: auto;
}

.test-table {
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
}

.test-table th,
.test-table td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid #dbe5ee;
  text-align: left;
  font-size: max(0.8125rem, 12px);
  font-weight: 500;
}

.test-table thead th {
  background-color: #eef4fb;
  color: var(--color-primary-dark);
  font-weight: 700;
  white-space: nowrap;
}

.test-table tbody td {
  color: var(--color-text);
}

.test-table tbody td:first-child {
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* 自由記述リッチテキスト（layout: rich_text） */
.rich-text {
  max-width: 84rem;
  margin: 0 auto;
  font-size: max(0.9375rem, 13px);
  font-weight: 500;
  line-height: 1.95;
  color: var(--color-text);
}

.rich-text p + p {
  margin-top: 1.25rem;
}

.rich-text h3 {
  margin-top: 2rem;
  font-size: max(1.0625rem, 15px);
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* 資料・データ（layout: resource_list） */
.resource-list {
  display: grid;
  gap: 1rem;
  max-width: 84rem;
  margin: 1.75rem auto 0;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.25rem 1.75rem;
  border: 1px solid #dbe5ee;
  border-radius: 0.5rem;
  background-color: #fff;
}

.resource-item__label {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: max(0.9375rem, 13px);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.resource-item__meta {
  font-size: max(0.75rem, 11px);
  font-weight: 500;
  color: #91a2b3;
}

.resource-item__buttons {
  display: flex;
  flex-shrink: 0;
  gap: 0.75rem;
}

.resource-item__button {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid var(--color-primary);
  border-radius: 4px;
  font-size: max(0.8125rem, 12px);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.resource-item__button svg {
  fill: currentcolor;
}

.resource-item__button--download {
  background-color: var(--color-primary);
  color: #fff;
}

@media (any-hover: hover) {
  .resource-item__button--view:hover {
    background-color: var(--color-primary);
    color: #fff;
    opacity: 1;
  }

  .resource-item__button--download:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    opacity: 1;
  }
}

/* ------------------------------
  レスポンシブ
------------------------------ */
@media screen and (max-width: 1199px) {
  .product-page-nav__list {
    justify-content: flex-start;
    gap: 1.75rem;
    padding: 0 2rem;
  }

  .product-intro,
  .product-photo,
  .product-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media screen and (max-width: 959px) {
  .product-page-nav {
    top: 74px;
  }

  .product-section {
    scroll-margin-top: 130px;
  }
}

@media screen and (max-width: 767px) {
  .product-section {
    scroll-margin-top: 118px;
  }

  .product-intro {
    padding: 0 1.25rem;
    font-size: 0.8125rem;
  }

  .product-photo {
    padding: 0 1.25rem;
  }

  .product-section {
    padding: 3rem 1.25rem;
  }

  .section-heading {
    font-size: 1.375rem;
  }

  .sub-hero__actions {
    gap: 0.5rem;
  }

  .sub-hero__cta {
    min-height: 2.375rem;
    padding: 0 0.875rem;
    font-size: 0.6875rem;
  }

  .product-page-nav__list {
    gap: 1.25rem;
    padding: 0 1.25rem;
  }

  .product-page-nav__list a {
    height: 2.75rem;
    font-size: 0.8125rem;
  }

  .feature-list {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }

  .feature-card {
    padding: 1.75rem 1.25rem;
  }

  .process-item {
    padding: 1.25rem;
  }

  .test-table-wrap {
    margin-top: 1.25rem;
  }

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

  .resource-item__buttons {
    width: 100%;
  }

  .resource-item__button {
    flex: 1;
    justify-content: center;
  }
}

/* 表：モバイルではlabel/valueの縦積みに変換 */
@media screen and (max-width: 599px) {
  .test-table thead {
    display: none;
  }

  .test-table,
  .test-table tbody,
  .test-table tr,
  .test-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .test-table-wrap {
    overflow-x: visible;
  }

  .test-table tr {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dbe5ee;
  }

  .test-table td {
    display: block;
    padding: 0.25rem 0;
    border-bottom: 0;
  }

  .test-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.125rem;
    font-size: max(0.6875rem, 10px);
    font-weight: 700;
    color: var(--color-primary-dark);
  }
}
