@charset "UTF-8";
/* =========================================================
   ストックカー（コンプリートカーの車両ページ）
   ページの枠・パンくず・ページ見出し（.page-heading）・青バーの見出し・NEWSは css/common.css
   動きは js/stockcar.js（写真ギャラリー・完成までの記録の切り替え）
   ========================================================= */

/* ---------- 全体の並び ---------- */
/* NEWS が上余白を持つので、このページの枠は下余白なし */
.stockcar { padding-bottom: 0; }
/* パンくず → 見出し 80 ／ ブロックの間 80 */
.stockcar__body { margin-top: 80px; display: flex; flex-direction: column; gap: 80px; }
/* 見出し → 車両 40 */
.stockcar__top { display: flex; flex-direction: column; gap: 40px; }
/* 青バーの見出し → 中身 24 */
.stockcar-section { display: flex; flex-direction: column; gap: 24px; }

/* =========================================================
   車両（幅1000）
   ========================================================= */
.vehicle { width: 100%; max-width: var(--content-width-narrow); margin: 0 auto; display: flex; flex-direction: column; gap: 40px; }

/* ---------- 写真ギャラリー ---------- */
.gallery { display: flex; flex-direction: column; align-items: center; gap: 24px; }
/* 左右の白いタブ型の矢印は、写真の上に重ねて上下中央に置く */
.gallery__main { position: relative; width: 100%; aspect-ratio: 1000 / 586; overflow: hidden; }
/* 写真は横一列のレールに並べ、js/stockcar.js が表示する写真の位置まで素早くずらす */
.gallery__track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.25,.8,.3,1); }
.gallery__image { flex: none; width: 100%; height: 100%; object-fit: cover; }
.gallery__arrow {
  position: absolute; inset-block: 0; width: 38px; height: 285px; margin-block: auto; /* 上下中央 */
  padding: 0; border: 0; background: url("../img/gallery-arrow.svg") no-repeat center / 100% 100%; cursor: pointer;
}
.gallery__arrow--previous { left: 0; }
.gallery__arrow--next { right: 0; transform: scaleX(-1); } /* 左の矢印を左右反転 */

/* サムネイル：9枚ぶんの窓。列は js/stockcar.js がずらし、選んだ写真が常に中央の赤い枠に来る（ループ） */
.gallery__thumbs-viewport {
  --thumb-width: 72px; --thumb-gap: 8px;
  position: relative; width: calc(var(--thumb-width) * 9 + var(--thumb-gap) * 8); max-width: 100%;
  padding-block: 3px; margin-block: -3px; /* 赤い枠のはみ出し3pxぶん。並びの上下の間隔はサムネイルの端から測る（Figma） */
  overflow: hidden; touch-action: pan-y; /* 横スワイプは js で受け取る */
}
/* 赤い枠（Figma 78×54・内側に2pxの線。サムネイルの外に3pxはみ出す） */
.gallery__thumbs-viewport::after {
  content: ""; position: absolute; inset-block: 0; left: calc(50% - var(--thumb-width) / 2 - 3px);
  width: calc(var(--thumb-width) + 6px); border: 2px solid var(--accent); pointer-events: none;
}
.gallery__thumbs { display: flex; gap: var(--thumb-gap, 8px); transition: transform .35s cubic-bezier(.25,.8,.3,1); }
.gallery__thumbs > li { flex: none; }
.gallery__thumb { display: block; width: var(--thumb-width, 72px); padding: 0; border: 0; background: none; cursor: pointer; transition: opacity .2s; }
.gallery__thumb img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery__thumb:hover { opacity: .7; }

/* ---------- 車両の情報 ---------- */
/* PC：左に車名（幅334）、右に「価格＋スペック」→ 線 → 主な装備 */
.vehicle__info {
  display: grid; grid-template-columns: 334px auto 1fr; column-gap: 16px; row-gap: 16px; align-items: end;
}
.vehicle__name-block { grid-column: 1; grid-row: 1 / span 2; align-self: start; display: flex; flex-direction: column; gap: 4px; font-family: var(--font-latin); }
.vehicle__maker { font-weight: 800; font-size: 20px; line-height: 28px; }
.vehicle__name { font-weight: 800; font-size: 48px; line-height: 52px; }
.vehicle__grade { font-weight: 500; font-size: 24px; line-height: 30px; }

