/**
 *  This module was created by Anastasia Bu and is protected by the laws of Copyright.
 *  This source file is subject to a commercial license from Anastasia Bu
 *  Use, copy, modification or distribution of this source file without written
 *  license agreement from Anastasia Bu <site@web-esse.ru> is strictly forbidden.
 *
 *  @author    Anastasia Bu <site@web-esse.ru>
 *  @copyright 2007-2026 Anastasia Bu
 *  @license Commercial license
 */

/* Product reviews block (productreviews_17.tpl) and the review card (front/review.tpl).
   Theme-neutral: font and text color come from the theme, only the accents are ours
   (stars / buttons / verified colors from the module settings).
   Layout follows the width of the block itself (container queries), not the screen:
   the same block sits in a wide tab, a product footer or a narrow column.
   Browsers without container queries get the one-column (mobile) layout. */

/* -------------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------------- */
.wsr-pr {
  --wsrl-accent: var(--wsr-buttons-color, #2fb5d2);
  --wsrl-accent-tint: #eef6f8;
  --wsrl-star: var(--wsr-stars-color, #f5a400);
  --wsrl-star-empty: #d5d9de;
  --wsrl-border: #e5e7eb;
  --wsrl-control-border: #d1d5db;
  --wsrl-muted: #5b6370;
  --wsrl-surface: #f6f7f9;
  /* Card background: white reads well on white and on grey theme backgrounds. */
  --wsrl-card-bg: #fff;
  --wsrl-radius: 16px;
  --wsrl-radius-sm: 10px;
}

@supports (color: color-mix(in srgb, red 10%, white)) {
  .wsr-pr {
    --wsrl-accent-tint: color-mix(in srgb, var(--wsrl-accent) 12%, #fff);
  }
}

/* -------------------------------------------------------------------------
   Block
   ------------------------------------------------------------------------- */
.wsr-pr {
  container: wsr / inline-size;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.75vw, 17px);
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.5;
}

.wsr-pr *,
.wsr-pr *::before,
.wsr-pr *::after {
  box-sizing: border-box;
}

.wsr-pr__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.wsr-pr .wsr-pr__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.wsr-pr .wsr-pr__all {
  font-size: 14px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wsr-pr .wsr-pr__subtitle {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

/* -------------------------------------------------------------------------
   Stars (SVG partials from ws-pr-icons.css): filled grey for empty ones
   ------------------------------------------------------------------------- */
.wsr-pr .ws-pr-star,
.wsr-review .ws-pr-star {
  color: var(--wsrl-star, #f5a400);
}

.wsr-pr .ws-pr-star--empty,
.wsr-review .ws-pr-star--empty {
  color: var(--wsrl-star-empty, #d5d9de);
}

.wsr-pr .ws-pr-star--empty path,
.wsr-review .ws-pr-star--empty path,
.wsr-pr .ws-pr-star--half .ws-pr-star__bg path,
.wsr-review .ws-pr-star--half .ws-pr-star__bg path {
  fill: var(--wsrl-star-empty, #d5d9de) !important;
  stroke: none;
}

/* -------------------------------------------------------------------------
   Layout: rating summary on the left (sticky), reviews on the right.
   Narrow blocks: one column, the summary on top.
   ------------------------------------------------------------------------- */
.wsr-pr__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: clamp(12px, 1.75vw, 17px);
}

/* The right column is its own "wsr" container: cards and photos adapt to its width. */
.wsr-pr__main {
  container: wsr / inline-size;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.75vw, 17px);
  min-width: 0;
}

@container wsr (min-width: 760px) {
  .wsr-pr__layout {
    grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
    column-gap: clamp(17px, 2.1vw, 28px);
  }

  /* Themes with a fixed header can raise it: .wsr-pr { --wsrl-sticky-top: 90px; } */
  .wsr-pr__aside {
    position: sticky;
    top: var(--wsrl-sticky-top, 24px);
  }
}

/* overflow: hidden on this wrapper (productcomments.css) would switch the sticky column off. */
#reviews_section_click.wsr-pr-section {
  display: flow-root;
  overflow: visible;
}

.wsr-pr__summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--wsrl-border);
  border-radius: var(--wsrl-radius);
  background: var(--wsrl-card-bg);
}

@container wsr (min-width: 480px) and (max-width: 759px) {
  .wsr-pr__summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 28px;
  }

  .wsr-pr__cta {
    grid-column: 1 / -1;
  }
}

.wsr-pr .wsr-pr__summary--short .wsr-pr__cta {
  padding-top: 0;
  border-top: 0;
}
.wsr-pr__score {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wsr-pr__score-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.wsr-pr__score-value {
  font-size: clamp(40px, 5vw, 48px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wsr-pr__reco {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  color: #166534;
}

.wsr-pr__score-max,
.wsr-pr__based {
  font-size: 14px;
  color: var(--wsrl-muted);
}

.wsr-pr__score-stars {
  line-height: 0;
}

.wsr-pr__score-stars .ws-pr-star {
  font-size: 20px;
}

.wsr-pr__bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wsr-pr .wsr-bar {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.wsr-pr a.wsr-bar:hover,
.wsr-pr a.wsr-bar:focus-visible {
  background: var(--wsrl-surface);
  color: inherit;
  text-decoration: none;
}

.wsr-pr .wsr-bar.is-active,
.wsr-pr a.wsr-bar.is-active:hover {
  background: var(--wsrl-accent-tint);
}

.wsr-pr .wsr-bar.is-empty {
  opacity: 0.55;
}

.wsr-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.wsr-bar__label .ws-pr-star {
  font-size: 13px;
}

.wsr-bar__track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #eef0f3;
}

.wsr-bar__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--wsrl-star);
}

.wsr-bar__count {
  font-size: 14px;
  text-align: right;
  color: var(--wsrl-muted);
}

.wsr-pr__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--wsrl-border);
}

