/* ソニックギア — オーディオ・ガジェット専門店風(白基調・グリーンアクセント・モノスペース見出し) */
/* 2026-08-28: ダーク基調 → 白背景に変更(グリーンのアクセントは維持)。
   ファーストビューはメーカー直販サイトの商品ページを参考に、画面幅いっぱいの 2 カラム
   (左: 画像 + 端の矢印 + 画像の下のサムネ / 右: 商品名・色・価格・購入・特典)
   2026-08-30: 1478x935 のファーストビューにメインセクションだけが収まるよう、
   右カラム(価格・購入)を 340px 固定に細くして画像を拡大。サムネは画像への重ねをやめ、下に配置
   2026-08-30(2): サブ画像(サムネ)を右カラムの商品名・価格・購入セクションの下へ移動。
   空いた左カラムの分だけメイン画像を縦に拡大し、1478x935 に収まる条件は維持 */
:root {
  --green: #2dd4a7;       /* 塗り・ボーダー・ホバー用(元のアクセント色) */
  --green-ink: #0f9f7a;   /* 白地の文字用(元色は白地で読みにくいため濃いトーン) */
  --green-hover: #35eebc;
  --ink: #1a1f26;
  --ink-2: #333a42;
  --muted: #4f5964;
  --muted-2: #6b7480;
  --line: #e3e7eb;
  --line-2: #eef1f4;
  --surface: #f5f7f9;
  --star: #e0a400;
  --bad: #d9534f;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --gutter: 48px;         /* 左右余白(全セクション共通で左端を揃える) */
  --page-max: 1440px;     /* 全セクション共通の最大幅 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: var(--ink); background: #fff; font-size: 14px; line-height: 1.8;
}
a { color: var(--green-ink); text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

/* topbar: 薄いグレー帯に告知文 2 つ */
.topbar {
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 6px var(--gutter); font-size: 11.5px; line-height: 1.6; color: var(--muted);
}
.topbar p { margin: 0; }
.topbar a { margin-left: 6px; font-weight: bold; }

/* header: ロゴ+ナビを左に、右端にアイコン */
.site-header {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 14px var(--gutter); border-bottom: 2px solid var(--green);
}
.header-left { display: flex; align-items: center; gap: 36px; min-width: 0; }
/* ロゴは和文のみ。SF Mono 等に和文グリフが無く mono 指定は効かないため font-family は指定せず、
   字間を広めに取ってサイトのモノスペース基調に寄せる */
.logo { font-size: 22px; font-weight: 800; letter-spacing: 2px; white-space: nowrap; }
.logo span { color: var(--green-ink); }

/* 支給ロゴ(images/logo-sonic-gear.svg)。従来の文字ロゴ 22px と同等の高さに合わせる */
.logo img { height: 27px; width: auto; display: block; }
.site-header nav ul { display: flex; gap: 22px; list-style: none; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.site-header nav li { flex: none; }
.site-header nav a { color: var(--ink-2); }
.site-header nav a:hover { color: var(--green-ink); }
.header-icons { display: flex; gap: 22px; list-style: none; }
.header-icons a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-2); font-size: 10px; line-height: 1.2; }
.header-icons svg { width: 22px; height: 22px; }
.header-icons a:hover { color: var(--green-ink); }

/* product layout: 画面幅いっぱいの 2 カラム(画像 ≒ 62%) */
.product-layout {
  max-width: var(--page-max); margin: 0 auto; padding: 22px var(--gutter) 40px;
  /* 右カラムは商品名 h1 が改行しない幅を確保(340px だと1478px幅で折り返す) */
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start;
}
.product-gallery { min-width: 0; }
.gallery-stage { position: relative; }
/* 高さはビューポート基準。1478x935 で画像下端(≒908px)まで収まり、続く .intro は画面外になる。
   サムネを右カラムへ移したぶん、以前の「画像+サムネ」と同じ下端まで画像を伸ばしている */
/* 支給写真は本体が画面右寄り・左が余白。既定の center 切り抜きだと本体が右にずれるので
   切り抜き位置を右へ送って本体を枠の中央に置く */
.main-image { width: 100%; height: clamp(360px, calc(100vh - 151px), 784px); object-fit: cover; object-position: 73% center; display: block; background: #fff; }
.main-image.is-graphic { object-fit: contain; background: var(--surface); } /* 図版(SVG)は切り取らずに全体を表示 */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9); color: var(--ink); font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding-bottom: 4px;
}
.gallery-arrow.prev { left: 6px; }
.gallery-arrow.next { right: 6px; }
.gallery-arrow:hover { border-color: var(--green); color: var(--green-ink); }
/* サブ画像:右カラムの商品名・価格・購入セクションの下。カラム幅にきっちり収まる 3 列グリッド
   (メインと同じ写真は並べないので3色バリエーションのみ。ラベルは削除しシンプルに) */
.sub-gallery { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* 各サムネは正方形の枠で包み、中身(写真/SVG)が枠からはみ出さないようにする */
.thumb { width: 100%; aspect-ratio: 1 / 1; padding: 0; appearance: none; -webkit-appearance: none; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; display: block; }
/* サブ画像も本体が右寄りの同じ構図。正方形に切り抜くと横がさらに詰まるので、メイン画像と同じく切り抜き位置を右へ送る */
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 72% center; display: block; }

.product-info { padding-top: 6px; }
.product-info h1 { font-size: 32px; letter-spacing: 0.5px; line-height: 1.2; margin: 0 0 16px; }
.color-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.color-thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; outline: 2px solid var(--green); outline-offset: 2px; }

