@charset "UTF-8";
/* 銀座田屋 サイエンスタイ特集 専用スタイル（sciencetie.css）
   ・ベースは nabe3.css（.taya-lp）。nabe3.css は変更しない
   ・このページ（特集ページ/サイエンスタイ/サイエンスタイ3.html）の <style> とタグの style 属性をまとめたもの */

    :root {
        --science-bg: #f9f9f9;
        --science-line: #e0e0e0;
        --taya-gold: #a7945f;
    }

    .science-theme {
        background-color: #ffffff;
        color: #444444;
        overflow-x: hidden;
    }

    /* 数式のベーススタイル */
    .math-deco {
        font-family: "Crimson Text", serif;
        font-style: italic;
        color: rgba(0, 0, 0, 0.04);
        position: absolute;
        z-index: 0;
        pointer-events: none;
        white-space: nowrap;
    }

    /* セクション共通 */
    .science-theme section.block {
        position: relative;
        z-index: 1;
        margin: 100px auto; /* 上下の余白を確保 */
    }

    /* カテゴリータイトルの調整 */
    .science-theme .title-sub span {
        display: block;
        color: var(--taya-gold);
        font-family: "Crimson Text", "Hiragino Mincho ProN", serif;
        font-size: 1rem;
        margin-top: 8px;
        letter-spacing: 0.08em;
    }

    .science-theme .nabe-h3 {
        border-left: 4px solid var(--taya-gold);
        color: #333;
    }

    /* 埋め尽くし背景専用スタイル */
    .bg-fill-container {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.8;
        font-family: "Crimson Text", serif;
        font-size: 1.8rem;
        line-height: 1.2;
        word-break: break-all;
        pointer-events: none;
        overflow: hidden;
        text-align: justify;
        color: #09041d; /* 例: 赤色に変更 */
    }

    .science-theme .card {
        background: #ffffff;
        border: 1px solid var(--science-line);
        z-index: 2;
    }

/* ========================================================
   MVコンテナと比率制御（レスポンシブ、外部CSS干渉排除） 
   桜や考古学テーマの固定高設定を無効化し、完璧な比率を実現します。
   ======================================================== */

/* MVコンテナの基本設定（中央揃え、レスポンシブ対応） */
.science-mv-animation {
position: relative;
width: 100% !important;
background-color: #000; /* コンテナの背景色（透け防止） */
overflow: hidden;

/* Flexboxによる縦横中央揃えを強制適用（テキスト配置用） */
display: flex !important;
align-items: center !important;
justify-content: center !important;

/* 【ここが最重要：外部CSSの固定高を無効化】
   nabe3.css などで設定されている .main-visual の固定高をリセットします。
   !important を付けて強制適用させることで、外部CSSの影響を排除します。
*/
height: auto !important;      /* 高さを自動（子要素に合わせる）にリセット */
min-height: 0 !important;     /* 最小の高さを0にリセット */
max-height: none !important;  /* 最大の高さの制限を解除 */
}

/* 背景画像のコンテナ（ここが比率保持の要）
   画像比率 (PC: 36.6%、スマホ: 168.3%) を padding-top で確保します。
   height: 0; にすることで、外部CSSの height の影響を受けずに、
   padding で設定したアスペクト比固定の高さだけを適用させます。
*/
.mv-slider {
position: relative;
width: 100%;
}

/* PC表示時（デフォルト、768px以上） */
@media (min-width: 768px) {
.mv-slider {
    /* 元の画像比率 (1000 / 2732 × 100%) に完璧に合わせる */
    height: 0 !important;          /* 高さを0に設定 */
    padding-top: 36.6% !important; /* 高さをpaddingで確保（アスペクト比固定技法） */
    /* min-height: 300px; */       /* 必要であればPCでの最小高さを設定 */
}
}

/* スマホ表示時（767px以下） */
@media (max-width: 767px) {
.mv-slider {
    /* 元の画像比率 (1262 / 750 × 100%) に完璧に合わせる */
    height: 0 !important;           /* 高さを0に設定 */
    padding-top: 168.3% !important; /* 高さをpaddingで確保 */
    /* min-height: 400px; */        /* 文字配置を考慮した最小高さ */
}
}

