/* =============================================
   product.css — 製品詳細ページ専用スタイル
   style.css と併用。製品ページのみ読み込む。
   ============================================= */

/* --- CSS変数 --- */
:root {
  --pd-max-width: 1160px;
  --pd-bg: #ffffff;
  --pd-bg-alt: #f7f7f7;
  --pd-text: #222;
  --pd-text-sub: #555;
  --pd-border: #e0e0e0;
  --pd-accent: #b12704;
  --pd-accent-hover: #921f00;
  --pd-cart-bg: #ffa41c;
  --pd-cart-hover: #e89200;
  --pd-check: #2a7d2e;
  --pd-radius: 6px;
  --pd-shadow: 0 1px 4px rgba(0,0,0,.08);
  --pd-font-body: '游ゴシック', 'Yu Gothic', 'Hiragino Kaku Gothic Pro', 'Meiryo', sans-serif;
}

/* --- セクションのリセット（style.cssのグローバルtext-align:centerを上書き） --- */
.pd-section {
  text-align: left;
  padding: 0;
  margin: 0;
}

/* =============================================
   上部：製品メイン（ギャラリー＋情報の2カラム）
   ============================================= */
.pd-main {
  max-width: var(--pd-max-width);
  margin: 30px auto 0;
  padding: 30px 24px;
  display: flex;
  gap: 40px;
  background: var(--pd-bg);
  border-bottom: 1px solid var(--pd-border);
  align-items: flex-start;
}

/* --- ギャラリー（左カラム） --- */
.pd-gallery {
  flex: 1 1 55%;
  display: flex;
  gap: 12px;
  position: sticky;
  top: 100px; /* ヘッダー分のオフセット */
}

/* サムネイル：縦並び（左側） */
.pd-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 64px;
}

.pd-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color .15s ease;
  background: #f9f9f9;
}

.pd-thumb:hover {
  border-color: #bbb;
}

.pd-thumb.active {
  border-color: var(--pd-accent);
}

/* メイン画像 */
.pd-main-image-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: var(--pd-radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.pd-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- 製品情報（右カラム） --- */
.pd-info {
  flex: 1 1 45%;
  min-width: 0;
}

.pd-info h1 {
  font-size: 1.55em;
  font-weight: 700;
  color: var(--pd-text);
  line-height: 1.4;
  margin: 0 0 6px;
}

.pd-brand {
  font-size: .92em;
  color: var(--pd-text-sub);
  margin-bottom: 14px;
}

.pd-brand a {
  color: #0066c0;
  text-decoration: none;
}
.pd-brand a:hover {
  text-decoration: underline;
  color: #c45500;
}

.pd-price {
  font-size: 1.65em;
  font-weight: 700;
  color: var(--pd-accent);
  margin-bottom: 4px;
}

.pd-price-tax {
  font-size: .55em;
  font-weight: 400;
  color: var(--pd-text-sub);
}

.pd-description {
  font-size: .95em;
  color: var(--pd-text);
  line-height: 1.75;
  margin: 16px 0;
}

/* 仕様リスト（上部の簡易版） */
.pd-spec-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  overflow: hidden;
}

.pd-spec-list li {
  padding: 9px 16px;
  font-size: .9em;
  color: var(--pd-text);
  line-height: 1.5;
  border-bottom: 1px solid #eee;
}

.pd-spec-list li:last-child {
  border-bottom: none;
}

.pd-spec-list li strong {
  color: var(--pd-text);
}

/* --- ボトル訴求 --- */
.pd-feature-box {
  background: var(--pd-bg-alt);
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  padding: 14px 18px;
  margin: 16px 0;
}

.pd-feature-box .pd-feature-title {
  font-size: .95em;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--pd-text);
}

.pd-feature-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pd-feature-box li {
  position: relative;
  padding-left: 20px;
  font-size: .88em;
  color: var(--pd-text-sub);
  line-height: 1.7;
  margin-bottom: 4px;
}

.pd-feature-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--pd-check);
  font-weight: 700;
}

/* --- サイズ選択（ニトリルグローブ等） --- */
.pd-size-selector {
  border: none;
  padding: 0;
  margin: 16px 0;
}

.pd-size-selector legend {
  font-size: .9em;
  font-weight: 600;
  color: var(--pd-text);
  margin-bottom: 8px;
}

.pd-size-option {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
}

.pd-size-option input {
  display: none;
}

.pd-size-option span {
  display: inline-block;
  padding: 8px 18px;
  border: 2px solid var(--pd-border);
  border-radius: 4px;
  font-size: .9em;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  color: var(--pd-text);
  background: var(--pd-bg);
}

.pd-size-option input:checked + span {
  background: var(--pd-text);
  color: #fff;
  border-color: var(--pd-text);
}

.pd-size-option span:hover {
  border-color: #999;
}

