/* ===================== PRODUCT WORKPLACE 専用スタイル ===================== */

/* ===================== Layout Helpers ===================== */
/* Productページ共通のスタイル */

/* スクロールアニメーション：下から上にフェードイン */
/* 初期状態では非表示で下側に配置（ビューポートに入る前の状態） */
.io-fadeup {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s ease, transform 1s ease;
}

/* ビューポートに入ったときに下からフェードインして表示されるアニメーション */
.io-fadeup.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* Productページ全体のコンテナ（全幅、背景色#F5F1EB） */
.product-page {
  width: 100%;
  background: #F5F1EB;
}

/* ===================== PRODUCT セクション ===================== */
/* Productページのヘッダーセクション（全幅、白背景、中央揃え） */
.product-page__product-section {
  width: 100%;
  margin: 0;
  padding: 80px 1rem 40px;
  text-align: center;
  background: #fff;
}

/* Productページのヘッダータイトル（超大サイズ、太字、黒色） */
.product-page__product-title {
  font-weight: 900;
  font-size: 80px;
  line-height: 1.3;
  letter-spacing: 0.28em;
  margin: 0 0 24px;
  color: #d8d8d8;
}

/* Productページのヘッダーサブタイトル（小サイズ、オレンジ色） */
.product-page__product-subtitle {
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  margin: 0;
  color: #888888;
}

/* ===================== CTAセクション ===================== */
/* CTAセクション（全幅、縦方向フレックス、中央揃え） */
.top__cta {
  width: 100%;
  max-width: none;
  margin: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 0;
  min-height: auto;
}

/* CTAセクションは左右の余白をなくして全幅で配置（alignfull想定） */
.top__cta.top__section {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* CTAセクションのコンテナ（横並びフレックス、高さ380px固定） */
.top__cta-container {
  display: flex;
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
  position: relative;
  height: 380px;
}

/* CTAセクションの各項目（中央揃え、ホバー時に拡大） */
.top__cta-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: flex-grow 0.3s ease, opacity 0.3s ease;
  padding: clamp(40px, 8vw, 80px) 0;
  height: 100%;
}

/* CTAセクションの各項目のホバー状態（透明度変化、拡大） */
.top__cta-item:hover {
  opacity: 0.9;
  flex-grow: 1.5;
}

/* CTAセクションの各項目のホバー時にアイコンのトランジションを設定 */
.top__cta-item:hover .top__cta-icon {
  transition: transform 0.3s ease;
}

/* CTAセクションの問い合わせ項目（透明背景、黒文字、オーバーレイ付き） */
.top__cta-item--contact {
  background-color: transparent;
  color: #ffffff;
  position: relative;
}

/* CTAセクションの問い合わせ項目のオーバーレイ（ライトグレー背景、ポインターイベント無効） */
.top__cta-item--contact::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(0 0 0 / 60%);
  z-index: 1;
  pointer-events: none;
}

/* CTAセクションの問い合わせ項目の子要素（z-index設定） */
.top__cta-item--contact > * {
  position: relative;
  z-index: 2;
}

/* CTAセクションの問い合わせ項目のテキスト（黒色） */
.top__cta-item--contact .top__cta-english {
  color: #ffffff;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
}

.top__cta-item--contact .top__cta-japanese {
  color: #ffffff;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 400;
}

/* CTAセクションの資料DL項目（透明背景、黒文字、オーバーレイ付き） */
.top__cta-item--download {
  background-color: transparent;
  color: #ffffff;
  position: relative;
}

/* CTAセクションの資料DL項目のオーバーレイ（ライトグレー背景、ポインターイベント無効） */
.top__cta-item--download::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(0 0 0 / 60%);
  z-index: 1;
  pointer-events: none;
}

/* CTAセクションの資料DL項目の子要素（z-index設定） */
.top__cta-item--download > * {
  position: relative;
  z-index: 2;
}

/* CTAセクションの資料DL項目のテキスト（黒色） */
.top__cta-item--download .top__cta-english,
.top__cta-item--download .top__cta-japanese {
  color: #ffffff;
}

