/* SoftBank Affiliate - 比較テーブル・カードスタイル */

/* ===== ラッパー ===== */
.sb-table-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

/* ===== 契約種別タブ ===== */
.sb-contract-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 2px solid #007aff;
}

.sb-tab-btn {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-bottom: none;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  font-size: 14px;
  transition: background 0.15s;
}

.sb-tab-btn:hover {
  background: #e0edff;
}

.sb-tab-btn.is-active {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
  font-weight: bold;
}

/* ===== 支払い回数セレクター ===== */
.sb-payment-selector {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-payment-select {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* ===== テーブルスクロール ===== */
.sb-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== 価格比較テーブル ===== */
.sb-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 640px;
}

.sb-price-table thead {
  background: #f0f4ff;
}

.sb-price-table th,
.sb-price-table td {
  padding: 10px 12px;
  border: 1px solid #dde3ea;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.sb-price-table th {
  font-weight: bold;
  color: #444;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sb-price-table tbody tr:nth-child(even) {
  background: #f9fbff;
}

.sb-price-table tbody tr:hover {
  background: #e8f0fe;
}

/* ===== カラム幅 ===== */
.sb-col-rank    { width: 48px; text-align: center; }
.sb-col-product { min-width: 160px; white-space: normal; }
.sb-col-spec    { min-width: 110px; white-space: normal; }
.sb-col-net     { min-width: 110px; text-align: right; }
.sb-col-monthly { min-width: 90px;  text-align: right; }
.sb-col-total   { min-width: 90px;  text-align: right; }
.sb-col-discount { min-width: 110px; text-align: right; }
.sb-col-link    { min-width: 90px;  text-align: center; }

/* ===== サムネイル ===== */
.sb-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
  border-radius: 4px;
}

.sb-product-name {
  display: block;
  font-weight: bold;
}

.sb-maker {
  display: block;
  color: #888;
  font-size: 11px;
}

/* ===== 価格強調 ===== */
.sb-price-highlight strong {
  font-size: 17px;
  color: #e63900;
}

/* ===== 割引バッジ ===== */
.sb-discount-badge {
  display: inline-block;
  background: #e63900;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
}

/* ===== 購入ボタン ===== */
.sb-buy-btn {
  display: inline-block;
  padding: 6px 14px;
  background: #007aff;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.15s;
  white-space: nowrap;
}

.sb-buy-btn:hover {
  background: #005ec4;
}

/* ===== 注記 ===== */
.sb-disclaimer {
  font-size: 11px;
  color: #888;
  margin-top: 8px;
}

.sb-no-data {
  padding: 20px;
  text-align: center;
  color: #888;
  border: 1px solid #eee;
  border-radius: 4px;
}

/* ===== インライン価格 ([sb_price]) ===== */
.sb-price-inline {
  display: inline;
}

.sb-price-link {
  color: #007aff;
  text-decoration: underline;
}

.sb-price-meta {
  color: #888;
  font-size: 0.9em;
  margin: 0 4px;
}

.sb-price-value strong {
  color: #e63900;
  font-size: 1.1em;
}

.sb-price-discount {
  color: #e63900;
  font-size: 0.9em;
}

.sb-price-unavailable {
  color: #888;
}

/* ===== レスポンシブ ===== */
@media (max-width: 600px) {
  .sb-contract-tabs {
    flex-wrap: wrap;
  }
  .sb-tab-btn {
    flex: 1 1 auto;
    font-size: 12px;
    padding: 6px 8px;
  }
  .sb-price-table {
    font-size: 12px;
  }
  .sb-price-table th,
  .sb-price-table td {
    padding: 7px 8px;
  }
}