.wsr-pr__cta-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}

.wsr-pr .wsr-pr__cta-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--wsrl-muted);
}

/* Write a review / Log in: theme .btn-primary / .btn-secondary in the "theme" buttons style;
   the module look below only under .wsr-btns-module. */
.wsr-pr .wsr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  text-align: center;
  text-decoration: none;
  white-space: normal;
}

.wsr-pr.wsr-btns-module .wsr-btn {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--wsrl-radius-sm);
  background: var(--wsrl-accent);
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.wsr-pr.wsr-btns-module .wsr-btn:hover,
.wsr-pr.wsr-btns-module .wsr-btn:focus {
  color: #fff;
  text-decoration: none;
  filter: brightness(0.92);
}

.wsr-pr.wsr-btns-module .wsr-btn:focus-visible,
.wsr-pr .wsr-nav:focus-visible,
.wsr-pr a.wsr-bar:focus-visible,
.wsr-thumb:focus-visible,
.wsr-review button:focus-visible {
  outline: 2px solid var(--wsrl-accent, #2fb5d2);
  outline-offset: 2px;
}

.wsr-pr.wsr-btns-module .wsr-btn--ghost {
  border: 1px solid var(--wsrl-control-border);
  background: transparent;
  color: inherit;
}

.wsr-pr.wsr-btns-module .wsr-btn--ghost:hover,
.wsr-pr.wsr-btns-module .wsr-btn--ghost:focus {
  color: inherit;
}

.wsr-ico {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
}

/* -------------------------------------------------------------------------
   Reviews card: photos strip, count + sorting, list and pagination together
   ------------------------------------------------------------------------- */
.wsr-pr__reviews {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.75vw, 17px);
  min-width: 0;
  padding: clamp(14px, 2vw, 20px) clamp(14px, 2.2vw, 24px);
  border: 1px solid var(--wsrl-border);
  border-radius: var(--wsrl-radius);
  background: var(--wsrl-card-bg);
}

@container wsr (max-width: 479px) {
  .wsr-pr__reviews {
    padding: 12px;
  }
}

/* -------------------------------------------------------------------------
   Customer photos strip
   ------------------------------------------------------------------------- */
.wsr-pr__photos {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.wsr-pr__photos-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wsr-pr__photos-nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.wsr-pr .wsr-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--wsrl-border);
  border-radius: 50%;
  background: #fff;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
}

.wsr-pr .wsr-nav[hidden] {
  display: none;
}

.wsr-pr .wsr-nav:disabled {
  opacity: 0.4;
  cursor: default;
}

