/* Сквозной блок отзывов (Яндекс Карты, 2ГИС) в стиле Aspro Max. Разметка: /local/php_interface/yuki/reviews_block.php. */
.yk-reviews {
  --yk-accent: var(--theme-base-color, #b80a2c);
  --yk-ink: #333;
  --yk-text: #555;
  --yk-muted: #888;
  --yk-line: #ececec;
  --yk-card: #f8f8f8;
  --yk-card-hover: #f2f2f2;
  --yk-radius: 3px;
  --yk-gap: 16px;
  background: #fff;
  border-top: 1px solid var(--yk-line);
  font-family: Montserrat, Arial, sans-serif;
}
.yk-reviews__inner {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 48px;
  padding: 48px 0 52px;
}

.yk-reviews [hidden] { display: none !important; }
.yk-reviews__panels { min-width: 0; }

/* Сводка */
.yk-reviews__summary { display: flex; flex-direction: column; align-items: flex-start; }
.yk-reviews__source { font-size: 13px; line-height: 18px; color: var(--yk-muted); margin: 0 0 18px; }
.yk-reviews__title { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--yk-ink); margin: 0 0 16px; }

/* Переключатель площадок: как кнопки выбора варианта на карточке товара */
.yk-reviews__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.yk-reviews__tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border: 1px solid #e5e5e5; border-radius: var(--yk-radius);
  background: #fff; color: var(--yk-ink); font: 500 13px/18px Montserrat, Arial, sans-serif;
  cursor: pointer; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 100ms ease-out;
}
.yk-reviews__tab:hover { border-color: var(--yk-accent); }
.yk-reviews__tab:active { transform: scale(0.98); }
.yk-reviews__tab:focus-visible { outline: 2px solid var(--yk-accent); outline-offset: 2px; }
.yk-reviews__tab[aria-selected="true"] { background: var(--yk-accent); border-color: var(--yk-accent); color: #fff; }
.yk-reviews__tab-rating { font-weight: 700; }
.yk-reviews__score { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.yk-reviews__value { font-size: 44px; line-height: 1; font-weight: 700; color: var(--yk-ink); letter-spacing: -0.02em; }
.yk-reviews__counts { font-size: 14px; line-height: 20px; color: var(--yk-muted); margin: 0 0 28px; }
.yk-reviews__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: auto; }
.yk-reviews__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 24px; border-radius: var(--yk-radius);
  background: var(--yk-accent); color: #fff !important;
  font-size: 11px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; text-decoration: none !important;
  white-space: nowrap; transition: filter 150ms ease, transform 100ms ease-out;
}
.yk-reviews__btn:hover { filter: brightness(1.08); }
.yk-reviews__btn:active { transform: scale(0.98); }
.yk-reviews__more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: var(--yk-ink) !important; text-decoration: none !important;
  border-bottom: 1px solid var(--yk-line); padding-bottom: 2px; transition: color 150ms ease, border-color 150ms ease;
}
.yk-reviews__more:hover { color: var(--yk-accent) !important; border-color: currentColor; }
.yk-reviews__more svg { width: 14px; height: 14px; }

/* Звёзды: заливка по доле рейтинга */
.yk-stars { position: relative; display: inline-flex; line-height: 0; }
.yk-stars__row { display: inline-flex; gap: 2px; }
.yk-stars__row svg { width: var(--yk-star, 18px); height: var(--yk-star, 18px); flex: none; }
.yk-stars__row--base { color: #e3e3e3; }
.yk-stars__row--fill { color: var(--yk-accent); position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; }

/* Лента */
.yk-reviews__viewport { position: relative; min-width: 0; }
.yk-reviews__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--yk-gap)) / 3);
  gap: var(--yk-gap);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; outline: none;
  margin: 0; padding: 0; list-style: none;
}
.yk-reviews__track::-webkit-scrollbar { display: none; }
.yk-reviews__track:focus-visible { box-shadow: 0 0 0 2px var(--yk-accent); border-radius: var(--yk-radius); }

