/* ===========================================================
   PEPTIGRID Reviews - Styles
   Used on: index.html, reviews.html, all product pages
   =========================================================== */

/* Editorial serif for review headlines (matches founder page) */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&display=swap");

/* ----- Star rating ----- */
.stars { display:inline-flex; align-items:center; gap:2px; line-height:1; }
.stars__star { width:14px; height:14px; display:inline-block; }
.stars__star svg { width:100%; height:100%; display:block; }
.stars__star path { fill:var(--accent); }
.stars__star--empty path { fill:var(--text-15); }
.stars--lg .stars__star { width:20px; height:20px; }
.stars--xl .stars__star { width:26px; height:26px; }

/* ----- Initials avatar ----- */
.rvAvatar {
  width:44px; height:44px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-family:"Fraunces", serif; font-weight:600;
  font-size:16px; letter-spacing:.02em; flex-shrink:0;
  user-select:none;
}
.rvAvatar--lg { width:56px; height:56px; font-size:20px; }

/* Verified badge */
.rvVerified {
  display:inline-flex; align-items:center; gap:5px;
  font-size:11px; font-weight:700; color:var(--green);
  background:var(--green-light); padding:3px 8px; border-radius:999px;
  letter-spacing:.01em;
}
.rvVerified::before {
  content:""; width:6px; height:6px; border-radius:50%; background:var(--green);
}

/* ====================================================
   REVIEW CARD
   ==================================================== */
.rvCard {
  border:1px solid var(--line); border-radius:var(--radius-card);
  background:var(--white-25); padding:22px;
  display:flex; flex-direction:column; gap:14px;
  transition:border-color .15s ease, transform .15s ease;
}
.rvCard:hover { border-color:var(--text-18); }
.rvCard--clickable { cursor:pointer; }
.rvCard--clickable:hover { transform:translateY(-2px); }

.rvCard__head { display:flex; align-items:flex-start; gap:12px; }
.rvCard__who { display:flex; flex-direction:column; gap:3px; min-width:0; flex:1; }
.rvCard__name {
  font-size:15px; font-weight:700; color:var(--text);
  letter-spacing:-0.01em; line-height:1.2;
}
.rvCard__city {
  font-size:12px; color:var(--muted); letter-spacing:.02em;
}
.rvCard__meta {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  margin-top:4px;
}

.rvCard__body {
  font-family:"Fraunces", serif; font-size:16px; line-height:1.55;
  color:var(--text); font-weight:400; letter-spacing:-0.005em;
  margin:0;
}

[data-theme="dark"] .rvCard {
  background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.06);
}
[data-theme="dark"] .rvCard:hover { border-color:rgba(255,255,255,.18); }

/* ----- Photos in card ----- */
.rvCard__photos {
  display:grid; gap:6px; border-radius:12px; overflow:hidden;
}
.rvCard__photos--1 { grid-template-columns:1fr; }
.rvCard__photos--2 { grid-template-columns:1fr 1fr; }
.rvCard__photos--3 { grid-template-columns:2fr 1fr; grid-template-rows:1fr 1fr; }
.rvCard__photos--3 .rvCard__photo:first-child { grid-row:1 / 3; }

.rvCard__photo {
  position:relative; aspect-ratio:1/1; background:var(--text-05);
  cursor:zoom-in; overflow:hidden;
}
.rvCard__photos--1 .rvCard__photo { aspect-ratio:4/3; }
.rvCard__photo img {
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .3s ease;
}
.rvCard__photo:hover img { transform:scale(1.04); }

/* Landing page: smaller photos (40% reduction) since cards are narrower */
.reviewsSection .rvCard__photos {
  max-width:60%;
  margin:0 auto;
}
.reviewsSection .rvCard__photo { aspect-ratio:1/1; }
.reviewsSection .rvCard__photos--1 .rvCard__photo { aspect-ratio:4/3; }
@media(max-width:920px) {
  .reviewsSection .rvCard__photos { max-width:75%; }
}

/* ====================================================
   LANDING PAGE REVIEWS SECTION
   ==================================================== */
.reviewsSection {
  padding:68px 0; border-top:1px solid var(--line);
}
.reviewsSection__head {
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:24px; margin-bottom:36px; flex-wrap:wrap;
}
.reviewsSection__intro { flex:1; min-width:280px; }
.reviewsSection__label {
  font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-family:var(--mono); margin:0 0 8px;
}
.reviewsSection__title {
  font-family:"Fraunces", serif; font-weight:500;
  font-size:clamp(28px, 4vw, 42px); letter-spacing:-0.02em;
  margin:0 0 10px; line-height:1.1; color:var(--text);
}
.reviewsSection__sub {
  font-size:15px; color:var(--muted); margin:0; max-width:520px;
  line-height:1.55;
}