.wsr-pr__photos-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.wsr-pr__photos-track::-webkit-scrollbar {
  display: none;
}

.wsr-thumb {
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--wsrl-radius-sm, 10px);
  background: var(--wsrl-surface, #f6f7f9);
  box-shadow: none;
  cursor: zoom-in;
  scroll-snap-align: start;
}

.wsr-thumb img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.wsr-thumb:hover img {
  transform: scale(1.04);
}

.wsr-thumb--lg {
  width: 120px;
  height: 120px;
  border-radius: 12px;
}

@container wsr (max-width: 479px) {
  .wsr-thumb {
    width: 64px;
    height: 64px;
  }

  .wsr-thumb--lg {
    width: 96px;
    height: 96px;
  }

  /* Swipe on phones, no arrows */
  .wsr-pr__photos-nav {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   Filters + sorting
   ------------------------------------------------------------------------- */
.wsr-pr__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.wsr-pr__filter-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

.wsr-pr__count {
  font-size: 15px;
  font-weight: 600;
}

.wsr-pr .wsr-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--wsrl-accent);
  border-radius: 17px;
  background: var(--wsrl-accent-tint);
  color: inherit;
  line-height: 1;
  text-decoration: none;
}

.wsr-pr .wsr-filter-tag:hover,
.wsr-pr .wsr-filter-tag:focus {
  color: inherit;
  text-decoration: none;
  filter: brightness(0.96);
}

.wsr-pr .wsr-filter-tag:focus-visible {
  outline: 2px solid var(--wsrl-accent);
  outline-offset: 2px;
}

/* "With photos": a switch styled as a small checkbox chip */
.wsr-pr .wsr-photos-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--wsrl-control-border);
  border-radius: 17px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wsr-pr .wsr-photos-toggle:hover,
.wsr-pr .wsr-photos-toggle:focus {
  border-color: var(--wsrl-accent);
  color: inherit;
  text-decoration: none;
}

.wsr-pr .wsr-photos-toggle:focus-visible {
  outline: 2px solid var(--wsrl-accent);
  outline-offset: 2px;
}

.wsr-photos-toggle__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--wsrl-control-border);
  border-radius: 4px;
  background: #fff;
  color: transparent;
}

.wsr-photos-toggle__count {
  opacity: 0.7;
}

.wsr-pr .wsr-photos-toggle.is-active {
  border-color: var(--wsrl-accent);
  background: var(--wsrl-accent-tint);
}

.wsr-photos-toggle.is-active .wsr-photos-toggle__box {
  border-color: var(--wsrl-accent);
  background: var(--wsrl-accent);
  color: #fff;
}

.wsr-filter-tag .ws-pr-star {
  font-size: 14px;
}
.wsr-pr .wsr-sort {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--wsrl-muted);
}

.wsr-pr #sortingOrder {
  width: auto;
  min-height: 38px;
  height: 38px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--wsrl-control-border);
  border-radius: var(--wsrl-radius-sm);
  background-color: #fff;
  box-shadow: none;
  color: #111827;
  font-size: 14px;
}

/* -------------------------------------------------------------------------
   List, empty state, pagination
   ------------------------------------------------------------------------- */
.wsr-pr__list-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#reviews_section #ws_reviewList.wsr-pr__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.wsr-pr .wsr-pr__empty {
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed var(--wsrl-control-border);
  border-radius: 12px;
  text-align: center;
  color: var(--wsrl-muted);
}

/* Wide blocks: page numbers. Narrow (phones): "Show more" appends the next page instead. */
.wsr-pr .wsr-more {
  display: none;
  align-self: stretch;
  justify-content: center;
  margin: 12px 0 0;
}

.wsr-pr .wsr-more[hidden] {
  display: none !important;
}

@container wsr (max-width: 599px) {
  .wsr-pr .wsr-more {
    display: flex;
  }

  /* All shop reviews page has no "Show more": its page numbers stay. */
  .wsr-pr:not(.wsr-shop) .nav-review.wsr-pager {
    display: none;
  }
}

.wsr-pr.wsr-btns-module .wsr-more {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--wsrl-control-border);
  border-radius: var(--wsrl-radius-sm);
  background: #fff;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.wsr-pr.wsr-btns-module .wsr-more:hover {
  border-color: var(--wsrl-accent);
}

