/* =============================================================
   nav.css
   ============================================================= */

/* ── 1. Header リセット / 上書き ─────────────────────────────── */

.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: none !important;
}

/* ヘッダー分のスペースを body 直下に確保 */
.site-wrapper {
/*  padding-top: 45px; */
}

/* 既存の旧ナビ要素を完全に非表示 */
.site-header .site-nav,
.site-header .dropdown,
.site-header .site-cart {
  display: none !important;
}

/* ── 2. Header Inner レイアウト ──────────────────────────────── */

.site-header .site-header-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 44px !important;
  padding: 0 !important;
  gap: 16px;
}

/* ── 3. ロゴ ─────────────────────────────────────────────────── */

.site-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo-link .site-logo {
  display: block;
  width: auto;
  height: 20px;
}

/* ── 4. PC用 中央ナビ ────────────────────────────────────────── */

.site-nav-desktop {
  display: flex;
  align-items: center;
  column-gap: 40px;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

.site-nav-desktop a {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #1d1d1f;
  text-decoration: none !important;
  white-space: nowrap;
  border-radius: 6px;
  /*letter-spacing: -0.01em;*/
  letter-spacing: 0.05rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav-desktop a:hover {
  /*
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f !important;
  */
  color: #1222b6;
}

/* スマホでは PC ナビを非表示 */
@media screen and (max-width: 767px) {
  .site-nav-desktop {
    display: none !important;
  }
}

/* ── 5. 右側コントロール群 ───────────────────────────────────── */

.site-header-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ── 6. カートアイコン ───────────────────────────────────────── */

.nav-cart {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #1d1d1f;
  text-decoration: none !important;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ── カート内点数バッジ ─────────────────────────────────────── */

.nav-cart-badge {
  position: absolute;
  /* 44px枠の中央にある20pxアイコンの右上角に重ねる */
  top: 8px;
  right: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e0245e;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  z-index: 9;
}

/* ── バッジのパルスアニメーション（推し活サイトと同じ挙動） ──── */
/* バッジ中心から波紋状のリングを広げる。数字自体は静止。 */
@keyframes nav-cart-pulsate {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 0; }
}

.nav-cart-badge::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border: 15px solid rgba(224, 36, 94, 0.3);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: nav-cart-pulsate 1.6s ease-out infinite;
}

/* アニメーションを控えたいユーザー設定を尊重 */
@media (prefers-reduced-motion: reduce) {
  .nav-cart-badge::before {
    animation: none;
  }
}

.nav-cart:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f !important;
}

.nav-cart svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── 7. ハンバーガーボタン ───────────────────────────────────── */

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  gap: 6px;
  transition: background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* PC ではハンバーガーとオーバーレイを非表示 */
@media screen and (min-width: 768px) {
  .nav-toggle {
    display: none !important;
  }
  .nav-overlay {
    display: none !important;
  }
}

/* 2本線 */
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: #1d1d1f;
  border-radius: 2px;
  transform-origin: center center;
  transition:
    transform 0.42s cubic-bezier(0.23, 1, 0.32, 1),
    opacity   0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 開いている時 → × に変形 */
.nav-toggle.is-open .nav-toggle-bar.top {
  transform: translateY(3.75px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar.bottom {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ── 8. フルスクリーン オーバーレイ (スマホのみ) ─────────────── */

.nav-overlay {
  position: fixed;
  top: 44px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8999;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* 上から「にゅー」と出るアニメーション */
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.55s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  visibility: hidden;
}

.nav-overlay.is-open {
  clip-path: inset(0 0 0% 0);
  pointer-events: all;
  visibility: visible;
}

/* ── 9. オーバーレイ内部 ─────────────────────────────────────── */

.nav-overlay-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 22px 64px;
}

/* ── 10. ナビゲーションリスト ────────────────────────────────── */

.nav-overlay-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-overlay-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-overlay-list li:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-overlay-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 600;
  color: #1d1d1f;
  text-decoration: none !important;
  letter-spacing: -0.01em;
  line-height: 1.2;

  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity   0.45s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
    color     0.2s  ease;
}

/* 矢印 */
.nav-overlay-list li a::after {
  content: "›";
  font-size: 0.75em;
  font-weight: 300;
  color: rgba(29, 29, 31, 0.35);
  transition: transform 0.2s ease, color 0.2s ease;
}

.nav-overlay-list li a:hover {
  color: #0071e3;
}

.nav-overlay-list li a:hover::after {
  transform: translateX(4px);
  color: #0071e3;
}

.nav-overlay-list li a[target="_blank"]::after {
  content: "";
}

/* ── 11. スタガーアニメーション ──────────────────────────────── */

.nav-overlay.is-open .nav-overlay-list li a {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.is-open .nav-overlay-list li:nth-child(1) a { transition-delay: 0.04s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(2) a { transition-delay: 0.09s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(3) a { transition-delay: 0.14s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(4) a { transition-delay: 0.19s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(5) a { transition-delay: 0.24s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(6) a { transition-delay: 0.29s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(7) a { transition-delay: 0.34s; }
.nav-overlay.is-open .nav-overlay-list li:nth-child(8) a { transition-delay: 0.39s; }

.nav-overlay:not(.is-open) .nav-overlay-list li a {
  transition-delay: 0s !important;
}

/* ── 12. スクロール禁止 ──────────────────────────────────────── */

body.nav-open {
  overflow: hidden;
}