/* CTAセクションのアイコン（中央揃え、ホバー時に変形） */
.top__cta-icon {
  margin-bottom: clamp(20px, 4vw, 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

/* CONTACT / SHOP の文字を囲む白枠ボックス */
.top__cta-text-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 0;
  position: relative;
  z-index: 3;
}

/* 枠ボックス内ではアイコン下の余白をなくす */
.top__cta-text-box .top__cta-icon {
  margin-bottom: 0;
}

/* 英語・日本語テキストをそれぞれ個別の白枠で囲む */
.top__cta-item .top__cta-english,
.top__cta-item .top__cta-japanese {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  width: 100%;
}

.top__cta-item .top__cta-english {
  border: 1px solid #ffffff;
}

/* CTAセクションの問い合わせアイコン（黒色） */
.top__cta-icon--contact {
  color: #ffffff;
}

/* CTAセクションの資料DLアイコン（黒色） */
.top__cta-icon--download {
  color: #ffffff;
}

/* CTAセクションのアイコン内のSVG（レスポンシブサイズ） */
.top__cta-icon svg {
  width: clamp(40px, 6vw, 48px);
  height: clamp(40px, 6vw, 48px);
}

/* CTAセクションの英語テキスト（太字、レスポンシブフォントサイズ、中央揃え） */
.top__cta-english {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700;
  margin-bottom: clamp(8px, 1.5vw, 12px);
  text-align: center;
}

/* CTAセクションの日本語テキスト（通常の太さ、レスポンシブフォントサイズ、中央揃え） */
.top__cta-japanese {
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 400;
  text-align: center;
  line-height: 1.6;
}

/* ===================== ビフォーアフター比較レイアウト ===================== */
/* ビフォーアフター比較レイアウトセクション（最大幅1200px、中央揃え、背景色#F5F1EB） */
.product-page__before-after-layout {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 1rem;
  background: #F5F1EB;
}

/* ビフォーアフター比較レイアウトのステップタイトル（太字、大サイズ、黒色、左揃え） */
.product-page__step-title {
  font-weight: 700;
  font-size: 36px;
  line-height: 40px;
  margin: 0 0 16px;
  text-align: left;
  color: #000000;
}

/* ビフォーアフター比較レイアウトのステップ説明文（通常サイズ、グレー色、左揃え、最大幅1000px、1.8倍行間） */
.product-page__step-description {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 auto 40px;
  text-align: center;
  color: #333333;
  max-width: 1000px;
}

/* ビフォーアフター比較コンテナ（横並びフレックス、中央揃え、最大幅1000px、間隔40px） */
.before-after-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  overflow: visible;
}

/* ビフォー画像のボックス（可変幅、最大幅45%、相対位置） */
.box_before {
  flex: 1;
  max-width: 45%;
  position: relative;
  overflow: visible;
}

/* 画像の上に表示するラベル */
.product-page__image-label {
  position: absolute;
  top: -30px;
  left: 0;
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.box_after .product-page__image-label {
  text-align: center;
}

/* ビフォー画像のボックスの「Before」テキスト（疑似要素、超大サイズ、半透明青色、左側配置、ホバー時に色変化） */
.box_before::before {
  content: 'Before';
  position: absolute;
  top: 50%;
  left: -250px;
  transform: translateY(-50%);
  font-size: 120px;
  font-weight: 900;
  color: rgba(0, 100, 255, 0.15);
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
  overflow: visible;
  transition: color 0.5s ease-in-out;
}

/* ビフォー画像（全幅、アスペクト比維持、角丸、シャドウ、カラー表示、ホバー時にグレースケール変化） */
.product-page__before-after-layout .box_before img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  filter: grayscale(0%);
  transition: filter 0.5s ease-in-out;
  position: relative;
  z-index: 1;
  background: transparent;
}

/* After画像にホバーしたときにBefore画像をグレースケール化 */
.product-page__before-after-layout .before-after-container:has(.box_after:hover) .box_before img {
  filter: grayscale(100%);
}

/* After画像にホバーしたときにBeforeテキストの色をグレーに変更 */
.product-page__before-after-layout .before-after-container:has(.box_after:hover) .box_before::before {
  color: rgba(128, 128, 128, 0.15);
}

/* Before画像にホバーしたときにBefore画像をカラー表示に戻す */
.product-page__before-after-layout .box_before:hover img {
  filter: grayscale(0%);
}

/* Before画像にホバーしたときにBeforeテキストの色を濃く（Afterにホバーしていないときのみ） */
.product-page__before-after-layout .before-after-container:not(:has(.box_after:hover)) .box_before:hover::before {
  color: rgba(0, 100, 255, 0.3);
}

/* Before画像にホバーしたときにAfter画像をグレースケール化（Afterにホバーしていないときのみ） */
.product-page__before-after-layout .before-after-container:has(.box_before:hover) .box_after:not(:hover) img {
  filter: grayscale(100%);
}

/* Before画像にホバーしたときにAfterテキストの色をグレーに変更 */
.product-page__before-after-layout .before-after-container:has(.box_before:hover) .box_after::before {
  color: rgba(128, 128, 128, 0.15);
}