/* Aggregate score block */
.aggScore {
  display:flex; align-items:center; gap:18px;
  padding:18px 22px; border:1px solid var(--line);
  border-radius:var(--radius-card); background:var(--white-25);
}
.aggScore__num {
  font-family:"Fraunces", serif; font-weight:600;
  font-size:42px; line-height:1; color:var(--text);
  letter-spacing:-0.02em;
}
.aggScore__right { display:flex; flex-direction:column; gap:4px; }
.aggScore__count {
  font-size:12px; color:var(--muted); font-family:var(--mono);
  letter-spacing:.04em;
}
[data-theme="dark"] .aggScore { background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.06); }

.reviewsSection__grid {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:18px;
}

/* ====================================================
   SLIDER (landing page, when >3 reviews)
   ==================================================== */
.rvSlider {
  --rv-per-view: 3;
  --rv-gap: 18px;
  position:relative;
  display:block !important;
  padding:0 0 8px;
}
.rvSlider__viewport {
  overflow:hidden;
  margin:0 -4px; /* tiny breathing room for shadow */
}
.rvSlider__track {
  display:flex;
  gap:var(--rv-gap);
  transition:transform .55s cubic-bezier(.4, 0, .2, 1);
  will-change:transform;
}
.rvSlider__slide {
  flex:0 0 calc((100% - (var(--rv-per-view) - 1) * var(--rv-gap)) / var(--rv-per-view));
  min-width:0;
  display:flex;
}
.rvSlider__slide .rvCard {
  flex:1;
  min-width:0;
}

/* Arrow navigation */
.rvSlider__nav {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:44px; height:44px; border-radius:50%;
  border:1px solid var(--text-18);
  background:var(--bg);
  color:var(--text);
  font-size:22px; font-weight:400; line-height:1;
  cursor:pointer; z-index:5;
  display:grid; place-items:center;
  transition:background .15s ease, border-color .15s ease, opacity .2s ease;
  box-shadow:var(--shadow-soft);
}
.rvSlider__nav:hover {
  background:var(--text-05);
  border-color:var(--text-30);
}
.rvSlider__nav--prev { left:-22px; }
.rvSlider__nav--next { right:-22px; }
.rvSlider__nav.is-disabled {
  opacity:0.35;
}

/* Dots */
.rvSlider__dots {
  display:flex; justify-content:center; gap:8px;
  margin-top:24px;
}
.rvSlider__dot {
  width:8px; height:8px; border-radius:50%;
  border:none; background:var(--text-18);
  padding:0; cursor:pointer;
  transition:background .15s ease, transform .15s ease;
}
.rvSlider__dot:hover { background:var(--text-30); }
.rvSlider__dot.is-active {
  background:var(--accent);
  transform:scale(1.3);
}

[data-theme="dark"] .rvSlider__nav {
  background:var(--panel);
  border-color:rgba(255,255,255,.12);
}
[data-theme="dark"] .rvSlider__nav:hover {
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.25);
}

@media(max-width:920px) {
  .rvSlider__nav--prev { left:4px; }
  .rvSlider__nav--next { right:4px; }
  .rvSlider__nav {
    width:38px; height:38px; font-size:18px;
    background:rgba(255,255,255,.92);
    backdrop-filter:blur(4px);
  }
  [data-theme="dark"] .rvSlider__nav {
    background:rgba(26,26,31,.92);
  }
}
.reviewsSection__cta {
  margin-top:28px; text-align:center;
}
.reviewsSection__ctaLink {
  display:inline-flex; align-items:center; gap:8px;
  padding:14px 24px; border-radius:999px;
  border:1px solid var(--text-18); background:transparent;
  font-weight:650; letter-spacing:-0.01em; color:var(--text);
  transition:background .15s ease, border-color .15s ease;
}
.reviewsSection__ctaLink:hover { background:var(--text-05); border-color:var(--text-30); }

@media(max-width:920px) {
  .reviewsSection__grid { grid-template-columns:1fr; }
  .reviewsSection { padding:48px 0; }
}

/* ====================================================
   REVIEWS PAGE (reviews.html)
   ==================================================== */
.rvPage {
  padding:48px 0 80px;
}
.rvPage__hero {
  text-align:center; max-width:760px; margin:0 auto 44px;
}
.rvPage__label {
  font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-family:var(--mono); margin:0 0 14px;
}
.rvPage__title {
  font-family:"Fraunces", serif; font-weight:500;
  font-size:clamp(36px, 6vw, 56px); letter-spacing:-0.025em;
  line-height:1.05; margin:0 0 18px; color:var(--text);
}
.rvPage__sub {
  font-size:16px; color:var(--muted); line-height:1.6; margin:0 auto;
  max-width:540px;
}

