
.products.pd-template {
  align-items: flex-start;
}

.products.pd-template .mainContents {
  min-width: 0;
}

.pd-product-detail {
  --pd-blue: #21497b;
  --pd-blue-dark: #173b67;
  --pd-blue-pale: #eef4f8;
  --pd-border: #b9c4cc;
  --pd-border-light: #d7dee3;
  --pd-heading: #1d3448;
  --pd-text: #334b5d;
  --pd-muted: #6b7c89;
  color: var(--pd-text);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.pd-product-detail *,
.pd-product-detail *::before,
.pd-product-detail *::after {
  box-sizing: border-box;
}

.pd-product-detail a {
  color: inherit;
}

/* 製品上部 */
.pd-hero {
  display: grid;
  grid-template-columns: minmax(16rem, 42%) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 3.25rem;
}

.pd-product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--pd-border);
  background: #f7f8f8;
}

.pd-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-product-summary {
  min-width: 0;
  padding-top: 0.125rem;
}

.pd-category-label {
  margin-bottom: 0.45rem;
  color: var(--pd-blue);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

.pd-product-summary h1 {
  margin: 0 0 1.25rem;
  color: var(--pd-blue);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.pd-model-list {
  margin: 0;
  border-top: 1px solid var(--pd-border);
  border-bottom: 1px solid var(--pd-border);
}

.pd-model-list > div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.25rem;
}

.pd-model-list > div + div {
  border-top: 1px solid var(--pd-border-light);
}

.pd-model-list dt {
  color: var(--pd-muted);
  font-size: 0.6875rem;
  font-weight: 700;
}

.pd-model-list dd {
  min-width: 0;
  color: var(--pd-blue);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
}

.pd-model-list small {
  margin-left: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
}

.pd-badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #665f2e;
  background: #ece8b2;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.4;
  vertical-align: 0.1rem;
}

.pd-lead {
  margin-top: 1.2rem;
  color: var(--pd-blue);
  font-size: 0.8125rem;
  line-height: 1.9;
}

/* 共通セクション */
.pd-section {
  margin-top: 3rem;
}

.pd-section > h2 {
  margin: 0 0 1.2rem;
  padding: 0 0 0.65rem;
  border-bottom: 1px solid var(--pd-border);
  color: var(--pd-blue);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.045em;
}

.pd-richtext,
.pd-note,
.pd-contact-section p {
  color: var(--pd-blue);
  font-size: 0.8125rem;
  line-height: 1.95;
}

.pd-richtext p + p {
  margin-top: 0.25rem;
}

/* テーブル共通 */
.pd-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pd-table-wrap:focus {
  outline: none;
}

.pd-table-wrap:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: 2px;
}

.pd-spec-table,
.pd-related-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--pd-blue);
  font-size: 0.75rem;
}

.pd-spec-table th,
.pd-spec-table td,
.pd-related-table th,
.pd-related-table td {
  border: 1px solid var(--pd-border);
  padding: 0.75rem 0.9rem;
  vertical-align: middle;
  line-height: 1.65;
}

/* 仕様表：列幅を colgroup で固定し、行のがたつきを防止 */
.pd-spec-table__heading {
  width: 8.75rem;
}

.pd-spec-table th {
  color: var(--pd-blue);
  background: var(--pd-blue-pale);
  text-align: center;
  font-weight: 700;
}

.pd-spec-table td {
  background: #fff;
}

.pd-spec-load {
  display: grid;
  grid-template-columns: minmax(10rem, 0.9fr) minmax(11rem, 1.1fr);
  gap: 1.75rem;
  align-items: center;
}

.pd-spec-load > span {
  display: block;
}

/* 図面 */
.pd-drawing-area {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
}

.pd-drawing {
  display: block;
  width: min(23.5rem, calc(100% - 4rem));
  padding: 0.3rem;
  border: 1px solid var(--pd-border);
  background: #fff;
  cursor: zoom-in;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pd-drawing:hover {
  border-color: var(--pd-blue);
  box-shadow: 0 0.35rem 1rem rgba(33, 73, 123, 0.1);
}

.pd-drawing img {
  width: 100%;
}

.pd-zoom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  border: 1px solid var(--pd-border);
  color: var(--pd-blue);
  background: #fff;
  cursor: pointer;
}

.pd-zoom span {
  font-size: 1.35rem;
  line-height: 1;
}

