/* ===========================================================================
   jl-reviews.css — rediseño del bloque de opiniones de producto
   PILOTO: todo cuelga de body#product.
   Para extenderlo a todo el catálogo: sustituir "body#product"
   por "body#product" en este fichero y quitar el {if} de product.tpl.
   di-seo.com — 02/09/2026
   =========================================================================== */

body#product {
  --jlr-tinta: #232324;
  --jlr-suave: #6f6862;
  --jlr-linea: #e8ded2;
  --jlr-papel: #fffdfb;
  --jlr-crema: #ffe8d5;
  --jlr-acento: #e8472b;
  --jlr-estrella: #f2a03d;
  --jlr-vacia: #ded5c9;
  --jlr-radio: 16px;
}

/* --------------------------------------------------------------- estrellas */
body#product .jlr-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  font-size: 1.05rem;
  vertical-align: middle;
}
body#product .jlr-stars::before {
  content: "\2605\2605\2605\2605\2605";
  color: var(--jlr-vacia);
}
body#product .jlr-stars i {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  width: var(--pct, 0%);
  color: var(--jlr-estrella);
  font-style: normal;
}
body#product .jlr-stars i::before {
  content: "\2605\2605\2605\2605\2605";
}

/* ---------------------------------------------------------------- cabecera */
body#product #product-comments-list-header {
  background: var(--jlr-papel);
  border: 1px solid var(--jlr-linea);
  border-radius: var(--jlr-radio);
  padding: 1.7rem 1.9rem 1.5rem;
  margin: 0 0 1.4rem;
}
/* El título "Comentarios (N)" repite el recuento que ya da el resumen.
   Se saca de la vista pero se deja en el DOM: es el único encabezado que
   tiene la sección, y lo necesitan lectores de pantalla y rastreadores.
   Para eliminarlo del todo: display: none. */
body#product .comments-nb {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* la nota original del módulo la sustituye el resumen nuevo */
body#product #product-comments-list-header .comments-note { display: none; }

/* ----------------------------------------------------------------- resumen */
body#product .jlr-resumen {
  display: grid;
  grid-template-columns: minmax(150px, 200px) 1fr;
  gap: 1.5rem 2.4rem;
  align-items: center;
}
body#product .jlr-nota {
  text-align: center;
  padding: 0.2rem 1.2rem 0.2rem 0;
  border-right: 1px solid var(--jlr-linea);
}
body#product .jlr-nota-num {
  display: block;
  font-family: "Clash Grotesk", "General Sans", sans-serif;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1;
  color: var(--jlr-tinta);
  letter-spacing: -0.03em;
}
body#product .jlr-nota-de {
  display: block;
  font-size: 0.78rem;
  color: var(--jlr-suave);
  margin-bottom: 0.55rem;
}
body#product .jlr-nota .jlr-stars { font-size: 1.2rem; }
body#product .jlr-total {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--jlr-suave);
}

/* barras de distribución */
body#product .jlr-barras {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
body#product .jlr-barra {
  display: grid;
  grid-template-columns: 2.6rem 1fr 2.6rem;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  color: var(--jlr-suave);
}
body#product .jlr-barra-label {
  color: var(--jlr-tinta);
  font-weight: 500;
  white-space: nowrap;
}
body#product .jlr-barra-label span { color: var(--jlr-estrella); }
body#product .jlr-barra-pista {
  height: 9px;
  background: #f0e9e0;
  border-radius: 99px;
  overflow: hidden;
}
body#product .jlr-barra-relleno {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--jlr-estrella);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
body#product .jlr-barra-n { text-align: right; font-variant-numeric: tabular-nums; }
body#product .jlr-barra-0 .jlr-barra-relleno { background: var(--jlr-vacia); }

/* ------------------------------------------------------------- tarjeta */
body#product #product-comments-list { display: grid; gap: 0.85rem; }

body#product .product-comment-list-item {
  display: block;
  margin: 0;
  padding: 1.35rem 1.6rem 1.15rem;
  background: var(--jlr-papel);
  border: 1px solid var(--jlr-linea);
  border-radius: var(--jlr-radio);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
