/* WB Reviews Plugin — стили фронтенда (можно редактировать) */

/* --- Звезда в строке рейтинга (категории, страница товара) --- */
i.wb-star {
  display: inline-block;
  font-style: normal;
  line-height: 1;
  color: #f5a623;
  margin-top: -1px;
  margin-right: 0.3em;
}
i.wb-star::before {
  content: "★";
  font-size: 15px;
}
.thumbs i.wb-star {
  margin-right: 0.13em;
}

/* --- Строка рейтинга (категории, страница товара) --- */
.wb-rating-row {
  display: inline-flex;
  align-items: center;
  color: #444;
  margin-top: 6px;
  line-height: 1.2;
  white-space: nowrap;
}
.wb-rating-row a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.wb-rating-row a:hover {
  text-decoration: none;
}
.wb-rating-row i.wb-star {
  margin-right: 0.2em;
  margin-top: -1px;
}

/* ============================================================
   КАРУСЕЛЬ ОТЗЫВОВ
   ============================================================ */

.wb-carousel {
  display: flex;
  margin: 32px 0;
  font-family: inherit;
  background: #f0f0f0;
  border-radius: 20px;
  overflow: hidden;
}

/* --- Левая панель --- */
.wb-carousel__summary {
  flex: 0 0 210px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  background: #f0f0f0;
}

.wb-carousel__avg {
  font-size: 38px;
  font-weight: 700;
  color: #111;
  line-height: 1;
  letter-spacing: -1px;
}
.wb-carousel__avg span {
  font-size: 17px;
  font-weight: 400;
  color: #666;
  letter-spacing: 0;
}

.wb-carousel__avg-stars-wrap {
  position: relative;
  display: inline-block;
  font-size: 26px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 2px 0;
  white-space: nowrap;
}
.wb-carousel__avg-stars-empty {
  color: #ddd;
}
.wb-carousel__avg-stars-full {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #f5a623;
  width: var(--wb-stars, 100%);
}

.wb-carousel__brand {
  font-size: 19px;
  font-weight: 900;
  font-style: italic;
  color: #cb11ab;
  margin: 4px 0 2px;
}
.wb-carousel__brand em {
  font-style: inherit;
}

.wb-carousel__cnt {
  font-size: 13px;
  color: #888;
}

