/* Luxon — prototipo de reseñas, tomado de prototipo-resenas/resenas.css. Aislado bajo
   #resenas-proto (ver base.css para los tokens/reset compartidos). */
#resenas-proto {
  --stage-h: clamp(480px, calc(100svh - 330px), 680px);   /* alto del video = alto de la columna de reseñas */
  --on-dark-muted: rgba(255, 255, 255, .62);
  --on-dark-line: rgba(255, 255, 255, .1);
}

#resenas-proto .stars { display: inline-flex; gap: 2px; color: var(--gold); }
#resenas-proto .stars svg { width: 15px; height: 15px; }
#resenas-proto .stars .off { color: rgba(229, 186, 142, .25); }
#resenas-proto .r-card .stars { color: var(--gold-mark); }
#resenas-proto .r-card .stars .off { color: rgba(176, 128, 80, .25); }

#resenas-proto .src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
#resenas-proto .src svg { width: 16px; height: 16px; flex: none; }

#resenas-proto .avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ivory); color: var(--gold-text);
  font-size: 14px; font-weight: 500; letter-spacing: .04em;
  position: relative; overflow: hidden;
}
#resenas-proto .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Escenario: título + video + reseñas en movimiento ---------- */
#resenas-proto .stage { background: var(--ink); color: #fff; padding: clamp(28px, 4vw, 44px) 0 clamp(56px, 7vw, 88px); }
#resenas-proto .stage-head {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: end;
  padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--on-dark-line);
}
#resenas-proto .stage-head h1 {
  margin: 0; max-width: 22ch;
  font-weight: 300; font-size: clamp(34px, 4vw, 54px); line-height: 1.02; letter-spacing: -.02em; text-wrap: balance;
}
#resenas-proto .stage-head h1 em { font-style: normal; color: var(--gold); }

#resenas-proto .score { display: flex; align-items: center; gap: 20px; }
#resenas-proto .score-num { font-weight: 300; font-size: 56px; line-height: .9; }
#resenas-proto .score-meta { display: grid; gap: 6px; font-size: 14px; color: var(--on-dark-muted); }
#resenas-proto .score-meta strong { color: #fff; font-weight: 500; }
#resenas-proto .score-src { display: flex; gap: 16px; }
#resenas-proto .score-src .src { color: var(--on-dark-muted); font-size: 13px; letter-spacing: 0; }

#resenas-proto .stage-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 2.4vw, 32px); height: var(--stage-h); }

/* Video vertical */
#resenas-proto .player { position: relative; height: var(--stage-h); width: calc(var(--stage-h) * 9 / 16); overflow: hidden; background: #000; border-radius: var(--radius); }
#resenas-proto .player video { width: 100%; height: 100%; object-fit: cover; display: block; }
#resenas-proto .player::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.45) 0, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 55%, rgba(0,0,0,.72)); }
#resenas-proto .player-top { position: absolute; z-index: 2; top: 16px; left: 16px; right: 16px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
#resenas-proto .p-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(14, 13, 12, .45); border: 1px solid rgba(255,255,255,.22); color: #fff;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s;
}
#resenas-proto .p-btn:hover { background: rgba(14, 13, 12, .7); }
#resenas-proto .p-btn svg { width: 18px; height: 18px; }
#resenas-proto .audio-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px 0 14px; border-radius: 999px;
  background: rgba(14, 13, 12, .45); border: 1px solid rgba(255,255,255,.22); color: #fff;
  font: inherit; font-size: 14px; line-height: 1; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .2s;
}
#resenas-proto .audio-btn:hover { background: rgba(14, 13, 12, .7); }
#resenas-proto .audio-btn svg { width: 18px; height: 18px; flex: none; }
#resenas-proto .player-bottom { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; }
#resenas-proto .caption {
  min-height: 2.6em; margin: 0 0 14px;
  font-size: 17px; line-height: 1.3; font-weight: 400; text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0,0,0,.55);
  transition: opacity .25s;
}
#resenas-proto .caption:empty { opacity: 0; }
#resenas-proto .player-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; font-size: 14px; }
#resenas-proto .player-title span { color: var(--on-dark-muted); font-size: 13px; }
#resenas-proto .progress { height: 2px; margin-top: 12px; background: rgba(255,255,255,.2); }
#resenas-proto .progress i { display: block; height: 100%; width: 0; background: var(--gold); }
#resenas-proto .player-play {
  position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%; display: none; place-items: center;
  background: var(--gold); color: var(--ink); border: 0;
}
#resenas-proto .player-play svg { width: 26px; height: 26px; margin-left: 3px; }
#resenas-proto .player.paused .player-play { display: grid; }
#resenas-proto .player.failed video, #resenas-proto .player.failed .player-top, #resenas-proto .player.failed .player-play, #resenas-proto .player.failed .progress, #resenas-proto .player.failed .caption { display: none; }
#resenas-proto .player.failed { background: var(--ink-2) center / cover no-repeat; }
#resenas-proto .player-error { display: none; margin: 0 0 8px; font-size: 14px; color: var(--on-dark-muted); }
#resenas-proto .player.failed .player-error { display: block; }
#resenas-proto .player-nav { position: absolute; z-index: 2; top: 50%; left: 10px; right: 10px; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
#resenas-proto .player-nav .p-btn { pointer-events: auto; }

