/* =====================================================================
   SKS REVIEWS SECTION — exact replica of reference design
   ===================================================================== */

.sks-rev-section {
  --sks-ivory:   #F5F0E8;
  --sks-white:   #FFFFFF;
  --sks-amber:   #B8520A;
  --sks-amber-l: #D4681A;
  --sks-amber-p: #FEF3EC;
  --sks-onyx:    #1A1A1A;
  --sks-body:    #4A4440;
  --sks-muted:   #9A9088;
  --sks-ok:      #1A5C2A;
  --sks-rule:    rgba(74,68,64,.14);
  --sks-rule2:   rgba(74,68,64,.22);
  --sks-r:       6px;
  --sks-rl:      10px;

  background: var(--sks-white);
  padding: 80px 48px;
  box-sizing: border-box;
  font-family: 'Jost', 'Helvetica Neue', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  color: var(--sks-body);
}

.sks-rev-section *,
.sks-rev-section *::before,
.sks-rev-section *::after { box-sizing: inherit; }

.sks-rev-inner {
  max-width: 1400px;
  margin: 0 auto;
}

/* ── OPTIONAL SECTION HEADING ──────────────────────────────────────── */
.sks-rev-title-wrap {
  text-align: center;
  margin-bottom: 40px;
}
.sks-rev-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  color: var(--sks-onyx);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.01em;
}
.sks-rev-section-title em {
  font-style: italic;
  color: var(--sks-amber);
  font-weight: 400;
}

/* ── HEAD ──────────────────────────────────────────────────────────── */
.sks-rev-head {
  display: flex;
  align-items: flex-start;
  justify-content: center;   /* centers .sks-rev-score (single child) horizontally on the page */
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 24px;
}

.sks-rev-score {
  display: flex;
  align-items: center;
    justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Write-a-review button, second child of the centred .sks-rev-head flex row.
   align-self keeps it level with the bars rather than top-aligned, and the
   parent's flex-wrap drops it onto its own line on narrow screens. */
.sks-rev-write {
  align-self: center;
}

@media screen and (max-width: 749px) {
  .sks-rev-write {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 4px;
  }
}

.sks-rev-num {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--sks-amber);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  min-width: 78px;
}

.sks-rev-meta { flex-shrink: 0; }

.sks-rev-stars {
  display: flex;
  gap: 2px;
  color: var(--sks-amber);
  font-size: 18px;
  margin-bottom: 4px;
  letter-spacing: 1px;
  line-height: 1;
}

.sks-rev-info {
  font-size: 13px;
  color: var(--sks-muted);
  line-height: 1.4;
}
.sks-rev-sources {
  /* Hidden for now — kept in place so it can be re-shown later by removing
     this display:none (the markup + "Trust sources line" setting still exist). */
  display: none;
  font-size: 12px;
  color: var(--sks-muted);
  line-height: 1.5;
  margin-top: 3px;
}
.sks-rev-powered { margin-top: 2px; }
.sks-rev-powered a {
  color: var(--sks-muted);
  text-decoration: underline;
  text-decoration-color: var(--sks-rule2);
  text-underline-offset: 2px;
}
.sks-rev-powered a:hover { color: var(--sks-amber); }

/* ── RATING BARS ───────────────────────────────────────────────────── */
.sks-rev-bars {
  display: grid;
  gap: 5px;
}

.sks-rev-row {
  display: grid;
  grid-template-columns: 30px 140px 30px;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  color: var(--sks-body);
}
.sks-rev-bar-pct { text-align: right; }

.sks-rev-track {
  height: 5px;
  background: var(--sks-rule);
  border-radius: 3px;
  overflow: hidden;
}

/* .sks-rev-track scopes the selector (0,2,0) so it beats base.css's
   `div:empty { display:none }` (0,1,1) — the bar is an empty div and would
   otherwise stay hidden, so its width fill never shows. */
.sks-rev-track .sks-rev-bar {
  display: block;
  height: 100%;
  background: var(--sks-amber);
  border-radius: 3px;
  width: 0%;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ── FILTER + SORT ─────────────────────────────────────────────────── */
.sks-rev-filter {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--sks-rule);
  border-bottom: 1px solid var(--sks-rule);
  margin-bottom: 30px;
  align-items: center;
}

.sks-rev-fp {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sks-rev-pill {
  padding: 7px 14px;
  border: 1px solid var(--sks-rule2);
  border-radius: var(--sks-r);
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  color: var(--sks-body);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  letter-spacing: .02em;
}
.sks-rev-pill.active {
  background: var(--sks-amber);
  color: #fff;
  border-color: var(--sks-amber);
}
.sks-rev-pill:hover:not(.active) {
  border-color: var(--sks-amber);
  color: var(--sks-amber);
}

/* sort dropdown */
.sks-rev-sort-wrap { position: relative; }
.sks-rev-sort-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--sks-body);
  pointer-events: none;
}
.sks-rev-sort {
  appearance: none;
  -webkit-appearance: none;
  background: var(--sks-ivory);
  border: 1px solid var(--sks-rule2);
  border-radius: var(--sks-r);
  padding: 8px 32px 8px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--sks-onyx);
  cursor: pointer;
  transition: border-color .2s;
  outline: none;
}
.sks-rev-sort:hover,
.sks-rev-sort:focus { border-color: var(--sks-amber); }

/* ── CARD GRID ─────────────────────────────────────────────────────── */
.sks-rev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* ── CARD ──────────────────────────────────────────────────────────── */
.sks-rev-card {
  background: var(--sks-ivory);
  padding: 26px;
  border-radius: var(--sks-rl);
  border: 1px solid var(--sks-rule);
}

.sks-rev-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.sks-rev-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--sks-amber);
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

