/* Lynbro Reviews — front-end card grid.
 * Self-contained luxury styling that works against light or dark themes.
 * Uses inheritable typography / colors when possible.
 */

.lynbro-rv { display: block; }
.lynbro-rv-empty { padding: 1rem; opacity: 0.7; font-style: italic; }

.lynbro-rv-aggregate { text-align: center; margin: 0 auto 1.2rem; line-height: 1.4; }
.lynbro-rv-aggregate__rating { font-weight: 600; font-size: 1.4rem; }
.lynbro-rv-aggregate__stars { color: #E0C68B; letter-spacing: 0.25em; }
.lynbro-rv-aggregate__count { opacity: 0.8; }

.lynbro-rv__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 720px) {
  .lynbro-rv__grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}
.lynbro-rv--list .lynbro-rv__grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.lynbro-rv--carousel .lynbro-rv__grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.6rem;
}
.lynbro-rv--carousel .lynbro-rv-card { scroll-snap-align: start; }

.lynbro-rv-card {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: linear-gradient(160deg, rgba(74,15,30,0.06) 0%, rgba(23,6,11,0.04) 100%);
  border: 1px solid rgba(199,168,105,0.25);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.lynbro-rv-card:hover {
  transform: translateY(-2px);
  border-color: rgba(224,198,139,0.5);
  box-shadow: 0 14px 32px rgba(0,0,0,0.14);
}

/* — Compact head row: [avatar 72px] [name + (stars · date)] [G badge] — */
.lynbro-rv-card__head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1rem;
  min-width: 0;
  text-align: left;     /* override .lynbro-rv--carousel { text-align: center } */
}
.lynbro-rv-card__avatar {
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(199,168,105,0.5);   /* stronger gold ring */
  box-shadow: 0 0 0 3px rgba(199,168,105,0.14);
}
.lynbro-rv-card__avatar img,
.lynbro-rv-card__avatar svg { width: 100%; height: 100%; display: block; object-fit: cover; }
.lynbro-rv-card__who { min-width: 0; display: flex; flex-direction: column; gap: .25rem; text-align: left; }
.lynbro-rv-card__author-link { text-decoration: none; color: inherit; }
.lynbro-rv-card__name {
  font-family: Cinzel, "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: inherit;
  line-height: 1.2;
}
.lynbro-rv-card__meta {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .85rem;
  line-height: 1.2;
  color: inherit;
}
.lynbro-rv-card__sep { opacity: .35; }
.lynbro-rv-card__date { font-style: italic; opacity: .75; }
.lynbro-rv-card__source-wrap { align-self: start; }
.lynbro-rv-card__source {
  display: inline-flex; align-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(199,168,105,0.08);
  border: 1px solid rgba(199,168,105,0.45);
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(199,168,105,0.08);
}