/* どちらにもホバーしていないときにAfterテキストの色をグレーに設定 */
.product-page__before-after-layout .before-after-container:not(:has(.box_before:hover)):not(:has(.box_after:hover)) .box_after::before {
  color: rgba(128, 128, 128, 0.15);
}

/* ビフォーアフター比較の中央矢印エリア（縮小不可、中央揃え、60px×60px） */
.arrow-center {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  pointer-events: none;
}

/* テキスト比較レイアウト用スタイル */
.box_before--text,
.box_after--text {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 45%;
}

.product-page__comparison-value {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #000000;
  text-align: center;
}

.arrow-center--with-result {
  flex-direction: column;
  gap: 12px;
  width: auto;
  min-width: 150px;
  height: auto;
  padding: 0 20px;
}

.product-page__comparison-label {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: #000000;
  text-align: center;
  white-space: nowrap;
}

.product-page__comparison-result {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 700;
  color: #fbc02d;
  text-align: center;
  white-space: nowrap;
}

/* ビフォーアフター比較の中央矢印アイコン（大サイズ、オレンジ色、太字） */
.arrow-icon {
  font-size: 48px;
  color: #2D5016;
  font-weight: bold;
  line-height: 1;
}

/* アフター画像のボックス（可変幅、最大幅45%、相対位置） */
.box_after {
  flex: 1;
  max-width: 45%;
  position: relative;
  overflow: visible;
}

/* アフター画像のボックスの「After」テキスト（疑似要素、超大サイズ、半透明グレー、右側配置、ホバー時に色変化） */
.box_after::before {
  content: 'After';
  position: absolute;
  top: 50%;
  right: -250px;
  transform: translateY(-50%);
  font-size: 120px;
  font-weight: 900;
  color: rgba(128, 128, 128, 0.15);
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
  overflow: visible;
  transition: color 0.5s ease-in-out;
}