/* 各画像の共通スタイル（完全に重ねる） */
.mv-slide {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0; /* 通常は非表示 */
z-index: 1;

/* 【ここが重要】
   不透明度（opacity）の変化に 2.5秒のフェード効果を適用します。
   ease-in-out で滑らかな動きにします。
   これにより、JSでクラスが切り替わった際にクロスフェードします。
*/
transition: opacity 2.5s ease-in-out !important; 
}

/* .active クラスが付与された画像：前面に表示 */
.mv-slide.active {
opacity: 1; /* 不透明にして表示 */
z-index: 2; /* 前面に配置 */
}

/* 画像自体の表示設定（コンテナ全体に広げる） */
.mv-slide img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover; /* 画像の比率を保ちながらコンテナ全体を表示 */
vertical-align: bottom; /* 画像下の隙間防止 */
}

/* 各画像ごとの明るさ調整（JS版ではCSSで個別に指定） */
.bg-img1 { filter: brightness(0.7); } /* 少し暗くする */
.bg-img2 { filter: brightness(0.8); }
.bg-img3 { filter: brightness(1); }   /* 製品画像は本来の明るさ */

/* ========================================================
   テキストのスタイルと配置（!important で上書きを強制）
   文字が画像の下（黒帯）に出る問題を解決し、真ん中に重ねます。
   ======================================================== */

/* caption（h1）の調整（考古学テーマを参考に、z-indexと強力な配置を確保） */
.science-mv-animation .caption {
/* ↓ここを修正：positionを absolute に変更し、!important で強制適用 */
position: absolute !important; 
top: 50% !important;   /* MVの縦真ん中に配置 */
left: 50% !important;  /* MVの横真ん中に配置 */
/* ↓ここを修正： transform で自身の幅・高さを考慮して真ん中に調整 */
transform: translate(-50%, -50%) !important; 

z-index: 100 !important; /* スライダー（z-index: 2）の上に配置 */

/* 横方向の中央揃え、色、影を確保 */
text-align: center !important;
color: #fff !important;
text-shadow: 0 2px 10px rgba(0,0,0,0.5) !important;

/* nabe3.css で width が制限されたり余白が干渉したりするのを防ぐため、
   強制的に幅100%と余白0を適用します。
*/
width: 100% !important;
max-width: none !important; /* 幅の制限を解除 */
margin: 0 !important;
padding: 0 20px; /* スマートフォン表示時などの左右の余白 */
box-sizing: border-box !important;
}

/* 浮かび上がるタイトル (H1) */
.animate-title {
/* でかすぎないサイズ 2rem に設定し、!important で強制適用 */
font-size: 2rem !important;
letter-spacing: 0.1em;
margin-bottom: 20px !important;
margin-top: 0 !important; /* 上の余白をリセット */

/* フェードイン＆アップのアニメーション設定 */
opacity: 0;
animation: fade-in-up 2s forwards 1s; /* 1秒後に開始 */
}

/* 浮かび上がる文章 (P) */
.animate-text {
/* バランスの良い 1.5rem に設定し、!important で強制適用 */
font-size: 1.5rem !important;
margin: 0 !important; /* 余白をリセット */

/* フェードイン＆アップのアニメーション設定 */
opacity: 0;
animation: fade-in-up 2s forwards 2.5s; /* 2.5秒後に開始 */
}

/* 文字のフェードイン＆アップ（下から上へ浮かび上がる） */
@keyframes fade-in-up {
from {
    opacity: 0;
    transform: translateY(20px);
}
to {
    opacity: 1;
    transform: translateY(0);
}
}

/* ========================================================
   目次ナビゲーション（アンカーリンク）
   ======================================================== */
.science-nav {
max-width: 1000px;
margin: 40px auto 80px;
padding: 0 20px;
}

.science-nav-list {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 15px;
list-style: none;
padding: 0;
margin: 0;
}

.science-nav-list li {
flex: 1 1 0; /* PC：5つのカテゴリを1列に等幅で並べる */
min-width: 0;
}

/* スマホ：前と同じく、縦に1つずつ並べる */
@media (max-width: 768px) {
.science-nav-list li {
    flex: 1 1 100%;
}
}

.science-nav-list a {
display: block;
text-align: center;
padding: 15px 10px;
background: #ffffff;
border: 1px solid var(--science-line);
color: #333;
text-decoration: none;
transition: all 0.3s ease;
position: relative;
}

/* ホバー時の下線アニメーションと装飾 */
.science-nav-list a::after {
content: "";
position: absolute;
bottom: -1px;
left: 0;
width: 100%;
height: 2px;
background: var(--taya-gold);
transform: scaleX(0);
transition: transform 0.3s ease;
}

