/* ==========================================================================
   共通スタイル
   PCナビ: Figma 1:738 / SPナビ: 1:1508 / SPメニュー: 1:1792
   PCフッター: 1:710 / SPフッター: 1:1398
   ========================================================================== */

/* =========================
   ナビゲーション（PC）
   ========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid #e7e7e7;
}

.site-nav {
  height: 100%;
}

.nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 65px;
  position: relative;
}

/* ロゴ */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 81px; /* ロゴ右端165px → 商品一覧246px（Figma 1:746） */
}

.nav-logo img {
  width: 100px;
  height: 55px;
  object-fit: contain;
}

/* ナビリスト */
.nav-list {
  display: flex;
  align-items: center;
  gap: 30px; /* 各メニュー項目・セパレーター間 30px（Figma 1:746〜1:754） */
  flex: 1;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px; /* テキスト→ドロップダウン矢印（Figma 商品一覧302px→caret311px） */
  height: var(--nav-height);
  padding: 0;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-black);
  white-space: nowrap;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-text-gray);
}

/* ドロップダウン矢印 */
.nav-caret {
  width: 11px;
  height: 7px;
  object-fit: contain;
}

/* セパレーター（斜め線） */
.nav-sep {
  width: 13px;
  height: 22px;
  position: relative;
  flex-shrink: 0;
}

.nav-sep::after {
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(35deg);
  width: 1px;
  height: 22px;
  background: #c0c0c0;
}

/* ドロップダウンメニュー */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: var(--color-dark);
  padding: 8px 0;
  z-index: 200;
}

.nav-item--has-dropdown:hover .nav-dropdown,
.nav-item--has-dropdown:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown li {
  position: relative;
}

.nav-dropdown li + li::before {
  content: '';
  display: block;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 20px;
}

.nav-dropdown a {
  display: block;
  padding: 10px 20px 14px;
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-white);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-dropdown a::after {
  content: '';
  display: block;
  margin-top: 4px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
}

.nav-dropdown a:hover {
  opacity: 0.7;
}

/* SNSリンク（右端） */
.nav-sns {
  display: flex;
  align-items: center;
  gap: 30px; /* 代表アカウント群→Amebaブログ群 間 30px（Figma 1:756→1:760） */
  margin-left: auto;
}

.nav-sns-link {
  display: flex;
  align-items: center;
  gap: 5px; /* アイコン→ラベル（Figma icon1134+20=1154→ラベル1159） */
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-black);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.nav-sns-link:hover {
  opacity: 0.7;
}

.nav-sns-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ハンバーガーボタン（PCでは非表示） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* =========================
   SPハンバーガーメニュー（Figma 1:1792）
   ========================= */
.sp-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--color-white);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s;
}

.sp-menu.is-open {
  transform: translateX(0);
  visibility: visible;
}

.sp-menu__close {
  position: absolute;
  top: 22px;
  right: 24px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.sp-menu__close img {
  width: 29px;
  height: 16px;
  display: block;
}

.sp-menu__nav {
  width: 330px;
  margin: 65px auto 0;
}

.sp-menu__list {
  padding-left: 38px; /* 商品一覧 x=61（コンテナ23起点） */
}

.sp-menu__item > a {
  display: block;
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-black);
}

.sp-menu__item + .sp-menu__item {
  margin-top: 20px; /* お客様の声501→パーツ販売521（Figma 1:1797〜1:1800） */
}

/* サブメニュー（商品一覧配下 9項目） */
.sp-menu__sub {
  margin: 20px 0 32px;
  padding-left: 17px; /* dash x78 - 商品一覧 x61 */
}

.sp-menu__sub li + li {
  margin-top: 16px; /* 40pxピッチ = 24px行 + 16px */
}

.sp-menu__sub a {
  display: flex;
  align-items: center;
  gap: 8px; /* dash15px右端93 → テキスト101 */
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: #646464;
}

.sp-menu__sub a::before {
  content: '';
  flex-shrink: 0;
  width: 15px;
  height: 1px;
  background: #646464;
}

/* メニュー下部（区切り線 + SNSアイコン） */
.sp-menu__footer {
  width: 330px;
  margin: 20px auto 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-dark);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-right: 39px; /* アイコン右端 x314（Figma 1:1825） */
}

.sp-menu__footer img {
  width: 30px;
  height: 30px;
  display: block;
}

/* =========================
   フッター（PC: Figma 1:710 / 1440×450）
   ========================= */
