/* css/mw-reviews.css — /reviews "wall of reviews" page. (MW custom)
 *
 * Ports concept "D" from the approved reviews-page-concepts mockup 1:1, using
 * the storefront's existing theme tokens (css/mw.css :root — always loaded via
 * inc-mw-head.php, so this file does not redefine them) and an `.rw-` prefix
 * so nothing here collides with mw.css.
 *
 * [hidden] rule scoped to `.rw [hidden]`: a class setting `display` elsewhere
 * on the page would defeat the bare [hidden] attribute (see mw.js's own
 * gotcha notes) — scoping the override here keeps it local to this page.
 */

.rw [hidden] { display: none !important; }

/* ---------- head ---------- */
.rw-head { padding-top: 54px; padding-bottom: 30px; }   /* top/bottom only — .wrap owns the side gutters */
.rw-eyebrow {
  font: 500 .7rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--rubric);
  display: inline-flex;
  gap: .55em;
  align-items: center;
}
.rw-eyebrow::before { content: "\00A7"; }
.rw-h1 {
  font: 500 clamp(2.2rem, 4vw, 3.2rem)/1.05 Fraunces, Georgia, serif;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 10px 0 10px;
}
.rw-lede { max-width: 58ch; color: var(--muted); margin: 0; }

/* ---------- summary band ---------- */
.rw-sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rw-score { flex: 0 0 auto; }
.rw-big {
  font: 500 4.2rem/1 Fraunces, Georgia, serif;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.rw-big small {
  font: 400 .95rem/1 Inter, system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 8px;
}
.rw-cap { color: var(--muted); font-size: .86rem; margin-top: 8px; }

.rw-bars { display: grid; gap: 7px; flex: 1 1 260px; min-width: 220px; }
.rw-bars .bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: .76rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rw-bars .bar i { display: block; height: 8px; background: rgba(23, 20, 14, .08); border-radius: 999px; overflow: hidden; }
.rw-bars .bar i b { display: block; height: 100%; background: #C9A24B; }
.rw-bars .bar .n { min-width: 2.4em; text-align: right; }
.rw-bars .bar .s { font-style: normal; color: var(--ink); }

/* Clickable star rows (summary band) — only when the star filter is enabled. */
.rw-bars .bar.is-link {
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 3px 6px;
  margin: -3px -6px;
  transition: background .15s;
}
.rw-bars .bar.is-link:hover { background: rgba(23, 20, 14, .05); }
.rw-bars .bar.is-link:focus-visible { outline: 2px solid var(--rubric); outline-offset: 1px; }
.rw-bars .bar.on { background: rgba(23, 20, 14, .06); }
.rw-bars .bar.on .s, .rw-bars .bar.on .n { color: var(--ink); font-weight: 600; }
.rw-star-clear {
  justify-self: start;
  margin-top: 2px;
  font: 500 .7rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rubric);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.rw-snaps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; flex: 0 0 220px; max-width: 220px; }
.rw-snap {
  aspect-ratio: 1;
  border-radius: 3px;
  overflow: hidden;
  display: block;
  background: var(--panel);
}
.rw-snap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rw-snap.plus {
  display: grid;
  place-items: center;
  background: var(--paper-2);
  color: var(--ink);
  font: 500 .9rem/1 Fraunces, Georgia, serif;
}

.rw-cta { flex: 0 0 auto; margin-left: auto; }

/* ---------- card grid ---------- */
.rw-grid { columns: var(--rw-cols, 3); column-gap: 18px; padding: 26px 0 10px; }
.rw-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 22px 18px;
  overflow: hidden;   /* belt-and-braces: nothing inside a card may widen the wall */
}
/* Inner flex wrapper for the card's own children, kept separate from the
 * `inline-block` .rw-card itself — CSS multi-column + a flex container can
 * misbehave (mid-column splits) in Safari; this pairing avoided it in
 * testing. See the build report for the verification note. */
.rw-card > * + * { margin-top: 10px; }
/* Extra air under the star row — the review text needs to breathe away from it. */
.rw-card .rw-top + * { margin-top: 16px; }
.rw-card .rw-title + .rw-body { margin-top: 6px; }

.rw-photo { display: block; position: relative; aspect-ratio: 4/3; border-radius: 3px; overflow: hidden; }
.rw-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rw-photo-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  font: 500 .6rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(244, 241, 233, .85);
  background: linear-gradient(to top, rgba(0, 0, 0, .45), transparent);
}

.rw-top { display: flex; justify-content: space-between; align-items: center; }

