/* ball.css — ゴルフボールの詳細ページ・一覧ページ共通スタイル。
   spec-position-* (性能バー) は main.css のグローバル定義を再利用する。 */

.ball-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
}

/* ── 詳細: ヒーロー ───────────────────────────────── */
.ball-hero {
  display: flex;
  gap: 1.75rem;
  background: var(--gs-card, #fff);
  border: 1px solid var(--gs-border, #d9d6cc);
  border-radius: 14px;
  padding: 1.5rem;
  margin-top: .5rem;
}
.ball-hero-media {
  flex: 0 0 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--gs-border-soft, #ebe8df);
  padding: .75rem;
}
.ball-hero-media img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.ball-hero-body { flex: 1 1 auto; min-width: 0; }
.ball-eyebrow {
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--gs-accent, #2F8F5B);
  font-weight: 700;
}
.ball-hero-brand {
  font-size: .9rem;
  color: var(--gs-mute, #2c2c2c);
  margin: .15rem 0 .1rem;
}
.ball-hero-brand a { color: inherit; }
.ball-title {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--gs-ink, #161616);
  margin: 0;
}
.ball-title-kana {
  font-size: .85rem;
  color: #8a8a8a;
  margin: .2rem 0 0;
}
.ball-tagline {
  margin: .7rem 0 0;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--gs-mute, #2c2c2c);
}
.ball-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .9rem;
}
.ball-badge {
  font-size: .73rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--gs-accent-soft, rgba(20,40,28,.08));
  color: var(--gs-ink, #161616);
  border: 1px solid var(--gs-border-soft, #ebe8df);
}
.ball-badge--new { background: #2F8F5B; color: #fff; border-color: #2F8F5B; }
.ball-badge--price {
  background: #fff;
  font-feature-settings: "tnum";
}

/* ── 詳細: セクション ─────────────────────────────── */
.ball-section { padding: 1.75rem 0 .25rem; }
.ball-section > h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gs-ink, #161616);
  margin: 0 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--gs-accent, #2F8F5B);
  display: inline-block;
}
.ball-card-panel {
  background: var(--gs-card, #fff);
  border: 1px solid var(--gs-border, #d9d6cc);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
}

/* スペック key-value グリッド */
.ball-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: .1rem .9rem;
}
.ball-spec-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem .1rem;
  border-bottom: 1px dashed var(--gs-border-soft, #ebe8df);
  font-size: .88rem;
}
.ball-spec-row dt { color: #6b6b6b; margin: 0; }
.ball-spec-row dd {
  margin: 0;
  color: var(--gs-ink, #161616);
  font-weight: 600;
  text-align: right;
}

/* 性能バー (spec-position-* を内包) */
.ball-perf { display: flex; flex-direction: column; gap: .9rem; }
.ball-perf .spec-position-panel { margin: 0; padding: 0; border-top: none; }
.ball-perf-note {
  font-size: .8rem;
  color: #6b6b6b;
  line-height: 1.6;
  margin: 0 0 1.1rem;
}
/* 同ブランド全球のマーカー (薄いグレー) と現在のボール (アクセント色・前面) */
.ball-perf-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c4c4bd;
  border: 1.5px solid #fff;
}
.ball-perf-dot.is-current {
  width: 15px;
  height: 15px;
  background: var(--gs-accent, #2F8F5B);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, .2);
  z-index: 2;
}

/* 同ブランド比較テーブル */
.ball-compare-wrap { margin-top: 1.4rem; overflow-x: auto; }
.ball-compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  white-space: nowrap;
}
.ball-compare th,
.ball-compare td {
  padding: .5rem .7rem;
  text-align: left;
  border-bottom: 1px solid var(--gs-border-soft, #ebe8df);
}
.ball-compare th {
  font-size: .75rem;
  color: #6b6b6b;
  font-weight: 600;
  border-bottom: 2px solid var(--gs-border, #d9d6cc);
}
.ball-compare td a { color: var(--gs-accent, #2F8F5B); text-decoration: none; }
.ball-compare td a:hover { text-decoration: underline; }
.ball-compare tr.is-current { background: var(--gs-accent-soft, rgba(20, 40, 28, .08)); }
.ball-compare tr.is-current td { font-weight: 600; }

/* 構造レイヤー */
.ball-layers {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: layer;
}
.ball-layer {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: .65rem 0;
  border-bottom: 1px dashed var(--gs-border-soft, #ebe8df);
}
.ball-layer:last-child { border-bottom: none; }
.ball-layer-no {
  flex: 0 0 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--gs-accent, #2F8F5B);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ball-layer-body { flex: 1 1 auto; min-width: 0; }
.ball-layer-name { font-weight: 600; font-size: .9rem; color: var(--gs-ink,#161616); }
.ball-layer-material { font-size: .82rem; color: #6b6b6b; }
.ball-layer-note { font-size: .8rem; color: #8a8a8a; margin-top: .1rem; }

/* variants / tags チップ */
.ball-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.ball-chip {
  font-size: .8rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--gs-border, #d9d6cc);
  color: var(--gs-mute, #2c2c2c);
}
.ball-chip--accent {
  background: var(--gs-accent-soft, rgba(20,40,28,.08));
  border-color: transparent;
}
.ball-chip small { color: #8a8a8a; }

/* パッケージ価格 */
.ball-package {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .55rem .2rem;
  border-bottom: 1px dashed var(--gs-border-soft, #ebe8df);
  font-size: .9rem;
}
.ball-package:last-child { border-bottom: none; }
.ball-package-price {
  font-weight: 700;
  font-feature-settings: "tnum";
  color: var(--gs-ink, #161616);
}

/* 使用プロ */
.ball-pro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .6rem;
}
.ball-pro-card {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem .6rem;
  border: 1px solid var(--gs-border-soft, #ebe8df);
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  color: var(--gs-ink, #161616);
}
.ball-pro-card img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}
.ball-pro-name { font-size: .85rem; font-weight: 600; line-height: 1.2; }
.ball-pro-tour { font-size: .72rem; color: #8a8a8a; }

/* prose (markdown) */
.ball-prose { font-size: .92rem; line-height: 1.8; color: var(--gs-mute, #2c2c2c); }
.ball-prose p { margin: 0 0 .8rem; }

/* 解説の read-more 折りたたみ（スマホのみ。PC は常に展開）*/
.ball-readmore-label { display: none; }
.rm-collapsed { display: inline; }
.rm-expanded { display: none; }
.ball-readmore-toggle:checked ~ .ball-readmore-label .rm-collapsed { display: none; }
.ball-readmore-toggle:checked ~ .ball-readmore-label .rm-expanded { display: inline; }
@media (max-width: 720px) {
  .ball-readmore-content {
    max-height: 13em;
    overflow: hidden;
    position: relative;
  }
  .ball-readmore-content::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0; height: 3.5em;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 92%);
    pointer-events: none;
  }
  .ball-readmore-toggle:checked ~ .ball-readmore-content { max-height: 9999px; }
  .ball-readmore-toggle:checked ~ .ball-readmore-content::after { display: none; }
  .ball-readmore-label {
    display: inline-block;
    margin-top: .8rem;
    padding: .4rem 1.1rem;
    font-size: .82rem; font-weight: 700;
    color: var(--gs-accent, #2F8F5B);
    background: #fff;
    border: 1px solid var(--gs-border, #d9d6cc);
    border-radius: 999px;
    cursor: pointer;
  }
}

.ball-cta {
  display: inline-block;
  margin-top: .4rem;
  background: #bf0000;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: .6rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
}

/* ── 一覧ページ ───────────────────────────────────── */
.ball-index-head { margin: .75rem 0 1.25rem; }
.ball-index-head h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .35rem;
  color: var(--gs-ink, #161616);
}
.ball-index-lead { font-size: .85rem; color: #6b6b6b; margin: 0; }

.ball-index-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.ball-facets {
  background: var(--gs-card, #fff);
  border: 1px solid var(--gs-border, #d9d6cc);
  border-radius: 12px;
  padding: 1rem;
  position: sticky;
  top: 1rem;
}
.ball-facet-group { margin-bottom: 1.1rem; }
.ball-facet-group:last-of-type { margin-bottom: .5rem; }
.ball-facet-group h3 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--gs-ink, #161616);
  margin: 0 0 .5rem;
  letter-spacing: .03em;
}
.ball-facet-opt {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .83rem;
  color: var(--gs-mute, #2c2c2c);
  padding: .2rem 0;
  cursor: pointer;
}
.ball-facet-opt input { accent-color: var(--gs-accent, #2F8F5B); }
.ball-facet-opt .cnt { color: #a0a0a0; font-size: .76rem; }
.ball-facet-search {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--gs-border, #d9d6cc);
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: .9rem;
}
.ball-facet-actions { display: flex; gap: .5rem; margin-top: .4rem; }
.ball-facet-btn {
  flex: 1;
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  padding: .5rem;
  border-radius: 8px;
  border: 1px solid var(--gs-accent, #2F8F5B);
  cursor: pointer;
}
.ball-facet-btn--apply { background: var(--gs-accent, #2F8F5B); color: #fff; }
.ball-facet-btn--clear {
  background: #fff;
  color: var(--gs-accent, #2F8F5B);
  text-decoration: none;
}

.ball-result-count { font-size: .85rem; color: #6b6b6b; margin: 0 0 .8rem; }
.ball-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .9rem;
}
.ball-card {
  display: flex;
  flex-direction: column;
  background: var(--gs-card, #fff);
  border: 1px solid var(--gs-border, #d9d6cc);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--gs-ink, #161616);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ball-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.ball-card-media {
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--gs-border-soft, #ebe8df);
  padding: .6rem;
}
.ball-card-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ball-card-body { padding: .7rem .8rem .85rem; display: flex; flex-direction: column; flex: 1; }
.ball-card-brand { font-size: .75rem; color: #8a8a8a; }
.ball-card-name { font-size: .98rem; font-weight: 700; line-height: 1.3; margin: .1rem 0; }
.ball-card-meta { font-size: .76rem; color: #6b6b6b; margin-top: .2rem; }
.ball-card-price {
  margin-top: auto;
  padding-top: .5rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-size: .9rem;
}
.ball-card-price small { font-weight: 400; color: #8a8a8a; }
.ball-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #8a8a8a;
  font-size: .9rem;
}

@media (max-width: 720px) {
  .ball-hero { flex-direction: column; gap: 1.1rem; }
  .ball-hero-media { flex: none; align-self: center; max-width: 220px; }
  .ball-title { font-size: 1.4rem; }
  .ball-index-layout { grid-template-columns: 1fr; }
  .ball-facets { position: static; }
}
