/* =========================
   single.css
   商品詳細ページ専用スタイル
   ========================= */

/* ----------------------------------------
   商品詳細ページ全体（背景・縦書きラベルの基準）
   Figma: Frame 148 = 1440x861 / #f8f8f8 単一ブロック
   ---------------------------------------- */
.product-detail {
  position: relative;
  background: var(--color-bg-light);
}

/* ----------------------------------------
   ページヘッダー（MENUウォーターマーク + 商品詳細）
   ---------------------------------------- */
.product-detail__header {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.product-detail__watermark {
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 100px;
  line-height: 1.6;
  color: var(--color-bg-gray);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.product-detail__heading {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en-bold);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.6;
  color: var(--color-text-gray);
  white-space: nowrap;
}

/* 縦書きラベル: Figma left:24px / 高さ226px / ページ全体(861px)の垂直中央 */
.product-detail__side {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  height: 226px;
  z-index: 1;
}

/* ----------------------------------------
   メインコンテンツエリア
   ---------------------------------------- */
.product-detail__body {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 44px 220px 82px;
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 70px;
  min-height: 681px;
}

/* ----------------------------------------
   商品ギャラリー
   ---------------------------------------- */
.product-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-detail__main-img-wrap {
  width: 410px;
  height: 410px;
  overflow: hidden;
}

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

.product-detail__thumbs {
  display: flex;
  gap: 10px;
}

.product-detail__thumb-img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity 0.2s;
}

.product-detail__thumb-img:hover {
  opacity: 0.8;
}

/* ----------------------------------------
   商品情報
   ---------------------------------------- */
.product-detail__info {
  padding-top: 0;
}

.product-detail__title {
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: 22px;
  line-height: 44px;
  color: var(--color-black);
  margin: 0;
}

/* 区切り線: Figma Vector40/41/42 → #ccc 1px / 幅520px(右カラム全幅) */
.product-detail__divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 0;
}

/* 区切り線の前後余白 (Figma座標基準) */
/* タイトル下端268 → 区切り線288 = 20px */
.product-detail__divider--1 {
  margin-top: 20px;
}
/* 区切り線288 → 価格318 = 30px / 価格354 → 区切り線384 = 30px 等 */
.product-detail__divider--2,
.product-detail__divider--3 {
  margin-top: 30px;
}

/* 価格 Figma: Group181 x=704 y=318 h=36 */
.product-detail__price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 30px;
}

.product-detail__price-label {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  line-height: 32px;
  color: var(--color-black);
}

.product-detail__price-num {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 26px;
  line-height: 36px;
  letter-spacing: 0.78px;
  color: var(--color-red);
}

/* 「円」は数値と連続表示（Figmaでは"14,000円"が1テキスト）→ gap分を相殺 */
.product-detail__price-unit {
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 26px;
  line-height: 36px;
  color: var(--color-red);
  margin-left: -10px;
}

.product-detail__price-tax {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-black);
}

/* 説明文 Figma: 1:817 x=704 y=414 w=568 h=149 / Noto Sans JP Medium 15px / line-height 30 */
.product-detail__desc {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: 15px;
  line-height: 30px;
  color: var(--color-black);
  white-space: pre-wrap;
  margin-top: 30px;
}

/* Figmaでは段落間マージン0、空行は<br>で表現 */
.product-detail__desc p {
  margin: 0;
}

/* 購入ボタン Figma: 1:810 x=700 y=625 w=235 h=61 radius20 #ae3a39 / 区切り線593→ボタン625=32px */
.product-detail__buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 235px;
  height: 61px;
  border-radius: 20px;
  background: var(--color-red);
  color: var(--color-white);
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.36px;
  text-decoration: none;
  transition: opacity 0.2s;
  margin-top: 32px;
}

.product-detail__buy-btn:hover {
  opacity: 0.85;
}

.product-detail__cart-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
}

/* SP専用区切り線（説明文と価格の間）はPCでは非表示 */
.product-detail__divider--sp {
  display: none;
}

/* ==========================================================================
   SP（〜767px / Figma 1:1830: 375×1398）
   ========================================================================== */
@media (max-width: 767px) {

  /* ---- ページヘッダー（1:1840: MENU 50px + 商品詳細 18px） ---- */
  .product-detail__header {
    height: 100px;
  }

  .product-detail__watermark {
    top: 30px;
    font-size: 50px;
    line-height: 1;
  }

  .product-detail__heading {
    top: 40px;
    font-size: 18px;
    line-height: 1.6;
  }

  /* 縦書きラベルはSP非表示 */
  .product-detail__side {
    display: none;
  }

  /* ---- 本文: 1カラム化 + SPの表示順に並べ替え ----
     順序（1:1843〜1:1858）:
     タイトル → 線 → メイン画像 → サムネイル → 線 → 説明文 → 線 → 価格 → 線 → 購入ボタン */
  .product-detail__body {
    display: flex;
    flex-direction: column;
    padding: 0 28px 77px;
    min-height: 0;
  }

  .product-detail__gallery,
  .product-detail__info {
    display: contents;
  }

  .product-detail__title           { order: 1; }
  .product-detail__divider--1      { order: 2; }
  .product-detail__main-img-wrap   { order: 3; }
  .product-detail__thumbs          { order: 4; }
  .product-detail__divider--2      { order: 5; }
  .product-detail__desc            { order: 6; }
  .product-detail__divider--sp     { order: 7; display: block; }
  .product-detail__price-row       { order: 8; }
  .product-detail__divider--3      { order: 9; }
  .product-detail__buy-btn         { order: 10; }

  /* タイトル（1:1846: 18px ExtraBold 中央 lh44） */
  .product-detail__title {
    font-weight: 800;
    font-size: 18px;
    line-height: 44px;
    text-align: center;
  }

  .product-detail__divider--1 {
    margin-top: 15px;
  }

  /* メイン画像（1:1849: 320×320） */
  .product-detail__main-img-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin-top: 35px;
  }

  /* サムネイル（1:1867〜: 100×100 ×3 gap10） */
  .product-detail__thumbs {
    gap: 10px;
    margin-top: 10px;
  }

  .product-detail__thumb-img {
    width: calc((100% - 20px) / 3);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .product-detail__divider--2 {
    margin-top: 25px;
  }

  /* 説明文（1:1850: 13px Medium lh26） */
  .product-detail__desc {
    margin-top: 15px;
    font-size: 13px;
    line-height: 26px;
  }

  .product-detail__divider--sp {
    margin-top: 15px;
  }

  /* 価格（1:1851: 13px + 22px #ae3a39） */
  .product-detail__price-row {
    margin-top: 10px;
  }

  .product-detail__price-label {
    font-size: 13px;
  }

  .product-detail__price-num {
    font-size: 22px;
    letter-spacing: 0.66px;
  }

  .product-detail__price-unit {
    font-size: 22px;
  }

  .product-detail__price-tax {
    font-size: 13px;
  }

  .product-detail__divider--3 {
    margin-top: 12px;
  }

  /* 購入ボタン（1:1858: 320×55 radius15 / cart 31px / 14px ExtraBold） */
  .product-detail__buy-btn {
    width: 100%;
    height: 55px;
    border-radius: 15px;
    margin-top: 25px;
    font-size: 14px;
    letter-spacing: 0.28px;
  }

  .product-detail__cart-icon {
    width: 31px;
    height: 31px;
  }
}
