/* =====================================================================
   PILI CAR DETAILING — resenas.css
   Estilos de las páginas de reseñas:
     · resenas.php        (ver opiniones)
     · dejar-resena.php   (dejar la tuya)
   Reutiliza los tokens de style.css (--navy, --blue, --radius…).
   --------------------------------------------------------------------- */

:root {
  --rv-gold: #ffb020;
  --rv-line: #e6eaf3;
}

/* ============================ ESTRELLAS ============================ */
.rv-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 0;
  vertical-align: middle;
}
.rv-star {
  width: var(--rv-star, 18px);
  height: var(--rv-star, 18px);
  fill: #d8dee9;
  flex: none;
}
.rv-star.is-on { fill: var(--rv-gold); }
.rv-star.is-half {
  fill: var(--rv-gold);
  -webkit-mask-image: linear-gradient(90deg, #000 50%, rgba(0, 0, 0, .22) 50%);
          mask-image: linear-gradient(90deg, #000 50%, rgba(0, 0, 0, .22) 50%);
}
.rv-hero .rv-star { fill: rgba(255, 255, 255, .28); }
.rv-hero .rv-star.is-on,
.rv-hero .rv-star.is-half { fill: var(--rv-gold); }

/* ============================ PORTADA ============================ */
.rv-hero .container { position: relative; z-index: 2; }

.rv-hero-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: center;
}
.rv-hero-copy h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.06;
  margin: 0 0 16px;
}
.rv-hero-copy p.rv-lead {
  color: #c3cfe6;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0;
}
.rv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* Tarjeta del producto sobre el que se opina */
.rv-prod-card {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.rv-prod-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  margin-bottom: 18px;
}
.rv-prod-card .rv-prod-brand {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7fa0ff;
}
.rv-prod-card h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 8px 0 12px;
  color: #fff;
}
.rv-prod-card .rv-prod-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #c3cfe6;
  font-size: .88rem;
}

/* Selector de producto (si hay más de uno) */
.rv-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}
.rv-switch a {
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 600;
  color: #c3cfe6;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 9px 18px;
  transition: all .25s var(--ease);
}
.rv-switch a:hover { border-color: #fff; color: #fff; }
.rv-switch a.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ============================ RESUMEN ============================ */
.rv-section { padding-block: 80px; }
.rv-section.tight { padding-block: 60px 0; }

.rv-summary {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--rv-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px;
}
.rv-score { text-align: center; }
.rv-score-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 4.4rem;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -.03em;
}
.rv-score-num span { font-size: 1.6rem; color: var(--gray-400); }
.rv-score .rv-stars { margin: 12px 0 8px; }
.rv-score-total {
  color: var(--ink-soft);
  font-size: .9rem;
}

.rv-bars { display: grid; gap: 10px; }
.rv-bar {
  display: grid;
  grid-template-columns: 62px 1fr 52px;
  align-items: center;
  gap: 14px;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.rv-bar-label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.rv-bar-label svg { width: 14px; height: 14px; fill: var(--rv-gold); }
.rv-bar-track {
  height: 9px;
  border-radius: 999px;
  background: var(--gray-100);
  overflow: hidden;
}
.rv-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--rv-gold);
}
.rv-bar-num { font-size: .84rem; color: var(--ink-soft); text-align: right; }
.rv-bar:hover .rv-bar-track { background: var(--gray-200); }
.rv-bar.is-active .rv-bar-fill { background: var(--blue); }

/* ============================ MURO DE FOTOS ============================ */
.rv-wall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.rv-wall-head h2 {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.rv-wall {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.rv-wall::-webkit-scrollbar { height: 6px; }
.rv-wall::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 999px; }
.rv-wall button {
  flex: none;
  width: 150px;
  height: 150px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-100);
  scroll-snap-align: start;
  transition: transform .3s var(--ease);
}
.rv-wall button:hover { transform: translateY(-4px); }
.rv-wall img { width: 100%; height: 100%; object-fit: cover; }

/* ============================ FILTROS ============================ */
.rv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rv-line);
}
.rv-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.rv-chip {
  font-family: var(--font-head);
  font-size: .84rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--gray-50);
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  padding: 8px 16px;
  transition: all .25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rv-chip:hover { border-color: var(--blue); color: var(--blue); }
.rv-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.rv-chip svg { width: 13px; height: 13px; fill: currentColor; }

.rv-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .86rem;
  color: var(--ink-soft);
}
.rv-sort select {
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--ink);
  border: 1px solid var(--rv-line);
  border-radius: 999px;
  padding: 9px 16px;
  background: #fff;
  cursor: pointer;
}

