/* =========================================
   /installation/（商品一覧）専用CSS
   scope: .p2829-scope / .p2829-fixed-banner / .top-banner
   ✅ iPhoneの「img左に帯」＆「画像ズレ」対策込み（完全置き換え）
========================================= */

/* 上部バナー（使う場合） */
.top-banner {
  width: 100%;
  background: #0b1220;
}
.top-banner__img {
  margin: 0;
}
.top-banner__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ページ全体 */
.p2829-scope {
  background: #f8fafc;
  color: #0f172a;
  padding: 28px 0 84px; /* 下の固定バー分 */
}

/* 見出し */
.p2829-scope .lead {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 16px 10px;
}
.p2829-scope .section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
}
.p2829-scope .lead-desc {
  margin: 0;
  color: #475569;
  font-size: 14px;
}

/* 目次（横スクロール） */
.p2829-scope .index {
  max-width: 1120px;
  margin: 10px auto 10px;
  padding: 10px 16px 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.p2829-scope .index::-webkit-scrollbar {
  height: 8px;
}
.p2829-scope .index::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
}
.p2829-scope .index a {
  flex: 0 0 auto;
  scroll-snap-align: start;
  text-decoration: none;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.p2829-scope .index a:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.55);
}
.p2829-scope .index a.is-active {
  border-color: rgba(37, 99, 235, 0.9);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

/* 「右にスクロール」 */
.p2829-scope .scroll-hint {
  max-width: 1120px;
  margin: 0 auto 18px;
  padding: 0 16px;
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.p2829-scope .scroll-hint .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 6, 23, 0.06);
  padding: 6px 10px;
  border-radius: 999px;
}
.p2829-scope .scroll-hint.is-hidden {
  display: none;
}

/* セクション */
.p2829-scope section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px;
}
.p2829-scope section .section-title {
  font-size: 18px;
  font-weight: 900;
  margin: 0 0 14px;
  position: relative;
  padding-left: 12px;
}
.p2829-scope section .section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 4px;
  height: 1.1em;
  border-radius: 4px;
  background: #2563eb;
}

/* =================================================
   ✅ カードグリッド（統一）
================================================= */
.p2829-scope .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px) {
  .p2829-scope .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
/* ✅ SPも2列維持 */
@media (max-width: 640px) {
  .p2829-scope .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
/* 極小だけ1列 */
@media (max-width: 360px) {
  .p2829-scope .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* カード */
.p2829-scope .cardish {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
}

/* =================================================
   ✅ 画像ズレ＆左の帯（背景見え）対策の本体
   ・img枠の背景を白に → 帯が消える
   ・iOSでズレるので img を max-* で収める
================================================= */
.p2829-scope .imgish {
  margin: 0;
  background: #ffffff; /* ★ここ重要：帯の色を出さない */
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  height: 220px; /* PC基準 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* 最小限の余白 */
}

/* a で囲っててもズレないように */
.p2829-scope .imgish a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

/* ★width/height:100% で引き伸ばさない（iPhone対策） */
.p2829-scope .imgish img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0 !important;
  display: block;
}

/* SPは少し低く */
@media (max-width: 640px) {
  .p2829-scope .imgish {
    height: 180px;
    padding: 6px;
  }
}

/* 本文 */
.p2829-scope .meta {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.p2829-scope .meta p {
  margin: 0;
}

/* ✅ タイトル行数ズレ対策（VSCodeの“警告”が気になるなら clamp無しでもOK）
   ※ line-clamp は仕様上ベンダー扱いで「警告」になりがち。動作は正常。
*/
.p2829-scope .meta strong {
  font-size: 14px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(14px * 1.35 * 2);
}

/* 特徴リスト */
.p2829-scope .feat {
  margin: 0;
  padding: 0 0 0 18px;
  color: #334155;
  font-size: 13px;
}
.p2829-scope .feat li {
  margin: 2px 0;
}

/* 価格 */
.p2829-scope .price {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}
.p2829-scope .price .list {
  color: #64748b;
  font-size: 12px;
}
.p2829-scope .price-strong {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.p2829-scope .price-strong .amount {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.p2829-scope .price-strong .tax {
  font-size: 12px;
  color: #64748b;
}

/* CTA */
.p2829-scope .cta {
  margin-top: 2px;
}
.p2829-scope .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.p2829-scope .btn--primary {
  background: #06c755;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(6, 199, 85, 0.22);
}
.p2829-scope .btn--primary:hover {
  transform: translateY(-1px);
}

/* SPで文字詰め（2列対策） */
@media (max-width: 640px) {
  .p2829-scope .btn {
    padding: 11px 10px;
    font-size: 13px;
  }
  .p2829-scope .price-strong .amount {
    font-size: 18px;
  }
}

/* 下部固定バナー（このページ専用） */
.p2829-fixed-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}
.p2829-fixed-banner .inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.p2829-fixed-banner p {
  margin: 0;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.35;
}
.p2829-fixed-banner .btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #06c755;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(6, 199, 85, 0.28);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .p2829-fixed-banner .inner {
    grid-template-columns: 1fr;
  }
  .p2829-fixed-banner .btn-line {
    width: 100%;
  }
}

/* ✅ /installation/ だけ：共通の下固定LINEボタンを消す */
body.page-id-3692 .y2k-sp-line-btn,
body.page-id-2829 .y2k-sp-line-btn {
  display: none !important;
}
/* ==============================
   iPhone(Safari)だけ：画像の左右の帯を消す
   - iOS Safari 判定（ざっくり）
============================== */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 820px) {
    .p2829-scope .imgish {
      padding: 0; /* 背景が見える余白を消す */
      overflow: hidden; /* はみ出しカット */
      background: #fff; /* 帯が出ても白に寄せる */
    }

    .p2829-scope .imgish img {
      width: 112%;
      height: 112%;
      object-fit: cover; /* 帯ごと切る */
      object-position: 45% 50%; /* 少し左寄せ（必要なら 40%〜50%で調整） */
      display: block;
    }
  }
}