/* Columna de reseñas en movimiento */
#resenas-proto .ticker { position: relative; min-width: 0; height: var(--stage-h); display: flex; flex-direction: column; }
#resenas-proto .ticker-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; }
#resenas-proto .ticker-bar .label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); }
#resenas-proto .ticker-ctrl { display: flex; gap: 8px; }
#resenas-proto .ticker-ctrl .p-btn { width: 36px; height: 36px; background: transparent; border-color: var(--on-dark-line); }
#resenas-proto .ticker-ctrl .p-btn:hover { border-color: rgba(255,255,255,.4); }
#resenas-proto .ticker-win {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  mask-image: linear-gradient(180deg, #000 0, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 82%, transparent);
}
#resenas-proto .ticker-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; will-change: transform; }
#resenas-proto .ticker-list.moving { transition: transform .8s var(--ease); }

#resenas-proto .t-card {
  display: grid; grid-template-columns: 210px 1fr; gap: 6px 28px;
  padding: 20px 22px; background: var(--ink-2); border: 1px solid var(--on-dark-line); border-radius: var(--radius);
}
#resenas-proto .t-card .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
#resenas-proto .t-card .avatar { background: rgba(229, 186, 142, .12); color: var(--gold); }
#resenas-proto .t-card .name { display: block; font-size: 15px; line-height: 1.25; color: #fff; }
#resenas-proto .t-card .when { display: block; font-size: 12.5px; color: var(--on-dark-muted); }
#resenas-proto .t-card .body { min-width: 0; }
#resenas-proto .t-card .rate > span:first-child { display: inline-flex; align-items: center; }
#resenas-proto .t-card .rate { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
#resenas-proto .t-card .src { color: var(--on-dark-muted); }
#resenas-proto .t-card p {
  max-width: 72ch; margin: 0; color: rgba(255,255,255,.86); font-size: 15px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
#resenas-proto .t-card.is-new { border-color: rgba(229, 186, 142, .45); }
#resenas-proto .badge-new { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); background: var(--gold); padding: 2px 7px; margin-left: 8px; vertical-align: 2px; }
#resenas-proto .recommends { font-size: 13px; color: var(--gold); }

@media (max-width: 1100px) {
  #resenas-proto .t-card { grid-template-columns: 1fr; }
  #resenas-proto .t-card p { -webkit-line-clamp: 3; }
}
@media (max-width: 760px) {
  #resenas-proto .stage-head { grid-template-columns: 1fr; }
  #resenas-proto .score-num { font-size: 52px; }
  #resenas-proto .stage-grid { grid-template-columns: 1fr; height: auto; }
  #resenas-proto .player { height: auto; width: min(100%, calc(min(56svh, 560px) * 9 / 16)); aspect-ratio: 9 / 16; margin: 0 auto; }
  #resenas-proto .ticker { height: 420px; }
  #resenas-proto .t-card { padding: 16px 18px; }
}
/* Objetivos táctiles de 44 px en pantallas touch */
@media (pointer: coarse) {
  #resenas-proto .p-btn, #resenas-proto .ticker-ctrl .p-btn { width: 44px; height: 44px; }
  #resenas-proto .audio-btn { height: 44px; }
}

