/* Customer photos (UGC) — product page */
.pp-ugc {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line, #e6e8ed);
}

.pp-ugc__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin: 0 0 6px;
}

.pp-ugc__sub {
  font-size: 13.5px;
  color: var(--muted, #6b7280);
  margin: 0 0 18px;
}

.pp-ugc__empty {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg, #f5f6f8);
  border: 1px dashed var(--line, #e6e8ed);
  color: var(--muted, #6b7280);
  font-size: 14px;
}

.pp-ugc__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 900px) {
  .pp-ugc__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .pp-ugc__grid {
    display: none;
  }

  .pp-ugc__carousel {
    display: flex;
  }
}

.pp-ugc__carousel {
  display: none;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  direction: rtl;
}

.pp-ugc__carousel::-webkit-scrollbar {
  height: 4px;
}

.pp-ugc-item {
  border: 0;
  padding: 0;
  background: #f5f6f8;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
}

.pp-ugc__grid .pp-ugc-item {
  width: 100%;
}

.pp-ugc__carousel .pp-ugc-item {
  flex: 0 0 46%;
  scroll-snap-align: start;
  min-width: 140px;
}

.pp-ugc-item.is-broken {
  display: none;
}

.pp-ugc-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pp-ugc-item__cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  text-align: start;
}

/* UGC lightbox */
.ugc-lb {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overscroll-behavior: contain;
}

.ugc-lb.is-on {
  display: flex;
}

.ugc-lb__img {
  max-width: min(92vw, 1000px);
  max-height: 88vh;
  object-fit: contain;
  transform-origin: center;
  touch-action: none;
}

.ugc-lb__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  inset-inline-end: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.ugc-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.ugc-lb__prev {
  inset-inline-start: 12px;
}

.ugc-lb__next {
  inset-inline-end: 12px;
}

.ugc-lb__cap {
  position: absolute;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  max-width: 90%;
  text-align: center;
}