/* --- カートエリア --- */
.pd-cart-area {
  margin: 24px 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--pd-border);
  border-radius: var(--pd-radius);
  background: var(--pd-bg-alt);
}

.pd-cart-form {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pd-cart-form label {
  font-size: .9em;
  font-weight: 600;
  color: var(--pd-text);
}

.pd-qty-select {
  padding: 8px 12px;
  font-size: .95em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  min-width: 64px;
  cursor: pointer;
}

.pd-cart-btn {
  flex: 1;
  min-width: 180px;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 700;
  color: #111;
  background: var(--pd-cart-bg);
  border: 1px solid #c78c14;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s ease;
  text-align: center;
}

.pd-cart-btn:hover {
  background: var(--pd-cart-hover);
}

/* Amazon購入リンク */
.pd-amazon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 20px;
  font-size: .92em;
  font-weight: 600;
  color: #111;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.pd-amazon-link:hover {
  background: #e4e4e4;
  border-color: #aaa;
}

.pd-amazon-link .fa-amazon {
  font-size: 1.2em;
  color: #ff9900;
}

.pd-wholesale-note {
  font-size: .85em;
  color: var(--pd-text-sub);
  margin-top: 12px;
  line-height: 1.6;
}

.pd-wholesale-note a {
  color: #0066c0;
  text-decoration: none;
}
.pd-wholesale-note a:hover {
  text-decoration: underline;
  color: #c45500;
}

/* =============================================
   下部：詳細セクション群
   ============================================= */
.pd-details-wrap {
  max-width: var(--pd-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.pd-detail-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--pd-border);
}

.pd-detail-section:last-child {
  border-bottom: none;
}

/* セクションタイトル */
.pd-detail-section h2 {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--pd-text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pd-text);
  display: inline-block;
}

/* ✔リスト（詳細セクション用） */
.pd-check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pd-check-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  font-size: .93em;
  color: var(--pd-text);
  line-height: 1.7;
  border-bottom: 1px solid #eee;
}

.pd-check-list li:last-child {
  border-bottom: none;
}

.pd-check-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--pd-check);
  font-weight: 700;
  font-size: .95em;
}

/* 製品仕様テーブル */
.pd-spec-table {
  width: 100%;
  border-collapse: collapse;
}

.pd-spec-table th,
.pd-spec-table td {
  padding: 11px 16px;
  font-size: .9em;
  text-align: left;
  border-bottom: 1px solid var(--pd-border);
  vertical-align: top;
}

.pd-spec-table th {
  width: 160px;
  font-weight: 600;
  color: var(--pd-text-sub);
  background: var(--pd-bg-alt);
}

.pd-spec-table td {
  color: var(--pd-text);
}

/* 注意書き */
.pd-notice {
  font-size: .9em;
  color: var(--pd-text-sub);
  line-height: 1.8;
  padding: 16px 20px;
  background: #fffbf0;
  border-left: 3px solid #e6a817;
  border-radius: 0 var(--pd-radius) var(--pd-radius) 0;
}

/* =============================================
   レビューセクション
   ============================================= */
.pd-reviews {
  max-width: var(--pd-max-width);
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.pd-reviews h2 {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--pd-text);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pd-text);
  display: inline-block;
}

.pd-review-card {
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}

.pd-review-card:last-of-type {
  border-bottom: none;
}

.pd-review-stars {
  color: #de7921;
  font-size: 1.05em;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.pd-review-text {
  font-size: .92em;
  color: var(--pd-text);
  line-height: 1.7;
  margin-bottom: 4px;
}

.pd-review-author {
  font-size: .82em;
  color: var(--pd-text-sub);
}

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 860px) {
  .pd-main {
    flex-direction: column;
    gap: 24px;
    padding: 20px 16px;
    margin-top: 16px;
  }

  .pd-gallery {
    flex: none;
    width: 100%;
    flex-direction: column-reverse; /* サムネイルを画像の下に */
    position: static;
  }

  .pd-thumbnails {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .pd-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
  }

  .pd-main-image-wrap {
    aspect-ratio: auto;
    min-height: 260px;
  }

  .pd-main-image {
    max-height: 360px;
  }

  .pd-info h1 {
    font-size: 1.3em;
  }

  .pd-price {
    font-size: 1.4em;
  }

  .pd-cart-form {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-cart-btn {
    min-width: 100%;
  }

  .pd-details-wrap,
  .pd-reviews {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pd-spec-table th {
    width: 110px;
  }
}

@media (max-width: 480px) {
  .pd-info h1 {
    font-size: 1.15em;
  }

  .pd-spec-table th,
  .pd-spec-table td {
    display: block;
    width: 100%;
  }

  .pd-spec-table th {
    padding-bottom: 2px;
    border-bottom: none;
  }

  .pd-spec-table td {
    padding-top: 2px;
    padding-bottom: 14px;
  }
}