.wsr-pr .nav-review.wsr-pager {
  flex-direction: row;
  justify-content: center;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--wsrl-border);
  border-bottom: 0;
}

.wsr-pr .wsr-pager .paging-container {
  width: auto;
  justify-content: center;
}

.wsr-pr .wsr-pager a {
  border-color: var(--wsrl-border);
  border-radius: var(--wsrl-radius-sm);
  box-shadow: none;
}

.wsr-pr .wsr-pager a.paging-selected,
.wsr-pr .wsr-pager a.paging-selected:hover {
  box-shadow: none;
}

/* -------------------------------------------------------------------------
   Review card
   ------------------------------------------------------------------------- */
.wsr-review {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--wsrl-border, #e5e7eb);
  font-size: 15px;
  line-height: 1.5;
}

@container wsr (min-width: 600px) {
  .wsr-review {
    padding: 17px 0;
  }
}

.wsr-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
}

.wsr-review__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.wsr-review__reviewed {
  display: none;
}
.wsr-review .wsr-review__product-name {
  flex-basis: 100%;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--wsrl-muted, #5b6370);
  text-decoration: none;
}

.wsr-review .wsr-review__product-name:hover,
.wsr-review .wsr-review__product-name:focus {
  color: inherit;
  text-decoration: underline;
}

.wsr-review__author {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.wsr-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #166534;
}

.wsr-review__verified-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--wsr-verified-color, #16a34a);
  line-height: 0;
}

.wsr-review__verified-icon svg {
  width: 12px;
  height: 12px;
}

.wsr-review__city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--wsrl-muted, #5b6370);
}

