/* ═══════════════════════════════════════════════════════════════════
   reviews.css — Seção de avaliações/depoimentos (mobile-first premium)
   Paleta: --dark #0A1937 · --accent #F5C518 · Inter
   Princípio do nicho: parecer VERIFICÁVEL, não vendedor.
   ═══════════════════════════════════════════════════════════════════ */

.rv {
  --rv-star: #F5C518;
  --rv-star-empty: #e0e2e8;
  --rv-green: #16a34a;
  --rv-dark: #0A1937;
  --rv-text: #1d1d1f;
  --rv-text-2: #6e6e73;
  --rv-border: #eceef3;
  --rv-surface: #f7f8fc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--rv-text);
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ─── Estrelas (SVG inline via mask) ─── */
.rv-stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 1; }
.rv-stars svg { width: 1em; height: 1em; display: block; }
.rv-stars .s-full { fill: var(--rv-star); }
.rv-stars .s-empty { fill: var(--rv-star-empty); }
.rv-stars .s-half-wrap { position: relative; display: inline-block; width: 1em; height: 1em; }
.rv-stars .s-half-wrap > svg { position: absolute; top: 0; left: 0; }
.rv-stars .s-half-wrap .s-half-fill { position: absolute; top: 0; left: 0; width: 50%; height: 100%; overflow: hidden; }
.rv-stars .s-half-wrap .s-half-fill svg { position: absolute; top: 0; left: 0; width: 1em; height: 1em; }

/* ══════ COMPACTO (vai no buy-box, perto do nome) ══════ */
.rv-compact {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: .9rem;
  -webkit-tap-highlight-color: transparent;
  padding: 2px 0;
}
.rv-compact .rv-stars { font-size: 1rem; }
.rv-compact .rv-avg { font-weight: 800; color: var(--rv-dark); }
.rv-compact .rv-count { color: var(--rv-text-2); font-size: .84rem; text-decoration: underline; text-underline-offset: 2px; }
.rv-compact:hover .rv-count { color: var(--rv-dark); }

/* ══════ SEÇÃO COMPLETA ══════ */
/* padding horizontal 20px = respiro nas laterais (sobrescreve o do .rv base) */
.rv-section { padding: 32px 20px 8px; }
.rv-section-head { text-align: center; margin-bottom: 24px; }
.rv-section-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rv-star); background: rgba(245,197,24,.12); display: inline-block;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 10px;
}
.rv-section-title { font-size: 1.5rem; font-weight: 900; color: var(--rv-dark); margin: 0; letter-spacing: -.02em; }

/* ─── Bloco resumo (nota + distribuição) ─── */
.rv-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  background: #fff;
  border: 1px solid var(--rv-border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 2px 14px rgba(10,25,55,.05);
}
.rv-summary-score { text-align: center; padding-right: 22px; border-right: 1px solid var(--rv-border); min-width: 118px; }
.rv-summary-avg { font-size: 3rem; font-weight: 900; color: var(--rv-dark); line-height: 1; letter-spacing: -.03em; }
.rv-summary-score .rv-stars { font-size: 1.05rem; margin: 8px 0 6px; }
.rv-summary-total { font-size: .8rem; color: var(--rv-text-2); font-weight: 600; }
.rv-summary-verified {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: .68rem; font-weight: 800; color: var(--rv-green); background: #f0fdf4;
  padding: 3px 9px; border-radius: 999px;
}