.pd-zoom small {
  margin-top: 0.12rem;
  font-size: 0.5625rem;
  line-height: 1;
}

.pd-zoom:hover {
  color: #fff;
  background: var(--pd-blue);
}

/* ダウンロード */
.pd-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.pd-downloads a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 10.5rem;
  min-height: 2.65rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--pd-blue);
  color: #fff;
  background: var(--pd-blue);
  font-size: 0.6875rem;
  font-weight: 700;
}

.pd-downloads a:hover {
  color: var(--pd-blue);
  background: #fff;
  text-decoration: none;
}

/* 関連動画 */
.pd-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.pd-video {
  display: block;
  padding: 0.5rem;
  border: 1px solid var(--pd-border);
  background: #fff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pd-video:hover {
  border-color: var(--pd-blue);
  box-shadow: 0 0.35rem 1rem rgba(33, 73, 123, 0.1);
  text-decoration: none;
}

.pd-video-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--pd-border-light);
  background: #f4f5f6;
}

.pd-video-thumb::before,
.pd-video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top right, transparent 49.7%, #c8d0d5 50%, transparent 50.3%);
}

.pd-video-thumb::after {
  background: linear-gradient(to bottom right, transparent 49.7%, #c8d0d5 50%, transparent 50.3%);
}

.pd-video-thumb > span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 1.5rem;
  border-radius: 0.25rem;
  color: #fff;
  background: var(--pd-blue);
  font-size: 0.625rem;
}

.pd-video-meta {
  display: block;
  margin-top: 0.5rem;
  color: var(--pd-muted);
  font-size: 0.625rem;
  line-height: 1.4;
}

.pd-video strong {
  display: block;
  margin-top: 0.1rem;
  color: var(--pd-blue);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
}

/* ==========================================================
   FAQ（複数項目対応）
   中西産業 製品詳細ページ用
   ========================================================== */

.pd-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* FAQ本体 */
.pd-faq {
  overflow: hidden;
  border: 1px solid var(--pd-border);
  border-radius: 0px;
  background: #fff;
}

/* 質問 */
.pd-faq__question {
  appearance: none;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.75rem;
  margin: 0;
  padding: 1rem 4.25rem 1rem 1.25rem;
  border: 0;
  color: var(--pd-blue);
  background: var(--pd-blue-pale);
  font-family: inherit;
  font-size: 0.9375rem; /* 15px */
  font-weight: 700;
  line-height: 1.7;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease;
}

.pd-faq__question:hover,
.pd-faq__question[aria-expanded="true"] {
  background: #e8eff6;
}

.pd-faq__question:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: -2px;
}

/* 円形アイコン */
.pd-faq__icon {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  border: 1px solid rgba(33,73,123,.28);
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: border-color .2s ease,
              background-color .2s ease;
}

.pd-faq__icon::before {
  content: "";
  width: .48rem;
  height: .48rem;
  border-right: 2px solid var(--pd-blue);
  border-bottom: 2px solid var(--pd-blue);
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform .25s ease;
}

.pd-faq__question[aria-expanded="true"] .pd-faq__icon::before {
  transform: translateY(.12rem) rotate(225deg);
}

.pd-faq__question:hover .pd-faq__icon {
  background: var(--pd-blue);
  border-color: var(--pd-blue);
}

.pd-faq__question:hover .pd-faq__icon::before {
  border-color: #fff;
}

/* 回答 */
.pd-faq__answer {
  padding: 1.15rem 1.25rem 1.3rem;
  border-top: 1px solid var(--pd-border-light);
  background: #fff;
}

.pd-faq__answer p {
  margin: 0;
  color: var(--pd-blue);
  font-size: 0.9375rem; /* 15px */
  font-weight: 400;
  line-height: 1.9;
}

/* スマホ */
@media (max-width:640px){

  .pd-faq-list{
    gap:10px;
  }

  .pd-faq__question{
    min-height:3.5rem;
    padding:.9rem 3.75rem .9rem 1rem;
    font-size:.9375rem;
  }

  .pd-faq__icon{
    right:1rem;
    width:1.8rem;
    height:1.8rem;
  }

  .pd-faq__answer{
    padding:1rem;
  }

  .pd-faq__answer p{
    font-size:.9375rem;
  }

}