.rw-stars { color: #C9A24B; letter-spacing: 2px; font-size: .9rem; line-height: 1; white-space: nowrap; }
.rw-stars .off { color: rgba(23, 20, 14, .18); }
.rw-stars-lg { font-size: 1.35rem; letter-spacing: 3px; }

.rw-ver {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 .64rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2F6B3A;
}
.rw-ver::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2F6B3A;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.4 2.2 3.2-.4 1 3.1 2.8 1.6-1.2 3 1.2 3-2.8 1.6-1 3.1-3.2-.4L12 22l-2.4-2.2-3.2.4-1-3.1-2.8-1.6 1.2-3-1.2-3 2.8-1.6 1-3.1 3.2.4z' fill='%23000'/%3E%3Cpath d='M8.5 12.2l2.3 2.3 4.7-4.9' stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.4 2.2 3.2-.4 1 3.1 2.8 1.6-1.2 3 1.2 3-2.8 1.6-1 3.1-3.2-.4L12 22l-2.4-2.2-3.2.4-1-3.1-2.8-1.6 1.2-3-1.2-3 2.8-1.6 1-3.1 3.2.4z' fill='%23000'/%3E%3Cpath d='M8.5 12.2l2.3 2.3 4.7-4.9' stroke='%23fff' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.rw-title { font: 500 1.08rem/1.3 Fraunces, Georgia, serif; margin: 0; }
.rw-body { font-size: .92rem; color: var(--ink-soft); margin: 0; overflow-wrap: anywhere; }
.rw-who { font: 600 .82rem/1 Inter, system-ui, sans-serif; color: var(--ink); }
.rw-who small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.rw-date { font-weight: 400; color: var(--muted); margin-left: 6px; font-size: .78rem; }

.rw-prod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.rw-prod-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; text-decoration: none; }
.rw-th {
  width: 38px;
  height: 38px;
  border-radius: 3px;
  background: var(--panel);
  flex: none;
  overflow: hidden;
  display: block;
}
.rw-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Wraps to at most two lines. It must NOT be `white-space: nowrap`: inside a
 * CSS-columns card a nowrap product name sets a huge min-content width, which
 * pushed the whole wall wider than the viewport on phones. */
.rw-nm {
  font-size: .8rem;
  color: var(--ink);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rw-go {
  margin-left: auto;
  flex: none;
  font: 500 .66rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rubric);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
}

.rw-reply {
  padding: 12px 16px;
  background: rgba(23, 20, 14, .045);
  border-left: 3px solid var(--muted);
  font-size: .88rem;
}
.rw-reply b {
  display: block;
  font: 500 .66rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}

/* ---------- filter bar ---------- */
/* Sticks under the site header while the wall scrolls, so the active filter is
 * always visible and switchable without scrolling back up. */
.rw-filters {
  position: sticky;
  /* Clears the site header, which is itself sticky at top:0 (css/mw.css .head:
   * 72px tall, 56px below 1024). z-index stays under the header's 40. */
  top: 72px;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.rw-filters-in {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rw-filters-in::-webkit-scrollbar { display: none; }
.rw-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex: none;
  font: 500 .78rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .02em;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.rw-pill:hover { border-color: var(--ink); }
.rw-pill.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rw-pill-n { font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rw-pill.on .rw-pill-n { color: rgba(244, 241, 233, .65); }
.rw-pill:focus-visible { outline: 2px solid var(--rubric); outline-offset: 2px; }

.rw-grid[aria-busy="true"] { opacity: .45; transition: opacity .15s; }
.rw-empty { text-align: center; color: var(--muted); padding: 40px 0 10px; }

/* ---------- more / end ---------- */
.rw-more, .rw-end { text-align: center; padding: 44px 0 70px; }
.rw-end-line {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: .8rem;
}
.rw-hr { width: 60px; height: 1px; background: var(--line); }
.rw-end-ctas { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.rw-end-note { display: block; margin-top: 10px; color: var(--muted); font-size: .78rem; }

.rw-btn {
  display: inline-block;
  font: 500 .76rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 13px 24px;
  border: 1px solid var(--ink);
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}
.rw-btn-solid { background: var(--ink); color: var(--paper); }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .rw-filters { top: 56px; }
}
@media (max-width: 1000px) {
  .rw-grid { columns: min(2, var(--rw-cols, 3)); }
}
@media (max-width: 640px) {
  .rw-grid { columns: 1; }
  .rw-filters-in { gap: 6px; }
  .rw-sum { flex-direction: column; align-items: flex-start; }
  .rw-big { font-size: 3.2rem; }
  .rw-bars, .rw-snaps { width: 100%; }
  .rw-cta { margin-left: 0; }
}