.science-nav-list a:hover {
border-color: var(--taya-gold);
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.science-nav-list a:hover::after {
transform: scaleX(1);
}

.science-nav-list span {
display: block;
font-family: "Crimson Text", serif;
font-size: 0.85rem;
color: var(--taya-gold);
margin-top: 4px;
letter-spacing: 0.05em;
}

/* スムーススクロール（クリックした時にヌルッと移動させる） */
html {
scroll-behavior: smooth;
}

/* 飛んだ先でヘッダー（上のメニューバー）にタイトルが隠れないようにする調整 */
.science-theme section[id] {
scroll-margin-top: 100px; /* サイトのヘッダーの高さに合わせて数値を調整してください */
}

/* ========================================================
   カード要素の修正（目次の線は残し、カードの線だけを消去）
   ======================================================== */
.science-theme .card {
background: #ffffff;
border: none !important; /* ★ 1px solid... から none !important に変更 */
box-shadow: none !important; /* 必要に応じて不要な影もカット */
z-index: 2;
}

/* =========================================
   メルカート共通ヘッダー・突き抜け＆崩れ防止（サイエンス特集用）
   ========================================= */

/* 1. 親玉である共通ヘッダーを最前面にする（中身のレイアウトは壊さない） */
#header {
  z-index: 99999 !important;
}

/* 2. サイエンスページ全体を一歩奥に引っ込めてレイヤーを完全に分離する */
.science-theme,
.taya-lp {
  position: relative !important;
  z-index: 1 !important;
}

/* =========================================
   「サイエンスタイをすべて見る」：ブルーエレット・シャツ特集と同じ、金の細枠の丸いボタン
   （nabe3.css の .taya-btn の四角い金色ボタンを、このページだけ上書き）
   ========================================= */
.taya-lp.science-theme .btn-wrap .taya-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 260px;
  height: 52px;
  padding: 0 32px;
  border: 1px solid #a7945f;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-family: "Times New Roman", Times, "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #333 !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.taya-lp.science-theme .btn-wrap .taya-btn:hover {
  background: #a7945f;
  color: #fff !important;
}

/* =========================================
   商品表示（試作：円周率）
   左：モデルカット＋サムネイル（モデル・商品画像1・2・3）
   右：商品を中央ぞろえ。色の丸ボタン → 商品画像・色名・価格・リンク・左のサムネイルが切り替わる
   ========================================= */