/* Aggregate stats panel */
.rvStats {
  display:grid; grid-template-columns:auto 1fr; gap:36px;
  padding:32px 36px; border:1px solid var(--line);
  border-radius:var(--radius-card); background:var(--white-25);
  margin:0 auto 44px; max-width:760px; align-items:center;
}
.rvStats__left { text-align:center; }
.rvStats__num {
  font-family:"Fraunces", serif; font-weight:600;
  font-size:64px; line-height:1; color:var(--text);
  letter-spacing:-0.03em; margin-bottom:8px;
}
.rvStats__count {
  font-size:12px; color:var(--muted); font-family:var(--mono);
  letter-spacing:.04em; margin-top:8px;
}
.rvStats__breakdown { display:flex; flex-direction:column; gap:6px; }
.rvBreakdownRow {
  display:grid; grid-template-columns:42px 1fr 32px;
  align-items:center; gap:10px; font-size:12px; color:var(--muted);
  font-family:var(--mono);
}
.rvBreakdownRow__label { display:flex; align-items:center; gap:3px; }
.rvBreakdownRow__bar {
  height:6px; border-radius:999px; background:var(--text-08);
  overflow:hidden;
}
.rvBreakdownRow__fill {
  height:100%; background:var(--accent); border-radius:999px;
  transition:width .3s ease;
}
.rvBreakdownRow__count { text-align:right; font-weight:700; color:var(--text); }
[data-theme="dark"] .rvStats { background:rgba(255,255,255,.03); border-color:rgba(255,255,255,.06); }

@media(max-width:680px) {
  .rvStats { grid-template-columns:1fr; gap:24px; padding:24px; }
}

/* Filter / sort toolbar */
.rvToolbar {
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; margin-bottom:28px; flex-wrap:wrap;
}
.rvFilters { display:flex; gap:8px; flex-wrap:wrap; }
.rvChip {
  padding:8px 16px; border-radius:999px; border:1px solid var(--text-18);
  background:transparent; font-size:13px; font-weight:600; cursor:pointer;
  color:var(--text); transition:all .15s ease;
  font-family:var(--sans); white-space:nowrap;
}
.rvChip:hover { background:var(--text-05); border-color:var(--text-30); }
.rvChip.is-active {
  background:var(--text); color:var(--bg); border-color:var(--text);
}
[data-theme="dark"] .rvChip.is-active { background:var(--text); color:var(--bg); }

.rvSort {
  display:flex; align-items:center; gap:10px; font-size:13px; color:var(--muted);
}
.rvSort select {
  padding:8px 14px; border-radius:999px; border:1px solid var(--text-18);
  background:transparent; color:var(--text); font-family:var(--sans);
  font-size:13px; font-weight:600; cursor:pointer; outline:none;
}

/* Reviews grid */
.rvGrid {
  display:grid; grid-template-columns:repeat(2, 1fr); gap:20px;
}
@media(max-width:820px) {
  .rvGrid { grid-template-columns:1fr; }
}

.rvEmpty {
  padding:60px 20px; text-align:center; color:var(--muted);
  border:1px dashed var(--line); border-radius:var(--radius-card);
}

/* ====================================================
   PHOTO GALLERY (on reviews.html)
   ==================================================== */
.rvGallery {
  margin-top:72px; padding-top:56px; border-top:1px solid var(--line);
}
.rvGallery__head { text-align:center; margin-bottom:32px; }
.rvGallery__label {
  font-size:11px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted); font-family:var(--mono); margin:0 0 10px;
}
.rvGallery__title {
  font-family:"Fraunces", serif; font-weight:500;
  font-size:clamp(28px, 4vw, 38px); letter-spacing:-0.02em;
  line-height:1.1; margin:0; color:var(--text);
}
.rvGallery__grid {
  columns:4 200px; column-gap:8px;
}
.rvGallery__item {
  break-inside:avoid; margin-bottom:8px; border-radius:10px;
  overflow:hidden; cursor:zoom-in; position:relative;
  background:var(--text-05);
}
.rvGallery__item img {
  width:100%; height:auto; display:block;
  transition:transform .3s ease;
}
.rvGallery__item:hover img { transform:scale(1.05); }
.rvGallery__item::after {
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, transparent 60%, rgba(0,0,0,.4));
  opacity:0; transition:opacity .2s ease; pointer-events:none;
}
.rvGallery__item:hover::after { opacity:1; }
.rvGallery__caption {
  position:absolute; bottom:8px; left:10px; right:10px;
  color:#fff; font-size:11px; font-weight:700; z-index:1;
  opacity:0; transition:opacity .2s ease;
  text-shadow:0 1px 4px rgba(0,0,0,.5);
}
.rvGallery__item:hover .rvGallery__caption { opacity:1; }