/* ---------- Listado completo ---------- */
#resenas-proto .all { --focus: var(--ink); padding: clamp(56px, 8vw, 104px) 0; }
#resenas-proto .all .section-head h2 { margin: 0; }
#resenas-proto .sort-note { display: block; margin-top: 8px; }
#resenas-proto .all .section-head { flex-wrap: wrap; }
#resenas-proto .all .chips { flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; mask-image: none; overflow: visible; flex-wrap: wrap; }
#resenas-proto .sort-note { font-size: 15px; color: var(--muted); }

/* Masonry sobre grid: filas de 1px y cada tarjeta ocupa tantas como mide (lo calcula app.js).
   El auto-placement coloca cada reseña, en orden, en la columna más corta: no hay huecos
   y se sigue leyendo de la más reciente a la más antigua (con columnas CSS el orden sería vertical). */
#resenas-proto .r-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1px; column-gap: 20px; align-items: start; margin-top: 8px; }
@media (max-width: 1100px) { #resenas-proto .r-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { #resenas-proto .r-grid { grid-template-columns: 1fr; column-gap: 14px; } }
#resenas-proto .r-card {
  padding: 24px; scroll-margin-top: calc(var(--header-h) + 24px);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
#resenas-proto .r-card[hidden] { display: none; }
#resenas-proto .r-card:focus { outline: none; }
#resenas-proto .r-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
#resenas-proto .r-card header { display: flex; align-items: center; gap: 12px; }
#resenas-proto .r-card .who { flex: 1; min-width: 0; }
#resenas-proto .r-card .name { display: block; color: var(--ink); font-size: 16px; line-height: 1.25; }
#resenas-proto .r-card .when { display: block; font-size: 13px; color: var(--muted); }
#resenas-proto .r-card .rate { margin: 16px 0 8px; display: flex; align-items: center; gap: 10px; }
#resenas-proto .r-card .recommends { color: var(--gold-text); }
#resenas-proto .r-card .text { margin: 0; color: var(--text); font-size: 16px; line-height: 1.6; white-space: pre-line; }
#resenas-proto .r-card .text.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
#resenas-proto .more-link { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 14px; color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }
#resenas-proto .r-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
#resenas-proto .r-photos button { padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--ivory); cursor: zoom-in; }
#resenas-proto .r-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
#resenas-proto .r-photos button:hover img { transform: scale(1.05); }
#resenas-proto .reply { margin-top: 16px; padding: 14px 16px; background: var(--ivory); font-size: 14.5px; color: var(--muted); }
#resenas-proto .reply summary { cursor: pointer; color: var(--ink); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; list-style: none; }
#resenas-proto .reply summary::-webkit-details-marker { display: none; }
#resenas-proto .reply summary::after { content: " +"; color: var(--gold-text); }
#resenas-proto .reply[open] summary::after { content: " −"; }
#resenas-proto .reply p { margin: 8px 0 0; white-space: pre-line; }

#resenas-proto .load-more { display: flex; justify-content: center; margin-top: 16px; }
#resenas-proto .load-more[hidden] { display: none; }
#resenas-proto .list-foot { margin-top: 20px; text-align: center; font-size: 14px; color: var(--muted); }
#resenas-proto .list-foot a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Deja tu reseña: bloque secundario al pie del listado ---------- */
#resenas-proto .leave-review {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line);
}
#resenas-proto .leave-review h3 { margin: 0; font-weight: 400; font-size: 22px; line-height: 1.25; color: var(--ink); }
#resenas-proto .leave-review p { margin: 4px 0 0; color: var(--muted); }
#resenas-proto .leave-review .actions { display: flex; flex-wrap: wrap; gap: 10px; }
#resenas-proto .leave-review .btn { min-height: 44px; padding: 0 18px; }

/* ---------- Cierre: cotizar o visitar el showroom (usa .cta-band) ---------- */
#resenas-proto .visit p { margin: 14px 0 0; max-width: 48ch; color: var(--on-dark-muted); }

#resenas-proto .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  #resenas-proto .ticker-win { overflow-y: auto; mask-image: none; -webkit-mask-image: none; }
}