/* ============================ LISTA ============================ */
.rv-list { display: grid; gap: 20px; }

.rv-card {
  background: #fff;
  border: 1px solid var(--rv-line);
  border-radius: var(--radius);
  padding: 28px 30px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.rv-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.rv-card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.rv-avatar {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-who { flex: 1; min-width: 0; }
.rv-name {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rv-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
  color: #1d7d4f;
  background: #e4f7ee;
  border-radius: 999px;
  padding: 3px 10px;
}
.rv-verified svg { width: 12px; height: 12px; fill: currentColor; }
.rv-meta { font-size: .82rem; color: var(--gray-400); margin-top: 3px; }
.rv-card-head .rv-stars { margin-left: auto; }

.rv-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0 0 8px;
}
.rv-body {
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.rv-photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.rv-photos button {
  width: 104px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-100);
  transition: transform .25s var(--ease);
}
.rv-photos button:hover { transform: scale(1.04); }
.rv-photos img { width: 100%; height: 100%; object-fit: cover; }

.rv-reply {
  margin-top: 20px;
  padding: 18px 20px;
  background: var(--gray-50);
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
}
.rv-reply strong {
  font-family: var(--font-head);
  font-size: .84rem;
  color: var(--navy);
  display: block;
  margin-bottom: 4px;
}
.rv-reply p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* Estado vacío */
.rv-empty {
  text-align: center;
  padding: 70px 30px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: var(--radius);
}
.rv-empty h3 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 10px;
  font-size: 1.3rem;
}
.rv-empty p { color: var(--ink-soft); margin: 0 0 24px; }

/* Paginación */
.rv-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.rv-pager a, .rv-pager span {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--rv-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink-soft);
  transition: all .25s var(--ease);
}
.rv-pager a:hover { border-color: var(--blue); color: var(--blue); }
.rv-pager .is-current { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ============================ CTA FINAL ============================ */
.rv-cta {
  background: var(--navy);
  border-radius: var(--radius-lg);
  color: #fff;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.rv-cta::after {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  top: -220px; right: -140px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(36, 91, 255, .35), transparent 65%);
}
.rv-cta > * { position: relative; z-index: 2; }
.rv-cta h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0 0 14px;
}
.rv-cta p { color: #c3cfe6; max-width: 520px; margin: 0 auto 30px; }

/* ============================ LIGHTBOX ============================ */
.rv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6, 12, 26, .92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.rv-lightbox.is-open { display: flex; }
.rv-lightbox img {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}
.rv-lightbox .rv-lb-close,
.rv-lightbox .rv-lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s var(--ease);
}
.rv-lightbox .rv-lb-close:hover,
.rv-lightbox .rv-lb-nav:hover { background: rgba(255, 255, 255, .26); }
.rv-lightbox .rv-lb-close { top: 24px; right: 24px; }
.rv-lightbox .rv-lb-prev { left: 24px; }
.rv-lightbox .rv-lb-next { right: 24px; }
.rv-lb-caption {
  position: absolute;
  bottom: 26px;
  left: 0; right: 0;
  text-align: center;
  color: #c3cfe6;
  font-size: .86rem;
}

/* ============================ FORMULARIO ============================ */
.rv-form-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 50px;
  align-items: start;
}
.rv-form {
  background: #fff;
  border: 1px solid var(--rv-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 42px;
}
.rv-field { margin-bottom: 26px; }
.rv-field:last-child { margin-bottom: 0; }
.rv-field > label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .92rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.rv-field .rv-help {
  font-size: .82rem;
  color: var(--gray-400);
  margin: 6px 0 0;
}
.rv-req { color: var(--blue); }

.rv-input,
.rv-form select,
.rv-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .97rem;
  color: var(--ink);
  background: var(--gray-50);
  border: 1px solid var(--rv-line);
  border-radius: 14px;
  padding: 14px 18px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.rv-form textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.rv-input:focus,
.rv-form select:focus,
.rv-form textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 91, 255, .10);
}
.rv-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Selector de estrellas */
.rv-rate {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 6px;
}
.rv-rate input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.rv-rate label {
  cursor: pointer;
  line-height: 0;
  padding: 2px;
  border-radius: 8px;
}
.rv-rate label svg {
  width: 38px;
  height: 38px;
  fill: #d8dee9;
  transition: fill .18s var(--ease), transform .18s var(--ease);
}
.rv-rate label:hover svg,
.rv-rate label:hover ~ label svg,
.rv-rate input:checked ~ label svg { fill: var(--rv-gold); }
.rv-rate label:hover svg { transform: scale(1.12); }
.rv-rate input:focus-visible + label { box-shadow: 0 0 0 3px rgba(36, 91, 255, .35); }
.rv-rate-text {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  margin-top: 10px;
  min-height: 22px;
}

