/* ReviewWall styles — scoped to `.rw-root` so they don't bleed into the host page.
   Visual design lifted verbatim from review-wall (2).html prototype. */

@font-face {
  font-family: "HK Nova";
  src: url("../fonts/HKNova-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "HK Nova";
  src: url("../fonts/HKNova-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Avenir";
  src: url("../fonts/avenirltstd-book.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.rw-root {
  --bg:        #000;
  --bg-2:      #0A0A0B;
  --surface:   #111114;
  --surface-2: #18181E;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);
  --text:      #ECECEE;
  --text-2:    #A8A8AE;
  --text-3:    #6E6E76;
  --gold:      #D4A574;
  --gold-soft: rgba(212,165,116,0.12);
  --pill-track:rgba(255,255,255,0.06);
  --radius:    20px;
  --radius-sm: 12px;
  --display:   "HK Nova", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --sans:      "HK Nova", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --review:    "Avenir", "Helvetica Neue", system-ui, sans-serif;

  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

.rw-root *,
.rw-root *::before,
.rw-root *::after { box-sizing: border-box; }

.rw-root .section {
  position: relative;
  padding: 48px 24px 80px;
  overflow: hidden;
}
.rw-root .section::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 50% 0%, rgba(212,165,116,0.08), transparent 70%),
    radial-gradient(80% 60% at 50% 120%, rgba(255,255,255,0.025), transparent 70%);
  pointer-events: none;
}

.rw-root .container {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
}

.rw-root .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
  padding: 6px 12px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: var(--gold-soft);
}
.rw-root .eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.rw-root h1.headline {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
  max-width: 620px;
}
.rw-root h1.headline em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}
.rw-root .rw-mobile-br { display: none; }
@media (max-width: 720px) { .rw-root .rw-mobile-br { display: block; } }
.rw-root .subhead {
  color: var(--text-2);
  font-size: 15px;
  max-width: 560px;
  margin-bottom: 0;
}

/* Hero row: eyebrow + h1 + subhead on the left, rating summary on the right.
   Stacks under 900px. */
.rw-root .hero-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  padding: 16px 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.rw-root .hero-text { min-width: 0; }
@media (max-width: 900px) {
  .rw-root .hero-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 8px 0 24px;
  }
}

.rw-root .pill-bar-wrap {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 36px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rw-root .pill-bar-wrap::-webkit-scrollbar { display: none; }

.rw-root .pill-bar {
  display: inline-flex;
  background: var(--pill-track);
  border-radius: 999px;
  padding: 4px;
  gap: 0;
  border: 1px solid var(--line);
}
.rw-root .pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, transform .15s ease;
}
.rw-root .pill .count {
  color: var(--text-3);
  font-size: 12px;
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
}
.rw-root .pill:hover { color: var(--text); }
.rw-root .pill[aria-pressed="true"] {
  background: #FAFAFA;
  color: #0A0A0B;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.rw-root .pill[aria-pressed="true"] .count { color: rgba(10,10,11,0.5); }

.rw-root .wall {
  columns: 4 320px;
  column-gap: 18px;
}
@media (max-width: 720px) {
  .rw-root .wall { columns: 1; }
  .rw-root .section { padding: 64px 16px 80px; }
  /* Persona filter — wrap onto multiple rows so every pill is reachable
     without needing to horizontally scroll a hidden track. The single-row
     capsule shape gives way to a soft rounded rectangle that hugs all
     pills regardless of how many there are. */
  .rw-root .pill-bar-wrap {
    overflow-x: visible;
    justify-content: center;
    margin-bottom: 24px;
  }
  .rw-root .pill-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 6px;
    border-radius: 18px;
    max-width: 100%;
  }
  .rw-root .pill {
    padding: 8px 14px;
    font-size: 13px;
    flex: 0 0 auto;
  }
}

/* Widen the container on desktop so the wall can actually fit 4 columns
   (4 × 320 + 3 × 18 = 1334px). Below this breakpoint the column rule falls
   back to 3 columns automatically thanks to the 320px column-width hint. */
@media (min-width: 1400px) {
  .rw-root .container { max-width: 1400px; }
}

.rw-root .card {
  break-inside: avoid;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 18px;
  overflow: hidden;
  display: block;
  transition: opacity .35s ease, transform .35s ease, border-color .25s ease;
  will-change: opacity, transform;
}
.rw-root .card:hover { border-color: var(--line-2); }

.rw-root .card-pad { padding: 22px 22px 20px; }