body#product .product-comment-list-item:hover {
  border-color: #d9cbb9;
  box-shadow: 0 6px 22px rgba(35, 35, 36, 0.06);
}

/* fila superior: avatar + nombre + fecha, estrellas a la derecha */
body#product .product-comment-list-item .comment-infos {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: auto;
  max-width: none;
  flex: none;
  padding: 0;
  margin: 0 0 0.85rem;
}
body#product .comment-infos .jlr-avatar {
  order: 1;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--jlr-crema);
  color: var(--jlr-tinta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Clash Grotesk", "General Sans", sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
body#product .comment-infos .jlr-quien { order: 2; min-width: 0; }
body#product .comment-infos .comment-author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--jlr-tinta);
  line-height: 1.25;
  padding: 0;
  text-transform: none;
}
body#product .comment-infos .comment-date {
  font-size: 0.78rem;
  color: var(--jlr-suave);
  line-height: 1.3;
  padding: 0;
}
body#product .comment-infos .grade-stars,
body#product .comment-infos .jlr-stars {
  order: 3;
  margin-left: auto;
  flex: none;
}
/* las estrellas nativas del módulo se sustituyen por las nuestras */
body#product .product-comment-list-item .grade-stars { display: none; }

/* contenido */
body#product .product-comment-list-item .comment-content {
  width: auto;
  max-width: none;
  flex: none;
  padding: 0;
}
body#product .comment-content h4,
body#product .comment-content .h4 {
  font-family: "Clash Grotesk", "General Sans", sans-serif;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--jlr-tinta);
  margin: 0 0 0.4rem;
  text-transform: none;
}
body#product .comment-content > p {
  font-size: 0.95rem;
  line-height: 1.62;
  color: #3d3a37;
  margin: 0 0 0.9rem;
  max-width: 68ch;
}

/* acciones */
body#product .comment-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid #f1e9df;
}
body#product .comment-buttons .jlr-util {
  font-size: 0.8rem;
  color: var(--jlr-suave);
  margin-right: 0.2rem;
}
body#product .comment-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--jlr-linea);
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--jlr-suave);
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
body#product .comment-buttons a:hover {
  border-color: var(--jlr-tinta);
  color: var(--jlr-tinta);
  background: #fff;
}
body#product .comment-buttons .report-abuse {
  margin-left: auto;
  border-color: transparent;
  padding: 0.28rem 0.4rem;
  opacity: 0.55;
}
body#product .comment-buttons .report-abuse:hover {
  opacity: 1;
  border-color: transparent;
  color: var(--jlr-acento);
}

/* ------------------------------------------------- pie: ver más opiniones */
body#product #product-comments-list-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}
body#product #product-comments-list-pagination { display: none !important; }
body#product .jlr-mas {
  appearance: none;
  border: 1px solid var(--jlr-tinta);
  background: transparent;
  color: var(--jlr-tinta);
  font-family: "General Sans", sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.7rem 1.6rem;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
body#product .jlr-mas:hover { background: var(--jlr-tinta); color: #fff; }
body#product .jlr-mas[disabled] { opacity: 0.5; cursor: default; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 767px) {
  body#product #product-comments-list-header { padding: 1.3rem 1.1rem; }
  body#product .jlr-resumen { grid-template-columns: 1fr; gap: 1.1rem; }
  body#product .jlr-nota {
    border-right: 0;
    border-bottom: 1px solid var(--jlr-linea);
    padding: 0 0 1rem;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
  }
  body#product .jlr-nota-num { font-size: 2.5rem; }
  body#product .jlr-nota-de,
  body#product .jlr-total { margin: 0; }
  body#product .product-comment-list-item { padding: 1.1rem 1.05rem 0.95rem; }
  body#product .comment-infos .grade-stars,
  body#product .comment-infos .jlr-stars { margin-left: 0; width: 100%; order: 4; }
  body#product .comment-buttons a { padding: 0.4rem 0.8rem; }
}
