/* Task 4: review surfaces only. Product IDs, review claims, and image sources stay data-owned. */

/* Keep theme button padding and generic figure rules out of review photos. */
body .gp-story-card__thumbnail {
  display: block;
  box-sizing: border-box;
  width: 64px;
  height: 64px;
  min-width: 64px;
  flex: 0 0 64px;
  padding: 0 !important;
}

body .gp-story-card__thumbnail img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  object-fit: cover;
}

/* JS already owns the selected index; preserve its native hidden state. */
.gp-review-dialog [data-gp-dialog-image][hidden],
.gp-review-dialog [data-gp-dialog-previous][hidden],
.gp-review-dialog [data-gp-dialog-next][hidden],
.gp-review-dialog [data-gp-dialog-counter][hidden] {
  display: none !important;
}

.gp-review-dialog .gp-review-detail__gallery {
  padding-bottom: 36px;
}

.gp-review-dialog .gp-review-detail__gallery-images {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  place-items: center;
}

.gp-review-dialog .gp-review-detail__gallery-images figure:not([hidden]) {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
}

.gp-review-dialog .gp-review-detail__image {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.single-product .gp-story-wall--product {
  margin-block: clamp(2rem, 4vw, 3.25rem);
}

body.home .gph-reviews {
  padding-top: 60px;
  padding-bottom: 52px;
}

body.home .gph-reviews-heading {
  align-items: start;
  margin-bottom: 22px;
}

body.home .gph-rating-summary--story {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

body.home .gph-rating-summary--story strong {
  grid-row: auto;
  color: var(--green, #006b46);
  font-family: var(--sans, Arial, sans-serif);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.home .gph-rating-summary--story small {
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 820px) {
  body.home .gph-reviews {
    padding-top: 56px;
    padding-bottom: 48px;
  }

  body.home .gph-rating-summary--story {
    align-items: flex-start;
  }
}
