/* 楽天商品ランキングページ */
.rk {
  --rk-accent: #bf0000;
  --rk-ink: #1f2430;
  --rk-muted: #6b7280;
  --rk-line: #e5e7eb;
  --rk-bg: #f6f7f9;
  --rk-card: #ffffff;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  color: var(--rk-ink);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  letter-spacing: normal;
  line-height: 1.5;
}
.rk *, .rk *::before, .rk *::after { box-sizing: border-box; }
.rk a { text-decoration: none; color: inherit; }

/* ヒーロー */
.rk-hero {
  padding: 28px 28px 22px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #bf0000 0%, #e4572e 60%, #f2a154 100%);
  box-shadow: 0 10px 24px rgba(191, 0, 0, 0.18);
}
.rk-eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.18em; opacity: 0.9; }
.rk-hero h1 { margin: 0; font-size: 30px; line-height: 1.3; font-weight: 800; }
.rk-hero h1 span { font-size: 18px; font-weight: 600; margin-left: 4px; opacity: 0.95; }
.rk-crumb { margin-top: 12px; font-size: 13px; opacity: 0.95; }
.rk-crumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.rk-crumb span { margin: 0 6px; }

/* カテゴリの枠 */
.rk-frame {
  margin-top: 20px;
  padding: 16px 18px 18px;
  background: var(--rk-card);
  border: 1px solid var(--rk-line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.rk-frame h2 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; font-size: 15px; font-weight: 700;
}
.rk-frame h2 i { display: inline-block; width: 4px; height: 16px; border-radius: 2px; background: var(--rk-accent); }
.rk-frame--sub { background: #fffaf7; border-color: #f3d9cc; }
.rk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rk-chips a {
  display: inline-block; padding: 7px 14px; font-size: 13px;
  border: 1px solid var(--rk-line); border-radius: 999px; background: #fff; color: var(--rk-ink);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
}
.rk-chips a:hover { border-color: var(--rk-accent); color: var(--rk-accent); transform: translateY(-1px); }
.rk-chips a.is-active { background: var(--rk-accent); border-color: var(--rk-accent); color: #fff; font-weight: 700; }
.rk-chips--sub a { font-size: 12.5px; background: #fff; }

/* ランキングのカード */
.rk-grid {
  display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.rk-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--rk-card); border: 1px solid var(--rk-line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rk-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12); }
.rk-photo { display: block; aspect-ratio: 1 / 1; background: var(--rk-bg); overflow: hidden; }
.rk-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.rk-card:hover .rk-photo img { transform: scale(1.05); }
.rk-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.rk-name {
  font-size: 13px; line-height: 1.5; font-weight: 600; color: var(--rk-ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.5em;
}
.rk-name:hover { color: var(--rk-accent); }
.rk-price { margin: 2px 0 0; font-size: 21px; font-weight: 800; color: var(--rk-accent); letter-spacing: -0.01em; }
.rk-price small { font-size: 12px; font-weight: 600; margin-left: 2px; }
.rk-review { margin: 0; font-size: 12px; color: var(--rk-muted); display: flex; align-items: center; gap: 6px; }
.rk-review em { font-style: normal; }
.rk-star { --rate: 0%; position: relative; display: inline-block; width: 70px; height: 13px; }
.rk-star::before, .rk-star::after { content: "★★★★★"; position: absolute; left: 0; top: 0; font-size: 13px; line-height: 13px; letter-spacing: 1px; }
.rk-star::before { color: #d9dde3; }
.rk-star::after { color: #f5a623; width: var(--rate); overflow: hidden; white-space: nowrap; }
.rk-shop {
  margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--rk-line); font-size: 12px; color: var(--rk-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rk-shop:hover { color: var(--rk-accent); }

/* 順位バッジ */
.rk-badge {
  position: absolute; z-index: 2; top: 10px; left: 10px; min-width: 46px; padding: 6px 10px;
  display: inline-flex; align-items: baseline; justify-content: center; gap: 1px;
  border-radius: 999px; font-size: 18px; font-weight: 800; line-height: 1; color: #fff;
  background: rgba(31, 36, 48, 0.82); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.rk-badge small { font-size: 10px; font-weight: 600; opacity: 0.9; }
.rk-card--1 .rk-badge { background: linear-gradient(135deg, #f7d154, #d99a00); font-size: 22px; }
.rk-card--2 .rk-badge { background: linear-gradient(135deg, #cfd6df, #8d98a6); font-size: 20px; }
.rk-card--3 .rk-badge { background: linear-gradient(135deg, #e0a06c, #a5622c); font-size: 20px; }
.rk-card--1 { border-color: #f0cf6b; box-shadow: 0 6px 18px rgba(217, 154, 0, 0.18); }
.rk-card--2 { border-color: #cbd2db; }
.rk-card--3 { border-color: #e6bd9a; }

.rk-empty {
  margin-top: 28px; padding: 40px 16px; text-align: center; color: var(--rk-muted);
  background: var(--rk-card); border: 1px dashed var(--rk-line); border-radius: 14px;
}

@media (max-width: 560px) {
  .rk { padding: 16px 12px 40px; }
  .rk-hero { padding: 20px 18px 16px; }
  .rk-hero h1 { font-size: 24px; }
  .rk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rk-price { font-size: 18px; }
}