.rw-root .card-stars {
  display: flex; gap: 2px; margin-bottom: 14px;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 1px;
}

.rw-root .card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--text);
}

.rw-root .card-content {
  font-family: var(--review);
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 18px;
  white-space: pre-wrap;
}
.rw-root .card-content.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* When a Read more toggle follows the body, tighten the gap between them. */
.rw-root .card-content.has-toggle { margin-bottom: 6px; }
.rw-root .content-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
}
.rw-root .content-toggle:hover { color: var(--text); text-decoration: underline; }

.rw-root .card-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.rw-root .reviewer {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.rw-root .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a2a31, #1a1a1f);
  color: var(--text);
  font-size: 12px; font-weight: 600;
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line-2);
}
.rw-root .reviewer-meta { min-width: 0; flex: 1; }
.rw-root .reviewer-name {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rw-root .reviewer-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}
.rw-root .reviewer-sep {
  color: var(--text-3);
  font-size: 11px;
  line-height: 1;
}
.rw-root .verified {
  font-size: 11px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 4px;
}
.rw-root .verified::before {
  content: ""; width: 11px; height: 11px;
  background: var(--gold);
  border-radius: 50%;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 6.2l2.1 2.1L9.2 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 6.2l2.1 2.1L9.2 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
.rw-root .reviewer-date {
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

/* Response from UBlockout — surfaced under sub-5★ reviews. */
.rw-root .response {
  margin: 4px 0 18px;
  padding: 12px 14px;
  background: rgba(212, 165, 116, 0.06);
  border: 1px solid rgba(212, 165, 116, 0.18);
  border-radius: var(--radius-sm);
}
.rw-root .response-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.rw-root .response-body {
  font-family: var(--review);
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.5;
  white-space: pre-wrap;
}
.rw-root .response-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 0 0;
  margin: 0;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
}
.rw-root .response-toggle:hover { text-decoration: underline; }

.rw-root .video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  overflow: hidden;
  cursor: pointer;
}
.rw-root .video-wrap video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rw-root .video-wrap .play-overlay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.55) 100%);
  transition: opacity .25s ease;
  pointer-events: none;
}
.rw-root .video-wrap.is-playing .play-overlay { opacity: 0; }
.rw-root .play-btn {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: #0A0A0B;
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
  transition: transform .2s ease;
}
.rw-root .video-wrap:hover .play-btn { transform: scale(1.06); }
.rw-root .play-btn::before {
  content: "";
  width: 0; height: 0;
  border-left: 14px solid #0A0A0B;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}
.rw-root .video-caption {
  position: absolute;
  left: 14px; right: 14px; bottom: 14px;
  color: #fff;
  z-index: 1;
}
.rw-root .video-caption .vc-stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; margin-bottom: 6px; }
.rw-root .video-caption .vc-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.rw-root .video-card .card-pad { padding: 16px 18px 16px; }

/* Image-only review card (P2 of the brief — render Yotpo Published Image URLs) */
.rw-root .image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  overflow: hidden;
}
.rw-root .image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.rw-root .image-card .card-pad { padding: 18px 20px 18px; }

.rw-root .wall-foot {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.rw-root .wall-foot .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }

@keyframes rwFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rw-root .card.is-revealing { animation: rwFadeUp .42s ease both; }