/* ====================================================
   PRODUCT PAGE REVIEWS BLOCK
   ==================================================== */
.rvProduct {
  margin-top:48px; padding-top:40px; border-top:1px solid var(--line);
}
.rvProduct__head {
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; margin-bottom:24px; flex-wrap:wrap;
}
.rvProduct__title {
  font-family:"Fraunces", serif; font-weight:500;
  font-size:26px; letter-spacing:-0.02em; margin:0; color:var(--text);
}
.rvProduct__agg {
  display:flex; align-items:center; gap:10px;
  font-size:13px; color:var(--muted); font-family:var(--mono);
}
.rvProduct__agg strong { color:var(--text); font-size:15px; }
.rvProduct__list {
  display:grid; grid-template-columns:repeat(2, 1fr); gap:18px;
}
.rvProduct__more {
  margin-top:24px; text-align:center;
}
.rvProduct__moreLink {
  display:inline-flex; align-items:center; gap:6px;
  padding:12px 20px; border-radius:999px; border:1px solid var(--text-18);
  font-weight:650; font-size:14px; color:var(--text);
  transition:all .15s ease;
}
.rvProduct__moreLink:hover { background:var(--text-05); border-color:var(--text-30); }

@media(max-width:820px) {
  .rvProduct__list { grid-template-columns:1fr; }
}

/* ====================================================
   LIGHTBOX (full review modal + image zoom)
   ==================================================== */
.rvLightbox {
  position:fixed; inset:0; z-index:200;
  background:rgba(0,0,0,.78); backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  display:none; align-items:center; justify-content:center;
  padding:20px; opacity:0; transition:opacity .2s ease;
}
.rvLightbox.is-open { display:flex; opacity:1; }
.rvLightbox__panel {
  background:var(--bg); border-radius:18px; max-width:680px;
  width:100%; max-height:90vh; overflow-y:auto;
  position:relative; padding:32px;
}
.rvLightbox__close {
  position:absolute; top:14px; right:14px;
  width:36px; height:36px; border-radius:50%;
  border:1px solid var(--line); background:var(--bg);
  cursor:pointer; display:grid; place-items:center;
  font-size:18px; color:var(--text); z-index:2;
}
.rvLightbox__close:hover { background:var(--text-05); }
.rvLightbox__images {
  display:grid; gap:8px; margin-bottom:20px; border-radius:12px; overflow:hidden;
}
.rvLightbox__images--1 { grid-template-columns:1fr; }
.rvLightbox__images--2 { grid-template-columns:1fr 1fr; }
.rvLightbox__images--3 { grid-template-columns:1fr 1fr 1fr; }
.rvLightbox__img {
  aspect-ratio:1/1; background:var(--text-05); cursor:zoom-in;
  border-radius:8px; overflow:hidden;
}
.rvLightbox__images--1 .rvLightbox__img { aspect-ratio:4/3; }
.rvLightbox__img img { width:100%; height:100%; object-fit:cover; }

/* Image zoom */
.rvZoom {
  position:fixed; inset:0; z-index:300;
  background:rgba(0,0,0,.92); display:none;
  align-items:center; justify-content:center; padding:20px;
}
.rvZoom.is-open { display:flex; }
.rvZoom img {
  max-width:100%; max-height:100%; object-fit:contain;
  border-radius:6px;
}
.rvZoom__close {
  position:absolute; top:20px; right:20px;
  width:44px; height:44px; border-radius:50%;
  background:rgba(255,255,255,.1); color:#fff;
  border:none; cursor:pointer; font-size:22px;
}
.rvZoom__close:hover { background:rgba(255,255,255,.2); }
.rvZoom__nav {
  position:absolute; top:50%; transform:translateY(-50%);
  width:50px; height:50px; border-radius:50%;
  background:rgba(255,255,255,.1); color:#fff;
  border:none; cursor:pointer; font-size:24px;
  display:grid; place-items:center;
}
.rvZoom__nav:hover { background:rgba(255,255,255,.2); }
.rvZoom__nav--prev { left:20px; }
.rvZoom__nav--next { right:20px; }
.rvZoom__nav:disabled { opacity:.3; cursor:not-allowed; }

@media(max-width:560px) {
  .rvLightbox__panel { padding:24px 18px; }
  .rvZoom__nav { width:40px; height:40px; font-size:20px; }
}