.yk-review {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--yk-card); border-radius: var(--yk-radius);
  padding: 24px; margin: 0;
  transition: background-color 150ms ease;
}
.yk-review:hover { background: var(--yk-card-hover); }
/* Сброс правил темы Aspro: тире перед li и margin:auto у картинок */
.yk-reviews .yk-review::before { content: none; display: none; }
.yk-reviews .yk-review__photo { margin: 0; }
.yk-review__head > div { flex: 1; min-width: 0; }
.yk-reviews .yk-review { text-align: left; }
.yk-review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.yk-review__photo {
  width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover;
  background: #f3e1e5; color: var(--yk-accent); font-weight: 700; font-size: 16px;
  display: grid; place-items: center;
}
.yk-review__name { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--yk-ink); margin: 0; }
.yk-review__date { font-size: 13px; line-height: 18px; color: var(--yk-muted); margin: 2px 0 0; }
.yk-review .yk-stars { --yk-star: 14px; margin-bottom: 12px; }
.yk-review__text {
  font-size: 14px; line-height: 1.6; color: var(--yk-text); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.yk-review__link {
  margin-top: auto; padding-top: 14px; align-self: flex-start;
  font-size: 13px; color: var(--yk-accent) !important; text-decoration: none !important;
}
.yk-review__link:hover { text-decoration: underline !important; }
.yk-review__link[hidden] { display: none; }

/* Стрелки и мягкий край справа */
.yk-reviews__nav {
  position: absolute; top: 50%; z-index: 2;
  width: 40px; height: 40px; margin-top: -20px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--yk-line); border-radius: 50%;
  background: #fff; color: var(--yk-ink); cursor: pointer;
  box-shadow: 0 4px 14px rgba(51, 51, 51, 0.08);
  transition: opacity 200ms ease, color 150ms ease, transform 100ms ease-out;
}
.yk-reviews__nav:hover { color: var(--yk-accent); }
.yk-reviews__nav:active { transform: scale(0.94); }
.yk-reviews__nav svg { width: 16px; height: 16px; }
.yk-reviews__nav--prev { left: -20px; }
.yk-reviews__nav--next { right: -20px; }
.yk-reviews__nav[disabled] { opacity: 0; pointer-events: none; }
.yk-reviews__viewport::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 48px; pointer-events: none;
  background: linear-gradient(to right, rgba(255,255,255,0), #fff);
  transition: opacity 200ms ease;
}
.yk-reviews__viewport.is-end::after { opacity: 0; }

.yk-reviews__actions--bottom { display: none; }

@media (max-width: 1279px) {
  .yk-reviews__track { grid-auto-columns: calc((100% - var(--yk-gap)) / 2.15); }
}
@media (max-width: 991px) {
  .yk-reviews__inner { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 40px; }
  .yk-reviews__tabs { margin-bottom: 16px; }
  .yk-reviews__scorebox { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
  .yk-reviews__score { margin: 0; }
  .yk-reviews__value { font-size: 36px; }
  .yk-reviews__counts { margin: 0; }
  .yk-reviews__summary .yk-reviews__actions { display: none; }
  .yk-reviews__actions--bottom { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
}
@media (max-width: 767px) {
  .yk-reviews__track {
    grid-auto-columns: min(84vw, 320px);
    margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px;
  }
  .yk-reviews__nav, .yk-reviews__viewport::after { display: none; }
  .yk-review { padding: 20px; }
  /* Как у остальных разделов сайта на телефоне: заголовок по центру, текст отзывов по левому краю */
  .yk-reviews__summary { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .yk-reviews__tabs, .yk-reviews__scorebox, .yk-reviews__score { justify-content: center; }
  .yk-reviews__score { flex-wrap: wrap; gap: 6px 12px; }
  .yk-reviews__counts { margin-top: 4px; }
  .yk-reviews__actions--bottom { justify-content: center; }
  .yk-reviews__actions--bottom .yk-reviews__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .yk-reviews__track { scroll-behavior: auto; }
  .yk-reviews *, .yk-reviews *::after { transition: none !important; }
}
.yk-reviews__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
