@charset "utf-8";

/* =========================================================
  TOPカテゴリ（商品カテゴリセクション）
  ・外枠は import.css（LC_Page_Index #main_category_area）のカードを利用
  ・全項目に常に下線（幅に依存せず安定表示）
  ・サイズ単位は px に統一
========================================================= */

/* カラー変数（必要ならここだけ変更） */
:root{
  --topcat-accent:  #007a8b; /* 項目の点線色 */
  --topcat-heading: #f2f2f2; /* 見出しの下線色 */
}

/* 2カラム親：左=住宅設備 / 右=創エネ */
.raku2_theme01 .topcat-row{
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.5fr);
  gap: 20px;
  margin: 10px 0 30px;
}

/* セクション見出し（商品カテゴリ CATEGORY）の下線 */
.raku2_theme01 #main_category_area.topcat-section > h2{
  padding: 6px 10px 12px;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--topcat-heading);
}

/* 中のカード（左右の白い箱） */
.raku2_theme01 .topcat-card{
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,.12);
  padding: 14px 18px;
}

/* 小見出し（住宅設備／創エネ） */
.raku2_theme01 .topcat-subtitle{
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #1d1d1d;
  border-bottom: 1px solid var(--topcat-heading);
  padding-bottom: 6px;
}

/* グリッド（左3列／右1列） */
.raku2_theme01 .topcat-card.-facilities .topcat-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 24px;
}
.raku2_theme01 .topcat-card.-energy .topcat-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* 項目（画像＋テキスト）— “下線” で区切る（常に表示） */
.raku2_theme01 a.topcat-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 6px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px dotted var(--topcat-accent);
  transition: opacity .15s ease-in-out;
}
.raku2_theme01 a.topcat-item:hover{ opacity: .85; }

/* サムネイル・ラベル */
.raku2_theme01 .topcat-thumb{
  width: 78px;
  height: 78px;
  object-fit: contain;
}
.raku2_theme01 .topcat-label{
  font-size: 16px;
  letter-spacing: 0.3px;
}

/* 旧カテゴリULは非表示（見出しだけ活かす） */
#main_column .raku2_theme01 #main_category_area > ul{ display: none; }

/* レスポンシブ */
@media (max-width:1150px){
  .raku2_theme01 .topcat-row{ grid-template-columns: 1fr; }
}
@media (max-width:980px){
  .raku2_theme01 .topcat-card.-facilities .topcat-grid{ grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
  強制適用（テーマ側の汎用スタイルに勝つ）— 最後に置く
========================================================= */
.raku2_theme01 #main_category_area .topcat-card .topcat-grid{
  display: grid !important;
}
.raku2_theme01 #main_category_area .topcat-card.-facilities .topcat-grid{
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0 24px !important;
}
.raku2_theme01 #main_category_area .topcat-card.-energy .topcat-grid{
  grid-template-columns: 1fr !important;
  gap: 0 !important;
}
.raku2_theme01 #main_category_area .topcat-card .topcat-grid > a.topcat-item{
  display: flex !important;
  align-items: center !important;
  padding: 14px 6px !important;
  border-bottom: 1px dotted var(--topcat-accent) !important;
}
.raku2_theme01 #main_category_area .topcat-thumb{
  display: block !important;
  width: 78px !important;
  height: 78px !important;
  object-fit: contain !important;
}

/* ▼ 末尾の線を消す処理は入れない（常に全項目に線を出す） */

/* --- 最下段の点線だけを隠す（列数や件数に依存しない） --- */
.raku2_theme01 #main_category_area .topcat-card .topcat-grid{
  position: relative; /* 擬似要素の基準にする */
}
.raku2_theme01 #main_category_area .topcat-card .topcat-grid::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;              /* 点線と同じ太さ */
  background: #fff;         /* カードの背景色に合わせる（白） */
  pointer-events: none;
  z-index: 1;               /* 点線の上にかぶせる */
}

