/* Отзывы: живые данные с Авито — счётчик, распределение оценок, фото
   клиентов, фильтры, «Показать ещё» и просмотр фото. Дополняет 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; }
}

/* Compact reviews: stable rows, no column rebalancing when text expands. */
.customer-reviews.rv-grid { display: grid; columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; transition: none; }
.rv-grid > .rv-card { margin: 0; min-width: 0; animation: none; }
.customer-review.rv-card { padding: 20px; border-radius: 16px; transition: border-color .15s; }
.customer-review.rv-card:hover { transform: none; box-shadow: none; }
.rv-card .review-author { gap: 10px; }
.rv-card .review-avatar { width: 36px; height: 36px; border-radius: 11px; font-size: 15px; }
.rv-card .review-author h3 { font-size: 13px; line-height: 1.45; }
.rv-card .review-author div > span { font-size: 11px; }
.rv-card .review-rating-row { margin-top: 12px; gap: 8px; }
.rv-card .review-five-stars { gap: 3px; }
.rv-card .review-five-stars svg { width: 13px; height: 13px; }
.rv-card .review-topic { font-size: 10px; }
.rv-deal-info { color: var(--muted); font-size: 11px; margin-top: 10px; }
.rv-deal-info summary { display: flex; align-items: center; gap: 5px; cursor: pointer; list-style: none; min-height: 24px; }
.rv-deal-info summary::-webkit-details-marker { display: none; }
.rv-deal-info summary::after { content: '+'; margin-left: auto; }
.rv-deal-info[open] summary::after { content: '−'; }
.rv-deal-info summary svg { width: 13px; height: 13px; color: var(--lime); }
.rv-deal-info p { margin: 4px 0 0; line-height: 1.5; }
.customer-review.rv-card .rv-text { font-size: 13px; line-height: 1.75; margin: 12px 0 16px; -webkit-line-clamp: 5; }
.customer-review.rv-card.is-open .rv-text { -webkit-line-clamp: unset; }
.rv-card .rv-expand { min-height: 32px; margin: -8px 0 10px; font-size: 12px; }
.rv-card .rv-photos { display: flex; gap: 7px; margin: 0 0 14px; }
.rv-card .rv-photo { width: 64px; height: 64px; border-radius: 9px; flex: 0 1 64px; }
.rv-photo[hidden], .rv-more[hidden], .rv-lb-btn[hidden] { display: none; }
.rv-card .rv-answer { margin: 0 0 14px; padding: 10px; border-radius: 10px; font-size: 12px; }
.customer-review.rv-card > a { font-size: 10px; padding-top: 12px; }
.rv-toolbar { gap: 6px; margin-bottom: 18px; }
.rv-chip { min-height: 38px; padding: 0 14px; font-size: 12px; border-radius: 10px; }
.rv-more { margin-top: 24px; gap: 8px; }
.rv-more .btn { min-height: 44px; padding: 10px 22px; font-size: 13px; }
.rv-progress { font-size: 11px; }
.rv-load-error { margin: 10px 0; font-size: 13px; color: var(--muted); }
.rv-lightbox { overscroll-behavior: contain; }
html:has(.rv-lightbox[open]) { overflow: hidden; scrollbar-gutter: stable; }
.rv-lb-stage img { min-height: 0; width: auto; height: auto; max-height: calc(100dvh - 150px); }
.rv-lightbox .rv-lb-stage { overflow: hidden; }
body[data-reviews-page] .page-lead { padding-top: 32px; padding-bottom: 24px; }
body[data-reviews-page] .page-lead .breadcrumb { margin-bottom: 18px; padding: 0; min-height: 24px; border: 0; background: none; font-size: 12px; color: var(--muted); }
body[data-reviews-page] .page-lead h1 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -.045em; }
body[data-reviews-page] .page-lead > p { margin-top: 12px; font-size: 14px; max-width: 650px; }
body[data-reviews-page] #reviews { padding: 0; }
.rv-reputation { display: flex; align-items: center; gap: 32px; padding: 22px 26px; border: 1px solid var(--line); background: var(--panel); border-radius: 16px; }
.rv-score { display: flex; align-items: center; gap: 14px; }
.rv-reputation .rating-number { font-size: 56px; line-height: 1; margin: 0; letter-spacing: -.06em; color: var(--text); }
.rv-reputation .rating-stars { margin: 0 0 4px; color: var(--lime); font-size: 16px; letter-spacing: 2px; }
.rv-score-label, .rv-total > span { color: var(--muted); font-size: 11px; }
.rv-total { display: grid; gap: 4px; border-left: 1px solid var(--line); padding-left: 32px; }
.rv-total strong { font-size: 21px; letter-spacing: -.03em; }
.rv-avito { margin-left: auto; min-height: 44px; gap: 9px; padding: 10px 16px; font-size: 12px; white-space: nowrap; }
.rv-update { margin: 9px 2px 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.rv-distribution { font-size: 11px; color: var(--muted); margin: 5px 2px 0; }
.rv-distribution summary { cursor: pointer; padding: 5px 0; }
.rv-distribution .rv-dist { margin-top: 10px; }
.rv-distribution .rv-dist-row { color: var(--text); font-size: 11px; }
.rv-distribution .rv-dist-row i { background: var(--line); }
.rv-distribution .rv-dist-row b { background: var(--lime); transform: none; transition: none; }
body[data-reviews-page] .rv-gallery { margin-top: 28px; }
body[data-reviews-page] .rv-gallery-head { margin-bottom: 12px; align-items: center; gap: 12px; }
body[data-reviews-page] .rv-gallery-head h2 { font-size: 19px; letter-spacing: -.025em; line-height: 1.4; }
.rv-gallery-head h2 > span { font-size: 12px; color: var(--muted); margin-left: 6px; font-weight: 500; }
body[data-reviews-page] .rv-gallery-head > p { font-size: 11px; margin: 0; }
body[data-reviews-page] .rv-strip { grid-auto-columns: 112px; gap: 8px; padding-bottom: 10px; scroll-snap-type: x proximity; }
body[data-reviews-page] .rv-tile, body[data-reviews-page] .rv-own { height: 112px; aspect-ratio: 1; border-radius: 12px; }
body[data-reviews-page] .rv-own { grid-column: span 2; aspect-ratio: auto; }
body[data-reviews-page] .rv-own figcaption { left: 8px; bottom: 8px; padding: 5px 8px; border-radius: 7px; backdrop-filter: none; }
body[data-reviews-page] .rv-own figcaption b { font-size: 11px; }
body[data-reviews-page] .rv-own figcaption span { font-size: 9px; }
body[data-reviews-page] .rv-tile span { font-size: 10px; padding: 18px 8px 6px; }
body[data-reviews-page] .rv-tile-more b { font-size: 23px; }
body[data-reviews-page] .rv-tile-more span { padding: 0; }
body[data-reviews-page] .customer-stories { padding-top: 26px; padding-bottom: 30px; }
body[data-reviews-page] .stories-heading { margin: 0 0 14px; }
body[data-reviews-page] .stories-heading h2 { font-size: 24px; margin: 0; letter-spacing: -.025em; }
body[data-reviews-page] .stories-note { font-size: 11px; margin-top: 20px; }
[data-theme=light] .rv-reputation .rating-stars, [data-theme=light] .rv-deal-info summary svg { color: #42671e; }
@media (max-width: 1100px) { .customer-reviews.rv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .customer-reviews.rv-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .customer-review.rv-card { padding: 18px; }
  .rv-reputation { gap: 16px; padding: 18px; flex-wrap: wrap; }
  .rv-reputation .rating-number { font-size: 44px; }
  .rv-total { padding-left: 16px; }
  .rv-total strong { font-size: 17px; }
  .rv-total > span { font-size: 9px; }
  .rv-score { gap: 10px; }
  .rv-score-label { font-size: 10px; }
  .rv-avito { width: 100%; margin-left: 0; }
  body[data-reviews-page] .rv-gallery-head { display: flex; }
  body[data-reviews-page] .page-lead { padding-top: 22px; padding-bottom: 20px; }
  body[data-reviews-page] .rv-strip { grid-auto-columns: 96px; }
  body[data-reviews-page] .rv-tile, body[data-reviews-page] .rv-own { height: 96px; }
}
@media (max-width: 380px) {
  .rv-reputation { gap: 12px; }
  .rv-total { padding-left: 12px; }
  .rv-reputation .rating-number { font-size: 38px; }
  .rv-score { gap: 7px; }
  .rv-total strong { font-size: 15px; }
}
.rv-deal-info summary { padding: 0; font-size: 11px; font-weight: 500; line-height: 1.5; }
.rv-deal-info summary::after { font-size: 15px; }
.rv-distribution summary { font-size: 11px; font-weight: 500; line-height: 1.6; justify-content: flex-start; gap: 10px; }
.rv-distribution summary::after { font-size: 15px; }
@media (max-width: 700px) {
  .rv-reputation { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 12px; }
  .rv-score { min-width: 0; }
  .rv-score .rating-stars { font-size: 13px; letter-spacing: 1px; }
  .rv-score .rating-number { font-size: 40px; }
  .rv-total { min-width: 0; padding-left: 12px; }
  .rv-avito { grid-column: 1 / -1; }
}
.rv-deal-info summary::after, .rv-distribution summary::after { color: var(--muted); }