.vehicle__price-label { font-weight: 500; font-size: 13px; line-height: 22px; }
/* 行の高さは数字（48）で決める。「万円」の行の高さを0にしないと、大きさの違う文字が並んで行が60に広がり、スペックとずれる */
.vehicle__price { font-weight: 900; font-size: 18px; line-height: 0; letter-spacing: -.05em; }
.vehicle__price-number { font-family: var(--font-latin); font-weight: 800; font-size: 52px; line-height: 48px; letter-spacing: -.05em; }
/* 英語版だけ：価格の下の「Japanese Yen」 */
.vehicle__price-note { font-size: 13px; line-height: 18px; letter-spacing: .01em; color: var(--text-sub); } /* 字間は数字の大きさで計算し直す（親の-.05emは18pxのまま引き継がれるため） */

/* スペック（Figma 部品 Car/SpecItem）：グレーの項目名チップ＋値 */
.car-specs { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 16px; }
.car-spec { display: flex; align-items: center; gap: 8px; }
.car-spec dt { min-width: 65px; padding-inline: 8px; border-radius: 10px; background: var(--surface-tint); font-weight: 500; font-size: 12px; line-height: 18px; letter-spacing: .01em; color: var(--blue-gray); text-align: center; }
.car-spec dd { font-weight: 500; font-size: 13px; line-height: 22px; white-space: nowrap; }
/* 英語版のPC：項目名・値が長く価格の横に並びきらないので、価格 → スペック → 主な装備 の縦並びにする。
   スペックは日本語版と同じ3列×2段 */
@media (min-width: 1101px) {
  :root:lang(en) .vehicle__info { grid-template-columns: 334px 1fr; }
  :root:lang(en) .vehicle__name-block { grid-row: 1 / span 3; }
  :root:lang(en) .vehicle__price-block, :root:lang(en) .car-specs, :root:lang(en) .vehicle__equipment { grid-column: 2; }
  :root:lang(en) .car-specs { grid-template-columns: repeat(3, auto); }
}
:root:lang(en) .car-spec dt { white-space: nowrap; }

.vehicle__equipment {
  grid-column: 2 / -1; padding-top: 11px; border-top: 5px solid var(--border); /* 線の上端 → 文字 16（Figma） */
  font-size: 13px; line-height: 18px; letter-spacing: .01em;
}
.vehicle__equipment strong { font-weight: 900; }

/* =========================================================
   リード
   ========================================================= */
.stockcar-intro { display: flex; flex-direction: column; gap: 8px; }
.stockcar-intro__catch { font-weight: 900; font-size: 25px; line-height: 33px; }
.stockcar-intro__text { max-width: 863px; font-size: 14px; line-height: 22px; letter-spacing: .01em; color: var(--text-sub); }

/* 青バーの見出しの下のリード（メンテナンス内容） */
.stockcar-section__lead { font-size: 14px; line-height: 22px; letter-spacing: .01em; color: var(--text-sub); }

/* =========================================================
   車両の特長（2列）
   ========================================================= */
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feature-card { display: flex; flex-direction: column; padding: 40px 32px; background: var(--surface-gray); }
/* 見出しの左に、青い点が2列×3段のアイコン */
.feature-card__title { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; font-size: 20px; line-height: 27px; letter-spacing: .01em; }
.feature-card__title::before {
  content: ""; flex: none; width: 10px; height: 27px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 27' fill='%230F3893'%3E%3Cpath d='M0 4.1h3.33v3.33H0zM6.67 4.1H10v3.33H6.67zM0 11.88h3.33v3.33H0zM6.67 11.88H10v3.33H6.67zM0 19.66h3.33v3.33H0zM6.67 19.66H10v3.33H6.67z'/%3E%3C/svg%3E") no-repeat;
}
.feature-card__text { margin-top: 16px; font-size: 13px; line-height: 18px; letter-spacing: .01em; color: var(--text-sub); }
.feature-card__image { width: 100%; aspect-ratio: 526 / 278; margin-top: 24px; object-fit: cover; }

/* =========================================================
   装着パーツ・メンテナンス内容：製品カード（2列）＋そのほかの表
   PC：左に文字、右に写真（239×162・カードの上下右の端まで）
   ========================================================= */
.part-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.part-card { display: grid; grid-template-columns: 1fr 239px; column-gap: 48px; padding-left: 24px; background: var(--surface-gray); }
.part-card__body { padding-block: 19px; }
.part-card__category { font-family: var(--font-latin); font-weight: 800; font-size: 12px; line-height: 20px; color: var(--brand); }
.part-card__name { margin-top: 4px; font-weight: 700; font-size: 16px; line-height: 20px; letter-spacing: .01em; }
.part-card__text { margin-top: 8px; font-size: 13px; line-height: 18px; letter-spacing: .01em; color: var(--text-sub); }
.part-card__image { width: 100%; height: 100%; aspect-ratio: 239 / 162; object-fit: cover; }

