﻿.wd-product-reviews {
  --av-navy: #15335e;
  --av-navy-soft: #1d4378;
  --av-gold: #f5a623;
  --av-ink: #1f2730;
  --av-ink-soft: #5a6573;
  --av-muted: #66707c; /* item 111 (19/11/2026): era #8a94a1, contraste 3,0; agora 5,0 no branco (as datas das avaliações) */
  --av-line: #e7eaee;
  --av-card: #ffffff;
  --av-shadow-sm: 0 1px 2px rgba(20, 33, 61, .05), 0 1px 3px rgba(20, 33, 61, .04);
  --av-shadow-md: 0 6px 18px rgba(20, 33, 61, .08), 0 2px 6px rgba(20, 33, 61, .05);
  --av-shadow-lg: 0 16px 40px rgba(20, 33, 61, .12);
}

.av-root {
  font-family: inherit;
  color: var(--av-ink);
  text-align: left;
}
.av-root * { box-sizing: border-box; }

/* ---- cabeçalho da seção (na LP é escondido via CSS da rota) ---- */
.av-head { text-align: center; margin-bottom: 30px; }
.av-head h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: var(--av-navy);
  letter-spacing: -.2px;
  line-height: 1.15;
}
.av-head p { margin: 7px 0 0; color: var(--av-ink-soft); font-size: 15px; }

/* ---- card-resumo ---- */
.av-summary {
  background: var(--av-card);
  border-radius: 16px;
  box-shadow: var(--av-shadow-md);
  padding: 36px 44px;
  display: grid;
  grid-template-columns: 250px 1px 1fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 40px;
}
.av-score { text-align: center; }
.av-score .av-big {
  font-size: 66px;
  font-weight: 800;
  color: var(--av-navy);
  line-height: 1;
  letter-spacing: -1px;
}
.av-score .av-count {
  margin-top: 10px;
  font-size: 14px;
  color: var(--av-ink-soft);
  font-weight: 500;
}
.av-score .av-count b { font-weight: 700; }
.av-summary-div { background: var(--av-line); width: 1px; height: 100%; min-height: 130px; }

/* ---- estrelas (preenchimento parcial, pra médias fracionadas) ---- */
.av-stars {
  position: relative;
  display: inline-block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 3px;
  white-space: nowrap;
}
.av-stars::before { content: "\2605\2605\2605\2605\2605"; color: #e3e6ea; }
.av-stars .av-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--av-gold);
}
.av-stars .av-fill::before { content: "\2605\2605\2605\2605\2605"; }
.av-score .av-stars { font-size: 26px; margin: 12px 0 2px; }

/* ---- barras de distribuição ---- */
.av-bars { display: flex; flex-direction: column; gap: 11px; }
.av-bar-row {
  display: grid;
  grid-template-columns: 60px 1fr 44px;
  align-items: center;
  gap: 16px;
  padding: 4px 8px;
  border-radius: 10px;
}
.av-bar-row .av-rlabel {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--av-ink-soft);
}
.av-bar-row .av-rlabel .av-s { color: var(--av-gold); font-size: 14px; }
.av-track {
  display: block;
  height: 12px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
}
.av-track .av-tfill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f6b13e, var(--av-gold));
  border-radius: 999px;
  transition: width 1s cubic-bezier(.22, .61, .36, 1);
}
.av-bar-row .av-rcount {
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--av-ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---- grid de comentários ---- */
/* align-items:stretch (padrão): todos os cards de uma MESMA linha ficam com a
   altura do mais alto da linha → linha sempre regular. Se uma avaliação tiver
   texto maior, a linha cresce e os vizinhos acompanham. O card-CTA é mantido
   compacto (.av-cta) pra não ser ele a inflar a linha. */
.av-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.av-rev {
  background: var(--av-card);
  border: 1px solid var(--av-line);
  border-radius: 14px;
  padding: 24px 24px 22px;
  box-shadow: var(--av-shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px);
  animation: avRise .5s forwards;
}
.av-rev:hover {
  box-shadow: var(--av-shadow-lg);
  transform: translateY(-3px);
  border-color: #dfe3e8;
}
@keyframes avRise { to { opacity: 1; transform: none; } }

.av-rev-top { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.av-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--av-navy-soft), var(--av-navy));
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  display: grid;
  place-items: center;
  text-transform: uppercase;
}
.av-who { flex: 1; min-width: 0; }
.av-who .av-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--av-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.av-who .av-date { font-size: 12.5px; color: var(--av-muted); margin-top: 2px; }
.av-rev-stars { margin-left: auto; align-self: flex-start; }
.av-rev-stars .av-stars { font-size: 16px; letter-spacing: 2px; }

.av-rev .av-title {
  margin: 0 0 7px;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--av-ink);
  letter-spacing: -.1px;
}
.av-rev .av-body {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--av-ink-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
.av-rev .av-body.av-open { -webkit-line-clamp: unset; }
.av-rev .av-more {
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--av-navy);
  font-weight: 600;
  font-size: 13.5px;
  padding: 0;
  display: none;
  align-self: flex-start;
  cursor: pointer;
  font-family: inherit;
}
.av-rev .av-more:hover { text-decoration: underline; }

