@charset "UTF-8";
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css");
/* ============================================================
   共通ヘッダー / フッター（Figma 準拠）＋ T/M のトグル挙動
   全ページ共通のプレビュー用。本ファイルは最後に読み込み、
   各ページのインライン <style>・セクションCSSの上書きを担う。

   Figma: Header 40:2 / Footer 40:34（fileKey REYf4zaIBUrxCpYFphCETg）
   - Header(Desktop): 単一KMBロゴ + 右カラム2段
     上段=検索(中央)＋会員ボタン(右)、下段=グローバルナビ(中央/5項目)
   - Header(T/M): ロゴ + 検索アイコン + ハンバーガー
   - Footer: ｜区切りリンク（一部に外部リンクアイコン）＋Kyorinロゴ＋著作権
   ============================================================ */

/* ===================== Header（Desktop） ===================== */
.Header { position: relative; width: 100%; box-sizing: border-box; background: #fff;
  border-top: 4px solid #005cc5; border-bottom: 1px solid #ccc;
  /* 新トップ(base.css併用時)と同じレイアウト：.Header をflex化し .Header__bar(margin:0 auto)を
     内容幅で中央寄せ（インセット）にする。製品/薬剤師ページ(base.css非読込)でもTOPと揃える。 */
  display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 20px; padding: 0 10px; }
.Header__bar {
  max-width: 1440px; margin: 0 auto;
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 24px;
  padding: 8px 0 0 40px;
}
.Header__logo { flex-shrink: 0; width: 140px; height: 70px; }
.Header__logo a { display: block; width: 100%; height: 100%; }
.Header__logo img { width: 100%; height: 100%; object-fit: contain; }

.Header__right { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }

.Header__top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 16px;
  padding: 14px 40px 14px 0;
}
.Header__spacer { grid-column: 1; min-width: 0; }