.wb-carousel__leave-btn {
  display: inline-block;
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 0;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  border: 1.5px solid #aaa;
  border-radius: 10px;
  padding: 9px 16px;
  margin-top: auto;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wb-carousel__leave-btn:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* --- Правая область --- */
.wb-carousel__body {
  flex: 1;
  min-width: 0;
  padding: 18px 18px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.wb-carousel__viewport {
  overflow: hidden;
  width: 100%;
}

.wb-carousel__track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  visibility: hidden;
}

.wb-carousel__slide {
  flex-shrink: 0;
  height: 275px;
  overflow: hidden;
  transition: height 0.35s ease;
}

/* --- Карточка отзыва --- */
.wb-carousel__card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Шапка карточки */
.wb-card__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.wb-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.wb-card__avatar svg { display: block; }

.wb-card__meta {
  flex: 1;
  min-width: 0;
}

.wb-card__name {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}

.wb-card__verified {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.wb-card__verified svg { display: block; }

.wb-card__subrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 4px;
}

.wb-card__stars {
  display: flex;
  gap: 1px;
  font-size: 16px;
  line-height: 1;
}

.wb-s-full  { color: #f5a623; }
.wb-s-empty { color: #ddd; }

.wb-card__date {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

/* Тело карточки */
.wb-card__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}
.wb-card__body::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.wb-expanded .wb-card__body::after {
  opacity: 0;
}


.wb-card__photos {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.wb-card__photo-a {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.wb-card__photo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  display: block;
}

.wb-card__text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
.wb-card__text p {
  margin: 0 0 6px;
  line-height: 1.2em;
}
.wb-card__text p:last-child { margin-bottom: 0; }
.wb-card__text strong {
  color: #111;
  font-weight: 600;
}

/* Ссылка «Читать полностью / Скрыть» */
.wb-card__toggle {
  background: none;
  border: none;
  padding: 6px 0 0;
  font-size: 13px;
  color: #888;
  cursor: pointer;
  flex-shrink: 0;
  text-align: left;
  display: block;
}
.wb-card__toggle:hover { color: #555; }

/* Футер карточки */
.wb-card__foot {
  margin-top: 14px;
  flex-shrink: 0;
}

.wb-card__wblogo-img {
  height: 16px;
  width: auto;
  display: block;
}

/* Логотип в левой панели */
.wb-carousel__brand-logo {
  height: 22px;
  width: auto;
  display: block;
  margin: 4px 0 2px;
}

/* --- Навигация --- */
.wb-carousel__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-carousel__arrow {
  width: 36px;
  height: 36px;
  border: 1.5px solid #ccc;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #444;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  padding: 0;
}
.wb-carousel__arrow:hover {
  border-color: #888;
  background: #f5f5f5;
  color: #111;
}
.wb-carousel__arrow svg { display: block; }

.wb-carousel__bar {
  flex: 1;
  height: 3px;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
}

.wb-carousel__fill {
  height: 100%;
  background: #333;
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Скрытые фото (4+) — только для лайтбокса */
.wb-photo-hidden {
  display: none;
}

/* --- Лайтбокс --- */
.wb-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.wb-lightbox--open {
  display: flex;
}
.wb-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.wb-lightbox__dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  max-width: 92vw;
  max-height: 92vh;
  z-index: 1;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.wb-lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.wb-lightbox__close:hover { color: #333; }
.wb-lightbox__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.wb-lightbox__img {
  max-width: 65vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}
.wb-lightbox__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  width: 110px;
}
.wb-lightbox__thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 65vh;
  overflow-y: auto;
  width: 100%;
}
.wb-lightbox__thumb {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s;
  display: block;
  flex-shrink: 0;
}
.wb-lightbox__thumb:hover { opacity: 0.75; }
.wb-lightbox__thumb--active { opacity: 1; }
.wb-lightbox__next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
  padding: 0;
}
.wb-lightbox__next:hover {
  border-color: #888;
  background: #f5f5f5;
}

/* --- Страница отзывов --- */
.wb-reviews-page {
  display: flex;
  gap: 0;
  margin: 32px 0;
  font-family: inherit;
  background: #f0f0f0;
  border-radius: 20px;
  overflow: clip;
  align-items: stretch;
}

.wb-reviews-page__list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.wb-reviews-page__summary-wrap {
  flex: 0 0 210px;
  position: relative;
  padding-bottom: 120px;
}

.wb-reviews-page__summary {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: sticky;
  top: 20px;
}

.wb-rp-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.wb-rp-card__body {
  margin-bottom: 14px;
}

.wb-pagination-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 0;
  margin-top: 4px;
  flex-wrap: wrap;
}

.wb-pagination-label {
  font-size: 13px;
  color: #aaa;
  margin-right: 8px;
}

.wb-pagination-dots {
  font-size: 13px;
  color: #aaa;
  margin: 0 2px;
  letter-spacing: 1px;
}

.wb-pagination-total {
  font-size: 13px;
  color: #aaa;
  margin-left: 8px;
}

.wb-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  color: #444;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  margin: 0 3px;
  white-space: nowrap;
}

.wb-page-btn:hover {
  background: #f0f0f0;
  border-color: #bbb;
  text-decoration: none;
}

.wb-page-btn--current {
  background: #333;
  color: #fff;
  border-color: #333;
  cursor: default;
}

/* --- Адаптив --- */
@media (max-width: 700px) {
  .wb-reviews-page {
    flex-direction: column-reverse;
  }
  .wb-reviews-page__summary {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    position: static;
  }
  .wb-carousel {
    flex-direction: column;
  }
  .wb-carousel__summary {
    flex: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 18px 16px;
  }
  .wb-carousel__avg { font-size: 30px; }
  .wb-carousel__avg-stars { font-size: 22px; }
  .wb-carousel__leave-btn {
    margin-top: 8px;
    margin-left: 0;
  }
  .wb-carousel__body {
    padding: 12px 12px 10px;
  }
}