/* お問い合わせ */
.pd-contact-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 11rem;
  margin: 1.25rem auto 0;
  padding: 0.7rem 0.9rem 0.7rem 1.15rem;
  border: 1px solid var(--pd-blue);
  color: #fff !important;
  background: var(--pd-blue);
  font-size: 0.6875rem;
  font-weight: 700;
}

.pd-contact-button:hover {
  color: var(--pd-blue) !important;
  background: #fff;
  text-decoration: none;
}

/* 関連製品 */
.pd-related {
  margin-top: 4.75rem;
}

.pd-related h3 {
  margin: 1.6rem 0 0.65rem;
  color: var(--pd-blue);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.5;
}

.pd-related-table th {
  color: var(--pd-blue);
  background: var(--pd-blue-pale);
  font-weight: 700;
  text-align: left;
}

.pd-related-table tbody tr:nth-child(even) td {
  background: #f6f8fb;
}

.pd-related-table td:last-child {
  text-align: center;
}

.pd-related-table--series th:nth-child(1) { width: 21%; }
.pd-related-table--series th:nth-child(2) { width: 24%; }
.pd-related-table--series th:nth-child(3) { width: 23%; }
.pd-related-table--series th:nth-child(4) { width: 14%; }
.pd-related-table--series th:nth-child(5) { width: 18%; }

.pd-related-table--sizes th:nth-child(1) { width: 22%; }
.pd-related-table--sizes th:nth-child(2) { width: 31%; }
.pd-related-table--sizes th:nth-child(3) { width: 29%; }
.pd-related-table--sizes th:nth-child(4) { width: 18%; }

.pd-table-button {
  display: inline-block;
  min-width: 4.8rem;
  padding: 0.42rem 0.55rem;
  color: #fff !important;
  background: var(--pd-blue);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.pd-table-button:hover {
  background: var(--pd-blue-dark);
  text-decoration: none;
}

.pd-current-label {
  color: var(--pd-muted);
  font-size: 0.625rem;
  font-weight: 700;
  white-space: nowrap;
}

/* 図面拡大モーダル */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vw;
  background: rgba(0, 0, 0, 0.75);
}

.pd-lightbox[hidden] {
  display: none;
}

.pd-lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  background: #fff;
}

.pd-lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  color: #fff;
  font-size: 2.6rem;
  line-height: 1;
  cursor: pointer;
}

body.admin-bar .pd-lightbox {
  top: 32px;
}

