/* ==========================================================================
   O Bacano — comentarios
   ========================================================================== */

.rv-hero {
  position: relative; overflow: hidden;
  padding: calc(var(--header-h) + 56px) 0 96px;
  background:
    radial-gradient(60% 90% at 85% 0%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 65%),
    radial-gradient(50% 70% at 100% 100%, color-mix(in srgb, var(--ember) 24%, transparent), transparent 70%),
    var(--bg);
}
.rv-hero__title { margin-top: 10px; font-size: clamp(3rem, 11vw, 6.2rem); }
.rv-hero__title span { color: var(--gold); display: block; }
.rv-hero__lead { margin: 18px 0 0; max-width: 50ch; color: var(--ink-2); font-size: 1.06rem; }

/* creme por cima do escuro, como na landing */
.cream {
  --ink: var(--cocoa); --ink-2: var(--cocoa-2); --muted: #8a6c56;
  background: var(--cream); color: var(--cocoa);
}
.rv {
  position: relative; margin-top: -44px; border-radius: 40px 40px 0 0;
  padding: clamp(48px, 7vw, 80px) 0 clamp(64px, 9vw, 110px);
}

.rv__top { display: grid; gap: 22px; align-items: start; }
@media (min-width: 900px) { .rv__top { grid-template-columns: 340px 1fr; gap: 30px; } }

/* resumo */
.rv-summary {
  background: var(--bg); color: var(--ink);
  --ink: #fbf3e8; --muted: #a3907f;
  border-radius: 26px; padding: 28px;
  box-shadow: var(--shadow-cream);
}
.rv-summary__avg { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.rv-summary__avg span { font-family: var(--f-display); font-size: 4.6rem; line-height: 1; color: var(--gold); }
.rv-summary__avg small { color: var(--muted); font-size: 1rem; }
.rv-summary__count { margin: 8px 0 20px; color: var(--muted); font-size: .9rem; }

.stars { display: inline-flex; gap: 3px; }
.stars i {
  width: 16px; height: 16px; display: block;
  background: color-mix(in srgb, currentColor 22%, transparent);
  clip-path: polygon(50% 0, 61.8% 35.4%, 100% 35.4%, 69.1% 57.3%, 80.9% 92.7%, 50% 70.8%, 19.1% 92.7%, 30.9% 57.3%, 0 35.4%, 38.2% 35.4%);
}
.stars i.on { background: var(--gold); }
.stars--lg i { width: 22px; height: 22px; }
.rv-summary .stars { color: #fbf3e8; margin-top: 8px; }

.rv-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv-bars li { display: grid; grid-template-columns: 14px 1fr 22px; gap: 10px; align-items: center; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-bars li > span:last-child { text-align: right; }
.bar { height: 8px; border-radius: 99px; background: #2c241f; overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--ember)); transition: width .8s var(--ease-out); }

/* formulario */
.rv-form {
  background: #fff; border-radius: 26px; padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow-cream);
  display: grid; gap: 18px;
}
.rv-form__title {
  margin: 0; font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 2.3rem); line-height: 1; color: var(--tomato);
}
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: .92rem; padding: 0; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--cocoa);
  padding: 13px 16px; border-radius: 14px; border: 0;
  background: #fff8ee; box-shadow: inset 0 0 0 1.5px #ead6bd;
  transition: box-shadow var(--t-fast) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: #b79a82; }
.field input:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tomato); }
.field__hint { margin: 0; font-size: .78rem; color: #a08670; text-align: right; }
.field__err { display: none; margin: 0; font-size: .82rem; font-weight: 600; color: #b3261e; }
.field.is-invalid .field__err { display: block; }
.field.is-invalid input, .field.is-invalid textarea { box-shadow: inset 0 0 0 2px #b3261e; }

/* estrelas clicaveis: radios na ordem 5..1, desenhadas da direita para a esquerda */
.rate__stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate__stars label {
  width: 40px; height: 40px; cursor: pointer;
  background: #ecdcc6;
  clip-path: polygon(50% 0, 61.8% 35.4%, 100% 35.4%, 69.1% 57.3%, 80.9% 92.7%, 50% 70.8%, 19.1% 92.7%, 30.9% 57.3%, 0 35.4%, 38.2% 35.4%);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-spring);
}
.rate__stars label:active { transform: scale(.88); }
.rate__stars input:checked ~ label,
.rate__stars label:hover, .rate__stars label:hover ~ label { background: var(--gold); }
.rate__stars input:focus-visible + label { outline: 2px solid var(--tomato); outline-offset: 2px; }

.rv-form .btn { justify-self: start; }
.rv-form__status { margin: 0; font-weight: 600; color: #3f7a2c; min-height: 1.4em; }

/* lista */
.rv-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: clamp(48px, 7vw, 76px) 0 22px;
}
.rv-toolbar__title { font-size: clamp(2rem, 6vw, 3rem); color: var(--tomato); }
.rv-sort select {
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--cocoa);
  padding: 10px 36px 10px 16px; border-radius: 999px; border: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b9411b' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  box-shadow: inset 0 0 0 1.5px #ead6bd;
  appearance: none; cursor: pointer;
}

.rv-list {
  list-style: none; margin: 0; padding: 0;
  columns: 1; column-gap: 20px;
}
@media (min-width: 700px) { .rv-list { columns: 2; } }
@media (min-width: 1080px) { .rv-list { columns: 3; } }
.review {
  break-inside: avoid; margin-bottom: 20px;
  background: #fff; border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow-cream);
}
.review.is-new { animation: pop .6s var(--ease-spring); box-shadow: 0 0 0 2px var(--gold), var(--shadow-cream); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.review__head { display: flex; align-items: center; gap: 12px; }
.review__avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold), var(--ember));
  color: var(--cocoa); font-family: var(--f-display); font-size: 1.2rem;
}
.review__who { display: flex; flex-direction: column; margin-right: auto; line-height: 1.25; }
.review__who strong { font-size: .98rem; }
.review__who time { font-size: .8rem; color: #a08670; }
.review .stars { color: var(--cocoa); }
.review__text { margin: 14px 0 0; color: var(--cocoa-2); font-size: .98rem; }

.rv-note { margin: 8px 0 0; text-align: center; font-size: .82rem; color: #a08670; }
