/* ==== hd-rev.css - bloco de avaliacoes (judge.me estatico) ====
   Renderizado pelo _tools/reviews_build.py em cada PDP. Prefixos hdrv/hdsr
   para nao colidir com o CSS do tema nem com o CSS do proprio judge.me. */

.hdrv {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 0 10px;
  color: #1a1a1a;
}

/* ---------- cabecalho ---------- */
.hdrv__head {
  text-align: center;
}

.hdrv__title {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .1px;
}

.hdrv__sum {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 15px;
  line-height: 1;
}

.hdrv__avg {
  font-weight: 600;
}

.hdrv__cnt {
  color: #4a4a4a;
}

.hdrv__write {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 16px auto 0;
  padding: 11px 24px;
  border: 0;
  border-radius: 24px;
  background: #00acd7;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: filter .15s ease;
}

.hdrv__write:hover {
  filter: brightness(.94);
}

/* ---------- estrelas (sem fonte de icone, sem imagem) ---------- */
.hdsr {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}

.hdsr__t {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  letter-spacing: 0;
  color: #ffb81c;
}

/* preenchimento fracionario: 1 estrela = 20% da largura */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hdsr__t {
    background-image: linear-gradient(90deg, #ffb81c calc(var(--n) * 1%), #dedede 0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.hdsr--xs { font-size: 13px; }
.hdsr--sm { font-size: 14px; }
.hdsr--md { font-size: 15px; }
.hdsr--lg { font-size: 17px; }

/* ---------- selo embaixo do titulo do produto ---------- */
.hdrv-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 6px;
  font-size: 13px;
  line-height: 1.2;
  color: #1a1a1a;
  text-decoration: none;
}

.hdrv-badge:hover .hdrv-badge__n {
  text-decoration: underline;
}

.hdrv-badge__n {
  font-weight: 600;
}

/* produto com avaliacoes mas sem secao de reviews (igual ao original) */
.hdrv-badge--so {
  cursor: default;
}

.hdrv-badge--so:hover .hdrv-badge__n {
  text-decoration: none;
}

/* ---------- galeria de fotos das avaliacoes ---------- */
.hdrv__gal {
  display: flex;
  gap: 8px;
  margin: 22px 0 4px;
  padding: 0 0 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.hdrv__gal a {
  flex: 0 0 auto;
  width: 190px;
  height: 128px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f3f3;
  display: block;
}

.hdrv__gal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- lista ---------- */
.hdrv__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hdrv__item {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-top: 1px solid #e7e7e7;
}

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

.hdrv__who {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.hdrv__author {
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hdrv__date {
  font-size: 13px;
  color: #6f6f6f;
}

.hdrv__verif {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  font-size: 9px;
  line-height: 1;
  vertical-align: middle;
  margin-left: 2px;
}

.hdrv__main {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.hdrv__ttl {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.hdrv__body {
  font-size: 14px;
  line-height: 1.6;
  color: #1f1f1f;
}

.hdrv__body p {
  margin: 0 0 8px;
}

.hdrv__body p:last-child {
  margin-bottom: 0;
}

.hdrv__pics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hdrv__pics a {
  width: 86px;
  height: 86px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f3f3;
  display: block;
}

.hdrv__pics img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hdrv__votes {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #6f6f6f;
}

.hdrv__vote {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hdrv__vote svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  opacity: .75;
}

/* ---------- mostrar mais / vazio ---------- */
.hdrv__more-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0 6px;
}

.hdrv__more {
  padding: 10px 26px;
  border: 0;
  border-radius: 22px;
  background: #00acd7;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

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

.hdrv__empty {
  padding: 4px 0 14px;
  text-align: center;
  font-size: 15px;
  color: #4a4a4a;
}

/* ---------- modal "escreva a sua avaliacao" ---------- */
.hdrv-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .55);
}

.hdrv-modal.on {
  display: flex;
}

.hdrv-modal__box {
  position: relative;
  width: 100%;
  max-width: 430px;
  max-height: 86vh;
  overflow: auto;
  padding: 24px 22px 20px;
  border-radius: 14px;
  background: #fff;
  color: #1a1a1a;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.hdrv-modal__box h3 {
  margin: 0 0 10px;
  padding-right: 24px;
  font-size: 17px;
  line-height: 1.3;
}

.hdrv-modal__box p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}

.hdrv-modal__x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.hdrv-modal__ok {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 18px;
  border: 0;
  border-radius: 24px;
  background: #00acd7;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- responsivo ---------- */
@media (max-width: 749px) {
  .hdrv {
    padding: 18px 0 6px;
  }

  .hdrv__title {
    font-size: 17px;
  }

  .hdrv__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 18px 0;
  }

  .hdrv__who {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hdrv__gal a {
    width: 142px;
    height: 96px;
  }

  .hdrv__pics a {
    width: 74px;
    height: 74px;
  }

  .hdrv__write,
  .hdrv__more {
    width: 100%;
    max-width: 340px;
  }
}