.site-footer {
  position: relative;
  height: 450px;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.footer-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay); /* rgba(0,0,0,0.45) */
}

.footer-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: var(--site-width);
  margin: 0 auto;
}

/* フッターナビ（左上・縦並び x=220 / y=55, 行ピッチ41px） */
.footer-nav {
  position: absolute;
  left: 220px;
  top: 55px;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 15.4px; /* 41pxピッチ = 16px×lh1.6(25.6) + 15.4 */
}

.footer-nav a {
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-white);
  letter-spacing: 0.48px;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.footer-nav a:hover {
  opacity: 0.7;
}

/* セパレーター（中央 y=229, x=220→1420） */
.footer-separator {
  position: absolute;
  left: 220px;
  right: 20px;
  top: 229px;
  height: 1px;
  background: rgba(255, 255, 255, 0.4);
}

/* フッターSNS（線の下・横並び y=254, x=220, 各「ラベル→アイコン」） */
.footer-sns {
  position: absolute;
  left: 220px;
  top: 254px;
  display: flex;
  align-items: center;
  gap: 27px; /* SNS群間（Figma アイコン右端358→代表アカウント385） */
}

.footer-sns-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-white);
  white-space: nowrap;
  transition: opacity 0.2s;
}

.footer-sns-link:hover {
  opacity: 0.7;
}

.footer-sns-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* フッターロゴ（左下 y=315, x=220, 白box 170×77） */
.footer-logo-wrap {
  position: absolute;
  left: 220px;
  top: 315px;
}

.footer-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 170px;
  height: 77px;
  background: var(--color-white);
}

.footer-logo {
  width: 130px;
  height: auto;
  object-fit: contain;
}

/* =========================
   ページヘッダー（共通）
   ========================= */
.page-hero {
  position: relative;
  background: var(--color-bg-light);
  padding-top: 100px;
  padding-bottom: 60px;
  overflow: hidden;
  text-align: center;
}

