/* ==========================================================================
   CUSTOM PRODUCT REVIEWS – GRID & SLIDER STYLES
   Path: astra-child/assets/css/wc-custom-reviews.css
   ========================================================================== */

.wc-custom-reviews-container {
  width: 100%;
  margin: 20px 0;
}

/* ============================================================
   GRID LAYOUT (Default – kept for other uses)
   ============================================================ */
.wc-custom-reviews-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols-desktop, 3), 1fr);
  gap: 20px;
}

@media (max-width: 991px) {
  .wc-custom-reviews-grid {
    grid-template-columns: repeat(var(--cols-tablet, 2), 1fr) !important;
  }
}

@media (max-width: 600px) {
  .wc-custom-reviews-grid {
    grid-template-columns: repeat(var(--cols-mobile, 1), 1fr) !important;
    gap: 15px;
  }
}

/* ============================================================
   REVIEW CARD
   ============================================================ */
.custom-review-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid #cccccc;
  border-radius: var(--radius, 12px);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

/* Header: Avatar + Name | Stars */
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  width: 100%;
}

.review-author-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.author-avatar img {
  border-radius: 50%;
  display: block;
  width: 44px;
  height: 44px;
  object-fit: cover;
  flex-shrink: 0;
}

.author-name {
  font-weight: 700;
  font-size: 15px;
  color: #2d2b3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-rating-stars {
  color: var(--accent, #e5456d);
  font-size: 14px;
  letter-spacing: 0;
  flex-shrink: 0;
  margin-left: 8px;
  display: flex;
  align-items: center;
  gap: 0;
}

.review-rating-stars .star {
  opacity: 0.2;
  margin: 0;
}

.review-rating-stars .star.filled {
  opacity: 1;
}

/* Body: Quote Icon + Review Text */
.review-body {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
  flex: 1;
}

.quote-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.quote-icon svg {
  fill: #e5456d !important;
}

.review-content-wrap {
  flex-grow: 1;
  min-width: 0;
}

.review-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-color, #444444);
  display: -webkit-box;
  -webkit-line-clamp: var(--line-clamp, 3);
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.3s ease;
}

.review-text.expanded {
  display: block;
  overflow: visible;
}

.review-read-more-btn {
  background: none;
  border: none;
  padding: 0;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #2d2b3a;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease;
}

.review-read-more-btn:hover {
  color: #e5456d;
}

/* Bottom: Product Card */
.review-product-card {
  background: var(--prod-bg, #f9f9f9);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  transition: background 0.2s ease;
  margin-top: auto;
}

.review-product-card:hover {
  filter: brightness(0.96);
}

.product-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.product-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.product-details .product-name {
  font-size: 13px;
  font-weight: 600;
  color: #2d2b3a;
  margin: 0 0 4px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-details .product-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent, #e5456d);
}

.product-details .product-price del {
  color: #606060;
  font-weight: 400;
  font-size: 11px;
  margin-right: 4px;
}

/* ============================================================
   REVIEWS SLIDER – CONSISTENT WITH PRODUCT SLIDERS
   ============================================================ */
.reviews-slider-wrapper {
  position: relative; /* Anchor for absolute arrows */
  margin-bottom: 30px;
  /* NO PADDING – matches product sliders */
}

/* Title – left aligned, inline-block so arrows can sit beside it */
.reviews-slider-wrapper .slider-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #2d2b3a;
  display: inline-block;
}

/* Navigation – absolute top-right (exactly like product sliders) */
.reviews-slider-wrapper .swiper-navigation-wrapper {
  position: absolute;
  top: -50px; /* Matches product sliders (-50px) */
  right: 0;
  z-index: 10;
  display: flex !important;
  gap: 8px;
}

/* Arrow buttons – identical to product sliders */
.reviews-slider-wrapper .swiper-button-prev-custom,
.reviews-slider-wrapper .swiper-button-next-custom {
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 4px 10px;
  border-radius: 4px;
  user-select: none;
  transition: background 0.2s ease-in-out;
  font-size: 18px;
  line-height: 1;
}

.reviews-slider-wrapper .swiper-button-prev-custom:hover,
.reviews-slider-wrapper .swiper-button-next-custom:hover {
  background: #f9f9f9;
}

.reviews-slider-wrapper .swiper-button-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Slides – uniform height */
.reviews-slider-wrapper .swiper-slide {
  height: auto !important;
  display: flex !important;
}

.reviews-slider-wrapper .custom-review-card {
  width: 100%;
  height: 100%;
}

/* Mobile: arrows below title (optional – matches product sliders on small screens) */
@media (max-width: 600px) {
  .reviews-slider-wrapper .swiper-navigation-wrapper {
    position: static;
    text-align: center;
    margin-top: 10px;
    justify-content: center;
  }
}