.lynbro-rv-card__stars {
  color: #E0C68B; letter-spacing: 0.08em; font-size: .95rem;
  line-height: 1; display: inline-flex; gap: 1px;
}
.lynbro-rv-card__stars .lynbro-rv-star.is-on { color: #E8D4A8; text-shadow: 0 0 6px rgba(232,212,168,0.35); }
.lynbro-rv-card__stars .lynbro-rv-star { color: rgba(199,168,105,0.25); }
.lynbro-rv-card__stars .lynbro-rv-star.is-on { color: #E0C68B; }

/* — Review text: full width, italic, NO box, NO centered quote marks —
 * !important is needed because the theme (and core blocks) auto-style
 * <blockquote> with rounded background + padding which we don't want here.
 */
.lynbro-rv-card__text,
.lynbro-rv--carousel .lynbro-rv-card__text,
.lynbro-rv--carousel blockquote.lynbro-rv-card__text {
  font-family: "Cormorant Garamond", "Cormorant", serif !important;
  font-style: italic !important;
  font-size: 1.08rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  margin-inline: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  color: inherit !important;
}
/* Kill any leftover centered quote ornaments from theme */
.lynbro-rv-card__text::before,
.lynbro-rv-card__text::after { content: none !important; }

/* ============================================================
 * CAROUSEL (layout="carousel")
 *  - horizontal scroll-snap track
 *  - 3 / 2 / 1 visible cards (desktop / tablet / mobile)
 *  - JS handles autoplay; CSS only sizes things
 * ============================================================ */

.lynbro-rv--carousel {
  --lynbro-rv-card-w: min(720px, 92vw);   /* one wide card at a time */
  position: relative;
  /* Section is sized to the card so only ONE card is visible at any moment.
   * The marquee track still scrolls behind the viewport — next card slides in
   * as the current slides out. Everything inside (aggregate, controls, CTA)
   * inherits this width so it's all visually centered.
   * !important is needed because WP's `wp-block-group.is-layout-constrained`
   * forces `max-width: 1320px` on direct children with higher specificity. */
  max-width: var(--lynbro-rv-card-w) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0;
  box-sizing: border-box;
}

/* Force border-box so card padding doesn't bloat the 720px width to 752px. */
.lynbro-rv--carousel * { box-sizing: border-box; }

/* Section heading + aggregate slightly larger so it earns its place above
 * a single prominent card. */
.lynbro-rv--carousel .lynbro-rv-aggregate {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.lynbro-rv--carousel .lynbro-rv-aggregate__rating { font-size: 1.6rem; }
.lynbro-rv--carousel .lynbro-rv-aggregate__stars { font-size: 1.15rem; }

.lynbro-rv__viewport {
  overflow: hidden;        /* track moves via translateX — no scrollbar */
  padding: .5rem .25rem 1rem;
  /* Soft fade at left/right edges so cards feel like they emerge/dissolve */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}

.lynbro-rv__track {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
  width: max-content;       /* the track is as wide as its (cards + clones) content */
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.lynbro-rv--carousel .lynbro-rv-card {
  flex: 0 0 var(--lynbro-rv-card-w);
  max-width: var(--lynbro-rv-card-w);
  display: flex;
  flex-direction: column;
  /* Section grows to fit current card naturally. Less side padding so the
   * text reads edge-to-edge without an empty halo around it. */
  padding: 1.5rem 1.5rem;
  text-align: left;     /* counter the centered controls/CTA inheritance */
  /* +5% lighter so the card is properly separated from the dark page bg */
  background: linear-gradient(160deg, rgba(74,15,30,0.32) 0%, rgba(23,6,11,0.22) 100%);
  border: 1px solid rgba(199,168,105,0.42);
  box-shadow: 0 6px 28px rgba(0,0,0,0.32), inset 0 1px 0 rgba(224,198,139,0.08);
  border-radius: 12px;
}
/* Clones are visually identical so the loop is seamless. */
.lynbro-rv-card--clone { /* (no marker — kept for selector hooks) */ }

/* — Line-clamped review text + "Show full" toggle — */
.lynbro-rv--carousel .lynbro-rv-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
          line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0 !important;
}
.lynbro-rv--carousel .lynbro-rv-card__text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
          line-clamp: unset;
  overflow: visible;
}
.lynbro-rv-card__more {
  display: none;                /* JS reveals only when text was truncated */
  align-self: flex-start;
  margin-top: .65rem;
  background: none;
  border: none;
  padding: 0;
  color: #C7A869;
  font-family: inherit;
  font-size: .85rem;
  letter-spacing: .04em;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
}
.lynbro-rv-card__more:hover { color: #E0C68B; }
.lynbro-rv-card__more.is-visible { display: inline-block; }

/* Tablet — keep 720px-ish but cap at viewport */
@media (max-width: 980px) {
  .lynbro-rv--carousel { --lynbro-rv-card-w: min(640px, 92vw); }
}
/* Mobile — % on a flex item inside a width:max-content track causes
 * runaway sizing. Use vw which is parent-independent. */
@media (max-width: 640px) {
  .lynbro-rv--carousel { --lynbro-rv-card-w: 92vw; }
  .lynbro-rv__track { gap: .85rem; }
}

/* — Navigation controls (gold round pills) — */
.lynbro-rv__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .65rem;
  margin: 1rem auto .25rem;
}
.lynbro-rv__btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(199,168,105,0.12);
  border: 1px solid rgba(199,168,105,0.4);
  color: #E0C68B;
  font-size: 1.3rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  padding: 0;
}
.lynbro-rv__btn:hover {
  background: rgba(199,168,105,0.25);
  transform: translateY(-1px);
}
.lynbro-rv__btn:focus-visible {
  outline: 2px solid #C7A869;
  outline-offset: 2px;
}
.lynbro-rv__btn--play .lynbro-rv__icon-pause,
.lynbro-rv__btn--play .lynbro-rv__icon-play  { font-size: .75rem; letter-spacing: -.1em; }
.lynbro-rv__btn--play[data-state="playing"] .lynbro-rv__icon-play  { display: none; }
.lynbro-rv__btn--play[data-state="paused"]  .lynbro-rv__icon-pause { display: none; }

/* — "Read more reviews" CTA — */
.lynbro-rv__cta {
  display: inline-block;
  margin: 1.25rem auto 0;
  padding: .65rem 1.6rem;
  background: linear-gradient(135deg, #C7A869, #E0C68B);
  color: #17060B !important;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .82rem;
  font-family: Cinzel, serif;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lynbro-rv--carousel { text-align: center; }
.lynbro-rv__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(199,168,105,0.4);
}

/* — Reduced motion — flatten carousel into vertical stack — */
@media (prefers-reduced-motion: reduce) {
  .lynbro-rv__viewport { scroll-behavior: auto; }
}
