/* 商品詳細ページ：2カラムレイアウト */
.p-product__layout {
  display: flex;
  align-items: flex-start; /* ← stretchから変更して高さ差分を許容 */
  gap: 2rem;
  margin-bottom: 3rem;
  height: auto;
  min-height: 580px;
}


/* 商品詳細ページ：左側 */
.p-product__left {
  flex: 0 0 500px;
  max-width: 500px;
  height: 580px; /* ← これがないと右が揃わない */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}



/* Swiperスタイル（PC用） */
.swiper-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.product-slider-main {
  width: 500px;
  height: 500px;
  margin-bottom: 10px;
}

.product-slider-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-slider-thumb {
  height: 90px; /* ← サムネサイズ（80px）＋ borderなど考慮して少し大きめに */
  padding-bottom: 5px; /* ← 安全のため余白を少し追加 */
  box-sizing: content-box;
}

.product-slider-thumb .swiper-slide {
  width: 80px;
  height: 80px;
  opacity: 0.5;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.product-slider-thumb .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #333;
}

.product-slider-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Swiper矢印・ドット */
.swiper-button-next,
.swiper-button-prev {
  color: #333;
  width: 44px;
  height: 44px;
}

.swiper-pagination {
  margin-top: 1rem;
  text-align: center;
}

/* 商品詳細ページ：右側 */
.p-product__right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 570px; /* 左と合わせる */
  flex: 1; /* ←これを追加して左カラムとの差分を埋める */
}


.p-product__right .c-postTitle {
  margin: 0 0 5px 0;
  font-size: 2rem;
  text-align: left;
  align-self: flex-start;
}

.p-product__name {
  font-size: 1.2rem;
  font-weight: 550;
  margin: 0 0 20px 0;
}

.p-product__price {
  margin: 0 0 20px 0;
}

.p-product__priceValue {
  font-size: 1.8rem;
  font-weight: bold;
}

.p-product__priceNote {
  font-size: 1rem;
  color: #444;
}


.p-product__description {
  margin: 0 0 20px 0;
}

.p-product__sectionTitle {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.p-product__textGroup {
  font-size: 0.85rem;
}

.p-product__code,
.p-product__brand {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.5em;
}

.p-product__buttonArea {
  margin-top: auto;
  width: 100%;
  text-align: center;
}


.p-product__button {
  display: block;
  width: 100%;
  background-color: #ff0;
  color: #000;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  border-radius: 6px;
  transition: background-color 0.3s;
  font-size: 1.2rem;
}


.p-product__button:hover {
  background-color: #ffd700;
}


/* 商品スペック全体 */
.p-product__spec {
  margin-top: 5rem;
}

/* 3カラムレイアウト */
.p-product__specInner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* 必要に応じて */
}

.p-product__specBox {
  flex: 1 1 30%;
  height: 260px; /* 高さ固定 */
  overflow-y: auto; /* スクロール可 */
  box-sizing: border-box;
}


.p-product__specBoxTitle {
  position: relative;
  padding-left: 0.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1.2;
  border-left: 3.5px solid #ff0;
  display: inline-block; /* ←追加：テキストの高さに縦棒を合わせる */
  margin-bottom: 0.5rem;  /* ←追加：スペースを取りたいならこちらで調整 */
}



/* 表全体 */
/* テーブルを横スクロールにするラッパー */
.p-product__tableWrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* スクロール対象のテーブルだけに適用 */
.p-product__tableWrapper .p-product__table {
  min-width: 600px; /* ← ここ重要！ */
}

/* 共通テーブルスタイル（全テーブルに） */
.p-product__table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  table-layout: fixed;
}

/* 列の幅調整 */
.p-product__table tr > *:first-child {
  width: 75px;
}

.p-product__table tr > *:not(:first-child) {
  width: auto;
}

/* セルのスタイル */
.p-product__table th,
.p-product__table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  background: #fff;
  vertical-align: middle;
  word-break: break-word;
}

/* ヘッダー背景 */
.p-product__table thead th {
  background-color: #f5f5f5;
}


.p-product__specList {
  list-style: disc outside;
  padding-left: 1.5em;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.p-product__specList li {
  padding-left: 0.2em;
  margin-bottom: 0.3em;
}

.p-product__notice {
  font-size: 0.85rem;
  line-height: 1.5;
}



.p-product__cta {
  margin-top: 3rem;
}


/* --- ここまでPC用スタイル --- */


/* ------------------------------
  レスポンシブ対応（1057px以下）
------------------------------ */
@media screen and (max-width: 1057px) {
  .p-product__layout {
    flex-direction: column;
    height: auto;
  }

  .p-product__left,
  .p-product__right {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .product-slider-main,
  .product-slider-thumb {
    width: 100%;
  }

  .p-product__right {
    padding-top: 1.5rem;
  }
}

/* ------------------------------
  レスポンシブ対応（768px以下）
------------------------------ */
@media screen and (max-width: 768px) {
  /* 全体レイアウトを縦並びに */
  .p-product__layout {
    flex-direction: column;
    gap: 0; /* カラム間の余白を詰める */
    height: auto;
  }

  /* 左カラム調整（高さは自動） */
  .p-product__left {
    width: 100%;
    max-width: 100%;
    height: auto;
    justify-content: flex-start;
  }

  /* 右カラム調整（高さは自動） */
  .p-product__right {
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-top: 0;
  }

  /* メイン画像：正方形＋余白調整 */
  .product-slider-main {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    margin-bottom: 0.5rem;
  }

  .product-slider-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* サムネイル：四角＋隙間調整 */
  .product-slider-thumb {
    width: 100%;
    margin-top: 0.4rem;
    display: flex;
    gap: 0.3rem;
  }

  .product-slider-thumb .swiper-slide {
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    opacity: 0.5;
    border: 2px solid transparent;
    box-sizing: border-box;
  }

  .product-slider-thumb .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #333;
  }

  .product-slider-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* 商品説明・ボタン周りの調整 */
  .p-product__buttonArea {
    text-align: center;
    padding: 0;
    margin-top: 1.5rem;
  }

  .p-product__right .p-product__button {
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
  }

  .p-product__cta {
    margin-top: 1rem;
    padding: 1rem 0;
  }

  /* 商品スペックのボックス間余白 */
  .p-product__specBox {
    width: 100%;
    flex: 1 1 100%;
    height: auto !important;
    overflow: visible !important;
    box-sizing: border-box;
    margin-bottom: 1rem;
  }
}