/* Subida de fotos */
.rv-drop {
  border: 2px dashed var(--gray-200);
  border-radius: 18px;
  background: var(--gray-50);
  padding: 30px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
  display: block;
}
.rv-drop:hover, .rv-drop.is-over {
  border-color: var(--blue);
  background: #f2f6ff;
}
.rv-drop svg {
  width: 34px; height: 34px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin: 0 auto 12px;
}
.rv-drop strong {
  display: block;
  font-family: var(--font-head);
  color: var(--navy);
  font-size: .96rem;
  margin-bottom: 4px;
}
.rv-drop span { font-size: .84rem; color: var(--ink-soft); }
.rv-drop input[type="file"] { display: none; }

.rv-previews {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.rv-preview {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
}
.rv-preview img { width: 100%; height: 100%; object-fit: cover; }
.rv-preview b {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(8, 21, 46, .72);
  color: #fff;
  font-size: .68rem;
  font-weight: 500;
  padding: 3px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Consentimiento */
.rv-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.5;
  cursor: pointer;
}
.rv-check input {
  width: 20px; height: 20px;
  flex: none;
  margin-top: 2px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Panel lateral de ayuda */
.rv-aside {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 20px;
}
.rv-aside-card {
  background: #fff;
  border: 1px solid var(--rv-line);
  border-radius: var(--radius);
  padding: 28px;
}
.rv-aside-card h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--navy);
  margin: 0 0 14px;
}
.rv-tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rv-tips li {
  display: flex;
  gap: 11px;
  font-size: .89rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.rv-tips svg {
  width: 18px; height: 18px;
  flex: none;
  margin-top: 2px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rv-aside-prod {
  display: flex;
  gap: 16px;
  align-items: center;
}
.rv-aside-prod img {
  width: 78px; height: 78px;
  object-fit: contain;
  background: var(--gray-50);
  border-radius: 14px;
  padding: 6px;
  flex: none;
}
.rv-aside-prod .rv-name { color: var(--navy); font-size: .96rem; }

/* Avisos */
.rv-alert {
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 26px;
  font-size: .92rem;
  line-height: 1.5;
}
.rv-alert-err { background: #fdecef; color: #a3243b; border: 1px solid #f6d3da; }
.rv-alert-ok  { background: #e4f7ee; color: #1a6b45; border: 1px solid #c9ecdb; }

/* Pantalla de gracias */
.rv-thanks {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--rv-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 60px 44px;
}
.rv-thanks-icon {
  width: 78px; height: 78px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #e4f7ee;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rv-thanks-icon svg {
  width: 36px; height: 36px;
  stroke: #1d7d4f;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rv-thanks h1 {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--navy);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 14px;
}
.rv-thanks p { color: var(--ink-soft); margin: 0 0 12px; }
.rv-thanks-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

/* Honeypot antispam */
.rv-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) {
  .rv-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .rv-prod-card { max-width: 420px; }
  .rv-form-grid { grid-template-columns: 1fr; gap: 34px; }
  .rv-aside { position: static; }
}

@media (max-width: 780px) {
  .rv-section { padding-block: 56px; }
  .rv-summary {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 28px 22px;
  }
  .rv-score-num { font-size: 3.4rem; }
  .rv-form { padding: 26px 20px; }
  .rv-two { grid-template-columns: 1fr; gap: 0; }
  .rv-two .rv-field { margin-bottom: 26px; }
  .rv-card { padding: 22px 20px; }
  .rv-card-head { flex-wrap: wrap; }
  .rv-card-head .rv-stars { margin-left: 60px; width: 100%; }
  .rv-toolbar { flex-direction: column; align-items: stretch; }
  .rv-sort { justify-content: space-between; }
  .rv-cta { padding: 40px 24px; }
  .rv-rate label svg { width: 44px; height: 44px; }
  .rv-photos button { width: calc(33.333% - 7px); height: 96px; }
  .rv-wall button { width: 128px; height: 128px; }
  .rv-thanks { padding: 40px 24px; }
  .rv-lightbox .rv-lb-nav { width: 40px; height: 40px; }
  .rv-lightbox .rv-lb-prev { left: 8px; }
  .rv-lightbox .rv-lb-next { right: 8px; }
}
