/* ============================================================
 * 人気の中古パソコン  スタイル
 * クラス名はすべて habis-pc- 接頭辞。既存テーマと干渉しにくい設計。
 * 色や角丸はサイトのデザインに合わせて自由に調整してください。
 * ============================================================ */

#habis-pc {
  --hpc-accent: #06c755;        /* LINEグリーン。サイトに合わせて変更可 */
  --hpc-price: #d0021b;         /* 価格の赤 */
  --hpc-border: #e3e6ea;
  --hpc-text: #333;
  --hpc-sub: #777;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--hpc-text);
  font-family: inherit;
}

/* ---- タブ ---- */
.habis-pc-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.habis-pc-tab {
  flex: 1 1 0;
  min-width: 140px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: #f3f5f7;
  color: var(--hpc-sub);
  border: 1px solid var(--hpc-border);
  border-radius: 8px;
  transition: .15s;
}
.habis-pc-tab.is-active {
  background: var(--hpc-accent);
  color: #fff;
  border-color: var(--hpc-accent);
}

/* ---- グリッド ---- */
.habis-pc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .habis-pc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .habis-pc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .habis-pc-grid { grid-template-columns: 1fr; } }

/* ---- カード ---- */
.habis-pc-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hpc-border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: box-shadow .15s, transform .15s;
}
.habis-pc-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

.habis-pc-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f7f8fa;
}
.habis-pc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.habis-pc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #444;
  border-radius: 4px;
}
.habis-pc-badge.is-both { background: var(--hpc-accent); }

.habis-pc-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.habis-pc-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.habis-pc-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--hpc-sub);
  line-height: 1.6;
}
.habis-pc-specs li::before { content: "・"; }

.habis-pc-price {
  margin: auto 0 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.habis-pc-listprice {
  font-size: 12px;
  color: var(--hpc-sub);
  text-decoration: line-through;
}
.habis-pc-nowprice {
  font-size: 22px;
  font-weight: 800;
  color: var(--hpc-price);
}
.habis-pc-tax { font-size: 11px; color: var(--hpc-sub); }

.habis-pc-cta {
  margin-top: 4px;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--hpc-accent);
  border-radius: 6px;
}

/* ---- 状態表示 ---- */
.habis-pc-empty,
.habis-pc-error {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--hpc-sub);
  padding: 32px 0;
}