.pd-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 782px) {
  body.admin-bar .pd-lightbox {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .products.pd-template .mainContents {
    margin-bottom: 2.5rem;
  }

  .pd-product-detail {
    font-size: 0.875rem;
  }

  .pd-hero {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-bottom: 2.6rem;
  }

  .pd-product-image {
    max-width: 22rem;
    margin: 0 auto;
  }

  .pd-product-summary h1 {
    font-size: 1.75rem;
  }

  .pd-section {
    margin-top: 2.5rem;
  }

  .pd-section > h2 {
    font-size: 1.0625rem;
  }

  .pd-spec-table {
    min-width: 34rem;
  }

  .pd-spec-load {
    grid-template-columns: 10rem 1fr;
    gap: 1rem;
  }

  .pd-video-grid {
    grid-template-columns: 1fr;
  }

  .pd-downloads {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pd-downloads a {
    width: 100%;
  }

  .pd-related-table--series {
    min-width: 43rem;
  }

  .pd-related-table--sizes {
    min-width: 38rem;
  }
}

/* ==========================================================
   既存製品ページ（例：/products/1119/）に合わせた文字サイズ調整
   本文・見出し・表・ボタンを一段階大きくし、読みやすさを統一。
   ========================================================== */

.pd-product-detail {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

.pd-category-label {
  margin-bottom: 0.55rem;
  font-size: 0.875rem;
}

.pd-product-summary h1 {
  margin-bottom: 1.5rem;
  font-size: 2.25rem;
  line-height: 1.3;
}

.pd-model-list > div {
  min-height: 3.15rem;
  padding: 0.5rem 0.35rem;
}

.pd-model-list dt {
  font-size: 0.8125rem;
}

.pd-model-list dd {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.pd-model-list small {
  font-size: 0.75rem;
}

.pd-badge {
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
}

.pd-lead {
  margin-top: 1.45rem;
  font-size: 1rem;
  line-height: 1.9;
}

.pd-section {
  margin-top: 3.5rem;
}

.pd-section > h2 {
  margin-bottom: 1.4rem;
  padding-bottom: 0.8rem;
  font-size: 1.375rem;
  line-height: 1.5;
}

.pd-richtext,
.pd-note,
.pd-contact-section p {
  font-size: 1rem;
  line-height: 1.9;
}

.pd-spec-table,
.pd-related-table {
  font-size: 0.875rem;
}

.pd-spec-table th,
.pd-spec-table td,
.pd-related-table th,
.pd-related-table td {
  padding: 0.9rem 1rem;
  line-height: 1.65;
}

.pd-downloads a {
  min-height: 3rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
}

.pd-video-meta {
  font-size: 0.75rem;
}

.pd-video strong {
  font-size: 0.875rem;
  line-height: 1.6;
}

.pd-faq__question {
  padding: 0.95rem 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.pd-faq__answer {
  padding: 1rem;
}

.pd-faq__answer p {
  font-size: 0.875rem;
  line-height: 1.9;
}

.pd-contact-button {
  width: 12rem;
  min-height: 3rem;
  padding: 0.75rem 1rem 0.75rem 1.25rem;
  font-size: 0.8125rem;
}

.pd-related h3 {
  margin-top: 1.9rem;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.pd-table-button,
.pd-current-label {
  font-size: 0.75rem;
}

.pd-table-button {
  min-width: 5.5rem;
  padding: 0.5rem 0.65rem;
}

@media (max-width: 640px) {
  .pd-product-detail {
    font-size: 0.9375rem;
  }

  .pd-product-summary h1 {
    font-size: 2rem;
  }

  .pd-section > h2 {
    font-size: 1.25rem;
  }

  .pd-lead,
  .pd-richtext,
  .pd-note,
  .pd-contact-section p {
    font-size: 0.9375rem;
  }

  .pd-spec-table,
  .pd-related-table {
    font-size: 0.8125rem;
  }
}

/* YouTube埋め込み動画 */
.pd-video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.pd-video-embed.second{
    margin-top: 20px;
}

.pd-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================
   製品画像ギャラリー
   メイン画像＋サムネイル。サムネイルは必要な数だけ追加可能。
   ========================================================== */

.pd-product-gallery {
  min-width: 0;
}

.pd-product-image {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--pd-border);
  border-radius: 0;
  background: #f7f8f8;
  cursor: zoom-in;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-product-image:hover,
.pd-product-image:focus-visible {
  border-color: var(--pd-blue);
  box-shadow: 0 0.35rem 1rem rgba(33, 73, 123, 0.1);
}

.pd-product-image:focus-visible,
.pd-product-thumbnail:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: 2px;
}

.pd-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-product-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.pd-product-thumbnail {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.75rem;
  aspect-ratio: 1 / 1;
  padding: 0.25rem;
  overflow: hidden;
  border: 1px solid var(--pd-border-light);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pd-product-thumbnail:hover {
  border-color: var(--pd-blue);
}

.pd-product-thumbnail.is-active {
  border: 2px solid var(--pd-blue);
  box-shadow: 0 0.25rem 0.75rem rgba(33, 73, 123, 0.12);
}

.pd-product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 640px) {
  .pd-product-thumbnails {
    gap: 0.6rem;
  }

  .pd-product-thumbnail {
    width: 5rem;
  }
}


/* ==========================================================
   ボタンデザイン調整
   CTAはサイト内の既存デザインに合わせてピル型、
   ダウンロード・表内ボタンは用途に応じて角丸を抑える。
   ========================================================== */

/* お問い合わせ：主要CTA */
.pd-contact-button {
  width: min(16.25rem, 100%);
  min-height: 3.25rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  box-shadow: none;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.pd-contact-button:hover {
  transform: translateY(-1px);
}

.pd-contact-button:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: 3px;
}

/* ダウンロード：機能ボタン */
.pd-downloads a {
  border-radius: 0.25rem;
}

.pd-downloads a:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: 2px;
}

/* 関連製品表：小型操作ボタン */
.pd-table-button {
  border-radius: 0.2rem;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.pd-table-button:hover {
  transform: translateY(-1px);
}

.pd-table-button:focus-visible {
  outline: 2px solid var(--pd-blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .pd-contact-button {
    width: min(15rem, 100%);
    min-height: 3.1rem;
    font-size: 0.875rem;
  }
}
