.ps-store-reviews {
  position: relative;
  z-index: 0;
  overflow: hidden;
  margin: 72px 0;
  padding: 52px 48px 56px;
  border-radius: 24px;
  background: #eee8fd;
  color: #0f0f0f;
  font-family: brandon-grotesque, sans-serif;
}

/* na detaile produktu blok nadvazuje na USP pas - drzime ho pri nom */
.benefitBanner + .ps-store-reviews {
  margin-top: 28px;
  margin-bottom: 56px;
}

/* keby blok zostal poslednym prvkom obsahu, pod nim uz je 200px margin
   paticky zo sablony a vlastny odstup by ho zdvojoval */
main > .ps-store-reviews:last-child {
  margin-bottom: 0;
}

.ps-store-reviews::before,
.ps-store-reviews::after {
  position: absolute;
  z-index: -1;
  width: 340px;
  height: 340px;
  border: 2px solid rgba(147, 124, 247, 0.3);
  border-radius: 44% 56% 62% 38%;
  content: '';
  pointer-events: none;
}

.ps-store-reviews::before {
  top: -220px;
  left: -100px;
  transform: rotate(24deg);
}

.ps-store-reviews::after {
  right: -145px;
  bottom: -245px;
  transform: rotate(-18deg);
}

.ps-store-reviews__header {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 28px;
  margin-bottom: 34px;
}

.ps-store-reviews__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.ps-store-reviews__summary-icon {
  display: inline-flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(51, 5, 141, 0.08);
}

.ps-store-reviews__score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.ps-store-reviews__average {
  color: #33058d;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.ps-store-reviews__count {
  color: #4e4560;
  font-size: 14px;
  line-height: 1.25;
  text-decoration: underline;
  white-space: nowrap;
}

.ps-store-reviews__title {
  margin: 0;
  color: #33058d;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.ps-store-reviews__all {
  justify-self: end;
  color: #33058d;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ps-store-reviews__all:hover,
.ps-store-reviews__all:focus-visible {
  color: #ff5e03;
}

/* Presunuty odkaz - priamym potomkom sekcie je len v presunutom stave.
   Centrujeme marginom, nie text-alignom: sablona odkazu v main.css na CDN
   nastavuje sirku, takze blok sa neroztiahne na celu sirku sekcie. */
.ps-store-reviews > .ps-store-reviews__all {
  display: block;
  width: fit-content;
  margin: 26px auto 0;
  text-align: center;
}

.ps-store-reviews__carousel {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 20px;
}

.ps-store-reviews__viewport {
  min-width: 0;
  overflow: hidden;
}

.ps-store-reviews__track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.ps-store-reviews__track::-webkit-scrollbar {
  display: none;
}

.ps-store-review {
  display: flex;
  min-width: 0;
  flex: 0 0 calc((100% - 40px) / 3);
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border: 5px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(51, 5, 141, 0.06);
  scroll-snap-align: start;
}

.ps-store-review__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  color: #ff9a2e;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 1px;
}

.ps-store-review__text {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #0f0f0f;
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.ps-store-review__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: #756b88;
  font-size: 13px;
  line-height: 1.35;
}

.ps-store-review__author {
  color: #33058d;
  font-weight: 600;
}

.ps-store-review__dot {
  color: #c8bddc;
}

.ps-store-review__source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin-top: 4px;
  color: #625873;
  font-size: 13px;
  font-weight: 500;
}

.ps-store-review__source-mark {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: contain;
}

.ps-store-reviews__arrow {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #33058d;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.ps-store-reviews__arrow:hover:not(:disabled) {
  background: #ff5e03;
  transform: translateY(-2px);
}

.ps-store-reviews__arrow:focus-visible {
  outline: 3px solid rgba(255, 94, 3, 0.34);
  outline-offset: 3px;
}

.ps-store-reviews__arrow:disabled {
  opacity: 0.34;
  cursor: default;
}

@media (max-width: 991px) {
  .ps-store-reviews {
    margin: 56px 0;
    padding: 42px 28px 46px;
  }

  /* odkaz odchadza pod karusel (sr.js), v hlavicke tak zostava nadpis
     a hodnotenie - tie davame pod seba na stred */
  .ps-store-reviews__header {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .ps-store-reviews__title {
    order: -1;
    font-size: 29px;
  }

  .ps-store-review {
    flex-basis: calc((100% - 20px) / 2);
  }
}

@media (max-width: 767px) {
  .ps-store-reviews {
    margin: 42px -15px;
    padding: 36px 18px 40px;
    border-radius: 20px;
  }

  .ps-store-reviews__header {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 26px;
  }

  .ps-store-reviews__title {
    order: -1;
    font-size: 27px;
  }

  .ps-store-reviews__summary-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .ps-store-reviews__average {
    font-size: 30px;
  }

  .ps-store-reviews__carousel {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .ps-store-reviews__arrow {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .ps-store-review {
    flex-basis: 100%;
    padding: 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ps-store-reviews__track {
    scroll-behavior: auto;
  }

  .ps-store-reviews__arrow {
    transition: none;
  }
}