.sks-rev-name {
  font-weight: 500;
  color: var(--sks-onyx);
  font-size: 13.5px;
  line-height: 1.3;
}
.sks-rev-loc {
  font-size: 11px;
  color: var(--sks-muted);
  margin-top: 1px;
}

.sks-rev-card .sks-rev-stars {
  font-size: 13px;
  margin-bottom: 8px;
}

.sks-rev-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px;
  color: var(--sks-onyx);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.sks-rev-quote {
  font-style: italic;
  color: var(--sks-body);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.sks-rev-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.sks-rev-tag {
  background: var(--sks-amber-p);
  color: var(--sks-amber);
  padding: 3px 9px;
  border-radius: var(--sks-r);
  font-size: 10.5px;
  letter-spacing: .04em;
  font-weight: 500;
}

.sks-rev-bot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  padding-top: 12px;
  border-top: 1px solid var(--sks-rule);
  flex-wrap: wrap;
  gap: 8px;
}

.sks-rev-verif {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--sks-ok);
  font-weight: 500;
}
.sks-rev-verif svg { width: 13px; height: 13px; flex-shrink: 0; }

.sks-rev-bot-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sks-rev-help {
  color: var(--sks-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 500;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  padding: 0;
  transition: color .2s;
}
.sks-rev-help:hover { color: var(--sks-amber); }
.sks-rev-help svg { width: 13px; height: 13px; }

.sks-rev-sep { color: var(--sks-muted); }
.sks-rev-date { color: var(--sks-muted); }

/* ── SKELETON STATE ────────────────────────────────────────────────── */
.sks-rev-card--skeleton { pointer-events: none; }

.sks-rev-avatar-skel {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sks-rev-avatar-skel,
.sks-rev-skel {
  display: block;
  background: rgba(74,68,64,.08);
  border-radius: 4px;
  animation: sks-rev-shimmer 1.8s ease-in-out infinite;
}

@keyframes sks-rev-shimmer {
  0%   { background-color: rgba(74,68,64,.07); }
  50%  { background-color: rgba(74,68,64,.15); }
  100% { background-color: rgba(74,68,64,.07); }
}

.sks-rev-top-lines { flex: 1; }

/* ── LOAD MORE ─────────────────────────────────────────────────────── */
/* Load-more row: centred pair of "Load more reviews" + "Write a review".
   Flex rather than text-align because either button can be hidden — flex
   keeps whichever remains centred instead of leaving it offset. */
.sks-rev-load {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.sks-rev-load-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--sks-rule2);
  border-radius: var(--sks-r);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--sks-onyx);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  letter-spacing: .02em;
}
.sks-rev-load-btn:hover {
  border-color: var(--sks-amber);
  color: var(--sks-amber);
}
.sks-rev-load-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

/* ── NO RESULTS ────────────────────────────────────────────────────── */
.sks-rev-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--sks-muted);
  font-size: 14px;
}

/* Product has no reviews at all, but the section stays visible to invite
   the first one. Drop the score block, histogram and filter pills — with
   nothing to summarise they render as 0.0, empty bars and pills that
   filter nothing. Heading and the empty state remain. */
.sks-rev-section--empty .sks-rev-head,
.sks-rev-section--empty .sks-rev-filter {
  display: none;
}

/* The section's 80px padding, the empty block's own padding and the
   load-row margin all stack up when there is only three lines of content
   to show, leaving ~124px above and ~158px below. Collapse them.

   Double class (0,2,0) on purpose: the responsive .sks-rev-section padding
   rules further down are (0,1,0) but appear later in the file, so a single
   class here would lose to them on mobile. */
.sks-rev-section.sks-rev-section--empty {
  padding-top: 56px;
  padding-bottom: 56px;
}

/* Both buttons are hidden in this state, so the row contributes nothing
   but its 30px top margin. */
.sks-rev-section--empty .sks-rev-load {
  display: none;
}

/* "Be the first" state — shown only when the product has no reviews at
   all, not when a filter simply matched nothing. */
.sks-rev-empty--first {
  padding: 44px 20px 48px;
}

.sks-rev-section--empty .sks-rev-empty--first {
  padding: 0 20px;
}

.sks-rev-empty__title {
  font-family: var(--sks-ff-display, 'Playfair Display', Georgia, serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--sks-ink, #1a1a1a);
  margin-bottom: 6px;
}

.sks-rev-empty__text {
  font-size: 14.5px;
  color: var(--sks-muted);
  margin: 0 0 18px;
}

.sks-rev-empty__btn {
  display: inline-flex;
}

/* ── FOCUS (a11y) ──────────────────────────────────────────────────── */
.sks-rev-pill:focus-visible,
.sks-rev-sort:focus-visible,
.sks-rev-load-btn:focus-visible,
.sks-rev-help:focus-visible {
  outline: 2px solid var(--sks-amber);
  outline-offset: 2px;
  border-radius: var(--sks-r);
}

/* ── RESPONSIVE: TABLET (≤960px) ───────────────────────────────────── */
@media (max-width: 960px) {
  .sks-rev-section { padding: 60px 32px; }
  .sks-rev-grid    { grid-template-columns: 1fr; }
  .sks-rev-score   { gap: 16px; }
}

/* ── RESPONSIVE: MOBILE (≤640px) ───────────────────────────────────── */
@media (max-width: 640px) {
  .sks-rev-section { padding: 48px 20px; }
  .sks-rev-num     { font-size: 52px; }
  .sks-rev-row     { grid-template-columns: 26px 100px 28px; }
  .sks-rev-score   { gap: 14px; }
}

/* ── REDUCED MOTION ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sks-rev-bar,
  .sks-rev-avatar-skel,
  .sks-rev-skel {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
