.product-review-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 4px 0 20px;
    color: #444;
}

.product-review-rating__average {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.product-review-rating__average .rater-starsOff {
    width: 115px;
}

.product-review-gallery {
    --review-photo-height: 320px;
    width: 100%;
    max-width: 560px;
    margin: 24px auto;
}

.product-review-gallery h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.product-review-gallery__frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #e4e7e2;
    border-radius: 8px;
    background: #f5f6f3;
}

.product-review-gallery__main .carousel__viewport {
    cursor: grab;
}

.product-review-gallery__main .carousel__viewport:active {
    cursor: grabbing;
}

.product-review-gallery__main > .product-review-gallery__slide:not(:first-child) {
    display: none;
}

.product-review-gallery__main .product-review-gallery__slide {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    width: 100%;
    height: var(--review-photo-height);
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.product-review-gallery__slide img {
    display: block;
    width: 100%;
    height: var(--review-photo-height);
    object-fit: contain;
}

.product-review-gallery__error,
.product-review-gallery__slide.is-unavailable img {
    display: none;
}

.product-review-gallery__slide.is-unavailable .product-review-gallery__error {
    display: block;
    color: #555;
}

.product-review-gallery__expand,
.product-review-gallery__arrow,
.product-review-gallery__count {
    position: absolute;
    z-index: 1;
    color: #202620;
    border: 1px solid #dfe3dc;
    background: rgb(255 255 255 / 94%);
    border-radius: 6px;
}

.product-review-gallery__expand {
    top: 8px;
    right: 8px;
    padding: 6px 9px;
    font-size: 13px;
    text-decoration: none;
}

.product-review-gallery__arrow {
    top: 50%;
    display: grid;
    place-items: center;
    width: 36px;
    height: 40px;
    padding: 0;
    transform: translateY(-50%);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.product-review-gallery__arrow--prev { left: 8px; }
.product-review-gallery__arrow--next { right: 8px; }

.product-review-gallery__arrow[aria-disabled="true"] {
    opacity: 0.55;
    cursor: default;
}

.product-review-gallery__count {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 9px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
}

.product-review-gallery__thumbs {
    position: relative;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    margin-top: 8px;
    padding: 3px 3px 6px;
    user-select: none;
}

.product-review-gallery__arrow[hidden],
.product-review-gallery__thumbs[hidden],
.product-review-gallery__count[hidden] {
    display: none;
}

.product-review-gallery__thumbs button {
    flex: 0 0 60px;
    height: 60px;
    padding: 2px;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #f1f3ef;
    cursor: pointer;
}

.product-review-gallery__thumbs button[aria-current="true"] {
    border-color: var(--green-dark, #477a13);
}

.product-review-gallery__thumbs.is-dragging,
.product-review-gallery__thumbs.is-dragging button {
    cursor: grabbing;
}

.product-review-gallery__thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.product-review-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #f5f6f3;
    border: 1px solid #e4e7e2;
    border-radius: 6px;
}

.product-review-filters label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.product-review-filters select {
    min-height: 34px;
    padding: 4px 6px;
    font: inherit;
    background: #fff;
    border: 1px solid #a6aca1;
    border-radius: 4px;
}

.product-review-results { margin: 0 0 14px; }

.product-review-card__author,
.product-review-card__heading span {
    overflow-wrap: anywhere;
}

.product-review-card__heading {
    gap: 4px 3px;
    margin: 10px 0 4px;
}

.product-review-card__heading:empty { display: none !important; }

.product-review-gallery :focus-visible,
.product-review-filters :focus-visible {
    outline: 2px solid var(--green-dark, #477a13);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .product-review-gallery {
        --review-photo-height: clamp(210px, 68vw, 260px);
    }
}
