/* ==========================================================================
   Reviorum — pages/category.css  (category.html / taxonomy-category.php)
   Requires pages/listing.css. Hue comes from .rv-hue--* on the page wrapper.
   ========================================================================== */

/* ---------- Hero ---------- */
.rv-category-hero { background: var(--rv-cat-tint, var(--rv-lavender)); }
.rv-category-hero__art { position: absolute; right: -60px; top: -80px; width: 420px; height: 420px; }
.rv-category-hero__head { display: flex; align-items: center; gap: 18px; max-width: 760px; }
.rv-category-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 16px;
  background: var(--rv-cat-strong, var(--rv-accent));
  color: #fff;
}
.rv-category-hero .rv-listing-band__lead { color: var(--rv-ink-2); }
.rv-category-stats { display: flex; flex-wrap: wrap; gap: var(--rv-s-10); margin: 0; }
.rv-category-stats__item { display: flex; flex-direction: column-reverse; }
.rv-category-stats dt { color: var(--rv-muted); font-size: var(--rv-fs-sm); }
.rv-category-stats dd { margin: 0; display: flex; align-items: center; gap: var(--rv-s-2); font-size: 1.625rem; font-weight: 800; }
.rv-body .rv-category-hero .rv-chip:hover { border-color: var(--rv-cat-strong); color: var(--rv-cat-strong); }
.rv-category-hero .rv-chip small { color: var(--rv-muted); font-size: var(--rv-fs-xs); }

/* ---------- Sections ---------- */
.rv-category-section { display: flex; flex-direction: column; gap: 14px; }
.rv-category-section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--rv-s-3); flex-wrap: wrap; }
.rv-category-section__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.rv-category-main { gap: 28px; }

/* ---------- Podium (top 3) ---------- */
.rv-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--rv-s-4); margin: 0; padding: 0; list-style: none; }
.rv-podium__card { display: flex; flex-direction: column; gap: 14px; padding: var(--rv-s-5); overflow: hidden; }
.rv-podium__rank { position: absolute; right: 16px; top: 12px; color: #c9d7f8; font-size: 3.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.rv-podium__item:nth-child(2) .rv-podium__rank { color: #dce4f5; }
.rv-podium__item:nth-child(3) .rv-podium__rank { color: #e8edf7; }
.rv-podium__name { font-size: 1.0625rem; font-weight: 700; }
.rv-podium__quote { margin: 0; padding: 10px 12px; border-radius: var(--rv-r-md); background: #f6f8fc; color: var(--rv-ink-2); font-size: var(--rv-fs-sm); line-height: 1.5; }
.rv-category-note { display: flex; align-items: center; gap: var(--rv-s-2); }
.rv-category-note svg { flex: none; }

/* ---------- Sort links (server-side ?sort=) ---------- */
.rv-sort-links { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--rv-line); border-radius: var(--rv-r-md); background: var(--rv-surface); list-style: none; }
.rv-sort-links__link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--rv-r-sm);
  font-size: var(--rv-fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.rv-body .rv-sort-links__link { color: var(--rv-muted); }
.rv-body .rv-sort-links__link:hover { color: var(--rv-ink); }
.rv-body .rv-sort-links__link[aria-current="page"] { background: var(--rv-ink); color: #fff; }

/* ---------- Ranked rows ---------- */
.rv-ranked-list { display: flex; flex-direction: column; gap: var(--rv-s-3); margin: 0; padding: 0; list-style: none; }
.rv-category-row { align-items: center; gap: 18px; padding: 18px var(--rv-s-5); }
.rv-category-row > .rv-logo { width: 52px; height: 52px; font-size: 1.0625rem; border-radius: 12px; }
.rv-category-row .rv-result__side { width: 150px; }
.rv-category-row .rv-result__title { font-size: var(--rv-fs-base); }
.rv-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--rv-cat-tint, var(--rv-accent-soft));
  color: var(--rv-cat-strong, var(--rv-accent));
  font-size: var(--rv-fs-md);
  font-weight: 800;
}
.rv-rank-badge--none { background: var(--rv-surface); border: 1px dashed #b9c7e8; color: var(--rv-muted); }
.rv-category-more { align-self: center; margin-top: 6px; }

/* ---------- Buying guide ---------- */
.rv-guide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rv-s-4); margin: 0; padding: 0; list-style: none; }
.rv-guide__item { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.rv-guide__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rv-r-md);
  background: var(--rv-cat-tint);
  color: var(--rv-cat-strong);
  font-weight: 800;
}
.rv-guide__title { font-size: var(--rv-fs-base); font-weight: 700; }
.rv-guide__text { color: var(--rv-ink-2); font-size: var(--rv-fs-md); line-height: 1.55; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rv-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .rv-category-hero__art { width: 220px; height: 220px; right: -40px; top: -30px; opacity: 0.6; }
  .rv-category-stats { gap: var(--rv-s-5); }
  .rv-category-stats dd { font-size: 1.25rem; }
  .rv-guide { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .rv-category-hero__art { display: none; }
  .rv-category-hero__head { gap: var(--rv-s-3); }
  .rv-category-hero__icon { width: 52px; height: 52px; border-radius: 14px; }
  .rv-category-stats__item:nth-child(4) { display: none; }
  .rv-category-section__title { font-size: 1.25rem; }

  /* Podium becomes a horizontal scroller (mobile design) */
  .rv-podium {
    display: flex;
    gap: var(--rv-s-3);
    margin-inline: calc(var(--rv-gutter) * -1);
    padding: 0 var(--rv-gutter) 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .rv-podium::-webkit-scrollbar { display: none; }
  .rv-podium__item { flex: 0 0 78%; scroll-snap-align: start; display: flex; }
  .rv-podium__card { width: 100%; }

  .rv-category-section__head > nav { max-width: 100%; min-width: 0; }
  .rv-sort-links { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .rv-category-row { flex-wrap: nowrap; align-items: center; gap: var(--rv-s-3); padding: 14px; }
  .rv-category-row > .rv-logo { width: 40px; height: 40px; font-size: var(--rv-fs-md); border-radius: 10px; }
  .rv-category-row .rv-result__body { flex-basis: auto; }
  .rv-category-row .rv-result__desc,
  .rv-category-row .rv-result__tags,
  .rv-category-row .rv-result__side .rv-meta,
  .rv-category-row .rv-result__side .rv-stars { display: none; }
  .rv-category-row .rv-result__side { width: auto; padding-left: 0; }
  .rv-rank-badge { width: 26px; height: 26px; font-size: var(--rv-fs-sm); border-radius: 7px; }
}
