/* ======================================================
   Fukuyama Shingai Tool LP - Scoped Styles
   ====================================================== */

.shingai-tool-lp {
  /* カラー変数 */
  --base: #0f172a;
  --muted: #4b5563;
  --accent: #2563eb;
  --accent-2: #16a34a;
  --bg: #f8fafc;
  --card: #ffffff;
  --danger: #ef4444;

  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--base);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP",
    "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

/* --- 基本要素 --- */
.shingai-tool-lp a {
  color: var(--accent);
  text-decoration: none;
}

.shingai-tool-lp img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.shingai-tool-lp .container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.shingai-tool-lp .grid {
  display: grid;
  gap: 20px;
}

.shingai-tool-lp .card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(2, 8, 23, 0.06);
  padding: 20px;
}

/* --- タイポグラフィ --- */
.shingai-tool-lp b,
.shingai-tool-lp strong {
  font-weight: 800;
}

.shingai-tool-lp h1,
.shingai-tool-lp h2,
.shingai-tool-lp h3 {
  font-weight: 900;
  letter-spacing: 0.01em;
  margin: 0.2em 0 0.5em;
}

.shingai-tool-lp .section h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.shingai-tool-lp .muted {
  color: var(--muted);
}

.shingai-tool-lp .nowrap {
  white-space: nowrap;
}

/* --- ボタンコンポーネント --- */
.shingai-tool-lp .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  font-weight: 900;
  color: #fff !important;
  text-decoration: none !important;
}