/* アフター画像（全幅、アスペクト比維持、角丸、シャドウ、初期状態はグレースケール、ホバー時にカラー表示） */
.product-page__before-after-layout .box_after img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  transition: filter 0.5s ease-in-out, -webkit-filter 0.5s ease-in-out;
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Afterボックスにホバーがない間はカラー化させない */
.product-page .product-page__before-after-layout .box_after:not(:hover) img {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* コンテナ全体でAfterにホバーしていない場合も同様にグレースケールを維持 */
.product-page .product-page__before-after-layout .before-after-container:not(:has(.box_after:hover)) .box_after img {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* After画像にホバーしたときにAfter画像をカラー表示に変更 */
.product-page .product-page__before-after-layout .box_after:hover img {
  filter: grayscale(0%);
  -webkit-filter: grayscale(0%);
}

/* After画像にホバーしたときにAfterテキストの色を赤に変更 */
.product-page__before-after-layout .box_after:hover::before {
  color: rgba(255, 0, 0, 0.3);
}

/* ===================== 既存養殖方法との比較テーブル ===================== */
/* Component: Comparison Table (BEM) - Solid Style */
.c-comp-table {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 1rem;
  font-family: 'Noto Sans JP', sans-serif;
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.c-comp-table__header {
  text-align: center;
  margin-bottom: 24px;
}

.c-comp-table__title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  color: #000000;
  margin-bottom: 4px;
}

.c-comp-table__subtitle {
  font-size: 0.9rem;
  color: #666;
  font-weight: 400;
}

/* テーブルのスクロール枠 */
.c-comp-table__scroll-wrapper {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #ddd; /* 外枠追加 */
  border-radius: 0; /* 角丸なし */
  box-shadow: none; /* 影なし */
}

.c-comp-table__main {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.c-comp-table__th,
.c-comp-table__td {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid #ccc; /* 薄いグレーから少し濃くして視認性確保 */
  border-right: 1px solid #eee; /* 縦線も薄く追加 */
  font-size: 1.5rem;
}

.c-comp-table__th:last-child,
.c-comp-table__td:last-child {
  border-right: none;
}

/* ヘッダーデザイン */
.c-comp-table__th {
  background-color: transparent; /* 背景なし */
  color: #333;
  font-weight: 700;
  border-bottom: 2px solid #333; /* ヘッダー下は太線 */
}

/* 「独自養殖方法」カラムの強調（枠線のみで表現） */
.c-comp-table__th--highlight,
.c-comp-table__td--highlight {
  background-color: transparent; /* 背景なし */
  color: #00695c;
  font-weight: 700;
  /* 左右を太めの線で囲って強調 */
  border-left: 2px solid #00695c;
  border-right: 2px solid #00695c;
  background-color: #e1f2e4;
}
.c-comp-table__th--highlight {
  color: #004d40;
  font-size: 1.1rem;
  border-top: 2px solid #00695c; /* 上も囲う */
}
.c-comp-table__td--highlight:last-child {
   /* 最終行の底辺処理が必要な場合は個別に調整しますが、基本はborder-bottomで足ります */
   border-bottom: 2px solid #00695c; /* 下も囲う（表の最後） */
}
/* ※HTML構造的にtbodyの最後を知る術がないCSSの場合、
   厳密に下線を引くには :last-child 擬似クラスなどを使いますが、
   ここでは簡易的にセルの下線で対応します。 */


/* 成果（数字）のデザイン */
.c-comp-table__result {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #fbc02d;
}
.c-comp-table__result--up {
  color: #ff5252;
}
.c-comp-table__result-unit {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.8rem;
  font-weight: normal;
  color: #888;
  margin-left: 4px;
}

/* ===================== Responsive (WORKPLACE専用) ===================== */
@media (max-width: 768px) {
  /* 既存養殖方法との比較テーブルのレスポンシブ調整 */
  .c-comp-table {
    min-height: auto;
    padding: 20px 0;
    text-align: center;
  }
  
  .c-comp-table__th, 
  .c-comp-table__td {
    padding: 12px 10px;
    font-size: 0.85rem;
    text-align: center;
  }
  .c-comp-table__title {
    font-size: clamp(24px, 4vw, 36px);
    text-align: center;
  }
  .c-comp-table__subtitle {
    text-align: center;
  }
  /* ヘッダーセクションの上下余白を調整 */
  .product-page__product-section {
    padding: 60px 1rem 30px;
    text-align: center;
  }
  
  /* CTAカードを縦並び・可変高さに */
  .top__cta-container {
    flex-direction: column;
    height: auto;
  }
  
  /* 個々のCTAカードの高さを抑える */
  .top__cta-item {
    height: clamp(180px, 45vh, 240px);
  }
  
  /* Before/Afterレイアウト全体の余白を縮小 */
  .product-page__before-after-layout {
    padding: 40px 1rem;
  }
  
  /* Before/Afterボックス間のギャップ */
  .before-after-container {
    gap: 20px;
  }
  
  /* Beforeラベルの文字サイズと表示位置を調整 */
  .box_before::before {
    font-size: 80px;
    left: -100px;
  }
  
  /* Afterラベルも同様に調整 */
  .box_after::before {
    font-size: 80px;
    right: -100px;
  }
  
  /* 矢印エリアを小さく */
  .arrow-center {
    width: 40px;
    height: 40px;
  }
  
  /* 矢印アイコンのサイズ */
  .arrow-icon {
    font-size: 32px;
  }
}

/* (max-width: 480px) での詳細調整 */
@media (max-width: 480px) {
  /* ページタイトルをさらに小さく */
  .product-page__product-title {
    font-size: 36px;
  }
  
  /* Before/Afterレイアウトの余白 */
  .product-page__before-after-layout {
    padding: 30px 1rem;
  }
  
  /* Before/After並びを縦方向に */
  .before-after-container {
    flex-direction: column;
    gap: 20px;
  }
  
  /* Beforeボックスを全幅にし、ラベルも調整 */
  .box_before::before {
    font-size: 60px;
    left: -60px;
  }
  
  /* Beforeボックス本体を全幅に広げる */
  .box_before {
    max-width: 100%;
  }
  
  /* Afterボックスも同様に全幅へ */
  .box_after {
    max-width: 100%;
  }
  
  /* Afterラベルの位置とサイズを再調整 */
  .box_after::before {
    font-size: 60px;
    right: -60px;
  }
  
  /* 矢印を回転させて上下表示 */
  .arrow-center {
    transform: rotate(90deg);
    width: 40px;
    height: 40px;
  }
  
  /* 矢印アイコンのサイズ */
  .arrow-icon {
    font-size: 32px;
  }
  
  /* テキスト比較レイアウトのレスポンシブ調整 */
  .arrow-center--with-result {
    min-width: 120px;
    padding: 0 10px;
    gap: 8px;
  }
  
  .product-page__comparison-label {
    font-size: clamp(16px, 2vw, 20px);
  }
  
  .product-page__comparison-result {
    font-size: clamp(12px, 1.5vw, 16px);
  }
  
  .product-page__comparison-value {
    font-size: clamp(20px, 2.5vw, 28px);
  }
  
  .box_before--text,
  .box_after--text {
    max-width: 100%;
  }
}
