/* SELL-1912: review card grid, as approved by the client on the
   wr-leafblower-landing-preview (c48ee59f). Loaded after index-v9.css on
   landing, landing-ship and landing-cvt.
   Frame review photos so the full product stays in view, and keep an even
   card grid. index-v9.css uses object-fit:cover with a fixed 260px height;
   at mid widths the frame is about 195x260 and side-crops the nearly-square
   photos. height:auto keeps the native aspect. */
.review-image,
.review-image picture {
  display: block;
  width: 100%;
}
.review-image img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
}

.reviews .reviews-items {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  column-count: unset !important;
  max-width: none;
}
.reviews .review {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
}

@media screen and (max-width: 991px) {
  .reviews .reviews-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 860px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 768px) {
  .reviews .reviews-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 568px;
  }
}

@media screen and (max-width: 480px) {
  .reviews .reviews-items {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: none;
  }
  .reviews .review {
    max-width: unset;
  }
}

/* Keep Steve as last-child in the DOM (existing max-width 991px hide still
   applies to him) but place the Robert card in the last grid cell, as on
   the client preview. */
@media screen and (min-width: 481px) {
  .reviews .review:nth-child(7) {
    order: 1;
  }
}

/* Restore the rule that hides the last review card at mid and mobile
   widths. The display:flex on .reviews .review above would override it. */
@media screen and (max-width: 991px) {
  .reviews .review:last-child {
    display: none !important;
  }
}
