/* =========================================================
   smp_navi（バー型 追従リンク）— デザイン & レイアウト
   - 数量は可変。各ボタンは常に等幅（行ごとに均等割り）
   - 固定化の制御は JS（.is-fixed を付与）
   - ここでは見た目のみを定義
   ========================================================= */

/* スペーサー（固定時に JS が高さを付与してレイアウトシフトを防止） */
.smp-sticky__spacer { display:block; height:0; }

/* バー：通常時はそのままのブロック、固定時は背景/影のみ付与（位置はJSで設定） */
.smp-sticky {
  background: transparent;
      margin-bottom: 0px !important;
}
.smp-sticky.is-fixed {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  z-index: 9999;
}

/* 内側のパディング（必要に応じて調整） */
.smp-sticky__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 12px;
}

/* ▼ ボタン群：Grid で均等割り。数が増減しても等幅になり、狭い幅では自動改行 */
.smp-sticky__list {
  display: flex;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 6px;

}

/* li 自体に特別な幅指定は不要（Grid が制御） */
.smp-sticky__item {
  flex: 1;
  margin-bottom: 0;
  text-align: center;
  border: 1px solid #cecece;
  border-radius: 3px;
}

/* ボタンの見た目（ご提示の画像に合わせた白地＋グレーボーダー＋角丸） */
.smp-sticky__link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 25px;
    padding: 7px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    transition: background .15s ease, border-color .15s ease, transform .08s ease;
    color: #333 !important;
}

/* ホバー/フォーカスの軽い反応 */
.smp-sticky__link:hover,
.smp-sticky__link:focus-visible {
  border-color: #c7c7cc;
  outline: none;
  text-decoration: none !important;
}

/* 押下時のわずかな沈み込み */
.smp-sticky__link:active {
  transform: translateY(1px);

  text-decoration: none !important;
}

/* 低モーション環境への配慮（任意） */
@media (prefers-reduced-motion: reduce) {
  .smp-sticky__link { transition: none !important; }
}







/* =========================================================
   smp_navi — ページャー（UL左右配置・モバイルのみ表示）
   - :has() で「4件目が存在する場合のみ」表示
   - PC(>=769px) では常に非表示
   - ボタンは枠線なし／背景透明（必要なら後述の背景を有効化）
   ========================================================= */

/* PC はページャー非表示（最優先） */
@media (min-width: 769px){
  .smp-sticky__pager{ display: none !important; }
}

/* モバイルのみ：UL 左右にボタンを重ねる */
@media (max-width: 768px){
  /* UL の左右にボタンを置くため、内側を相対配置＆左右余白を確保 */
  .smp-sticky__inner{
    position: relative;
    padding-left: 44px;   /* ← 左ボタンぶんの余白 */
    padding-right: 44px;  /* → 右ボタンぶんの余白 */
  }

  /* ページャーのベース：デフォルトは非表示＆クリックを透過 */
  .smp-sticky__pager{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: none;              /* 後述の :has() で必要時のみ表示 */
    pointer-events: none;       /* コンテナ自体はクリック不可 */
    z-index: 2;                 /* リンクより前面 */
  }

  /* ─ 条件表示：4件目が存在する（= 3件超）ときだけ表示 ─ */
  .smp-sticky__inner:has(.smp-sticky__list .smp-sticky__item:nth-child(4)) .smp-sticky__pager{
    display: block;
  }

  /* 左右位置（.smp-sticky__pager は2つある想定：先頭＝左、最後＝右） */
  .smp-sticky__inner .smp-sticky__pager:first-of-type{ left: 6px; }
  .smp-sticky__inner .smp-sticky__pager:last-of-type { right: 6px; }

  /* ボタン本体：枠線なし・背景透明・クリック有効化 */
  .smp-sticky__prev,
  .smp-sticky__next{
    width: 32px;
    height: 32px;
    border: none;               /* ← ボーダーなし */
    background: transparent;    /* ← 背景なし（必要なら下2行をコメント解除） */
    /* background: rgba(255,255,255,.95);
       box-shadow: 0 2px 6px rgba(0,0,0,.12); */
    color: #333;
    font-size: 18px;
    line-height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;       /* ← ボタンはクリック可能に */
  }

  /* 無効状態の視覚表現 */
  .smp-sticky__prev.is-disabled,
  .smp-sticky__next.is-disabled,
  .smp-sticky__prev:disabled,
  .smp-sticky__next:disabled{
    opacity: .35;
  }

  /* ページングで非表示にする li（既存） */
  .smp-sticky__item.is-hidden{ display: none !important; }

  /* =========================================================
   スワイプ時の横スクロール設定（モバイル / items>3）
   - .smp-sticky__list に .is-swipe が付くと横スクロール化
   - 1画面に3個見える幅（隙間6px×2を考慮）
   ========================================================= */
@media (max-width: 768px){
  .smp-sticky__list.is-swipe{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/旧Edge */
  }
  .smp-sticky__list.is-swipe .smp-sticky__item{
    flex: 0 0 calc((100% - 12px)/3); /* 3個/画面、gap=6px×2 = 12px */
    scroll-snap-align: center;
  }

  .smp-sticky__list.is-swipe::-webkit-scrollbar{
    /* Chrome / Safari / 新Edge */
    display: none;                    /* 最優先 */
    width: 0;
    height: 0;
    background: transparent;
  }
  .smp-sticky__list.is-swipe::-webkit-scrollbar-thumb{ background: transparent; }
  .smp-sticky__list.is-swipe::-webkit-scrollbar-track{ background: transparent; }
  
}

}