/* 小見出し（■ ZERO/SPORTS製品・■ そのほかの〜）と中身のまとまり。見出し → 中身 20
   青バーの見出し（またはリード）→ 1つめ 36（セクションの間隔24＋12）、まとまりの間 80（24＋56） */
.parts-group { display: flex; flex-direction: column; gap: 20px; }
.stockcar-section > .parts-group { margin-top: 12px; }
.stockcar-section > .parts-group + .parts-group { margin-top: 56px; }
.parts-group__title { display: flex; gap: .4em; font-weight: 700; font-size: 20px; line-height: 27px; letter-spacing: .01em; }
.parts-group__title::before { content: "■"; color: var(--brand); }
/* PCは2列（左の列から順に埋める） */
.parts-table { columns: 2; column-gap: 20px; }
.parts-table__row { display: flex; padding-block: 24px; border-bottom: 1px solid var(--border); break-inside: avoid; }
.parts-table__row dt { flex: none; width: 146px; font-size: 14px; line-height: 22px; letter-spacing: .01em; color: var(--brand); }
.parts-table__row dd { font-weight: 700; font-size: 16px; line-height: 22px; letter-spacing: .01em; }
:root:lang(en) .parts-table__row dt { width: 180px; } /* 英語は項目名が長い（Power Steering Rack など） */

/* =========================================================
   完成までの記録
   PC：左に写真（556）、右に「工程名・バー・説明」と矢印。説明と矢印のかたまりは上下中央
   ※ 各工程の中身（.process-step）は display: contents で .process のグリッドに直接並べる
   ========================================================= */
.process { display: grid; grid-template-columns: 556px 1fr; grid-template-rows: 1fr auto auto 1fr; background: var(--surface-gray); }
.process__steps, .process-step { display: contents; }
.process-step[hidden] { display: none; }
.process-step__image { grid-column: 1; grid-row: 1 / -1; width: 100%; aspect-ratio: 556 / 391; object-fit: cover; }
.process-step__body { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 24px; padding: 0 100px; }

.process-step__title { display: flex; align-items: center; gap: 24px; font-weight: 700; font-size: 20px; line-height: 27px; letter-spacing: .01em; }
.process-step__number { font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 58px; letter-spacing: 0; color: var(--brand); }
/* 工程名 → バー 8。バーは今の工程だけ青 */
.process-step__head { display: flex; flex-direction: column; gap: 8px; }
.process-step__progress { display: flex; gap: 6px; }
.process-step__progress span { width: 47px; height: 5px; background: var(--border); }
.process-step__progress .is-current { background: var(--brand); }
.process-step__text { font-size: 13px; line-height: 18px; letter-spacing: .01em; }

.process__nav { grid-column: 2; grid-row: 3; display: flex; justify-content: space-between; padding: 48px 100px 0; }

