﻿/* ProductDetailSection.tsx / ProductImageGallery.tsx — Next Tailwind 分解 */

.product-detail__hero {
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--slate-200);
}

.product-detail__hero .product-gallery__frame,
.product-detail__hero .product-gallery__stage {
  background: #fff;
}

@media (min-width: 768px) {
  .product-detail__hero {
    margin-inline: -2.5rem;
    padding-inline: 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .product-detail__hero {
    margin-left: -2.5rem;
    padding-left: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 6rem;
  }
}

@media (min-width: 1280px) {
  .product-detail__hero {
    margin-left: -3.5rem;
    padding-left: 3.5rem;
  }
}

.product-detail__category {
  margin: 0;
  font-family: var(--font-noto);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.product-detail__title {
  margin: 1.25rem 0 0;
  font-family: var(--font-noto);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink);
}

@media (min-width: 768px) {
  .product-detail__title {
    font-size: 2.75rem;
  }
}

.product-detail__lead {
  margin: 2rem 0 0;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: #334155;
  white-space: normal;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .product-detail__lead {
    font-size: var(--text-md);
    line-height: 1.9;
  }
}

.product-detail__subtitle {
  margin: 0.75rem 0 0;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--slate-500);
}

.product-detail__proof {
  display: inline-block;
  margin: 0.85rem 0 0;
  max-width: 100%;
  padding: 0.35rem 0.75rem;
  border: 1px solid color-mix(in srgb, var(--slate-400) 55%, white);
  background: color-mix(in srgb, var(--slate-100) 70%, white);
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: var(--slate-700);
  white-space: normal;
}

.product-detail__block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.product-detail__block--overview {
  margin-top: 2rem;
}

.product-detail__content-section {
  border-top: none;
  padding-top: 2rem;
}

.product-detail__block-title {
  margin: 0;
  font-family: var(--font-noto);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ink);
  position: relative;
  padding-left: 1rem;
}

.product-detail__block-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateY(1px);
  width: 4px;
  height: 1em;
  background: var(--heading-rule-color);
  border-radius: 999px;
}

@media (min-width: 768px) {
  .product-detail__block-title {
    font-size: 1.25rem;
  }
}

.product-detail__section-stack {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

@media (min-width: 768px) {
  .product-detail__section-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .product-detail__section-stack > :not(.product-detail__video-item) {
    grid-column: 1 / -1;
  }

  .product-detail__section-stack > .product-detail__video-item:only-of-type {
    grid-column: 1 / -1;
  }
}

.product-detail__card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--slate-200);
  background: var(--slate-50, #f8fafc);
  padding: 1.25rem;
}

.product-detail__card--no-frame {
  border: none;
  background: transparent;
  padding: 0;
}

