/* Unified layout rules shared by widget, shortcode and gallery */

/* Card */
.mega-reviews-wrapper .mega-review-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: var(--mega-card-min-height, 360px) !important;
}
.mega-reviews-wrapper .mega-review-card-inner {
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
}
.mega-reviews-wrapper .mega-review-footer {
  margin-top: auto !important;
}

/* Product image area */
.mega-reviews-wrapper .mega-review-product-image,
.mega-reviews-wrapper .mega-product-thumbnail {
  width: 100% !important;
  height: var(--mega-thumb-height, 220px) !important;
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  background: #ffffff !important;
}
.mega-reviews-wrapper .mega-review-product-image img,
.mega-reviews-wrapper .mega-product-thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #ffffff !important;
}

/* Grid */
.mega-reviews-wrapper .mega-reviews-grid {
  display: grid;
  gap: 20px;
}
@media (max-width: 1024px) {
  .mega-reviews-wrapper .mega-reviews-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  }
}
@media (max-width: 768px) {
  .mega-reviews-wrapper .mega-reviews-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Slider */
.mega-reviews-wrapper .mega-reviews-slider .swiper-slide {
  height: auto !important;
  display: flex !important;
  justify-content: center !important;
  align-items: stretch !important;
}
.mega-reviews-wrapper .mega-reviews-slider .mega-review-card {
  max-width: 450px;
  margin: 0 auto;
  height: 100%;
}