.wsr-review .wsr-review__date {
  margin-left: auto;
  font-size: 13px;
  color: var(--wsrl-muted, #5b6370);
}

.wsr-review__rating-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.wsr-review__stars {
  display: inline-flex;
  line-height: 0;
}

.wsr-review__stars .ws-pr-star {
  font-size: 17px;
}

.wsr-review .wsr-review__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.wsr-review .wsr-review__criteria {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--wsrl-muted, #5b6370);
}

.wsr-review .wsr-review__criterion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.wsr-review__criterion .ws-pr-star {
  font-size: 13px;
}

.wsr-review .wsr-review__text {
  max-width: 80ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* Set by productcomments.js, so the full text stays visible without JS. */
.wsr-review__text.is-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

@container wsr (max-width: 479px) {
  .wsr-review__text.is-clamped {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

.wsr-review .wsr-review__more {
  min-height: 0;
  margin: -4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 3px;
  cursor: pointer;
}

.wsr-review .wsr-review__more[hidden] {
  display: none;
}

.wsr-review__photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wsr-review__reply {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 4px;
  max-width: 76ch;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--wsrl-surface, #f6f7f9);
}

.wsr-review__reply-title {
  font-size: 13px;
  font-weight: 650;
}

.wsr-review .wsr-review__reply-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.wsr-review__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  width: 100%;
  font-size: 13px;
  color: var(--wsrl-muted, #5b6370);
}

.wsr-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.wsr-chip--yes {
  background: #ecfdf3;
  color: #166534;
}

.wsr-chip--no {
  background: #f3f4f6;
  color: #4b5563;
}

.wsr-review__helpful {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.wsr-review .wsr-vote {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--wsrl-control-border, #d1d5db);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #111827;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
}

.wsr-review .wsr-vote:hover {
  border-color: var(--wsrl-accent, #2fb5d2);
}

.wsr-review .wsr-vote--login,
.wsr-review .wsr-vote--login:hover,
.wsr-review .wsr-vote--login:focus {
  color: #111827;
  text-decoration: none;
}

/* Guests: "Log in to rate reviews" in a small bubble above the clicked vote button
   (productcomments.js places the arrow and keeps the bubble inside the screen).
   Colors of the primary button: module buttons color, or the theme's when probed. */
.wsr-review__helpful--guest {
  position: relative;
}

.wsr-review__login-hint {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: var(--wsrl-btn-radius, 8px);
  background: var(--wsrl-accent, #2fb5d2);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  color: var(--wsrl-accent-text, #fff);
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

.wsr-review__login-hint::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--wsr-hint-arrow, 24px);
  border: 6px solid transparent;
  border-top-color: var(--wsrl-accent, #2fb5d2);
  transform: translateX(-50%);
}

.wsr-review__login-hint[hidden] {
  display: none;
}

.wsr-review .wsr-review__login-hint a,
.wsr-review .wsr-review__login-hint a:hover {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.wsr-review__report-wrap {
  margin-left: auto;
}

.wsr-review .wsr-review__report {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-transform: none;
  text-underline-offset: 2px;
  cursor: pointer;
}

@container wsr (max-width: 479px) {
  .wsr-review .wsr-vote {
    min-height: 36px;
    padding: 0 12px;
  }
}

/* -------------------------------------------------------------------------
   "All shop reviews" page: product thumbnail next to each review (review.tpl)
   ------------------------------------------------------------------------- */
.wsr-review--with-product {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px 14px;
}

.wsr-review__product {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: var(--wsrl-radius-sm, 10px);
  background: var(--wsrl-surface, #f6f7f9);
}

.wsr-review__product img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

.wsr-review--with-product .wsr-review__head {
  grid-column: 2;
  grid-row: 1;
}

.wsr-review--with-product .wsr-review__body {
  grid-column: 1 / -1;
  grid-row: 2;
}

@container wsr (min-width: 600px) {
  .wsr-review--with-product {
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    column-gap: 20px;
  }

  .wsr-review--with-product .wsr-review__product {
    grid-row: 1 / span 2;
    width: 96px;
    height: 96px;
  }

  .wsr-review--with-product .wsr-review__body {
    grid-column: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wsr-pr__photos-track {
    scroll-behavior: auto;
  }

  .wsr-thumb img,
  .wsr-pr .wsr-bar,
  .wsr-pr .wsr-btn {
    transition: none;
  }
}

/* -------------------------------------------------------------------------
   "As in the theme" buttons style: productcomments.js reads the color and the corner
   radius of the theme's .btn-primary and sets them on the roots (--wsrl-accent,
   --wsr-buttons-color, --wsrl-btn-radius, class .wsr-theme-probed). Then every button and
   control of the module has the theme's shape (square theme = square everywhere) and the
   highlights use the theme color. Without JS the module look stays.
   ------------------------------------------------------------------------- */
.wsr-theme-probed .btn,
.wsr-theme-probed .wsr-vote,
.wsr-theme-probed .wsr-photos-toggle,
.wsr-theme-probed .wsr-filter-tag,
.wsr-theme-probed .wsr-pager a,
.wsr-theme-probed .wsr-nav,
.wsr-theme-probed .wsr-bar,
.wsr-theme-probed #sortingOrder,
.wsr-theme-probed .ws_review_recommend label {
  border-radius: var(--wsrl-btn-radius);
}

.wsr-theme-probed .wsr-photos-toggle__box {
  border-radius: min(var(--wsrl-btn-radius), 4px);
}

/* -------------------------------------------------------------------------
   Review widgets: home, category footer, left column (hook/_partials/widget_block.tpl).
   Root also has .wsr-pr, so tokens, stars, buttons and the theme look are shared.
   Three display modes: customer photos (carousel), moving reviews (slider), featured (list).
   ------------------------------------------------------------------------- */
.wsr-pr.wsr-widget {
  --wsrl-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 20px rgba(16, 24, 40, 0.07);
  --wsrl-shadow-hover: 0 2px 4px rgba(16, 24, 40, 0.06), 0 12px 28px rgba(16, 24, 40, 0.12);

  gap: 18px;
  /* Top / bottom only: the side margins belong to the theme .container (centered). */
  margin-top: clamp(28px, 4vw, 56px);
  margin-bottom: clamp(28px, 4vw, 56px);
}

/* Heading: title + one summary line, link and arrows on the right */
.wsr-widget__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 20px;
}

.wsr-widget__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-right: auto;
}

.wsr-widget .wsr-widget__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  color: inherit;
}

.wsr-widget__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font-size: 14px;
  color: var(--wsrl-muted);
}

.wsr-widget__score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
}

.wsr-widget__score strong {
  color: var(--wsrl-text, #111827);
  font-size: 15px;
}

.wsr-widget__score .ws-pr-star {
  font-size: 16px;
}

.wsr-widget__meta-item strong {
  color: #166534;
}

.wsr-widget .wsr-widget__all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--wsrl-text, #111827);
  text-decoration: none;
  white-space: nowrap;
}

.wsr-widget .wsr-widget__all:hover,
.wsr-widget .wsr-widget__all:focus {
  color: var(--wsrl-text, #111827);
  text-decoration: underline;
}

.wsr-widget__nav {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.wsr-widget .wsr-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--wsrl-card-bg);
  box-shadow: var(--wsrl-shadow);
  color: inherit;
  cursor: pointer;
}

.wsr-widget .wsr-nav[hidden] {
  display: none;
}

.wsr-widget .wsr-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.wsr-theme-probed .wsr-widget__nav .wsr-nav {
  border-radius: var(--wsrl-btn-radius);
}

/* Phones: swipe, no arrows (as the customer photos strip of the product page) */
@media (max-width: 575px) {
  .wsr-widget__nav {
    display: none;
  }
}

/* Cards: no border, soft shadow, slight lift on hover */
.wsr-wc {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--wsrl-radius);
  background: var(--wsrl-card-bg);
  box-shadow: var(--wsrl-shadow);
  font-size: 14px;
  line-height: 1.55;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.wsr-wc:hover {
  box-shadow: var(--wsrl-shadow-hover);
  transform: translateY(-2px);
}

.wsr-wc-stars {
  display: inline-flex;
  line-height: 0;
}

.wsr-wc-stars .ws-pr-star {
  font-size: 15px;
}

.wsr-wc .wsr-wc__title {
  display: -webkit-box;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.wsr-wc .wsr-wc__text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--wsrl-text-soft, #374151);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.wsr-wc__name {
  font-size: 13px;
  font-weight: 650;
}

.wsr-wc__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #166534;
}

/* Photo card (customer photos mode, bento large tile) */
.wsr-wc__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--wsrl-surface);
}

.wsr-wc .wsr-wc__photo,
.wsr-wc .wsr-wc__cover {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.wsr-wc .wsr-wc__photo[hidden] {
  display: none;
}

.wsr-wc .wsr-wc__cover {
  cursor: pointer;
}

.wsr-wc__photo img,
.wsr-wc__cover img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* Product image (no customer photo): whole product, on the light background */
.wsr-wc__cover img {
  padding: 12%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.wsr-wc:hover .wsr-wc__photo img {
  transform: scale(1.04);
}

.wsr-wc__badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
  line-height: 0;
  pointer-events: none;
}

.wsr-wc__badge:empty {
  display: none;
}

.wsr-wc__photo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
}

.wsr-wc__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px 16px;
}

.wsr-wc__author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin-top: auto;
}