.price-line { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.price { font-size: 30px; font-weight: bold; color: var(--green-ink); font-family: var(--mono); }
.price-line .tax { font-size: 13px; color: var(--muted-2); }

/* 購入ボタン → 数量 の順(参考レイアウトに合わせる) */
.buy-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: stretch; }
.btn-cart {
  flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; font-size: 14.5px; font-weight: bold; border-radius: 6px;
  background: var(--green); border: none; color: #10131a; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-cart svg { width: 20px; height: 20px; }
.btn-cart:hover { background: var(--green-hover); }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex: none; }
.qty button { width: 34px; height: 46px; border: none; background: #fff; font-size: 18px; color: var(--muted); cursor: pointer; }
.qty button:hover { background: var(--surface); }
.qty span { min-width: 30px; text-align: center; font-family: var(--mono); font-size: 14px; }
.stock { font-size: 13px; font-weight: bold; color: var(--ink-2); margin-bottom: 26px; }

.perks { list-style: none; display: grid; grid-template-columns: 1fr; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 10px; line-height: 1.3; }
.perks svg { width: 36px; height: 36px; color: var(--ink-2); flex: none; }
.perks span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-2); }
.perks b { font-family: var(--mono); font-weight: normal; font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.02em; }

/* intro: 説明文とタグ(ファーストビューの下・全幅) */
.intro { max-width: var(--page-max); margin: 0 auto; padding: 6px var(--gutter) 8px; }
.subtitle { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.intro-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.rating { font-size: 13px; color: var(--muted); white-space: nowrap; }
.stars { color: var(--star); letter-spacing: 1px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-family: var(--mono); font-size: 11px;
  color: var(--green-ink); border: 1px solid var(--green); border-radius: 3px; padding: 2px 8px;
}

/* detail */
.detail-section { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 40px; }
.staff-note { background: var(--surface); border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; padding: 12px 16px; margin: 22px 0 6px; }
.staff-note h3 { font-size: 13px; color: var(--green-ink); margin-bottom: 6px; }
.staff-note p { font-size: 13px; color: var(--ink-2); }
.detail-section h2 {
  font-family: var(--mono);
  font-size: 18px; letter-spacing: 1px; margin: 34px 0 16px;
}
.detail-section h2 span { color: var(--green-ink); margin-right: 6px; }

.features { list-style: none; }
.features li {
  padding: 10px 0 10px 26px; position: relative; border-bottom: 1px solid var(--line-2);
  color: var(--ink-2);
}
.features li strong { color: var(--ink); }
.features li::before { content: "▸"; color: var(--green-ink); position: absolute; left: 6px; }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.photo-strip { margin: 0; }
.photo-strip img { width: 100%; border: 1px solid var(--line); border-radius: 8px; display: block; }
.photo-strip figcaption { font-family: var(--mono); font-size: 12px; color: var(--muted-2); padding: 6px 2px 0; }

.long-review { max-width: 960px; }
.long-review p { margin-bottom: 14px; color: var(--ink-2); font-size: 13.5px; text-align: justify; }
.long-review strong { color: var(--green-ink); }
.lab-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lab-table th, .lab-table td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.lab-table th { background: var(--surface); width: 18%; font-weight: normal; color: var(--muted); }
.lab-table .score { color: var(--star); white-space: nowrap; width: 1%; }

.full-spec { width: 100%; border-collapse: collapse; font-size: 13px; }
.full-spec th, .full-spec td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.full-spec th { background: var(--surface); width: 30%; font-weight: normal; color: var(--muted); }

.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fit-card { border-radius: 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); }
.fit-card h3 { font-size: 14px; margin-bottom: 10px; }
.fit-card.good h3 { color: var(--green-ink); }
.fit-card.bad h3 { color: var(--bad); }
.fit-card ul { padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.fit-card li { margin-bottom: 6px; }

.review { border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; background: #fff; }
.review-head { font-size: 14px; }
.review-meta { font-size: 12px; color: var(--muted-2); margin: 2px 0 6px; }
.review p { font-size: 13px; color: var(--ink-2); }

/* footer */
.site-footer {
  border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--muted-2);
  padding: 24px 20px;
}

@media (max-width: 1000px) {
  :root { --gutter: 24px; }
  /* 右カラムをこの幅域でも h1(28px)が改行しない340pxに広げる(元は300px) */
  .product-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; padding-bottom: 20px; }
  .product-info h1 { font-size: 28px; }
}

@media (max-width: 800px) {
  :root { --gutter: 16px; }
  .topbar { display: none; }
  .product-layout { grid-template-columns: 1fr; gap: 18px; }
  .main-image { height: auto; aspect-ratio: 3 / 2; }
  .thumbs { grid-template-columns: repeat(3, 1fr); }
  .fit-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .product-info h1 { font-size: 28px; }
  .header-left { flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; }
  .site-header nav { width: 100%; }
  .site-header nav ul { gap: 16px; padding-bottom: 4px; }
  .header-icons { gap: 16px; }
  .lab-review { overflow-x: auto; }
  .lab-table { min-width: 560px; }
}

@media (max-width: 480px) {
  body { font-size: 13px; }
  .logo { font-size: 18px; }
  .product-info h1 { font-size: 24px; }
  .subtitle { font-size: 13px; }
  .price { font-size: 26px; }
  .thumbs { gap: 6px; }
  .gallery-arrow { width: 36px; height: 36px; font-size: 24px; }
  .btn-cart { flex: 1; }
  .perks { grid-template-columns: 1fr; gap: 8px; }
  .detail-section h2 { font-size: 16px; }
  .full-spec th, .full-spec td { padding: 7px 8px; font-size: 12px; }
  .full-spec th { width: 38%; }
  .fit-card { padding: 13px 15px; }
  .review { padding: 11px 13px; }
}