.Header__search {
  grid-column: 2; justify-self: center;
  display: flex; align-items: center; flex-shrink: 0;
  width: 260px; height: auto; border: none; border-radius: 0; padding: 0;
  background: transparent;
  box-shadow: 0 2px 3px rgba(0, 0, 0, .2);
}
.Header__search input {
  flex: 1; min-width: 0; height: 38px;
  border: 1px solid #d9d9d9; border-right: none; border-radius: 2px 0 0 2px;
  padding: 0 10px; font-size: 16px; color: #212121;
  font-family: 'Noto Sans JP', sans-serif; background: #fff; outline: none;
}
.Header__search input::placeholder { color: #9e9e9e; }
.Header__search button {
  flex-shrink: 0; height: 38px; padding: 0 12px;
  background: #005cc4; color: #fff; border: none; border-radius: 0 2px 2px 0;
  font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; white-space: nowrap;
}

.Header__members { grid-column: 3; justify-self: end; display: flex; gap: 8px; flex-shrink: 0; }
.Header__members a {
  display: inline-flex; align-items: center; gap: 6px;
  background: #005cc4; color: #fff; border: 1px solid #005cc4; border-radius: 2px;
  padding: 10px 14px; font-size: 16px; font-weight: 700; line-height: 15px;
  white-space: nowrap; box-shadow: 0 2px 3px rgba(0, 0, 0, .2);
}
.Header__members a:hover { background: #0048a0; }

.Header__nav {
  display: flex; align-items: flex-end; justify-content: center;
  flex-wrap: wrap; gap: 8px 32px;
  padding: 8px 40px 0 0;
}
.Header__nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px 8px; font-size: 18px; font-weight: 500; color: #000;
  border-bottom: 3px solid transparent; white-space: nowrap;
  text-decoration: none;
}
/* 中間デスクトップ(961-1200px)ではナビ間隔を詰めて折返しを防ぐ */
@media (max-width: 1200px) {
  .Header__nav { gap: 6px 16px; padding-right: 0; }
  .Header__nav a { padding: 6px 4px 8px; gap: 5px; }
}
.Header__nav a i { font-size: 18px; color: #005cc4; }
.Header__nav a.is-active { border-bottom-color: #005cc4; }
.Header__nav a:hover { color: #005cc4; text-decoration: none; }

/* トグル（Desktop 非表示） */
.Header__toggles { display: none; }
.Header__toggle {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  padding: 0; border: none; background: none; cursor: pointer; color: #005cc4; font-size: 20px; line-height: 1;
}
.Header__toggle:hover { color: #0048a0; }

/* 旧共通JS(common.js)が #header に無条件 appendChild する旧デザインの
   ハンバーガー(.hamburger-menu)を、新ヘッダー内では無効化する。
   新ヘッダーには正規のトグル(.Header__toggle--menu)があり二重表示になるため。
   旧ヘッダー(.Header 以外)配下の .hamburger-menu は従来通り有効なまま。 */
.Header .hamburger-menu { display: none !important; }

/* ===================== Header（Tablet / Mobile <=960px） =====================
   デスクトップ2段ヘッダーは約940px以上必要なため、960px以下は
   ハンバーガー型（幅に依存せず収まる）へ切替える。 */
@media (max-width: 960px) {
  .Header__bar { flex-wrap: nowrap; align-items: center; gap: 12px; padding: 10px 16px; }
  .Header__logo { width: auto; height: 40px; }
  .Header__logo img { width: auto; }

  /* 右カラムは既定で隠し、開いたらドロップダウンパネルに */
  .Header__right {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1000;
    background: #fff; border-bottom: 1px solid #ccc;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    padding: 8px 16px 16px;
  }
  .Header__spacer { display: none; }

  .Header__toggles { display: flex; align-items: center; gap: 2px; margin-left: auto; }

  /* --- ハンバーガー：ナビ＋会員を表示、検索は隠す --- */
  .Header.is-nav-open .Header__right { display: flex; }
  .Header.is-nav-open .Header__top { display: block; order: 2; padding: 0; }
  .Header.is-nav-open .Header__search { display: none; }
  .Header.is-nav-open .Header__members { display: flex; gap: 12px; margin-top: 14px; }
  .Header.is-nav-open .Header__members a { flex: 1; justify-content: center; font-size: 14px; padding: 12px 8px; }
  .Header.is-nav-open .Header__nav {
    order: 1; display: flex; flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 0; padding: 0;
  }
  .Header.is-nav-open .Header__nav a { padding: 14px 4px; font-size: 16px; border-bottom: 1px solid #eee; }
  .Header.is-nav-open .Header__nav a i { font-size: 16px; }

  /* --- 検索アイコン：検索のみ表示 --- */
  .Header.is-search-open .Header__right { display: flex; }
  .Header.is-search-open .Header__top { display: block; padding: 0; }
  .Header.is-search-open .Header__members,
  .Header.is-search-open .Header__nav { display: none; }
  .Header.is-search-open .Header__search {
    display: flex; width: auto; box-shadow: none; padding: 8px 0;
  }
  .Header.is-search-open .Header__search input {
    height: 42px; border: 1px solid #ccc; border-right: none; font-size: 16px;
  }
  .Header.is-search-open .Header__search button { height: 42px; }
}

/* ===================== Footer（Figma 準拠） ===================== */
.Footer {
  max-width: none; width: 100%; margin: 40px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #f5f5f5; padding: 24px 20px 20px;
}
.Footer__links { font-size: 16px; color: #666; text-align: center; line-height: 1.8; margin: 0; }
.Footer__links a { color: #666; }
.Footer__links a:hover { text-decoration: underline; }
.Footer__links i { font-size: 14px; }
.Footer__sep { color: #bdbdbd; margin: 0 8px; }
.Footer__logo { background: #fff; border-radius: 6px; padding: 12px 20px; }
.Footer__logo img { width: 120px; height: 38px; object-fit: contain; display: block; }
.Footer__logo a { display: inline-block; text-decoration: none; transition: opacity .15s ease; }
.Footer__logo a:hover { opacity: .8; }
.Footer__copyright { font-size: 16px; color: #8c8c8c; text-align: center; margin: 0; }

@media (max-width: 480px) {
  .Footer__links { font-size: 15px; }
  .Footer__sep { margin: 0 5px; }
}

/* 製品セクション サブナビをバナーヘッダー(.Header: flex)内に置いた場合、
   全幅の独立行として表示する（従来の </header> 直後と同じ見た目に揃える）。 */
.Header { row-gap: 0; }
.Header > .SubNav { flex: 0 0 100%; margin: 0 -10px; }
/* ===== SubNav（セクション二次ナビ：製品/セミナー共通） ===== */
.SubNav { border-bottom: 1px solid #ccc; }
.SubNav__list { max-width: 1000px; margin: 0 auto; padding: 0; display: flex; justify-content: center; list-style: none; flex-wrap: wrap; }
.SubNav__item { margin: 0; }
.SubNav__item a { display: flex; align-items: center; gap: 5px; padding: 16px 20px; font-size: 18px; color: #212121; text-decoration: none; border-bottom: 3px solid transparent; }
.SubNav__item a:hover { color: #005cc5; text-decoration: none; }
.SubNav__item.is-active a { color: #005cc5; border-bottom-color: #005cc5; font-weight: 700; }
.SubNav__item a i { font-size: 13px; }
/* 開閉トグルはデスクトップでは非表示（モバイル@mediaで表示）。@mediaより前に置き後勝ちを防ぐ。 */
.SubNav__toggle { display: none; }

/* --- モバイル/タブレット（ハンバーガー帯 <=960px）: SubNav を「現在地＋開閉」アコーディオンに ---
   従来の中央寄せ折返し／2列グリッドは、(1)重要度の低い項目が5番目というだけで全幅になる
   (2)縦幅を取りすぎる (3)Headerバー中央寄せで境界線が途切れる・SubNavが右20pxズレて左寄せ＋
   右線が出る、等の問題があったため、現在地1行＋タップ展開の縦リストへ変更する。 */
@media (max-width: 960px) {
  /* Headerバーを全幅にし、ロゴ行下の境界線を全幅に引く（中央寄せで途切れる不具合の修正） */
  .Header__bar { max-width: none; width: 100%; margin: 0; flex: 1 1 100%; }

  /* 親Header(padding:0 10px)＋負マージン由来で右に約20pxの隙間ができ左寄せ＋右線になる不具合を、
     全幅(100vw・フルブリード)にして解消 */
  .Header > .SubNav { flex: 0 0 auto; width: 100vw; margin-left: calc(50% - 50vw); margin-right: 0; }
  .SubNav { border-bottom: 0; overflow: visible; }

  /* 現在地ラベル＋キャレットのトグルバー（header-nav.js が生成） */
  .SubNav__toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; gap: 8px; padding: 14px 16px;
    background: #fff; border: 0; border-bottom: 1px solid #ccc;
    font-size: 16px; font-weight: 700; color: #005cc5;
    font-family: inherit; line-height: 1.4; text-align: left; cursor: pointer;
  }
  .SubNav__toggleLabel { flex: 1 1 auto; min-width: 0; }
  .SubNav__toggleCaret {
    flex-shrink: 0; width: 9px; height: 9px; margin: -3px 6px 0 0;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .2s;
  }
  .SubNav.is-open .SubNav__toggleCaret { transform: rotate(-135deg); margin-top: 3px; }

  /* 一覧は既定で閉じ、開いたら縦積み。現在地はトグルバーに出すため一覧からは隠す。
     セクションCSS側の `.XxxDetail .SubNav__list{display:grid}` 等（詳細度が高く後読みでも
     勝つ 例: medicine.css の .MedicineDetail .SubNav__list）に負けないよう display は
     !important で確定させ、開閉を常にアコーディオンが制御する。 */
  .SubNav__list { display: none !important; grid-template-columns: none !important; max-width: none; margin: 0; padding: 0; }
  .SubNav.is-open .SubNav__list { display: block !important; border-bottom: 1px solid #ccc; }
  .SubNav__item { margin: 0; border: 0; border-bottom: 1px solid #eee; }
  .SubNav__item:last-child { border-bottom: 0; }
  .SubNav__item.is-active { display: none !important; }
  .SubNav__item a {
    justify-content: flex-start !important; text-align: left; gap: 6px;
    padding: 14px 20px !important; font-size: 16px; border: 0 !important; color: #212121;
  }
}

/* --- モバイル(<=768px): パンくずは折返しせず横スクロール1行 --- */
@media (max-width: 768px) {
  .TopicPath {
    flex-wrap: nowrap; overflow-x: auto; white-space: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .TopicPath::-webkit-scrollbar { display: none; }
  .TopicPath > * { flex: 0 0 auto; }
}

/* ===================== ページ上部へ戻るボタン（全ページ共通） =====================
   hcp-check.js が body 直下に .BackToTop を生成。スクロール量が一定を超えると
   右下にフェードイン表示し、タップで先頭へスムーズスクロールする。
   旧 .FooterNav__pagetop は新チェームのフッターに無く機能しないための代替。 */
.BackToTop {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  width: 48px; height: 48px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  background: #005cc4; color: #fff; border: none; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.BackToTop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.BackToTop:hover { background: #0048a0; }
.BackToTop:focus-visible { outline: 2px solid #005cc4; outline-offset: 2px; }
.BackToTop svg {
  width: 20px; height: 20px; display: block;
  fill: none; stroke: currentColor;
}
/* iOS セーフエリア（ノッチ/ホームバー）対応 */
@supports (padding: max(0px)) {
  .BackToTop {
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 480px) {
  .BackToTop { width: 44px; height: 44px; right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .BackToTop { transition: opacity .01s; transform: none; }
}

/* ============================================================
   /department/・/library/ トップのコンテンツバナー
   (.DepartmentLibrary .Division-2) のモバイル表示
   - 画像は固定height属性(163)で縦伸びするため比率を維持
   - モバイルは1列ではなく2列で表示
   ============================================================ */
.DepartmentLibrary .ProductContent__image { width: 100%; height: auto; }
@media (max-width: 767px) {
  .DepartmentLibrary.Division-2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
