/* Reset and Box Model */
*, *::before, *::after {
  box-sizing: border-box;
}
body, h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin: 0;
  padding: 0;
}
html, body {
  background-color: #fefefe;
}

/* Wrapper Adjustments */
.product-page-wrapper,
.home-common-wrapper {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.review-section-wrapper {
  background-color: #fefefe;
  padding: 60px 20px 0;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  min-height: calc(100vh - 300px);
}

/* Poetic Title Section */
.poetic-title-section {
  background-color: #1d5da8;
  padding: 15px 10px;
  text-align: center;
  color: white;
}

.poetic-title-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Happy Customers */
.happy-customer-count {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  line-height: 1.3;
}

#customer-count {
  margin-left: 6px;
  font-size: inherit;
  font-weight: inherit;
}

/* Rating Bar */
.rating-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #12142b;
  padding: 6px 14px;
  border-radius: 12px;
  gap: 6px;
  margin-top: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
}

.rating-bar .label {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffc107;
}
.rating-bar .star {
  font-size: 1.4rem;
  color: #ffc107;
}
.rating-bar .rating-score,
.rating-bar .divider {
  font-size: 1.6rem;
  font-weight: bold;
  color: white;
}

/* Rating Value */
.rating-value {
  display: inline-block;
  margin-left: 8px;
  font-weight: 700; /* This makes it bold */
}
.rating-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #000;
}
.rating-out-of {
  font-size: 1.4rem;
  font-weight: 500;
  color: #555;
}

/* Review Cards */
.review-card {
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}
.review-text-container {
  max-height: 120px;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.review-text-container.expanded {
  max-height: 800px;
}
.read-more-btn {
  color: #007bff;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 8px;
  display: inline-block;
}
.reviewer-name {
  font-weight: 700;
}
.review-card h5 span:first-child {
  font-weight: 400;
}

/* Reviewer Rating */
.review-card .reviewer-rating {
  font-size: 1.8rem;
  font-weight: 700;
  color: #000;
  margin-top: 10px;
}

/* Stars */
.star {
  font-size: 26px;
  color: gray;
}
.star.filled {
  color: gold;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}
.pagination a {
  margin: 0 5px;
  padding: 8px 14px;
  border-radius: 5px;
  border: 2px solid #1b5ca6;
  background-color: #fff;
  color: #1b5ca6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}
.pagination a:hover,
.pagination a:focus,
.pagination .active {
  background-color: #1b5ca6;
  color: #fff;
  font-weight: 600;
}

/* Buttons */
.custom-theme-btn {
  background-color: #fff;
  color: #1b5ca6;
  border: 2px solid #1b5ca6;
  padding: 10px 25px;
  font-weight: 500;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}
.custom-theme-btn:hover,
.custom-theme-btn:focus {
  background-color: #1b5ca6;
  color: #fff;
}

/* QR Image */
.google-review-qr {
  max-width: 160px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Responsive Optimizations */
@media (max-width: 768px) {
  .poetic-title-section {
    padding: 16px 8px 12px;
    margin-top: 0px;
  }

  .poetic-title-section h2 {
    font-size: 1.2rem;
  }

  .happy-customer-count {
    font-size: 2.1rem;
    line-height: 1.3;
    white-space: nowrap;
    text-align: center;
  }

  #customer-count {
    font-size: inherit;
    font-weight: bold;
    margin-left: 4px;
  }

  .customer-count-wrapper {
    font-size: 1.4rem;
    gap: 0.1rem;
  }

  .rating-bar {
    padding: 4px 8px;
    gap: 3px;
  }

  .rating-bar .label {
    font-size: 0.9rem;
  }

  .rating-bar .star {
    font-size: 1rem;
  }

  .rating-bar .rating-score,
  .rating-bar .divider {
    font-size: 1.3rem;
  }

  .rating-number {
    font-size: 1.5rem;
  }

  .rating-out-of {
    font-size: 1.2rem;
  }

  .review-card .reviewer-rating {
    font-size: 1.5rem;
  }

  .rating-box {
    padding: 10px 12px;
  }
}

#customer-count::after {
  content: none !important;
}
