/* valoracionesestrellas – estrellas y pestaña de opiniones */
:root {
  --vest-star-color: #f5b301;
  --vest-star-empty: #dcdcdc;
  --vest-text-muted: #6b6b6b;
  --vest-border: #ececec;
  --vest-bg-soft: #f7f7f7;
}

/* ---------- Fila de estrellas (relleno parcial, 3 diseños) ----------
   Los colores van con !important sobre cada pieza del SVG: hay temas que
   pintan de negro todos los iconos SVG y pisarían el color de las estrellas. */
.vest-stars { position: relative; display: inline-block; line-height: 0; vertical-align: middle; white-space: nowrap; }
.vest-stars__base, .vest-stars__fill { display: inline-flex; gap: 1px; }
.vest-stars__fill { position: absolute; top: 0; left: 0; overflow: hidden; }
.vest-stars svg.vs-svg { flex: 0 0 auto; display: block; max-width: none; }
.vest-stars__base .vs-star, .vest-stars__base .vs-bg { fill: var(--vest-star-empty) !important; stroke: none !important; }
.vest-stars__fill .vs-star, .vest-stars__fill .vs-bg { fill: var(--vest-star-color) !important; stroke: none !important; }
.vest-stars__base .vs-round { stroke: var(--vest-star-empty) !important; stroke-width: 3.4px !important; stroke-linejoin: round !important; }
.vest-stars__fill .vs-round { stroke: var(--vest-star-color) !important; stroke-width: 3.4px !important; stroke-linejoin: round !important; }
.vest-stars .vs-in { fill: #fff !important; stroke: none !important; }
.vest-stars--sm svg.vs-svg { width: 14px; height: 14px; }
.vest-stars--md svg.vs-svg { width: 19px; height: 19px; }
.vest-stars--lg svg.vs-svg { width: 28px; height: 28px; }
.vest-stars--boxed .vest-stars__base, .vest-stars--boxed .vest-stars__fill { gap: 2px; }
.vest-stars--boxed.vest-stars--sm svg.vs-svg { width: 15px; height: 15px; }

.vest-count { font-size: 13px; color: var(--vest-text-muted); vertical-align: middle; }

/* ---------- Miniaturas: alineadas al inicio del título, sin aire extra ---------- */
.vest-list-reviews { display: flex; align-items: center; justify-content: flex-start; gap: 5px; margin: 2px 0 4px; padding: 0; line-height: 1; text-align: left; }
.vest-list-reviews .vest-count { font-size: 12px; line-height: 1; }
.text-center .vest-list-reviews, .product-miniature.text-center .vest-list-reviews { justify-content: center; }

/* ---------- Ficha: debajo del nombre ---------- */
.vest-product-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.vest-product-summary .vest-count { font-size: 14px; text-decoration: none; }
.vest-product-summary a.vest-count:hover { color: inherit; text-decoration: underline; }
.vest-product-summary .vest-sep { color: #ccc; font-size: 13px; }
.vest-product-summary .vest-write-link { font-size: 14px; color: var(--vest-text-muted); text-decoration: underline; cursor: pointer; }
.vest-product-summary .vest-write-link:hover { color: inherit; }
/* Mientras el JS no la sube (o en vista rápida) se ve donde la pinta el hook */
.product-additional-info .vest-product-summary { margin-top: 10px; }

/* ---------- Pestaña "Opiniones" ---------- */
.vest-reviews { max-width: 900px; margin: 0 auto; padding: 8px 0; }

.vest-box {
  display: grid;
  grid-template-columns: 200px 1fr 220px;
  border: 1px solid var(--vest-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.vest-box > div { padding: 22px 20px; }
.vest-box__score { background: var(--vest-bg-soft); text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.vest-box__avg { line-height: 1; }
.vest-box__avg strong { font-size: 44px; font-weight: 700; color: #222; }
.vest-box__avg span { font-size: 20px; color: var(--vest-text-muted); margin-left: 2px; }
.vest-box__nb { font-size: 13px; color: var(--vest-text-muted); }

.vest-box__bars { display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid var(--vest-border); border-right: 1px solid var(--vest-border); }
.vest-bar { display: grid; grid-template-columns: 38px 1fr 42px; align-items: center; gap: 10px; font-size: 13px; color: #444; }
.vest-bar__label { display: inline-flex; align-items: center; gap: 3px; }
.vest-bar__icon { display: inline-flex; line-height: 0; }
.vest-bar__icon svg.vs-svg { width: 13px; height: 13px; }
.vest-bar__icon .vs-star, .vest-bar__icon .vs-bg { fill: var(--vest-star-color) !important; }
.vest-bar__icon .vs-round { stroke: var(--vest-star-color) !important; stroke-width: 3.4px !important; stroke-linejoin: round !important; }
.vest-bar__icon .vs-in { fill: #fff !important; }
.vest-bar__track { height: 8px; border-radius: 4px; background: #eee; overflow: hidden; }
.vest-bar__value { display: block; height: 100%; border-radius: 4px; background: var(--vest-star-color); }
.vest-bar__pct { text-align: right; font-weight: 600; }

.vest-box__cta { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 10px; }
.vest-box__cta p { margin: 0; font-size: 14px; color: #444; }
.vest-write { white-space: normal; }

.vest-section-head { margin: 30px 0 20px; }
.vest-section-head.nav { flex-wrap: nowrap; }
.vest-section-head .nav-link { cursor: default; }
.vest-in-tab .vest-section-head { display: none; }
.vest-modal .vest-section-head { display: flex; margin-top: 0; }
.vest-reviews--footer { padding-top: 10px; }
.vest-latest { margin: 28px 0 10px; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }

/* Lo que ya resume nuestra caja lo ocultamos del listado nativo */
.vest-reviews #product-comments-list-header,
.vest-reviews #product-comments-list-footer .btn-comment-big { display: none !important; }

.vest-reviews .product-comment-list-item { border-bottom: 1px solid var(--vest-border); padding: 16px 0; margin: 0; }
.vest-reviews .product-comment-list-item:last-child { border-bottom: 0; }

/* Estrellas del listado nativo y del formulario: mismo color que las nuestras */
.vest-reviews .star-content div.star,
.vest-reviews .star-content div.star-on,
.vest-reviews .star-content div.star-hover,
#post-product-comment-modal .star-content div.star,
#post-product-comment-modal .star-content div.star-on,
#post-product-comment-modal .star-content div.star-hover {
  background: var(--vest-star-empty) !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.94 6.26 6.86.8-5.08 4.7 1.36 6.78L12 17.6l-6.08 3.44 1.36-6.78-5.08-4.7 6.86-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.94 6.26 6.86.8-5.08 4.7 1.36 6.78L12 17.6l-6.08 3.44 1.36-6.78-5.08-4.7 6.86-.8z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vest-reviews .star-content div.star-on,
.vest-reviews .star-content div.star-hover,
#post-product-comment-modal .star-content div.star-on,
#post-product-comment-modal .star-content div.star-hover { background: var(--vest-star-color) !important; }

/* ---------- Ventana emergente de opiniones ---------- */
.vest-modal { display: none; position: fixed; inset: 0; z-index: 1030; }
.vest-modal.is-open { display: block; }
.vest-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.vest-modal__dialog {
  position: relative; margin: 4vh auto; width: min(960px, calc(100% - 24px)); max-height: 92vh;
  overflow-y: auto; background: #fff; border-radius: 8px; padding: 28px 24px 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.vest-modal__close {
  position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 32px; line-height: 1;
  color: #666; cursor: pointer; padding: 4px 8px;
}
.vest-modal__close:hover { color: #000; }
html.vest-modal-open, html.vest-modal-open body { overflow: hidden; }

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
  .vest-box { grid-template-columns: 1fr; }
  .vest-box__bars { border-left: 0; border-right: 0; border-top: 1px solid var(--vest-border); border-bottom: 1px solid var(--vest-border); }
}