.rw-root .pagination {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rw-root .pagination button {
  appearance: none;
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  min-width: 40px;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .1s ease;
}
.rw-root .pagination button:hover:not(:disabled):not([aria-current="page"]) {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.rw-root .pagination button:active:not(:disabled) { transform: scale(0.97); }
.rw-root .pagination button[aria-current="page"] {
  background: #FAFAFA;
  color: #0A0A0B;
  border-color: #FAFAFA;
  cursor: default;
}
.rw-root .pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.rw-root .pagination .pg-arrow { padding: 9px 16px; }
.rw-root .pagination .pg-arrow .label { display: inline; }
.rw-root .pagination .pg-ellipsis {
  color: var(--text-3);
  padding: 0 4px;
  user-select: none;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .rw-root .pagination .pg-arrow .label { display: none; }
  .rw-root .pagination button { padding: 9px 12px; min-width: 38px; }
}

.rw-root .rating-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 280px);
  justify-content: start;
  gap: 24px;
  align-items: center;
}
@media (max-width: 720px) {
  .rw-root .rating-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
.rw-root .rs-summary-left { display: flex; align-items: center; gap: 24px; }
.rw-root .rs-avg {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rw-root .rs-meta { display: flex; flex-direction: column; gap: 6px; }
.rw-root .rs-stars-big { color: var(--gold); font-size: 22px; letter-spacing: 3px; }
.rw-root .rs-based-on { color: var(--text-2); font-size: 14.5px; }
.rw-root .rs-based-on strong { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

.rw-root .rs-histogram { display: grid; gap: 0; }

/* Each row is a real <button>: clicking filters the wall to that score. */
.rw-root .rs-row {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr 48px;
  align-items: center;
  gap: 12px;
  padding: 3px 10px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, border-color .18s ease;
}
.rw-root .rs-row:hover:not(:disabled) {
  background: rgba(212, 165, 116, 0.06);
  border-color: rgba(212, 165, 116, 0.18);
}
.rw-root .rs-row[aria-pressed="true"] {
  background: rgba(212, 165, 116, 0.10);
  border-color: rgba(212, 165, 116, 0.45);
  color: var(--text);
}
.rw-root .rs-row:disabled {
  cursor: default;
  opacity: 0.4;
}
.rw-root .rs-row .rs-label { display: flex; align-items: center; gap: 4px; color: inherit; }
.rw-root .rs-row .rs-label .rs-star { color: var(--gold); font-size: 12px; }
.rw-root .rs-bar-track {
  display: block;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.rw-root .rs-bar-fill {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: 999px;
  transition: width .6s cubic-bezier(0.16, 1, 0.3, 1), opacity .25s ease;
}
.rw-root .rs-row .rs-count { text-align: right; color: inherit; font-weight: 500; }

.rw-root .toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.rw-root .toolbar .pill-bar-wrap { margin: 0; }

.rw-root .sort-wrap { position: relative; }
.rw-root .sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.rw-root .sort-trigger:hover { background: var(--surface); border-color: var(--line-2); }
.rw-root .sort-trigger .sort-prefix { color: var(--text-2); font-weight: 400; }
.rw-root .sort-trigger .sort-chevron {
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--text-2);
  border-bottom: 1.5px solid var(--text-2);
  transform: rotate(45deg) translate(-1px,-1px);
  transition: transform .2s ease;
}
.rw-root .sort-trigger[aria-expanded="true"] .sort-chevron {
  transform: rotate(-135deg) translate(-1px,-1px);
}

.rw-root .sort-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  z-index: 50;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.rw-root .sort-menu.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.rw-root .sort-option {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  gap: 12px;
}
.rw-root .sort-option:hover { background: var(--surface-2); }
.rw-root .sort-option[aria-checked="true"] { font-weight: 500; }
.rw-root .sort-option .check {
  opacity: 0;
  width: 14px; height: 14px;
  color: var(--gold);
}
.rw-root .sort-option[aria-checked="true"] .check { opacity: 1; }

@media (max-width: 480px) {
  .rw-root .toolbar { gap: 12px; }
  .rw-root .sort-trigger { font-size: 13.5px; padding: 9px 12px; }
}

/* Skeleton loading state — fetch placeholders */
.rw-root .skeleton {
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: rwShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes rwShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.rw-root .sk-summary {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) 1fr;
  gap: 56px;
  padding: 32px 0 36px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .rw-root .sk-summary { grid-template-columns: 1fr; gap: 28px; } }
.rw-root .sk-block { height: 88px; }
.rw-root .sk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 18px;
  padding: 22px;
  break-inside: avoid;
}
.rw-root .sk-line { height: 12px; margin: 8px 0; }
.rw-root .sk-line.short { width: 40%; }
.rw-root .sk-line.med { width: 70%; }

/* ── Centered layout variant ── */
.rw-root.rw-centered .hero-row {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}
.rw-root.rw-centered .hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rw-root.rw-centered h1.headline {
  text-align: center;
  max-width: 700px;
}
.rw-root.rw-centered .subhead {
  text-align: center;
  max-width: 600px;
}
.rw-root.rw-centered .pill-bar-wrap {
  justify-content: flex-start;
}
@media (min-width: 768px) {
  .rw-root.rw-centered .pill-bar-wrap { justify-content: center; }
}
.rw-root.rw-centered .toolbar {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.rw-root.rw-centered .rating-summary {
  justify-content: center;
}

/* ── Warm gold theme variant ── */
.rw-root.rw-theme-warm {
  --gold: #ECD5A2;
  --gold-soft: rgba(236,213,162,0.12);
}