.wsr-wc .wsr-wc__product {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--wsrl-border);
  color: inherit;
  text-decoration: none;
}

.wsr-wc__product-img {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  max-width: none;
  border-radius: 8px;
  background: var(--wsrl-surface);
  object-fit: cover;
}

.wsr-wc__product-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wsr-wc .wsr-wc__product:hover .wsr-wc__product-name,
.wsr-wc .wsr-wc__product:focus .wsr-wc__product-name {
  text-decoration: underline;
}

/* Quote card (moving reviews, small bento tiles) */
.wsr-wc--quote {
  gap: 10px;
  padding: 16px 18px;
}

.wsr-wc__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.wsr-wc .wsr-wc__mini-photo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--wsrl-surface);
  cursor: zoom-in;
}

.wsr-wc__mini-photo img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.wsr-wc--quote .wsr-wc__text {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

/* Title in bold at the start of the quote (no added period: titles often end with "!" or "?") */
.wsr-wc--quote .wsr-wc__text strong {
  margin-right: 4px;
  color: var(--wsrl-text, #111827);
  font-weight: 650;
}

.wsr-wc__foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  min-width: 0;
}

.wsr-wc .wsr-wc__product-link {
  overflow: hidden;
  font-size: 12px;
  color: var(--wsrl-muted);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wsr-wc .wsr-wc__product-link:hover,
.wsr-wc .wsr-wc__product-link:focus,
.wsr-wc--link:hover .wsr-wc__product-link {
  color: inherit;
  text-decoration: underline;
}

/* Moving reviews: the whole card opens the product page (stretched product link) */
.wsr-wc--link {
  position: relative;
}

.wsr-wc--link .wsr-wc__product-link::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border-radius: inherit;
  content: "";
}

.wsr-wc--link .wsr-wc__product-link:focus {
  outline: 0;
}

.wsr-wc--link .wsr-wc__product-link:focus-visible::after {
  outline: 2px solid var(--wsrl-accent, #2563eb);
  outline-offset: -2px;
}

.wsr-wc--link .wsr-wc__mini-photo {
  cursor: pointer;
}

/* ---- Mode 1: customer photos — strip with arrows (home-widget.js) */
.wsr-widget__cards {
  container: wsr / inline-size;
  min-width: 0;
}

.wsr-widget__track {
  display: flex;
  gap: 18px;
  /* Room for the card shadows inside the scroll area (no side overflow of the page). */
  margin: -12px 0;
  padding: 12px 2px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-padding: 0 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.wsr-widget__track::-webkit-scrollbar {
  display: none;
}

.wsr-widget__track > .wsr-wc {
  flex: 0 0 calc((100% - 3 * 18px) / 4);
  scroll-snap-align: start;
}

@container wsr (max-width: 959px) {
  .wsr-widget__track > .wsr-wc {
    flex-basis: calc((100% - 2 * 18px) / 3);
  }
}

@container wsr (max-width: 679px) {
  .wsr-widget__track > .wsr-wc {
    flex-basis: calc((100% - 18px) / 2);
  }
}

/* Phones and the left column: one card, the next one peeks in */
@container wsr (max-width: 459px) {
  .wsr-widget__track > .wsr-wc {
    flex-basis: calc(100% - 44px);
  }
}

/* ---- Mode 2: moving reviews — two rows in opposite directions, paused on hover */
.wsr-marquee-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: -12px 0;
}

.wsr-marquee {
  overflow: hidden;
  padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.wsr-marquee__inner {
  display: flex;
  width: max-content;
  animation: wsr-marquee var(--wsr-marquee-duration, 60s) linear infinite;
}

.wsr-marquee--reverse .wsr-marquee__inner {
  animation-direction: reverse;
}

.wsr-marquee:hover .wsr-marquee__inner,
.wsr-marquee:focus-within .wsr-marquee__inner {
  animation-play-state: paused;
}

.wsr-marquee__group {
  display: flex;
  gap: 16px;
  padding-right: 16px;
}

.wsr-marquee__group > .wsr-wc {
  flex: 0 0 300px;
}

.wsr-marquee .wsr-wc:hover {
  transform: none;
}

@keyframes wsr-marquee {
  to {
    transform: translateX(-50%);
  }
}

/* No motion wanted: a normal scrollable row, without the duplicate copy */
@media (prefers-reduced-motion: reduce) {
  .wsr-marquee {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .wsr-marquee__inner {
    animation: none;
  }

  .wsr-marquee__group[aria-hidden="true"] {
    display: none;
  }

  .wsr-wc,
  .wsr-wc__photo img {
    transition: none;
  }
}

/* ---- Mode 3: featured — one large tile + four small ones */
.wsr-bento {
  container: wsr / inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.wsr-bento > * {
  min-width: 0;
}

@container wsr (min-width: 560px) {
  .wsr-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wsr-bento > .wsr-wc--hero {
    grid-column: 1 / -1;
  }
}

@container wsr (min-width: 960px) {
  .wsr-bento {
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
  }

  .wsr-bento > .wsr-wc--hero {
    grid-row: span 2;
    grid-column: auto;
  }
}

.wsr-bento--simple {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Large tile: photo beside the text on wide screens */
.wsr-wc--hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@container wsr (min-width: 560px) {
  .wsr-wc--hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .wsr-wc--hero .wsr-wc__media {
    aspect-ratio: auto;
    min-height: 100%;
  }
}

.wsr-wc--hero .wsr-wc__body {
  gap: 10px;
  padding: clamp(16px, 2.5vw, 26px);
}

.wsr-wc--hero .wsr-wc__title {
  font-size: clamp(17px, 1.8vw, 20px);
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.wsr-wc--hero .wsr-wc__text {
  font-size: 15px;
  -webkit-line-clamp: 7;
  line-clamp: 7;
}