.page-hero__watermark {
  position: absolute;
  top: 19px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 100px;
  line-height: 1.6;
  color: var(--color-bg-gray);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.page-hero__heading {
  position: relative;
  z-index: 1;
  font-family: var(--font-en-bold);
  font-weight: 900;
  font-size: 30px;
  line-height: 1.6;
  color: var(--color-text-gray);
  letter-spacing: 0;
  margin-top: 10px;
}

.page-hero__title {
  position: relative;
  z-index: 1;
  font-family: var(--font-jp);
  font-weight: 900;
  font-size: 22px;
  line-height: 44px;
  color: var(--color-black);
  margin-top: 16px;
}

/* =========================
   サイドウォーターマーク（縦書き装飾）
   ========================= */
.side-label {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
}

.side-label__text {
  writing-mode: vertical-rl;
  font-family: var(--font-tomorrow);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: 0.84px;
  background: linear-gradient(
    to bottom,
    #454545 0%,
    rgba(240, 240, 240, 0.75) 50%,
    #454545 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

/* =========================
   購入ボタン
   ========================= */
.btn-purchase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 329px;
  height: 78px;
  background: var(--color-black); /* Figma 商品ショーケースCTA（1:702）= #111 */
  color: var(--color-white);
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.9px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.btn-purchase:hover {
  opacity: 0.8;
}

/* =========================
   星レーティング
   ========================= */
.star-rating {
  display: flex;
  gap: 0;
}

.star-rating img {
  width: 26.667px;
  height: 26.667px;
}

/* =========================
   「非常に良い」バッジ
   ========================= */
.review-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  padding: 0 12px;
  background: linear-gradient(
    67.17deg,
    #454545 0.77%,
    #d1d1d1 50%,
    #454545 99.23%
  );
  font-family: var(--font-jp);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-white);
}

/* ==========================================================================
   SP（〜767px）
   ========================================================================== */
@media (max-width: 767px) {

  /* ---- SPナビ（Figma 1:1508 / 375×60） ---- */
  .site-header {
    height: 60px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .nav-logo {
    margin-right: 0;
  }

  .nav-logo img {
    width: 91px;
    height: 38px;
  }

  .nav-list,
  .nav-sns {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-toggle img {
    width: 38px;
    height: 38px;
    display: block;
  }

  /* ---- SPフッター（Figma 1:1398 / 375×290） ---- */
  .site-footer {
    height: 290px;
  }

  .footer-nav {
    left: 38px;
    top: 26px;
  }

  .footer-nav ul {
    gap: 5px; /* 29pxピッチ = 12px×lh2(24) + 5 */
  }

  .footer-nav a {
    font-size: 12px;
    line-height: 24px;
    letter-spacing: 0;
  }

  /* セパレーター（y=147, 中央 320px） */
  .footer-separator {
    left: 50%;
    right: auto;
    top: 147px;
    width: 320px;
    transform: translateX(-50%);
  }

  /* SNS（y=157, x=38, 折返しあり gap15px） */
  .footer-sns {
    left: 38px;
    top: 157px;
    width: 300px;
    flex-wrap: wrap;
    gap: 15px;
  }

  .footer-sns-link {
    gap: 4px;
    font-size: 12px;
  }

  .footer-sns-icon {
    width: 20px;
    height: 20px;
  }

  /* ロゴ（y=227, x=38, 白box 80×36） */
  .footer-logo-wrap {
    left: 38px;
    top: 227px;
  }

  .footer-logo-box {
    width: 80px;
    height: 36px;
  }

  .footer-logo {
    width: 61px;
  }

  /* ---- ページヘッダー（SP共通） ---- */
  .page-hero {
    padding-top: 60px;
    padding-bottom: 30px;
  }

  .page-hero__watermark {
    top: 30px;
    font-size: 50px;
    line-height: 1;
  }

  .page-hero__heading {
    font-size: 18px;
    margin-top: 0;
  }

  .page-hero__title {
    font-size: 18px;
    line-height: 29px;
    margin-top: 8px;
  }

  /* ---- サイドウォーターマーク ---- */
  .side-label {
    left: 0;
    width: 18px;
  }

  .side-label__text {
    font-size: 18px;
    letter-spacing: 0.54px;
  }

  /* ---- 星レーティング ---- */
  .star-rating img {
    width: 27px;
    height: 27px;
  }

  /* ---- バッジ ---- */
  .review-badge {
    height: 26.5px;
    padding: 0 14px;
    font-size: 12px;
  }
}

/* =========================
   商品リストの横スライド
   （main.js が、はみ出している要素にだけ .is-slider を付与する）
   ========================= */
.is-slider {
  cursor: grab;
  /* ドラッグ中に画像やテキストが選択されないようにする */
  -webkit-user-select: none;
  user-select: none;

  /* touch-action は指定しない（既定の auto のまま）。
     以前は touch-action: pan-y を指定していたが、これは
     「横方向のパンをブラウザに任せない」という意味になるため、
     JS側はタッチを標準スワイプに任せている（main.js の pointerdown で
     pointerType === 'touch' を除外）関係で、スマホから横スワイプが
     まったく効かなくなっていた。ピンチズームも潰さないよう auto に戻す。 */
}

.is-slider.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

/* ドラッグ中はカードのホバー効果とリンク判定を止める */
.is-slider.is-dragging a {
  pointer-events: none;
}

.is-slider:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* =========================
   商品リストの左右ボタン（PC幅のみ表示）
   SPは指でスワイプできるため出さない。
   .slider-nav はスクロール領域と同じ矩形に重ねる（配置は各ページのCSSで指定）。
   ========================= */
.slider-nav {
  display: none;
}

.slider-btn {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(21, 21, 21, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, background-color 0.2s;
}

.slider-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.slider-btn:hover {
  background: var(--color-white);
}

/* 端まで来たら消す（押せる方向だけ見せる） */
.slider-btn[disabled] {
  opacity: 0;
  pointer-events: none;
}

/* 暗い背景のセクションでは反転させる */
.pm-section--dark .slider-btn,
.pm-hero .slider-btn,
.fp-products .slider-btn {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(21, 21, 21, 0.72);
  color: var(--color-white);
}

.pm-section--dark .slider-btn:hover,
.pm-hero .slider-btn:hover,
.fp-products .slider-btn:hover {
  background: var(--color-dark);
}

@media (min-width: 768px) {
  .slider-nav {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    /* ボタン以外はカードのドラッグを邪魔しない */
    pointer-events: none;
  }

  .slider-nav[hidden] {
    display: none;
  }
}

/* =========================
   スクロールで時間差に立ち上がる演出

   .reveal は main.js が付ける。CSSだけで opacity:0 にすると
   JSが動かない環境で中身が消えるため、初期状態はHTMLに持たせない。
   時間差（--reveal-delay）も main.js が要素ごとに設定する。
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 0.7, 0.25, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