/* 矢印だけのボタン（Figma 部品 ボタン／矢印） */
.button-arrow {
  width: 96px; height: 36px; padding: 0; border: 1px solid var(--brand); border-radius: 50px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 10' fill='none' stroke='%230F3893'%3E%3Cpath d='M1 5h28M24 9l5-4-5-4'/%3E%3C/svg%3E") no-repeat center / 30px 10px;
  transition: background-color .2s;
}
.button-arrow:hover { background-color: #eef1f8; }
.button-arrow--previous { transform: scaleX(-1); }

/* =========================================================
   タブレット（1100px以下）
   ========================================================= */
@media (max-width: 1100px) {
  .vehicle__info { grid-template-columns: 1fr auto; }
  .vehicle__name-block { grid-row: auto; grid-column: 1 / -1; }
  .vehicle__equipment { grid-column: 1 / -1; }
  .feature-card { padding: 32px 24px; }
  /* カードは写真が上・文字が下の縦並び（スマホと同じ形） */
  .part-card { display: flex; flex-direction: column; padding-left: 0; }
  .part-card__image { order: -1; height: auto; }
  .part-card__body { padding: 16px 20px 20px; }
  .process { grid-template-columns: 1fr 1fr; }
  .process-step__body, .process__nav { padding-inline: 40px; }
}

/* =========================================================
   スマホ（767px以下）：SPの文字ルール（2026-10-21確定）に合わせる
   ========================================================= */
@media (max-width: 767px) {
  .stockcar__body { margin-top: 64px; gap: 64px; }
  .stockcar__top { gap: 16px; }
  .stockcar-section { gap: 16px; }

  /* 車両：写真は画面の端から端まで */
  .vehicle { gap: 24px; }
  .gallery { gap: 12px; margin-inline: calc(var(--gutter) * -1); align-items: stretch; }
  .gallery__main { aspect-ratio: 375 / 234; }
  .gallery__arrow { width: 24px; height: 142px; }
  /* サムネイルは画面の幅いっぱい・横スワイプ。赤い枠はサムネイルと同じ大きさ（63×42） */
  .gallery__thumbs-viewport { --thumb-width: 63px; --thumb-gap: 4px; width: 100%; padding-block: 0; margin-block: 0; }
  .gallery__thumbs-viewport::after { left: calc(50% - var(--thumb-width) / 2); width: var(--thumb-width); }

  /* 車名と価格を横並び、その下にスペック2列 → 線 → 主な装備 */
  .vehicle__info { grid-template-columns: 1fr auto; row-gap: 8px; column-gap: 0; align-items: start; }
  .vehicle__name-block { grid-column: 1; grid-row: 1; gap: 0; }
  .vehicle__maker { font-size: 14px; line-height: 20px; }
  /* 車名のかたまりは Figma SP版の位置（メーカー名の上端から 車名+9・グレード+42、スペックは+86）に合わせ、文字の箱を少し重ねる */
  .vehicle__name-block { min-height: 78px; }
  .vehicle__name { margin-top: -11px; font-size: 28px; line-height: 40px; }
  .vehicle__grade { margin-top: -7px; font-size: 16px; line-height: 24px; }
  .vehicle__price-block { padding-top: 9px; } /* 価格の行を車名の行と揃える（Figma SP版の位置） */
  .vehicle__price { margin-top: -4px; }
  .vehicle__price { font-size: 16px; }
  .vehicle__price-number { font-size: 35px; line-height: 39px; }
  .car-specs { grid-column: 1 / -1; grid-template-columns: 167px 160px; gap: 8px; } /* 右の列は下のカード2列の右の列と同じ位置 */
  :root:lang(en) .car-specs { grid-template-columns: 1fr; } /* 英語は項目名・値が長いので1行に1項目（Figma英語版と同じ） */
  .vehicle__equipment { grid-column: 1 / -1; margin-top: 8px; }

  /* リード：大見出しは SPの日本語大見出し（Black 24／34） */
  .stockcar-intro { gap: 16px; }
  .stockcar-intro__catch { font-size: 24px; line-height: 34px; font-feature-settings: "palt"; } /* 約物を詰めて「パフォーマンスを、」を1行に収める */

  /* 特長：1列 */
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }
  .feature-card { padding: 24px 20px; }
  .feature-card__title { font-weight: 900; }
  .feature-card__text { margin-top: 8px; font-size: 14px; line-height: 22px; }
  .feature-card__image { margin-top: 16px; aspect-ratio: 295 / 156; }
  /* 製品カード：横2列。写真 160×108 → 文字 */
  .part-grid { gap: 15px; }
  .part-card__body { padding: 12px 12px 16px; }
  .part-card__category { font-size: 11px; line-height: 16px; }
  .part-card__name { font-size: 14px; line-height: 20px; }

  /* 小見出しのまとまり：見出し → 中身 8、青バー（リード）→ 1つめ 24（16＋8）、まとまりの間 40（16＋24） */
  .parts-group { gap: 8px; }
  .stockcar-section > .parts-group { margin-top: 8px; }
  .stockcar-section > .parts-group + .parts-group { margin-top: 24px; }
  .parts-group__title { font-size: 16px; line-height: 20px; }

  /* そのほかの表：1列。項目名の下に内容（Table/Row の Size=SP） */
  .parts-table { columns: auto; }
  .parts-table__row { flex-direction: column; gap: 4px; padding-block: 16px; }
  .parts-table__row dt { width: auto; }
  .parts-table__row dd { font-weight: 400; font-size: 14px; }

  /* 完成までの記録：写真 → 工程 → 矢印 の縦並び */
  .process { grid-template-columns: 1fr; grid-template-rows: none; }
  .process-step__image, .process-step__body, .process__nav { grid-column: 1; grid-row: auto; }
  .process-step__image { aspect-ratio: 335 / 236; }
  .process-step__body { gap: 16px; padding: 24px 20px; }
  .process-step__title { gap: 16px; }
  .process-step__number { font-size: 26px; line-height: 40px; }
  .process-step__progress span { flex: 1; width: auto; }
  .process-step__text { font-size: 14px; line-height: 22px; }
  .process__nav { padding: 82px 20px 60px; } /* 説明 → 矢印の間は Figma SP版（編集版 1375:5584）の位置 */
}

/* 「動きを減らす」設定の人には、写真のスライドを止める */
@media (prefers-reduced-motion: reduce) {
  .gallery__track, .gallery__thumbs { transition: none; }
}