/* Barras de distribuição (clicáveis = filtro) */
.rv-dist { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.rv-dist-row {
  display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 9px;
  cursor: pointer; border: none; background: none; padding: 3px 4px; border-radius: 8px;
  font-family: inherit; text-align: left; -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.rv-dist-row:hover { background: var(--rv-surface); }
.rv-dist-row.active { background: rgba(245,197,24,.12); }
.rv-dist-row .rv-dist-label { font-size: .8rem; font-weight: 700; color: var(--rv-text-2); display: flex; align-items: center; gap: 2px; }
.rv-dist-row .rv-dist-label svg { width: .8em; height: .8em; fill: var(--rv-star); }
.rv-dist-bar { height: 8px; background: var(--rv-surface); border-radius: 99px; overflow: hidden; }
.rv-dist-bar span { display: block; height: 100%; background: var(--rv-star); border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.rv-dist-row .rv-dist-count { font-size: .76rem; color: var(--rv-text-2); font-weight: 600; text-align: right; }

/* ─── Faixa de fotos (carrossel horizontal → lightbox) ─── */
.rv-photostrip { margin-bottom: 22px; }
.rv-photostrip-title { font-size: .82rem; font-weight: 800; color: var(--rv-dark); margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.rv-ico { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: middle; }
.rv-filter-chip .rv-ico { width: 1em; height: 1em; margin-right: 5px; }
.rv-filter-chip { display: inline-flex; align-items: center; }
.rv-photostrip-scroll {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity;
  padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.rv-photostrip-scroll::-webkit-scrollbar { display: none; }
.rv-photo-thumb {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 12px; overflow: hidden;
  scroll-snap-align: start; cursor: pointer; background: var(--rv-surface); position: relative;
  border: 1px solid var(--rv-border);
}
.rv-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-photo-thumb::after {
  content: ''; position: absolute; bottom: 6px; right: 6px; width: 26px; height: 26px;
  border-radius: 8px; opacity: 0; transition: opacity .2s;
  background: rgba(10,25,55,.62) center/15px 15px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35M11 8v6M8 11h6'/%3E%3C/svg%3E");
  backdrop-filter: blur(2px);
}
.rv-photo-thumb:hover::after { opacity: 1; }

/* ─── Filtros/ordenação ─── */
.rv-filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rv-filters::-webkit-scrollbar { display: none; }
.rv-filter-chip {
  flex: 0 0 auto; border: 1.5px solid var(--rv-border); background: #fff; color: var(--rv-text-2);
  font-size: .82rem; font-weight: 700; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font-family: inherit; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: all .15s; min-height: 40px;
}
.rv-filter-chip.active { background: var(--rv-dark); color: #fff; border-color: var(--rv-dark); }

/* ─── Cards de review (empilhados vertical) ─── */
.rv-list { display: flex; flex-direction: column; gap: 14px; }
.rv-card {
  background: #fff; border: 1px solid var(--rv-border); border-radius: 16px; padding: 18px;
  animation: rvFadeIn .4s ease both;
}
@keyframes rvFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rv-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 10px; }
.rv-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center;
  justify-content: center; font-weight: 900; font-size: 1rem; color: #fff; background: var(--rv-dark); overflow: hidden;
}
.rv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.rv-card-meta { flex: 1; min-width: 0; }
.rv-card-name { font-weight: 800; color: var(--rv-dark); font-size: .92rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-verified {
  display: inline-flex; align-items: center; gap: 3px; font-size: .65rem; font-weight: 800;
  color: var(--rv-green); background: #f0fdf4; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.rv-verified svg { width: .8em; height: .8em; fill: var(--rv-green); }
.rv-card-sub { font-size: .78rem; color: var(--rv-text-2); margin-top: 1px; }
.rv-card-stars-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rv-card-stars-row .rv-stars { font-size: .95rem; }
.rv-card-date { font-size: .74rem; color: var(--rv-text-2); }
.rv-card-title { font-weight: 800; color: var(--rv-dark); font-size: .92rem; margin: 0 0 4px; }
.rv-card-body { font-size: .9rem; color: var(--rv-text); line-height: 1.55; margin: 0; }
.rv-card-body.rv-clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rv-readmore { background: none; border: none; color: #1d4ed8; font-weight: 700; font-size: .82rem; cursor: pointer; padding: 6px 0 0; font-family: inherit; }
.rv-card-photo {
  margin-top: 12px; width: 100%; max-width: 220px; border-radius: 12px; overflow: hidden;
  cursor: pointer; aspect-ratio: 4/3; background: var(--rv-surface); border: 1px solid var(--rv-border);
}
.rv-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-card-foot { margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.rv-helpful {
  display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 700;
  color: var(--rv-text-2); background: var(--rv-surface); border: 1px solid var(--rv-border);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.rv-helpful svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }
.rv-helpful.voted { color: var(--rv-green); border-color: #bbf7d0; background: #f0fdf4; }

/* ─── Carregar mais ─── */
.rv-loadmore {
  display: block; margin: 20px auto 0; background: #fff; border: 1.5px solid var(--rv-dark); color: var(--rv-dark);
  font-weight: 800; font-size: .9rem; padding: 13px 30px; border-radius: 12px; cursor: pointer; font-family: inherit; min-height: 46px;
}
.rv-loadmore:hover { background: var(--rv-dark); color: #fff; }

/* ─── Estado vazio ─── */
.rv-empty { text-align: center; padding: 40px 20px; color: var(--rv-text-2); }
.rv-empty-cta { display: inline-block; margin-top: 14px; background: var(--rv-dark); color: var(--rv-accent, #F5C518); padding: 12px 24px; border-radius: 10px; text-decoration: none; font-weight: 800; }

/* ─── Skeleton loading ─── */
.rv-skeleton .rv-sk { background: linear-gradient(90deg, #f0f1f5 25%, #e6e8ef 50%, #f0f1f5 75%); background-size: 200% 100%; animation: rvShimmer 1.3s infinite; border-radius: 8px; }
@keyframes rvShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.rv-sk-card { background: #fff; border: 1px solid var(--rv-border); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.rv-sk-row { display: flex; gap: 11px; align-items: center; margin-bottom: 12px; }
.rv-sk-avatar { width: 42px; height: 42px; border-radius: 50%; }
.rv-sk-line { height: 12px; }

/* ─── Lightbox ─── */
.rv-lightbox {
  position: fixed; inset: 0; background: rgba(10,25,55,.92); z-index: 10000; display: none;
  align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px);
}
.rv-lightbox.open { display: flex; animation: rvFade .2s ease; }
@keyframes rvFade { from { opacity: 0; } to { opacity: 1; } }
.rv-lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; object-fit: contain; }
.rv-lightbox-close { position: absolute; top: 16px; right: 18px; background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.6rem; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; line-height: 1; }
.rv-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15); border: none; color: #fff; font-size: 1.8rem; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; }
.rv-lightbox-nav.prev { left: 12px; } .rv-lightbox-nav.next { right: 12px; }
.rv-lightbox-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-size: .85rem; font-weight: 600; }

/* ══════ DESKTOP ══════ */
@media (min-width: 720px) {
  .rv-section-title { font-size: 1.8rem; }
  .rv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .rv-card { animation: none; }
  .rv-photo-thumb { width: 108px; height: 108px; }
}

/* Mobile: resumo empilha */
@media (max-width: 480px) {
  .rv-summary { grid-template-columns: 1fr; gap: 16px; }
  .rv-summary-score { border-right: none; border-bottom: 1px solid var(--rv-border); padding-right: 0; padding-bottom: 16px; }
  .rv-summary-avg { font-size: 2.6rem; }
}