.shingai-tool-lp .btn-primary { background: #2563eb !important; }
.shingai-tool-lp .btn-primary:hover { background: #1e40af !important; }
.shingai-tool-lp .btn-secondary { background: #16a34a !important; }
.shingai-tool-lp .btn-secondary:hover { background: #15803d !important; }
.shingai-tool-lp .btn-ghost { background: #e5e7eb !important; color: var(--base) !important; }
.shingai-tool-lp .btn-ghost:hover { background: #d1d5db !important; }
.shingai-tool-lp .btn-sm { padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.shingai-tool-lp .btn-fluid { width: 100%; }

/* CTA共通の中央寄せ設定（インラインスタイル上書き用） */
.shingai-tool-lp .hero-actions,
.shingai-tool-lp .items-cta,
.shingai-tool-lp .flow-cta,
.shingai-tool-lp .access-cta,
.shingai-tool-lp .gallery-cta,
.shingai-tool-lp .shop-cta {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

/* ======================================================
   各セクション スタイル
   ====================================================== */

/* --- ヒーローエリア --- */
.shingai-tool-lp .hero {
  padding-top: 86px;
}

.shingai-tool-lp .hero-wrap {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.2fr 1fr;
}

.shingai-tool-lp .lead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  margin: 6px 0 0;
  max-width: 62ch;
}

.shingai-tool-lp .badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.shingai-tool-lp .pill {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #111827;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

.shingai-tool-lp .hero-actions {
  margin-top: 16px;
}

/* PC：ヒーロー画像を全幅に */
@media (min-width: 961px) {
  .shingai-tool-lp .hero .hero-wrap .hero-figure {
    grid-column: 1 / -1;
    margin-top: 18px;
  }
}

/* --- スティッキーバー (PC:トップ / スマホ:ボトム固定) --- */
.shingai-tool-lp .stickybar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid #e5e7eb;
}

.shingai-tool-lp .stickybar .inner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}

.shingai-tool-lp .sticky-title {
  font-weight: 900;
  font-size: 14px;
  max-width: 44vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shingai-tool-lp .sticky-actions {
  display: flex;
  gap: 8px;
}

/* --- 取扱一覧 (Items) --- */
.shingai-tool-lp #items .list {
  display: grid;
  gap: 14px;
}

.shingai-tool-lp #items .item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.shingai-tool-lp .items-cta .btn {
  min-width: 220px;
}

/* --- 買取の流れ (Flow) ステップデザイン --- */
.shingai-tool-lp .flow {
  counter-reset: step;
  padding-left: 24px;
  margin: 32px 0;
  position: relative;
}

.shingai-tool-lp .flow li {
  list-style: none;
  position: relative;
  background: #f8fafc;
  border-radius: 16px;
  margin: 0 0 32px 16px;
  padding: 20px 24px;
  border-left: none !important;
}

/* ステップを繋ぐ線 */
.shingai-tool-lp .flow li::after {
  content: "";
  position: absolute;
  left: -29px;
  top: 15px;
  bottom: -32px;
  width: 2px;
  background: var(--accent);
  opacity: 0.3;
  z-index: 1;
}

.shingai-tool-lp .flow li:last-child::after {
  display: none;
}

/* ステップ番号(円) */
.shingai-tool-lp .flow li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: -44px;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: 50%;
  font-weight: 900;
  font-size: 16px;
  z-index: 2;
  box-shadow: 0 0 0 6px #fff;
}

/* --- 店舗情報 / アクセス (Access) --- */
.shingai-tool-lp #access .store-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 18px;
}

.shingai-tool-lp #access .store-actions a.btn {
  flex: 1 1 260px;
  min-height: 64px;
  padding: 16px 18px;
}

/* --- ギャラリー / フォト (Store Gallery) --- */
.shingai-tool-lp .store-gallery {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.shingai-tool-lp .store-gallery__item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 20px rgba(2, 8, 23, 0.06);
}

.shingai-tool-lp .store-gallery__item img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

/* ======================================================
   レスポンシブ設定 (Mobile / Tablet)
   ====================================================== */

/* --- 共通タブレット/スマホ (960px以下) --- */
@media (max-width: 960px) {
  .shingai-tool-lp { padding-bottom: 92px; }
  
  .shingai-tool-lp .hero-wrap,
  .shingai-tool-lp .split { grid-template-columns: 1fr; }
  
  .shingai-tool-lp .hero { padding-top: 18px !important; }

  /* 下部固定ナビゲーション */
  .shingai-tool-lp .stickybar {
    position: fixed;
    top: auto;
    bottom: 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
  }
  .shingai-tool-lp .sticky-title { display: none !important; }
  .shingai-tool-lp .sticky-actions { width: 100%; }
  .shingai-tool-lp .sticky-actions a {
    flex: 1;
    font-size: 16px;
    padding: 14px 12px;
  }

  /* ヒーローアクション 2x2グリッド */
  .shingai-tool-lp .hero .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .shingai-tool-lp .hero .hero-actions .hero-btn { width: 100%; font-size: 16px; }
  .shingai-tool-lp .hero .hero-call { grid-column: 1; grid-row: 1; }
  .shingai-tool-lp .hero .hero-route { grid-column: 2; grid-row: 1; }
  .shingai-tool-lp .hero .hero-access { grid-column: 1; grid-row: 2; }
  .shingai-tool-lp .hero .hero-items { grid-column: 2; grid-row: 2; }

  /* CTAボタンのレスポンシブ */
  .shingai-tool-lp .items-cta .btn,
  .shingai-tool-lp .flow-cta .btn,
  .shingai-tool-lp .access-cta .btn {
    flex: 1 1 calc(50% - 10px);
    min-width: 0;
  }

  /* 店舗アクションを縦並びに */
  .shingai-tool-lp #access .store-actions { flex-direction: column; }
  .shingai-tool-lp #access .store-actions a.btn { width: 100%; min-height: 56px; }
  .shingai-tool-lp #access .store-actions .store-tel { order: 1; }
  .shingai-tool-lp #access .store-actions .store-map { order: 2; }

  .shingai-tool-lp .store-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* --- スマホ (640px以下) --- */
@media (max-width: 640px) {
  .shingai-tool-lp #items .list { grid-template-columns: 1fr; }
  .shingai-tool-lp .store-gallery { grid-template-columns: 1fr; }
  
  /* ステップデザインの調整 */
  .shingai-tool-lp .flow { padding-left: 16px; }
  .shingai-tool-lp .flow li { margin-left: 12px; padding: 16px 20px; }
  .shingai-tool-lp .flow li::before { left: -38px; width: 28px; height: 28px; font-size: 14px; }
  .shingai-tool-lp .flow li::after { left: -24px; }
}

/* --- 極小デバイス (360px以下) --- */
@media (max-width: 360px) {
  .shingai-tool-lp .hero .hero-actions .hero-btn { font-size: 14px; }
}

/* ======================================================
   外部ツール / プラグイン調整 (wppsac等)
   ====================================================== */
.shingai-tool-lp #tool-results .wppsac-post-content { display: none !important; }
.shingai-tool-lp #tool-results .wppsac-post-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-clamp: 2;          /* 標準プロパティを追加 */
  -webkit-line-clamp: 2;  /* 既存の互換プロパティ */
  overflow: hidden;
}
.shingai-tool-lp #tool-results img {
  width: 100% !important;
  height: 180px !important;
  object-fit: cover !important;
}