/* Opiniones — Arcade Express.
   Usa los tokens del tema (--text, --muted, --border, --surface, --red…): si el tema
   cambia de paleta, esto va detrás sin tocar nada. */

.ao-block { margin: 34px 0 8px; }

/* --- estrellas: un SVG no, un recorte por porcentaje. Sin peticiones ni JS --- */
.ao-stars { display: inline-flex; gap: 2px; vertical-align: middle; line-height: 1; }
.ao-star {
  position: relative; width: var(--ao-star, 14px); height: var(--ao-star, 14px);
  background: var(--border);
  -webkit-mask: var(--ao-star-shape) center/contain no-repeat;
          mask: var(--ao-star-shape) center/contain no-repeat;
}
.ao-star-on { position: absolute; inset: 0; background: #F5A623; }
:root {
  --ao-star-shape: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 1.6l2.35 5.1 5.65.64-4.2 3.82 1.1 5.64L10 14.05 5.1 16.8l1.1-5.64L2 7.34l5.65-.64z'/%3E%3C/svg%3E");
}

/* --- resumen: nota grande + reparto por estrellas --- */
.ao-resumen {
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 18px;
}
.ao-nota { display: flex; flex-direction: column; align-items: center; gap: 5px; padding-right: 22px; border-right: 1px solid var(--border); }
.ao-nota-num { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 38px; line-height: 1; color: var(--text); }
.ao-nota-n { font-size: 16px; color: var(--muted); }
.ao-barras { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ao-barra { display: grid; grid-template-columns: 12px 1fr 34px; gap: 9px; align-items: center; font-size: 16px; color: var(--muted); }
.ao-barra-pista { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.ao-barra-val { display: block; height: 100%; background: #F5A623; }
.ao-barra-n { text-align: right; }

/* --- lista --- */
.ao-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ao-item { border: 1px solid var(--border); border-radius: 11px; padding: 14px 16px; background: var(--surface); }
/* Las opiniones sin texto se listan igual (decisión 2026-08-18), pero ocupan menos:
   son una valoración, no una reseña. */
.ao-item-corta { padding: 10px 16px; background: none; }
.ao-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ao-autor { font-weight: 600; font-size: 16px; color: var(--text); }
.ao-fecha { font-size: 16px; color: var(--muted); }
.ao-lang { font-family: 'Share Tech Mono', monospace; font-size: 16px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.ao-texto { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--text); }

.ao-mas { display: block; width: 100%; margin-top: 14px; padding: 12px; background: none; border: 1.5px dashed var(--border); border-radius: 11px; font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 16px; color: var(--red); cursor: pointer; }
.ao-mas:hover { border-color: var(--muted); }
.ao-vacio { font-size: 16px; color: var(--muted); margin: 0; }

/* --- respaldo: el aval de la tienda cuando el producto tiene pocas opiniones.
       Caja aparte a propósito: no se mezcla con las tarjetas del producto. --- */
.ao-respaldo { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 15px; background: var(--surface-2); border-radius: 10px; font-size: 16px; color: var(--muted); }

/* --- estrellas en línea (listados, cabecera de ficha) --- */
.ao-inline { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.ao-inline-n { font-size: 16px; color: var(--muted); }

/* --- nota global suelta --- */
.ao-nota-global { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; color: var(--text); }
.ao-nota-global small { color: var(--muted); font-size: 16px; }

/* --- opiniones de tienda en portada (maqueta 16-home) ---
       Agregado a la izquierda y rejilla de tarjetas a la derecha. No es un carrusel:
       dos tarjetas enteras se leen; seis cortadas por el borde, no. --- */
.testi-wrap {
  background: var(--surface); border-radius: 16px; padding: 36px;
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center;
  box-shadow: var(--shadow);
}
.testi-agg { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.testi-agg .num { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 46px; color: #F5A623; line-height: 1; }
.testi-agg .count { font-size: 16px; color: var(--muted); }
.testi-sello { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted) !important; text-decoration: none; border: 1px solid var(--border); border-radius: 20px; padding: 4px 11px; }
.testi-sello:hover { color: var(--text) !important; border-color: var(--muted); }
.testi-sello .icon { width: 13px; height: 13px; color: #4CBB6C; }
.testi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.testi-card { padding: 16px; background: var(--surface-2); border-radius: 10px; }
.testi-card p { font-size: 16px; line-height: 1.55; margin: 8px 0 10px; color: var(--text); }
.testi-card .author { font-family: 'Rajdhani', sans-serif; font-weight: 600; font-size: 13px; color: var(--muted); }
.testi-fecha { font-weight: 400; }

@media (max-width: 780px) {
  .ao-resumen { grid-template-columns: 1fr; gap: 16px; }
  .ao-nota { flex-direction: row; align-items: baseline; gap: 10px; padding-right: 0; border-right: 0; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
  .testi-wrap { grid-template-columns: 1fr; padding: 24px 20px; gap: 22px; }
  .testi-grid { grid-template-columns: 1fr; gap: 14px; }
}

/* --- portada: carrusel de las últimas opiniones (23-11-2026) --- */
.testi-carrusel { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.testi-pista { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; }
.testi-pista::-webkit-scrollbar { display: none; }
.testi-pista:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 10px; }
.testi-pista .testi-card { scroll-snap-align: start; display: flex; flex-direction: column; min-height: 100%; }
.testi-pista .testi-card p { flex: 1; overflow-wrap: anywhere; }
.testi-producto { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; margin: -4px 0 8px; }
.testi-producto:hover { color: var(--text); }
.testi-nav { display: flex; justify-content: flex-end; gap: 8px; }
.testi-flecha { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; }
.testi-flecha svg { width: 16px; height: 16px; }
.testi-flecha:disabled { opacity: .35; cursor: default; }
@media (max-width: 1100px) { .testi-pista { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 780px) { .testi-pista { grid-auto-columns: 85%; } }

/* --- portada, escritorio: aviso flotante con la nota --- */
.ao-flota { position: fixed; left: 24px; bottom: 24px; z-index: 40; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(10, 12, 18, .12); font-size: 13px; color: var(--text) !important; text-decoration: none;
  animation: ao-entra .25s ease-out; }
.ao-flota b { font-family: 'Rajdhani', sans-serif; font-size: 15px; }
.ao-flota span { color: var(--muted); }
.ao-flota:hover { border-color: var(--muted); }
.ao-flota[hidden] { display: none; }
@keyframes ao-entra { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 980px) { .ao-flota { left: 12px; bottom: 12px; padding: 6px 11px; } }
@media (prefers-reduced-motion: reduce) { .ao-flota { animation: none; } .testi-pista { scroll-behavior: auto; } }
