/* ─────────────────────────────────────────────────────────────────────
   Avenu / photo-testimonials
   Aggregate-rating block (left) + photo-review carousel (right).
   Two cols on desktop, stacked on mobile. Cards are surface rectangles
   with portrait photo, star row, quote, name·city·verified-buyer chip.
   ───────────────────────────────────────────────────────────────────── */

.av-reviews { position: relative; }

.av-reviews__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.av-reviews__head-text { max-width: 720px; }
.av-reviews__title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  margin: 0;
}
.av-reviews__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin: 8px 0 0 0;
  line-height: var(--leading-base);
}

/* ── Two-column layout ────────────────────────────────────────────── */
.av-reviews__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-7);
  align-items: start;
}

/* ── Aggregate block (left col) ───────────────────────────────────── */
.av-reviews__aggregate {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.av-reviews__agg-score {
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.av-reviews__agg-stars {
  display: flex;
  gap: 2px;
  margin: 10px 0 6px 0;
  color: var(--color-text);
}
.av-reviews__agg-total {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5) 0;
  line-height: var(--leading-base);
}

/* Bars */
.av-reviews__bars {
  list-style: none;
  margin: 0 0 var(--space-5) 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.av-reviews__bar-row {
  display: grid;
  grid-template-columns: 28px 1fr 44px;
  align-items: center;
  gap: 10px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.av-reviews__bar-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 600;
  color: var(--color-text);
}
.av-reviews__bar-label svg { color: var(--color-text); }
.av-reviews__bar-track {
  position: relative;
  height: 6px;
  background: var(--color-border-soft);
  border-radius: 3px;
  overflow: hidden;
}
.av-reviews__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-text);
  border-radius: 3px;
  transition: width var(--transition-base);
}
.av-reviews__bar-count {
  text-align: right;
  font-size: var(--text-xs);
}

.av-reviews__cta {
  margin-top: auto;
  align-self: stretch;
  justify-content: center;
}

/* ── Carousel (right col) ─────────────────────────────────────────── */
.av-reviews__carousel {
  position: relative;
  min-width: 0;
}
.av-reviews__arrows {
  position: absolute;
  top: -52px;
  right: 0;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.av-reviews__arrow {
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.av-reviews__arrow:hover {
  border-color: var(--color-text);
  background: var(--color-surface);
}

.av-reviews__viewport {
  overflow: hidden;
}
.av-reviews__track {
  display: flex;
  gap: var(--space-4);
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

/* Card */
.av-reviews__card {
  flex: 0 0 calc((100% - (var(--space-4) * 2)) / 3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.av-reviews__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}
.av-reviews__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.av-reviews__photo-placeholder {
  width: 100%; height: 100%;
  display: block;
  background: linear-gradient(135deg, var(--color-surface), var(--color-surface-2));
}
.av-reviews__stars {
  display: flex;
  gap: 2px;
  color: var(--color-text);
  margin-top: 4px;
}
.av-reviews__quote {
  font-size: var(--text-base);
  line-height: var(--leading-base);
  color: var(--color-text);
  margin: 0;
  /* clamp at 4 lines so cards align */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.av-reviews__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 4px;
}
.av-reviews__name {
  font-weight: 700;
  color: var(--color-text);
}
.av-reviews__sep { color: var(--color-text-soft); }
.av-reviews__location { color: var(--color-text-muted); }
.av-reviews__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(22, 163, 74, 0.10);
  color: var(--color-success);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  white-space: nowrap;
}
.av-reviews__verified svg { color: var(--color-success); }

/* ── Tablet (≤1024) ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .av-reviews__layout { grid-template-columns: 240px 1fr; gap: var(--space-5); }
  .av-reviews__card { flex-basis: calc((100% - var(--space-4)) / 2); }
}

/* ── Mobile (≤768) — stack aggregate, 1-up scroll carousel ────────── */
@media (max-width: 768px) {
  .av-reviews__layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .av-reviews__aggregate {
    padding: var(--space-5);
  }
  .av-reviews__agg-score { font-size: 44px; }

  .av-reviews__arrows { display: none; }

  .av-reviews__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--container-pad-mobile) * -1);
    padding: 0 var(--container-pad-mobile);
  }
  .av-reviews__viewport::-webkit-scrollbar { display: none; }
  .av-reviews__track {
    transform: none !important;
    transition: none;
    gap: var(--space-3);
  }
  .av-reviews__card {
    flex: 0 0 82%;
    scroll-snap-align: start;
    padding: var(--space-4);
  }
}