.product-detail__card--no-frame > .product-detail__card-body {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-detail__card-body {
  margin-top: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.product-detail__cards-stack {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.product-detail__cards-stack .product-detail__info-grid .product-detail__body-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  overflow: hidden;
  background: #fff;
}

.product-detail__cards-stack .product-detail__info-grid .product-detail__body-figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.product-detail__cards-stack--single {
  grid-template-columns: 1fr !important;
}

.product-detail__cards-stack .product-detail__info-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
}

.product-detail__cards-stack > .product-detail__card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-detail__cards-stack > .product-detail__card > .product-detail__card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.product-detail__cards-stack .product-detail__copy-media {
  margin-top: auto;
  width: 100%;
}

/* カード横並び: 画像枠の高さを揃え、中身は contain で中央配置 */
.product-detail__cards-stack .product-detail__copy-media .product-gallery--compact .product-gallery__frame {
  aspect-ratio: auto;
  min-height: 10rem;
  height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-detail__cards-stack .product-detail__copy-media .product-gallery--compact .product-gallery__stage {
  position: relative;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.product-detail__cards-stack .product-detail__copy-media .product-gallery--compact .product-gallery__image {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .product-detail__cards-stack .product-detail__copy-media .product-gallery--compact .product-gallery__frame {
    min-height: 12rem;
    height: 12rem;
  }
}

.product-detail__cards-stack .product-gallery__frame,
.product-detail__cards-stack .product-gallery__stage,
.product-detail__info-inner:not(.product-detail__info-inner--split) .product-detail__copy-media .product-gallery__frame,
.product-detail__info-inner:not(.product-detail__info-inner--split) .product-detail__copy-media .product-gallery__stage {
  background: #fff;
}

@media (min-width: 768px) {
  .product-detail__cards-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .product-detail__cards-stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* カード枠内の見出しは横パディングなし・装飾なし */
.product-detail__card .product-detail__medium-title {
  padding: 0.75rem 0;
  background: transparent;
  border-left: none;
  border-top: 0;
}


.product-detail__medium-title {
  margin: 0;
  padding: 0.75rem 1rem;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: linear-gradient(90deg, color-mix(in srgb, var(--slate-100) 90%, white), transparent);
}

@media (min-width: 768px) {
  .product-detail__medium-title {
    font-size: 1rem;
  }
}

.product-detail__body {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

@media (min-width: 768px) {
  .product-detail__body {
    font-size: var(--text-md);
  }
}

.product-detail__body p {
  margin: 0;
}

.product-detail__body-block {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-detail__body-figure {
  margin: 0;
  max-width: 42rem;
  border: 1px solid var(--slate-200);
  background: var(--slate-50, #f8fafc);
}

.product-detail__body-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 16rem;
  object-fit: contain;
}

.product-detail__body-zoom {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.product-detail__body-zoom img {
  display: block;
  width: 100%;
  height: auto;
}

.product-detail__body-zoom-hint {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
  padding: 0.2rem 0.5rem;
  border: 1px solid color-mix(in srgb, #fff 55%, transparent);
  background: color-mix(in srgb, #0f172a 55%, transparent);
  color: #fff;
  font-family: var(--font-noto);
  font-size: var(--text-min);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.product-detail__features {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
  max-width: 100%;
}

.product-detail__feature {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 768px) {
  .product-detail__feature--has-media {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem);
    align-items: start;
    gap: 1.5rem;
  }
}

.product-detail__feature-copy {
  min-width: 0;
}

.product-detail__feature-title {
  margin: 0;
  font-family: var(--font-noto);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.product-detail__feature-text {
  margin: 0.5rem 0 0;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

.product-detail__feature-prose {
  margin-top: 0.5rem;
}

.product-detail__feature-prose > .product-detail__feature-text {
  margin: 0;
}

.product-detail__feature-figure {
  max-width: 100%;
  background: #fff;
}

.product-detail__feature-figure.product-detail__body-figure {
  background: #fff;
}

.product-detail__feature-figure .product-detail__body-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 16rem;
}

.product-detail__feature-figure .product-detail__body-zoom img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 16rem;
  object-fit: contain;
}

.product-detail__info-inner {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.product-detail__card-body > .product-detail__info-inner {
  margin-top: 0;
}

/* 汎用コンテンツ（--no-frame）内は gap で積み上げ余白を統一 */
.product-detail__card--no-frame > .product-detail__card-body > .product-detail__info-inner + .product-detail__cards-stack,
.product-detail__card--no-frame > .product-detail__card-body > .product-detail__info-inner + .product-detail__features,
.product-detail__card--no-frame > .product-detail__card-body > .product-detail__features,
.product-detail__card--no-frame > .product-detail__card-body > .product-detail__spec-table-wrap {
  margin-top: 0;
}

.product-detail__copy-media {
  min-width: 0;
}

.product-detail__copy-media .product-gallery {
  margin-top: 0;
  max-width: none;
  gap: 0.5rem;
}

.product-detail__copy-media .product-gallery--compact .product-gallery__frame {
  /* 本文と画像: 枠の高さは入れた画像の縦幅まで（4:3 強制・min-height なし） */
  aspect-ratio: auto;
  min-height: 0;
  height: auto;
  background: transparent;
}

.product-detail__copy-media .product-gallery--compact .product-gallery__stage {
  position: relative;
  inset: auto;
  overflow: visible;
  display: block;
  background: transparent;
}

.product-detail__copy-media .product-gallery--compact .product-gallery__image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-detail__copy-media .product-gallery--compact .product-gallery__zoom-hint {
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.15rem 0.4rem;
  font-size: var(--text-min);
}

.product-detail__copy-media .product-gallery--compact .product-gallery__thumbs {
  gap: 0.35rem;
}

.product-detail__copy-media .product-gallery--compact .product-gallery__thumb {
  width: 2.75rem;
  height: 2.75rem;
}

@media (min-width: 768px) {
  .product-detail__copy-media .product-gallery--compact .product-gallery__thumb {
    width: 3rem;
    height: 3rem;
  }
}

@media (min-width: 768px) {
  .product-detail__info-inner--split {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 22rem);
    align-items: start;
    gap: 1.5rem;
  }
}

.product-detail__info-text {
  margin: 0;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

.product-detail__info-text strong,
.product-detail__info-text b,
.product-detail__case-text strong,
.product-detail__case-text b,
.product-detail__feature-text strong,
.product-detail__feature-text b {
  font-weight: 600;
}

.product-detail__prose {
  display: grid;
  gap: 0.85em;
}

.product-detail__prose > .product-detail__info-text,
.product-detail__prose > .product-detail__case-text {
  margin: 0;
}

.product-detail__prose-list {
  margin: 0;
  padding: 0 0 0 1.15em;
  display: grid;
  gap: 0.65em;
  list-style: disc;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

.product-detail__prose-list[class] {
  list-style: disc;
}

ol.product-detail__prose-list {
  list-style: decimal;
}

.product-detail__prose-list li {
  padding-left: 0.2em;
}

@media (min-width: 768px) {
  .product-detail__info-text,
  .product-detail__prose-list,
  .product-detail__feature-text,
  .product-detail__subtitle {
    font-size: var(--text-md);
  }
}

.product-detail__info-grid {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail__info-grid .product-detail__body-figure {
  max-width: none;
}

/* split（本文＋画像横並び）時は横並び維持。高さは画像の比率を優先する */
@media (min-width: 768px) {
  .product-detail__info-inner--split .product-detail__info-grid .product-detail__body-figure {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .product-detail__info-inner--split .product-detail__info-grid .product-detail__body-figure img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .product-detail__info-inner--split .product-detail__info-grid .product-detail__body-zoom img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}

@media (min-width: 640px) {
  .product-detail__info-grid--2 {
    grid-template-columns: 1fr 1fr;
  }

  .product-detail__info-grid--3,
  .product-detail__info-grid--many {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-detail__spec-table-wrap {
  margin-top: 1.5rem;
  min-width: 0;
  max-width: 100%;
}

.product-detail__spec-table-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

.product-detail__spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  line-height: 1.15;
}

.product-detail__spec-table th,
.product-detail__spec-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--slate-200);
  vertical-align: middle;
  text-align: left;
  line-height: 1.15;
}

.product-detail__spec-table th br,
.product-detail__spec-table td br {
  display: block;
  content: "";
  margin-top: -0.15em;
}

.product-detail__spec-table th {
  width: 32%;
  font-weight: 600;
  background: color-mix(in srgb, var(--slate-100) 80%, white);
  color: var(--slate-700);
}

.product-detail__spec-table--matrix {
  min-width: 36rem;
  table-layout: fixed;
}

.product-detail__spec-table--matrix th,
.product-detail__spec-table--matrix thead th {
  width: auto;
}

.product-detail__spec-table--matrix:not(.product-detail__spec-table--col-widths) thead th:first-child,
.product-detail__spec-table--matrix:not(.product-detail__spec-table--col-widths) tbody th:first-child,
.product-detail__spec-table--matrix:not(.product-detail__spec-table--col-widths) tbody td:first-child {
  width: 22%;
  min-width: 5.5rem;
  white-space: normal;
}

.product-detail__spec-table--matrix.product-detail__spec-table--col-widths th,
.product-detail__spec-table--matrix.product-detail__spec-table--col-widths td {
  white-space: normal;
}

/* 1列目（項目名）はセル内で折り返し、隣列へはみ出さない */
.product-detail__spec-table--matrix.product-detail__spec-table--col-widths thead tr > :first-child,
.product-detail__spec-table--matrix.product-detail__spec-table--col-widths tbody tr > :first-child {
  min-width: 19.5rem;
  overflow-wrap: normal;
  word-break: keep-all;
}

.product-detail__spec-table--matrix.product-detail__spec-table--col-widths tbody tr > td:not(:first-child),
.product-detail__spec-table--matrix.product-detail__spec-table--col-widths thead tr > th:not(:first-child) {
  overflow-wrap: break-word;
}

/* 1列目（無線性能など・rowspan 見出し） */
.product-detail__spec-table--matrix tbody td[rowspan],
.product-detail__spec-table--matrix tbody th[rowspan] {
  min-width: 6.75rem;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* 2列目（周波数帯など）。rowspan 行は先頭 td が2列目相当 */
.product-detail__spec-table--matrix tbody tr > td:nth-child(2):not([colspan="2"]),
.product-detail__spec-table--matrix tbody tr > td:first-child:not([rowspan]):not([colspan="2"]) {
  min-width: 7.5rem;
}

@media (max-width: 767px) {
  .product-detail__spec-table--matrix {
    min-width: 34rem;
  }

  .product-detail__spec-table--matrix th,
  .product-detail__spec-table--matrix td {
    padding: 0.45rem 0.45rem;
    line-height: 1.45;
  }

  /* 列幅指定表: 1列目は折り返しで収めつつ、全体幅は抑える */
  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths col:nth-child(1) {
    width: 32% !important;
  }

  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths col:nth-child(2) {
    width: 34% !important;
  }

  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths col:nth-child(3),
  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths col:nth-child(4) {
    width: 17% !important;
  }

  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths thead tr > :first-child,
  .product-detail__spec-table--matrix.product-detail__spec-table--col-widths tbody tr > :first-child {
    min-width: 6.25rem;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .product-detail__spec-table--matrix tbody td[rowspan],
  .product-detail__spec-table--matrix tbody th[rowspan] {
    min-width: 6.25rem;
    overflow-wrap: break-word;
    word-break: normal;
  }

  .product-detail__spec-table--matrix tbody tr > td:nth-child(2):not([colspan="2"]) {
    overflow-wrap: break-word;
  }
}

/* CMS で列幅指定時は colgroup を優先（先頭列の固定幅ルールを無効化） */
.product-detail__spec-table--col-widths {
  table-layout: fixed;
}

.product-detail__spec-table--col-widths thead th:first-child,
.product-detail__spec-table--col-widths tbody th:first-child,
.product-detail__spec-table--col-widths tbody td:first-child,
.product-detail__spec-table--col-widths th {
  width: auto;
}

.product-detail__spec-table thead th {
  font-weight: 700;
  background: color-mix(in srgb, var(--slate-100) 90%, white);
  color: var(--ink);
  white-space: pre-line;
}

.product-detail__spec-table td {
  font-weight: 400;
  color: var(--slate-700);
  white-space: pre-line;
}

.product-detail__spec-table td:has(.product-detail__spec-pair-list) {
  white-space: normal;
}

.product-detail__spec-pair-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-detail__spec-pair-heading {
  margin: 0;
  font-weight: 600;
  color: var(--slate-700);
}

.product-detail__spec-pair-rows {
  margin: 0;
}

.product-detail__spec-pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  margin: 0;
}

.product-detail__spec-pair-row + .product-detail__spec-pair-row {
  margin-top: 0.35rem;
}

.product-detail__spec-pair-label {
  margin: 0;
  font-weight: 400;
}

.product-detail__spec-pair-label--empty {
  display: none;
}

.product-detail__spec-pair-value {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.product-detail__compare-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.product-detail__spec-table--compare {
  min-width: 40rem;
  table-layout: fixed;
}

.product-detail__spec-table--compare thead th {
  font-weight: 700;
  text-align: center;
  background: color-mix(in srgb, var(--slate-100) 70%, white);
  color: var(--ink);
  vertical-align: middle;
}

.product-detail__spec-table--compare .product-detail__compare-corner {
  width: 7.5rem;
  text-align: left;
  background: color-mix(in srgb, var(--slate-100) 80%, white);
}

.product-detail__spec-table--compare th[scope="row"] {
  width: 7.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.product-detail__spec-table--compare td {
  text-align: center;
  white-space: normal;
}

.product-detail__spec-table--compare .is-primary {
  background: color-mix(in srgb, var(--blue) 8%, white);
}

.product-detail__spec-table--compare thead th.is-primary {
  background: color-mix(in srgb, var(--blue) 14%, white);
  color: var(--blue);
}

.product-detail__compare-rating {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.product-detail__compare-rating--best {
  color: #0f766e;
}

.product-detail__compare-rating--good {
  color: var(--blue);
}

.product-detail__compare-rating--fair {
  color: #b45309;
}

.product-detail__compare-rating--poor {
  color: #b91c1c;
}

.product-detail__compare-text {
  display: block;
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.65;
  color: var(--slate-600);
  text-align: left;
}

@media (min-width: 768px) {
  .product-detail__compare-text {
    text-align: center;
  }
}

.product-detail__cases {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-detail__case {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .product-detail__case {
    grid-template-columns: 14rem minmax(0, 1fr);
    align-items: start;
  }
}

.product-detail__case-media {
  width: 100%;
  max-width: 14rem;
  overflow: visible;
  background: transparent;
  aspect-ratio: auto;
}

@media (min-width: 640px) {
  .product-detail__case-media {
    max-width: none;
  }
}

.product-detail__case-media .product-gallery {
  margin-top: 0;
  max-width: none;
  width: 100%;
  gap: 0.5rem;
}

.product-detail__case-media .product-gallery--compact .product-gallery__frame {
  width: 100%;
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.product-detail__case-media .product-gallery--compact .product-gallery__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.product-detail__case-media .product-gallery--compact .product-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.product-detail__case-media .product-gallery--compact .product-gallery__zoom-hint {
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.15rem 0.4rem;
  font-size: var(--text-min);
}

.product-detail__case-media .product-gallery--compact .product-gallery__thumbs {
  gap: 0.35rem;
}

.product-detail__case-media .product-gallery--compact .product-gallery__thumb {
  width: 2.75rem;
  height: 2.75rem;
}

@media (min-width: 768px) {
  .product-detail__case-media .product-gallery--compact .product-gallery__thumb {
    width: 3rem;
    height: 3rem;
  }
}

.product-detail__case-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail__case-title {
  margin: 0;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--ink);
}

.product-detail__case-text {
  margin: 0.5rem 0 0;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

.product-detail__downloads {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 1rem;
}

.product-detail__download-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.product-detail__download-link {
  display: inline-block;
  padding: 0.625rem 1rem;
  border: 1px solid var(--slate-200);
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--slate-700);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.product-detail__download-link:hover {
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
  color: var(--blue);
}

.product-detail__download-note {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--slate-500);
  white-space: normal;
  overflow-wrap: break-word;
}

.product-detail__videos {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-detail__videos--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 1rem;
}

@media (min-width: 768px) {
  .product-detail__videos--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.product-detail__video-item {
  min-width: 0;
}

.product-detail__video-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--slate-700);
}

.product-detail__video {
  aspect-ratio: 16 / 9;
  background: var(--slate-100);
}

.product-detail__video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.product-detail__notes {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--slate-200);
  background: color-mix(in srgb, var(--slate-100) 55%, white);
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.8;
  color: var(--slate-600);
}

.product-detail__notes p {
  margin: 0;
}

/* Gallery — メイン + 折り返しサムネ / クリック拡大（SCF gallery） */
.product-gallery {
  margin-top: 2rem;
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .product-gallery {
    margin-top: 2.5rem;
  }
}

.product-gallery__main {
  min-width: 0;
  width: 100%;
}

.product-gallery__zoom {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.product-gallery__zoom:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.product-gallery__still {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
}

.product-gallery__zoom-hint {
  position: absolute;
  right: 0.625rem;
  bottom: 0.625rem;
  z-index: 30;
  padding: 0.2rem 0.5rem;
  border: 1px solid color-mix(in srgb, #fff 55%, transparent);
  background: color-mix(in srgb, #0f172a 55%, transparent);
  color: #fff;
  font-family: var(--font-noto);
  font-size: var(--text-min);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.product-gallery__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 16rem;
  background: #f8fafc;
}

@media (min-width: 768px) {
  .product-gallery__frame {
    min-height: 22rem;
  }
}

.product-gallery__line {
  pointer-events: none;
  position: absolute;
  z-index: 20;
  background: var(--slate-300);
}

.product-gallery__line--t,
.product-gallery__line--b {
  left: 0;
  width: 100%;
  height: 1px;
}

.product-gallery__line--t {
  top: 0;
}

.product-gallery__line--b {
  bottom: 0;
}

.product-gallery__line--l,
.product-gallery__line--r {
  top: 0;
  height: 100%;
  width: 1px;
}

.product-gallery__line--l {
  left: 0;
}

.product-gallery__line--r {
  right: 0;
}

.product-gallery__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}

.product-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-gallery__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
}

.product-gallery__thumb-item {
  flex: 0 0 auto;
}

.product-gallery__thumb {
  position: relative;
  display: block;
  width: 4.5rem;
  height: 3.5rem;
  padding: 0;
  border: 1px solid var(--slate-200);
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 768px) {
  .product-gallery__thumb {
    width: 5rem;
    height: 3.75rem;
  }
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-gallery__thumb:hover {
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
}

.product-gallery__thumb.is-selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--blue) 30%, transparent);
}

/* Fullscreen lightbox — ビューポートいっぱいに拡大（ニュースと同系統） */
.product-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.85);
  padding: 1rem;
}

@media (min-width: 768px) {
  .product-gallery-lightbox {
    padding: 2rem;
  }
}

.product-gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  min-width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 9999px;
  padding: 0 1rem;
  background: rgb(0 0 0 / 0.4);
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  letter-spacing: 0.025em;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-gallery-lightbox__close:hover {
  background: rgb(0 0 0 / 0.6);
}

@media (min-width: 768px) {
  .product-gallery-lightbox__close {
    top: 1.5rem;
    right: 1.5rem;
  }
}

.product-gallery-lightbox__frame {
  position: relative;
  flex-shrink: 0;
  max-width: 96vw;
  max-height: 92vh;
}

.product-gallery-lightbox__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.product-gallery-lightbox__hint {
  pointer-events: none;
  position: absolute;
  inset-inline: 0;
  bottom: 1rem;
  margin: 0;
  text-align: center;
  font-family: var(--font-noto);
  font-size: var(--text-min);
  letter-spacing: 0.025em;
  color: rgb(255 255 255 / 0.6);
}

@media (min-width: 768px) {
  .product-gallery-lightbox__hint {
    bottom: 1.5rem;
  }
}

body[data-product-lightbox-open] header,
body[data-product-lightbox-open] .sticky-group-nav,
body[data-product-lightbox-open] .chat-widget {
  visibility: hidden;
  pointer-events: none;
}

/* ProductDetailSection.tsx L110–123 — 枠付きCTA（WP は paper-soft で周囲と同系） */
.product-detail__cta {
  margin-top: 3.5rem; /* mt-14 */
  padding: 1.5rem; /* p-6 */
  border: 1px solid var(--slate-300);
  background: var(--paper-soft);
}

@media (min-width: 768px) {
  .product-detail__cta {
    margin-top: 4rem; /* md:mt-16 */
    padding: 2rem; /* md:p-8 */
  }
}

.product-detail__cta-text {
  margin: 0;
  font-family: var(--font-noto);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: #334155;
}

@media (min-width: 768px) {
  .product-detail__cta-text {
    font-size: var(--text-md);
    line-height: 1.9;
  }
}

.product-detail__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem; /* mt-6 */
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.05em; /* tracking-wide */
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}

.product-detail__cta-link:hover {
  color: var(--blue);
}

.product-detail__cta-arrow {
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.3s;
}

.product-detail__cta-link:hover .product-detail__cta-arrow {
  transform: translateX(0.25rem);
}

.product-detail__catalog {
  margin-top: 3.5rem;
}

@media (min-width: 768px) {
  .product-detail__catalog {
    margin-top: 4rem;
  }
}

.product-detail__catalog .hub-section {
  padding-block: 0;
  border: none;
}

.product-detail__footer {
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  /* ProductDetailSection — border-b 下〜同カテゴリ見出し（pt-10 md:pt-12） */
  padding-top: 2.5rem;
  padding-bottom: 6rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

@media (min-width: 768px) {
  .product-detail__footer {
    margin-inline: -2.5rem;
    padding-inline: 2.5rem;
    padding-top: 3rem;
    padding-bottom: 8rem;
  }
}

@media (min-width: 1024px) {
  .product-detail__footer {
    margin-left: -2.5rem;
    padding-left: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .product-detail__footer {
    margin-left: -3.5rem;
    padding-left: 3.5rem;
  }
}

.product-detail__section-title {
  margin: 0;
  font-family: var(--font-noto);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  color: var(--ink);
}

@media (min-width: 768px) {
  .product-detail__section-title {
    font-size: 1.25rem;
  }
}

.product-detail__related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .product-detail__related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1280px) {
  .product-detail__related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-detail__related-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--slate-200);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}

.product-detail__related-card:hover {
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
}

.product-detail__related-card.is-current {
  border-color: color-mix(in srgb, var(--blue) 40%, transparent);
  background: color-mix(in srgb, var(--blue) 3%, transparent);
}

.product-detail__related-media {
  position: relative;
  flex-shrink: 0;
  width: 5rem;
  height: 4rem;
  overflow: hidden;
  background: #fff;
}

.product-detail__related-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-detail__related-copy {
  min-width: 0;
}

.product-detail__related-title {
  margin: 0;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.025em;
  color: var(--ink);
  transition: color 0.2s;
}

.product-detail__related-card:hover .product-detail__related-title {
  color: var(--blue);
}

.product-detail__related-badge {
  margin: 0.25rem 0 0;
  font-family: var(--font-noto);
  font-size: var(--text-min);
  color: var(--blue);
}

.product-detail__category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.product-detail__category-pill {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--slate-200);
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  letter-spacing: 0.025em;
  color: var(--slate-600);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.product-detail__category-pill:hover {
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
  color: var(--blue);
}

.product-detail__pager {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--slate-200);
}

@media (min-width: 640px) {
  .product-detail__pager {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
  }
}

.product-detail__pager-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--slate-200);
  text-decoration: none;
  text-align: left;
  transition: border-color 0.2s;
}

.product-detail__pager-link:hover {
  border-color: color-mix(in srgb, var(--blue) 30%, transparent);
}

.product-detail__pager-link--next {
  text-align: left;
}

@media (min-width: 640px) {
  .product-detail__pager-link--next {
    text-align: right;
  }
}

.product-detail__pager-spacer {
  display: none;
  flex: 1;
}

@media (min-width: 640px) {
  .product-detail__pager-spacer {
    display: block;
  }
}

.product-detail__pager-label {
  font-family: var(--font-condensed);
  font-size: var(--text-min);
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

.product-detail__pager-title {
  margin-top: 0.5rem;
  font-family: var(--font-noto);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s;
}

.product-detail__pager-link:hover .product-detail__pager-title {
  color: var(--blue);
}

.product-detail__backlinks {
  margin: 0;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.product-detail__backlinks a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--slate-300);
  text-underline-offset: 0.2em;
}

.product-detail__backlinks a:hover {
  text-decoration-color: var(--blue);
}
