/* ========================================
   メガメニュー（商品一覧／カテゴリで探す）
   クリアファイルサイト（cf_header.asp）の reference-mega-panel を
   カレンダーサイトの navigator ナビ用に移植したもの。
   cal_header.asp から分離した外部CSSファイル。
   ※ 実サイトの CSS ブレークポイントは推測（768px/1100px）のため、
     カレンダーサイト側の実際のブレークポイントに合わせて要調整。

   実機検証で判明した2点の対応（サイト本体のCSSと競合するため必須）:
   1) .navigator はサイト本体の外部CSS側ですでに
      position:relative + overflow:hidden が指定されている。
      これを基準にパネルを絶対配置すると、はみ出た部分が
      切り取られて見えなくなる。本体側の指定を打ち消すため
      !important で position:static を強制する。
   2) #header に transform が指定されており、これが新しい
      スタッキングコンテキストを生成してしまい、そのままだと
      トップページのバナーカルーセルの下に隠れてしまう。
      #header 自体に position:relative + 高い z-index を与えて
      ヘッダー全体を前面に出す。

   上記2つ以外のセレクタはすべて .megaCal- プレフィックスを
   付けており、サイト本体の既存クラスと衝突しない設計です。
   このファイルは cal_header.asp の他のCSSより後に読み込んでください
   （.navigator / #header の上書きが効かなくなるため）。
   ======================================== */
.navigator {
  position: static !important;
}

#header {
  position: relative;
  z-index: 9999;
}

.megaCal-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 32px));
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 28px 24px 20px;
  text-align: left;
  z-index: 500;
}

.megaCal-trigger:hover .megaCal-panel,
.megaCal-trigger:focus-within .megaCal-panel {
  display: block;
}

.megaCal-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0 20px;
}

.megaCal-column {
  display: flex;
  flex-direction: column;
}

.megaCal-card {
  display: block;
  text-decoration: none;
  color: inherit;
}

.megaCal-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f6f8;
  margin-bottom: 10px;
}

.megaCal-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.megaCal-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(14px * 1.4 * 2);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #1a3a6b;
  text-align: center;
  margin-bottom: 10px;
}

.megaCal-card:hover .megaCal-heading {
  text-decoration: underline;
}

.megaCal-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e5e8ec;
}

.megaCal-sublist li {
  border-bottom: 1px solid #e5e8ec;
}

.megaCal-sublist a {
  display: block;
  padding: 8px 4px;
  font-size: 12px;
  color: #333;
  text-decoration: none;
}

.megaCal-sublist a::before {
  content: "▸";
  color: #f39800;
  margin-right: 4px;
}

.megaCal-sublist a:hover {
  color: #f39800;
  text-decoration: underline;
}

.megaCal-footer {
  text-align: center;
  margin-top: 20px;
}

.megaCal-all {
  display: inline-block;
  min-width: 250px;
  padding: 6px 32px;
  background: #00327c;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

.megaCal-all:hover {
  background: #f39800;
}


.navigator_item.head-item.megaCal-trigger {
  background: #0e163d;
}

@media (max-width: 1100px) {
  .megaCal-panel { width: min(calc(100vw - 24px), 900px); padding: 20px 16px 16px; }
  .megaCal-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
}

@media (max-width: 768px) {
  .megaCal-panel { display: none !important; }
}
