/* ===========================
   美容成分グリッドコンポーネント（INGREDIENTS）
   3カラム（うるおい / ハリ・弾力 / 整肌）＋「その他」全成分ボックス
   =========================== */
.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 18px;
}

/* Figma: 各カラムは白の角丸カード（タイトル＋成分をまとめる）。
   flex column にして ※2 注釈を margin-top:auto でカード下部に押し下げる */
.ingredient-col {
  display: flex;
  flex-direction: column;
  background: rgba(253, 253, 253, 0.8);
  border-radius: 15px;
  padding: 30px 14px 34px;
}

/* Figma: 番号 01/02/03（SVG画像・金グラデ＋斜線を焼き込み済み）を左上に、
   成分名（明朝）を右下へ段差配置する */
.ingredient-col__title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 26px;
}

/* 成分名の金色グラデーション文字 */
.ingredient-col__name {
  background: linear-gradient(to bottom, #dccbaa 0%, #916c22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #a8863f; /* clip 非対応環境のフォールバック */
}

/* 番号は SVG 画像（01/02/03＋斜線）。テキストに対して少し上に出す */
.ingredient-col__num-img {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  margin-top: -6px;
}

/* 成分名は番号より一段下げる（段差） */
.ingredient-col__name {
  margin-top: 30px;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 40px;
  line-height: 1;
  white-space: nowrap;   /* 「ハリ・弾力」等を1行に保つ */
}

.ingredient-col__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Figma: アイコン89px枠 + テキストは上揃え（名前=1行目を丸の上辺に合わせ、
   説明は下に流す）。これでテキスト量が多い項目でも名前の位置が揃う。
   アイコン画像内の透明余白ぶん、テキスト側に padding-top を足して丸の上辺に合わせる。
   横の間隔はアイコン画像内の透明余白ぶんで確保（Figma も gap 0） */
.ingredient-item {
  display: flex;
  gap: 0;
  align-items: flex-start;
}

.ingredient-item__icon {
  width: 89px;
  height: 89px;
  flex-shrink: 0;
  object-fit: contain;
}

.ingredient-item__body {
  flex: 1;
  min-width: 0;
  padding-top: 10px;   /* アイコン画像の上余白ぶん下げて、名前を丸の上辺に合わせる */
}

.ingredient-item__name {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;   /* Figma: Zen Kaku Gothic Antique Medium */
  font-weight: 500;
  font-size: 20px;
  color: #4c4c4c;
  letter-spacing: -0.05em;   /* Figma: tracking -1px（20px 基準） */
  margin: 0;                 /* Figma: 名前↔説明は間隔0（行高で調整） */
  line-height: 1.5;
}

.ingredient-item__name-sub {
  display: inline;   /* Figma: EGF と同じ行に続けて表示 */
  font-size: 12px;
  font-weight: 400;
  color: #a8a8a8;
  letter-spacing: 0;
  margin-left: 4px;
}

.ingredient-item__desc {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;   /* Figma: Zen Kaku Gothic Antique Regular */
  font-weight: 400;
  font-size: 14px;
  color: #4c4c4c;
  line-height: 1.6;
  margin: 0;
}

.ingredient-item__desc sup {
  font-size: 9px;
  vertical-align: super;
}

/* ※2 注釈は col2（ハリ・弾力）カード内の最下部に左寄せで置く（margin-top:auto で押し下げ） */
.ingredient-note {
  font-family: 'Zen Kaku Gothic New', sans-serif;   /* Figma: Zen Kaku Gothic New Regular */
  font-weight: 400;
  font-size: 12px;
  color: #a8a8a8;
  margin-top: auto;
  padding-top: 20px;
}

/* ===========================
   その他（全成分表記ボックス）
   =========================== */
/* その他ブロック: 左に全成分カード、右に splash 画像（カード外）を配置（Figma準拠） */
.ingredient-other {
  position: relative;
  margin-top: 48px;
}

/* カード本体（Figma: 幅約58%・全成分をまとめる）。枠線なしで他の成分カラムカードと統一 */
.ingredient-other__body {
  width: 58%;
  background: rgba(253, 253, 253, 0.8);
  border-radius: 15px;
  padding: 32px 36px;
}

.ingredient-other__title {
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 16px;
  text-align: center;   /* Figma: 中央そろえ */
  background: linear-gradient(to bottom, #dccbaa 0%, #916c22 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #a8863f;
}

.ingredient-other__text {
  font-family: 'Zen Kaku Gothic New', sans-serif;   /* Figma: Zen Kaku Gothic New Regular */
  font-weight: 400;
  font-size: 14px;
  color: #4c4c4c;
  line-height: 1.9;
  margin: 0;
  word-break: break-word;
}

/* splash 画像はカードの外（右側）に。上辺はカードと揃え、下辺はカードより76px下まで
   伸ばす（Figma: 画像下辺→セクション下辺76px / カード下辺→152px）。高さ基準なので幅は比率で追従 */
.ingredient-other__splash {
  position: absolute;
  top: 0;
  right: 0;
  height: calc(100% + 76px);
  width: auto;
  pointer-events: none;
}

/* ===========================
   レスポンシブ
   =========================== */
/* カードが十分広い幅（内容幅上限=カード345px）でのみ3カラム。
   それ未満は2カラムにして「ハリ・弾力」等の nowrap がはみ出さないようにする */
@media (max-width: 1199px) {
  .ingredient-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 22px;
  }

  .ingredient-col__num-img { height: 58px; }
  .ingredient-col__name { font-size: 32px; margin-top: 26px; }
}

@media (max-width: 767px) {
  .ingredient-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .ingredient-col__title {
    gap: 14px;
    margin-bottom: 20px;
  }

  .ingredient-col__num-img { height: 50px; }
  .ingredient-col__name { font-size: 28px; margin-top: 22px; }

  .ingredient-item__icon {
    width: 76px;
    height: 76px;
  }

  .ingredient-other__body {
    width: 100%;
    padding: 24px 20px;
  }

  .ingredient-other__splash {
    position: static;
    display: block;
    width: 160px;
    max-width: 50%;
    height: auto;   /* desktop の calc 高さをリセット */
    margin: 12px auto 0;
  }

  /* モバイルは splash が静的（カード下）なので下余白は通常に戻す */
  .page-product-detail--cosmetic .ingredient-section {
    padding-bottom: 64px;
  }
}

/* ===========================
   美容成分セクションの見出し調整（Figma準拠）
   ページCSS（.ingredient-section / .deco-heading__line）を局所上書き。
   共有ファイル product-detail-moist.css は触らず、specificity で勝たせる
   =========================== */
/* 「美容成分」を Figma のフォント/サイズに（Zen Kaku Gothic Antique Regular 42px） */
.ingredient-section .deco-heading__ja {
  font-family: 'Zen Kaku Gothic Antique', sans-serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: 0.02em;
}

/* 「美容成分」両側の区切り線は中央見出しを挟んでグリッド全幅（content-wrap内寸）まで伸ばす＋色は #000000 */
.ingredient-section .deco-heading__line {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  background: #000000;
}

/* セクションタイトルをセクション上部近くに（Figma: ほぼ余白なし）＋
   下辺はその他カードから152px（splash画像が76px下まで出る） */
.page-product-detail--cosmetic .ingredient-section {
  padding-top: 16px;
  padding-bottom: 152px;
}

@media (max-width: 767px) {
  .ingredient-section .deco-heading__ja { font-size: 30px; }
  .ingredient-section .deco-heading__line { max-width: none; }
}
