/* Отзывы: живые данные с Авито — счётчик, распределение оценок, фото
   клиентов, фильтры, «Показать ещё» и просмотр фото. Дополняет site-v16.css. */

.rv-num { font-variant-numeric: tabular-nums; }
.review-five-stars .rv-off { opacity: .22; }

/* Распределение оценок — на лаймовой панели рейтинга */
.rv-dist { display: grid; gap: 7px; max-width: 320px; margin-top: 22px; }
.rv-dist-row { display: grid; grid-template-columns: 34px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: #131b11; font-variant-numeric: tabular-nums; }
.rv-dist-row span { display: inline-flex; align-items: center; gap: 3px; }
.rv-dist-row svg { width: 12px; height: 12px; }
.rv-dist-row i { display: block; height: 6px; border-radius: 99px; background: rgba(19, 27, 17, .14); overflow: hidden; }
.rv-dist-row b { display: block; height: 100%; border-radius: inherit; background: #131b11; transform-origin: left; }
.rv-dist-row em { font-style: normal; text-align: right; opacity: .7; }
.js .rv-dist-row b { transform: scaleX(0); transition: transform 1.1s var(--ease); }
.js .rv-dist.is-in .rv-dist-row b { transform: scaleX(1); }

/* Фото от клиентов */
.rv-gallery { margin-top: 26px; }
.rv-gallery-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 26px; }
.rv-gallery-head .eyebrow { font-size: 11px; color: var(--lime); margin-bottom: 18px; }
.rv-gallery-head h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.1; letter-spacing: -.045em; }
.rv-gallery-head > p { max-width: 330px; color: var(--muted); font-size: 14px; }
.rv-strip { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 17vw, 205px); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.rv-strip > * { scroll-snap-align: start; }
.rv-tile, .rv-own { position: relative; display: block; aspect-ratio: 3 / 4; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--panel); }
.rv-tile { cursor: zoom-in; transition: transform .25s var(--ease), border-color .25s; }
.rv-tile:hover { transform: translateY(-3px); border-color: var(--muted); }
.rv-tile img, .rv-own img { width: 100%; height: 100%; object-fit: cover; }
.rv-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-own { grid-column: span 2; aspect-ratio: auto; min-height: 100%; }
.rv-own img { position: absolute; inset: 0; }
.rv-own figcaption { position: absolute; left: 14px; bottom: 14px; display: grid; gap: 2px; padding: 10px 14px; border-radius: 14px; background: rgba(8, 11, 18, .72); backdrop-filter: blur(8px); color: #f3f5f8; }
.rv-own figcaption b { font-size: 14px; }
.rv-own figcaption span { font-size: 12px; color: #c8ced8; }
.rv-tile-more { display: grid; place-content: center; justify-items: center; gap: 4px; background: var(--lime); border-color: var(--lime); color: #131b11; text-align: center; cursor: pointer; }
.rv-tile-more svg { width: 26px; height: 26px; margin-bottom: 6px; }
.rv-tile-more b { font-size: 30px; letter-spacing: -.04em; line-height: 1; }
.rv-tile-more span { position: static; padding: 0; background: none; color: inherit; font-weight: 600; font-size: 13px; }

/* Фильтры и лента */
.rv-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.rv-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13.5px; font-weight: 600; transition: border-color .2s, background-color .2s, color .2s; }
.rv-chip span { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-chip:hover { border-color: var(--muted); }
.rv-chip[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #131b11; }
.rv-chip[aria-pressed="true"] span { color: rgba(19, 27, 17, .62); }
/* Лента «кирпичиками»: отзывы разной длины без пустот между карточками */
.customer-reviews.rv-grid { display: block; columns: 3; column-gap: 18px; transition: opacity .25s; }
.rv-grid > .rv-card { break-inside: avoid; margin-bottom: 18px; }
@media (max-width: 1100px) { .customer-reviews.rv-grid { columns: 2; } }
@media (max-width: 700px) { .customer-reviews.rv-grid { columns: 1; } }
.rv-grid.is-loading { opacity: .45; }
.rv-card { animation: rv-in .5s var(--ease) both; }
@keyframes rv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rv-deal { display: flex; align-items: flex-start; gap: 7px; margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.rv-deal svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #b6e05a; }
.customer-review .rv-text { margin-top: 18px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9; overflow: hidden; }
.rv-card.is-open .rv-text { -webkit-line-clamp: unset; display: block; }
.rv-expand { align-self: flex-start; margin: -18px 0 22px; padding: 0; background: none; font-size: 13px; font-weight: 700; color: var(--lime); }
.rv-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: -8px 0 22px; }
.rv-photo { position: relative; aspect-ratio: 1; padding: 0; border-radius: 12px; overflow: hidden; background: var(--line); cursor: zoom-in; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.rv-photo:hover img { transform: scale(1.05); }
.rv-photo[data-extra]::after { content: attr(data-extra); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 11, 18, .58); color: #fff; font-weight: 800; font-size: 16px; }
.rv-photo:focus-visible, .rv-tile:focus-visible, .rv-chip:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.rv-answer { display: grid; grid-template-columns: 26px 1fr; gap: 10px; margin: -6px 0 22px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .025); font-size: 13px; line-height: 1.6; }
.rv-answer img { border-radius: 8px; }
.rv-answer b { font-size: 12px; }
.rv-answer p { color: var(--muted); }
.rv-more { display: grid; justify-items: center; gap: 12px; margin-top: 36px; }
.rv-more .btn[disabled] { opacity: .6; pointer-events: none; }
.rv-progress { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-progress b { color: var(--text); font-weight: 700; }

/* Просмотр фото */
.rv-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 7, 11, .94); color: #f3f5f8; }
.rv-lightbox::backdrop { background: rgba(5, 7, 11, .6); }
.rv-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.rv-lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; font-size: 13px; color: #c8ced8; }
.rv-lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; touch-action: pan-y; }
.rv-lb-stage img { max-width: 100%; max-height: min(100%, calc(100dvh - 150px)); min-height: min(62dvh, 520px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -30px #000; }
.rv-lb-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .14); }
.rv-lb-btn:hover { background: rgba(255, 255, 255, .16); }
.rv-lb-btn svg { width: 20px; height: 20px; }
.rv-lb-prev, .rv-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.rv-lb-prev { left: 12px; }
.rv-lb-next { right: 12px; }
.rv-lb-cap { padding: 12px 18px max(18px, env(safe-area-inset-bottom)); text-align: center; font-size: 12.5px; color: #a8afbd; }

/* Светлая тема */
[data-theme=light] .rv-deal svg { color: #497225; }
[data-theme=light] .rv-expand { color: #38591b; }
[data-theme=light] .rv-answer { background: rgba(21, 36, 48, .03); }
[data-theme=light] .rv-gallery-head .eyebrow { color: #38591b; }

@media (max-width: 900px) {
  .rv-gallery-head { display: block; }
  .rv-gallery-head > p { margin-top: 12px; }
  .rv-strip { grid-auto-columns: 42vw; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; }
}
@media (max-width: 640px) {
  .rv-lb-stage { padding: 0 8px; }
  .rv-lb-prev, .rv-lb-next { top: auto; bottom: -58px; transform: none; }
  .rv-lb-prev { left: calc(50% - 56px); }
  .rv-lb-next { right: calc(50% - 56px); }
  .rv-lb-cap { padding-top: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-card { animation: none; }
  .js .rv-dist-row b { transition: none; transform: none; }
}
