/* ==================================================
   ホームページビルダー23　CSS
   ================================================== */

/* --- 1. 製品表 (product-table) --- */
.product-table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5em;
  background: transparent;
}
.product-table th, .product-table td {
  border-bottom: 1px solid #ccc;
  padding: 0.5em;
  text-align: left;
  vertical-align: top;
}
.product-table tfoot td {
  font-weight: bold;
  background-color: #f9f9f9;
  border-top: 1px solid #999;
}
.product-table a { color: #0077cc; text-decoration: none; }
.product-table a:hover { text-decoration: underline; }

/* --- 2. サイト接続共通 (product-td系) --- */
.product-td { padding: 20px; background: #fafafa; }
.product-logo { text-align: left; margin-bottom: 16px; }
.product-logo img { max-width: 160px; height: auto; border-radius: 8px; }

/* 3カラムグリッド */
.product-grid {
  display: block; display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.product-cell {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 10px;
}
.product-cell a { text-decoration: none; font-weight: 600; color: #111827; display: block; }
.product-cell a:hover { color: #2563eb; background: #eef2f6; }
.product-cell small { display: block; margin-top: 4px; font-size: 13px; color: #6b7280; }

/* --- 3. 製品リスト & 長さ別ボタン (今回追加分) --- */
.product-list {
  display: block; /* ビルダー用 */
  display: flex;  /* ブラウザ用 */
  flex-direction: column;
  gap: 20px;
}
.product-item {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.05);
  margin-bottom: 15px; /* ビルダー対策 */
}
.product-item h4 { margin: 0 0 10px 0; font-size: 16px; font-weight: bold; color: #111827; }

.product-links {
  display: block; /* ビルダー用 */
  display: flex;  /* ブラウザ用 */
  flex-wrap: wrap;
  gap: 10px;
}
.product-links a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  margin: 2px; /* ビルダーでの重なり防止 */
}
.product-links a:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eef2f6;
  transform: translateY(-1px);
}

/* --- 4. ランキングカード --- */
.card {
  border: 1px solid #e6e6ea; border-radius: 14px; background: #fff;
  overflow: hidden; max-width: 980px; width: 94%; margin: 0 auto 24px;
}
.card-head {
  display: block; display: flex; align-items: center; gap: 12px; padding: 16px 20px;
  background: #fbfbfd; border-bottom: 1px solid #e6e6ea;
}
.card-body { padding: 20px; line-height: 1.85; color: #1a1a1f; }
.rank-badge {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; color: #fff; background: #2b6cb0;
}
.rank-1 { background-color: #d4a62a !important; color: #1a1a1f !important; }
.rank-2 { background-color: #9aa3ad !important; color: #1a1a1f !important; }
.rank-3 { background-color: #b07a48 !important; color: #ffffff !important; }

.img-wrap img {
  display: block; margin: 0 auto;
  width: 680px; max-width: 100% !important; height: auto !important;
  border-radius: 10px;
}

/* --- 5. レスポンシブ --- */
@media (max-width: 720px) { .product-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .card { width: 92%; }
  .card-head { padding: 12px 15px; }
  .card-body { padding: 15px; }
  .rank-badge { width: 36px; height: 36px; font-size: 16px; }
}