/* 説明文：文節の途中で改行しない（<wbr> の位置でだけ折り返す）。両端そろえの不自然な字間もやめる */
.science-theme .block-text p.sci-phrase {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
  text-align: left !important;
}
/* スマホ：商品名を写真の上に移し（金の縦線なし）、商品名と説明文を中央ぞろえにする（文節の区切りで改行） */
@media (max-width: 768px) {
  .science-theme .sci-row .block-text {
display: contents; /* 中身（商品名・説明・商品）を写真と同じ並びに出して、商品名だけ先頭へ */
  }
  .science-theme .sci-row .block-text h4.nabe-h3 {
order: -2;
align-self: center;
margin: 0 !important;
text-align: left;
  }
  /* 色の丸ボタンを商品名のすぐ下（写真の上）へ */
  .science-theme .sci-row .sci-pv {
display: contents;
  }
  .science-theme .sci-row .sci-pv__colors {
order: -1;
align-self: center;
margin: -14px 0 -8px;
  }
  .science-theme .sci-row .block-text > p,
  .science-theme .sci-row .sci-pv > * {
align-self: stretch;
  }
  .science-theme .sci-row .sci-pv__img {
align-self: center;
  }
  /* 背景の数字より手前に出す（白い「商品を見る」が透けないように） */
  .science-theme .sci-row .block-text > *,
  .science-theme .sci-row .sci-pv > * {
position: relative;
z-index: 2;
  }
  /* 説明文と商品のあいだを詰める */
  .science-theme .sci-row .block-text > p.sci-phrase {
margin-bottom: -4px !important;
  }
  .science-theme .sci-row .sci-pv__name,
  .science-theme .sci-row .sci-pv__price,
  .science-theme .sci-row .sci-pv__btnwrap {
margin-top: -18px !important;
text-align: center !important;
  }
  .science-theme .block-text p.sci-phrase {
text-align: center !important;
  }
}
/* カテゴリの紹介文・導入文も文節の途中で改行しない */
.science-theme .sci-phrase {
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-break: strict;
}
/* スマホ（試作：円周率）：ブルーエレット特集と同じ並び。左に大きい写真、右にサムネイルを縦に並べ、その下に色の丸ボタン */
@media (max-width: 768px) {
  /* 商品どうしのあいだを少し詰める（上下の余白 60px → 36px） */
  .science-theme .sci-row {
padding-top: 36px !important;
padding-bottom: 36px !important;
  }
  .science-theme .sci-row--stack .sci-gal {
order: 1;
position: relative;
  }
  /* サムネイルは写真の右側に重ねて、縦に並べる（ブルーエレット特集と同じ） */
  .science-theme .sci-row--stack .sci-gal__thumbs {
position: absolute;
top: 10px;
right: 10px;
bottom: 10px;
z-index: 3;
flex-direction: column;
justify-content: flex-start;
gap: 6px;
margin: 0;
width: 42px; /* 写真の右に重ねるサムネイル（小さめ） */
  }
  .science-theme .sci-row--stack .sci-gal__thumbs li {
flex: 0 0 auto;
width: 100%;
  }
  /* 写真の邪魔にならないよう、選んでいないサムネイルは薄く。選択中・押したときははっきり */
  .science-theme .sci-row--stack .sci-gal__thumb {
opacity: 0.55;
border-color: rgba(255,255,255,0.8);
box-shadow: none;
transition: opacity 0.2s ease, border-color 0.2s ease;
  }
  .science-theme .sci-row--stack .sci-gal__thumb[aria-pressed="true"],
  .science-theme .sci-row--stack .sci-gal__thumb:active {
opacity: 1;
  }
  .science-theme .sci-row .sci-pv__colors.sci-pv__colors {
margin: -6px 0 -4px;
  }
  .science-theme .sci-row--stack .sci-pv__colors {
order: 2;
  }
  .science-theme .sci-row--stack .block-text > p.sci-phrase {
order: 3;
margin-top: -14px !important; /* 色の丸ボタンのすぐ下へ */
  }
  .science-theme .sci-row--stack .sci-pv > :not(.sci-pv__colors) {
order: 4;
  }
}
.science-theme .sci-gal__main {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  aspect-ratio: 1 / 1; /* 商品画像（正方形）に合わせる。モデルカットは上下を少し切って正方形に */
  overflow: hidden;
}
.science-theme .sci-gal__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%; /* モデルカットはネクタイの結び目側を残す */
}
.science-theme .sci-gal__img,
.science-theme .sci-pv__img img {
  transition: opacity 0.35s ease;
}
.science-theme .sci-gal__img.is-fading,
.science-theme .sci-pv__img img.is-fading {
  opacity: 0;
}
@media (prefers-reduced-motion: reduce) {
  .science-theme .sci-gal__img,
  .science-theme .sci-pv__img img {
transition: none;
  }
}
.science-theme .sci-gal__img.is-product {
  object-fit: contain; /* 商品画像は切らずに全体を見せる */
}
.science-theme .sci-gal__thumbs {
  display: flex;
  justify-content: center; /* 3つの商品も中央に並べる（大きさは4つのときと同じ） */
  gap: 10px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.science-theme .sci-gal__thumbs li {
  flex: 0 0 calc((100% - 30px) / 4);
}
.science-theme .sci-gal__thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid #e0e0e0;
  background: #fff;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.science-theme .sci-gal__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.science-theme .sci-gal__thumb:hover {
  border-color: #c9bb93;
}
.science-theme .sci-gal__thumb[aria-pressed="true"] {
  border: 2px solid #a7945f;
}

/* PC：左（写真＋サムネイル）と右（説明＋商品）の上下をそろえる。
   右は説明を上、商品を下に寄せ、「商品を見る」の下端をサムネイルの下端に合わせる */