/* ---- card-CTA "Deixar uma avaliação" (item do grid) ----
   É um item do .av-grid: o auto-flow do grid o coloca na célula vaga da última
   linha quando sobra espaço, ou desce pra linha de baixo quando a linha fecha.
   O botão dá .click() no a.review-create nativo (escondido) → abre o modal.
   Mantido COMPACTO (sem ícone, padding/gap enxutos) pra não ser ele a definir a
   altura da linha — quem manda é o conteúdo das avaliações; ele só acompanha. */
.av-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 18px 22px;
  border: 2px dashed #d4dae2;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcfd, #f4f6f9);
  transition: border-color .2s, background .2s;
}
.av-cta:hover { border-color: #c3ccd6; background: linear-gradient(180deg, #ffffff, #eef1f5); }
.av-cta-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--av-navy);
  letter-spacing: -.1px;
}
.av-cta-sub {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--av-ink-soft);
  max-width: 230px;
}
.av-cta-btn {
  margin-top: 6px;
  border: 0;
  background: #de2639;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(222, 38, 57, .22);
}
.av-cta-btn:hover { background: #c81f31; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(222, 38, 57, .28); }
.av-cta-btn:active { transform: translateY(0); }

/* ---- carregar mais ---- */
.av-loadmore-wrap { text-align: center; margin-top: 36px; }
.av-loadmore {
  border: 1.5px solid var(--av-navy);
  background: #fff;
  color: var(--av-navy);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 38px;
  border-radius: 999px;
  transition: background .15s, color .15s;
  cursor: pointer;
  font-family: inherit;
}
.av-loadmore:hover { background: var(--av-navy); color: #fff; }
.av-loadmore[hidden] { display: none; }

/* ---- formulário de avaliação (modal), montado pelo product-reviews.js no clique ---- */
.themodal-overlay.wd-product-reviews-create .the-modal { max-width: 560px; border-radius: 16px; }
.themodal-overlay.wd-product-reviews-create .the-modal-container { padding: 28px; }

.av-form-corpo { display: flex; flex-direction: column; gap: 18px; color: var(--av-ink); text-align: left; }
.av-form-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 36px 16px 0;
  border-bottom: 1px solid var(--av-line);
}
.av-form-topo img {
  flex: none;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border: 1px solid var(--av-line);
  border-radius: 10px;
  background: #fff;
}
.av-form-produto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.av-form-produto span { font-size: 12.5px; color: var(--av-ink-soft); }
.av-form-produto strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--av-navy);
}