@media (min-width: 769px) {
  .science-theme .sci-row {
align-items: stretch;
  }
  .science-theme .sci-row .block-text {
display: flex;
flex-direction: column;
  }
  .science-theme .sci-row .sci-pv {
margin-top: auto;
padding-top: 0;
  }
}
.science-theme .sci-pv {
  margin-top: 28px;
  text-align: center !important;
}
.science-theme .sci-pv p {
  text-align: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.science-theme .sci-pv__img {
  display: block;
  width: 144px;
  max-width: 60%;
  margin: 0 auto;
}
.science-theme .sci-pv__img img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid #a7945f; /* いつものゴールドの枠 */
  box-sizing: border-box;
}
.science-theme .sci-pv__name {
  margin: 4px 0 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #333;
}
.science-theme .sci-pv__color {
  margin-left: 0.8em;
  font-size: 13px;
  color: #777;
}
.science-theme .sci-pv__price {
  margin: 4px 0 0;
  font-size: 14px;
  color: #333;
}
/* 色の丸ボタン：見た目40px（押せる範囲48px）。選択中は金のリング */
.science-theme .sci-pv__colors {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.science-theme .sci-pv__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  cursor: pointer;
}
.science-theme .sci-pv__sw {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  transition: box-shadow 0.2s ease;
}
.science-theme .sci-pv__sw img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.6);
}
/* 円周率：色見本は商品画像2の「π」の部分を丸く切り取って見せる（π は画像の左から47.4%・上から20%） */
.science-theme .sci-pv__sw--pi {
  position: relative;
  background: #fff;
}
.science-theme .sci-pv__sw--pi img {
  position: absolute;
  width: 480px;
  height: 480px;
  max-width: none;
  left: -207px;
  top: -76px;
  transform: none;
  object-fit: fill;
}
.science-theme .sci-pv__chip:hover .sci-pv__sw {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 0 0 3px #fff, 0 0 0 4px #d8d0b8;
}
.science-theme .sci-pv__chip[aria-pressed="true"] .sci-pv__sw {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #a7945f;
}
.science-theme .sci-pv__chip:focus-visible,
.science-theme .sci-gal__thumb:focus-visible {
  outline: 2px solid #a7945f;
  outline-offset: 2px;
}
/* 商品を見る：いつもの金の細枠の丸いボタン */
.science-theme .sci-pv__btnwrap {
  margin: 10px 0 0;
}
.science-theme .sci-pv__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  max-width: 100%;
  height: 46px;
  box-sizing: border-box;
  padding: 0 28px;
  border: 1px solid #a7945f;
  border-radius: 999px;
  background: #fff; /* 後ろの数字が透けないように白で塗る */
  font-family: "Times New Roman", Times, "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #333 !important;
  text-decoration: none !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.science-theme .sci-pv__btn:hover {
  background: #a7945f;
  color: #fff !important;
}
/* 全色在庫なし：ボタンを SOLD OUT にして押せないようにする */
.science-theme .sci-pv__btn.is-soldout,
.science-theme .sci-pv__btn.is-soldout:hover {
  border-color: #ccc;
  background: #f4f4f4;
  color: #999 !important;
  cursor: default;
  letter-spacing: 0.12em;
}
.science-theme .sci-pv__chip:disabled {
  cursor: default;
}
.science-theme .sci-pv__soldout {
  margin: 14px 0 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #777;
}

/* =========================================
   元はタグの style 属性に書いていたもの（sciencetie.css に移動）
   ========================================= */
.science-theme .sci-mv-title {
  margin: 0;
  padding: 0;
}
.science-theme .animate-title {
  display: block;
}
.science-theme .animate-text {
  display: block;
  font-weight: normal;
}
/* カテゴリ見出しの枠 */
.science-theme .sci-cat-head {
  text-align: center;
  margin-bottom: 60px;
}
.science-theme .sci-cat-head--tight {
  margin-bottom: -10px;
}
/* 見出しの横の薄い数式（位置2種類） */
.science-theme .math-deco--a {
  top: 10px;
  left: 5%;
  font-size: 4rem;
}
.science-theme .math-deco--b {
  top: 20%;
  right: 2%;
  font-size: 2rem;
  transform: rotate(15deg);
}
/* 商品ブロック（写真＋文章）と、後ろに敷き詰めた薄い文字 */
.science-theme .pi-bg-item-wrap {
  position: relative;
  padding: 60px 0;
  overflow: hidden;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}
.science-theme .pi-bg-item-wrap > .bg-fill-container {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  font-size: 2.2rem;
  line-height: 1.3;
  letter-spacing: 0.1em;
  word-break: break-all;
  z-index: 0;
  pointer-events: none;
}
.science-theme .pi-bg-item-wrap > .block-visual,
.science-theme .pi-bg-item-wrap > .block-text {
  position: relative;
  z-index: 2;
}
.science-theme .pi-bg-item-wrap h4.nabe-h3 {
  margin-top: 0;
}