.av-form-campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.av-form-rotulo { font-size: 14px; font-weight: 600; color: var(--av-ink); }
.av-form-campo input,
.av-form-campo textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #cfd5dd;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--av-ink);
  transition: border-color .15s, box-shadow .15s;
}
.av-form-campo textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.av-form-campo input::placeholder,
.av-form-campo textarea::placeholder { color: var(--av-muted); }
.av-form-campo input:focus,
.av-form-campo textarea:focus {
  outline: 0;
  border-color: var(--av-navy-soft);
  box-shadow: 0 0 0 3px rgba(29, 67, 120, .15);
}
.av-form-dica { font-size: 12.5px; color: var(--av-ink-soft); }
.av-campo-msg { font-size: 13px; font-weight: 600; color: #b42318; }
.av-campo-msg:empty { display: none; }
.av-campo--erro input,
.av-campo--erro textarea { border-color: #d92d20; }
.av-campo--erro input:focus,
.av-campo--erro textarea:focus { border-color: #d92d20; box-shadow: 0 0 0 3px rgba(217, 45, 32, .15); }
.av-form-linha { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.av-form-estrelas { display: flex; gap: 2px; }
.av-form-estrelas button {
  padding: 0 2px;
  border: 0;
  background: none;
  font-size: 38px;
  line-height: 1;
  color: #dfe3e8;
  cursor: pointer;
  transition: transform .12s, color .12s;
}
.av-form-estrelas button.av-on { color: var(--av-gold); }
.av-form-estrelas button:hover { transform: scale(1.08); }
.av-form-estrelas button:focus-visible { outline: 2px solid var(--av-navy-soft); outline-offset: 2px; border-radius: 6px; }
.av-campo--erro .av-form-estrelas button:not(.av-on) { color: #f4c3bf; }
.av-form-nota-texto { min-height: 1.3em; font-size: 13.5px; font-weight: 600; color: var(--av-ink-soft); }

.av-form-captcha-img { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.av-form-captcha-img img { width: 220px; max-width: 100%; height: auto; border: 1px solid var(--av-line); border-radius: 8px; }
.av-form-captcha-img .reload-captcha {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #cfd5dd;
  border-radius: 999px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--av-navy);
  text-decoration: none;
  cursor: pointer;
}
.av-form-captcha-img .reload-captcha:hover { border-color: var(--av-navy-soft); }
.av-form-captcha input { max-width: 220px; letter-spacing: 2px; }

/* isca para robôs: fora da tela (não display:none, que muitos robôs pulam) */
.av-isca { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.av-form-erro {
  padding: 10px 12px;
  border: 1px solid #f5c2c0;
  border-radius: 10px;
  background: #fdf1f0;
  color: #b42318;
  font-size: 14px;
  line-height: 1.4;
}
.av-form-erro[hidden] { display: none; }
.av-form-erro p { margin: 0; }
.av-form-erro p + p { margin-top: 4px; }

.av-form-corpo .button-wrapper { margin: 0; }
.av-form-corpo .button-wrapper .btn {
  width: 100%;
  padding: 13px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--av-navy);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.av-form-corpo .button-wrapper .btn:hover { background: var(--av-navy-soft); }
.av-form-corpo .button-wrapper .btn:disabled { opacity: .7; cursor: wait; }

.av-form-ok { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 8px 8px; text-align: center; }
.av-form-ok-icone {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e7f6ee;
  color: #1a7f4b;
  font-size: 28px;
}
.av-form-ok h3 { margin: 4px 0 0; font-size: 20px; font-weight: 700; color: var(--av-navy); }
.av-form-ok p { margin: 0; color: var(--av-ink-soft); }
.av-form-botao {
  margin-top: 10px;
  padding: 11px 28px;
  border: 1px solid var(--av-navy);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--av-navy);
  cursor: pointer;
}

/* celular: a janela ocupa a tela e o "fechar" fica sempre à vista */
@media (max-width: 767px) {
  .themodal-overlay.wd-product-reviews-create .the-modal {
    top: 0 !important; /* a plataforma prende o modal no meio com top: 50% !important */
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0 !important; /* o plugin do modal põe margin-top inline */
    transform: none;
    border-radius: 0;
  }
  .themodal-overlay.wd-product-reviews-create .the-modal-container { padding: 20px 16px 32px; }
  .themodal-overlay.wd-product-reviews-create .the-modal > a.close { position: fixed; z-index: 5; }
  .av-form-linha { grid-template-columns: 1fr; }
}

/* ---- responsivo ---- */
@media (max-width: 1080px) {
  .av-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .av-summary { grid-template-columns: 1fr; gap: 26px; padding: 28px 24px; }
  .av-summary-div { display: none; }
}
@media (max-width: 640px) {
  .av-grid { grid-template-columns: 1fr; }
}

/* ---- acessibilidade: respeita "reduzir movimento" ---- */
@media (prefers-reduced-motion: reduce) {
  .av-rev { animation: none; opacity: 1; transform: none; }
  .av-track .av-tfill { transition: none; }
}

/* ---- acessibilidade: o título "Avaliações" virou h2 (12/11/2026, item 77; era h3 sem um h2 antes). O styles.css
   da Agrada estiliza o h3 pela etiqueta; aqui vai o mesmo visual, medido no ar: 20 px no celular, 26 px a partir de
   768 px na página do produto, Chillax Semibold, centralizado ---- */
#reviews .wd-product-reviews .header h2 {
  margin: 0; font-family: "chillax-semibold", -apple-system, BlinkMacSystemFont, sans-serif; font-weight: 400;
  font-size: 20px; line-height: 1.5; color: #000; text-align: center; text-transform: none; letter-spacing: normal;
}
@media screen and (min-width: 768px) {
  body[class*=context-product] #reviews .wd-product-reviews .header h2,
  body.context-landing-SelectVariationRoute #reviews .wd-product-reviews .header h2 { font-size: 26px; }
}

/* ---- produto sem nenhuma avaliação (item 103, 18/11/2026; desenho da versão 11 com o ajuste do usuário ao ver a
   prévia): o título, as 5 estrelas vazias no meio, embaixo dele, a frase para quem comprou e o botão, igual em todas as
   telas. Sai o "0" da nota, que ficava solto à esquerda, e saem as duas linhas e os espaços grandes do styles.css da
   Agrada (.no-data com bordas e 30 px em cima e embaixo; 42 px acima do botão). A frase vem do
   avaliacoes.js (o texto do widget nativo é trocado lá, como o título no item 77); as estrelas são o desenho da Linx
   (Shared/Svg), maior.
   Com avaliação nada muda: o .no-data só existe quando não há nenhuma. ---- */
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) > .header {
  margin-bottom: 8px;
}
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) > .header + div,
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) > .header + div > div {
  justify-content: center;
  align-items: center;
}
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) .note {
  display: none;
}
/* o desenho da Linx é uma estrela de 12 x 11 que se repete na linha (5 em 58 px): com 20 px de altura, 5 cabem em 105 */
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) .rating {
  height: auto;
}
html body #reviews .wd-product-reviews .wd-content:has(> .no-data) .star-view {
  width: 105px;
  height: 20px;
  background-size: auto 20px;
  background-repeat: repeat-x;
}
html body #reviews .wd-product-reviews .wd-content > .no-data {
  margin-top: 8px;
  padding: 0;
  border: 0;
  font-size: 15px;
  line-height: 22px;
  color: #3a3a3a;
}
html body #reviews .wd-product-reviews:has(.no-data) .review-create {
  margin-top: 20px;
}
