/* =========================
   REVIEWS SECTION
========================= */

#productReviewsContainer {
  padding: 0 20px;
  box-sizing: border-box;
}

.reviews_section {
  width: 100%;
  max-width: 1400px;

  margin: 60px auto;

  padding: 40px;

  box-sizing: border-box;

  outline: 2px solid #b6b5b5;

  background: #fff;

  border-radius: 16px;
}


.reviews_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.reviews_heading {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111;
}

/* =========================
   BUTTONS
========================= */

.write_review_btn,
.submit_review_btn {
  border: none;
  cursor: pointer;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  transition: all 0.2s ease;
}

.write_review_btn {
  background: #111;
  color: #fff;
}

.write_review_btn:hover {
  opacity: 0.9;
}

.submit_review_btn {
  width: 100%;
  background: #111;
  color: #fff;
  margin-top: 20px;
}

.submit_review_btn:hover {
  opacity: 0.9;
}

/* =========================
   SUMMARY
========================= */

.reviews_summary {
  display: grid;

  grid-template-columns:
    250px
    1fr
    250px;

  gap: 40px;

  align-items: center;

  padding-bottom: 30px;

  border-bottom: 1px solid #b6b5b5;

  margin-bottom: 30px;
}

.review_cta {
  display: flex;
  justify-content: center;
}

.rating_row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.rating_label {
  width: 60px;
  color: #555;
}

.rating_bar {
  flex: 1;
  height: 12px;
  background: #ececec;
  border-radius: 999px;
  overflow: hidden;
}

.rating_fill {
  height: 100%;
  background: #f5b301;
}

.rating_count {
  width: 40px;
  text-align: right;
}

.rating_overview {
  min-width: 220px;
}

.average_rating {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: #111;
}

.average_stars {
  font-size: 26px;
  margin-top: 8px;
  color: #ffb400;
}

.total_reviews {
  margin-top: 10px;
  color: #666;
  font-size: 15px;
}

/* =========================
   BREAKDOWN
========================= */

.rating_breakdown {
  flex: 1;
  min-width: 280px;
}

/* =========================
   REVIEWS LIST
========================= */

.reviews_list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review_card {
  padding: 24px;

  border: 1px solid #b6b5b5;

  border-radius: 12px;

  background: #fff;

  margin-bottom: 20px;

  min-width: 0;
}

.review_header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.review_avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #444;
  font-size: 18px;
}

.review_user {
  flex: 1;
}

.review_name {
  font-size: 16px;
  font-weight: 600;
  color: #111;
}

.review_date {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

.review_stars {
  color: #ffb400;
  font-size: 18px;
  margin-bottom: 8px;
}

.review_title {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  margin-bottom: 10px;
}

.review_text {
  color: #444;
  line-height: 1.7;
  font-size: 20px;
}

.review_text,
.review_title {
  overflow-wrap: anywhere;
}

/* =========================
   VERIFIED BADGE
========================= */

.verified_badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f7ea;
  color: #138a36;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 8px;
}

/* =========================
   REVIEW IMAGES
========================= */

.review_images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.review_images img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #ddd;
}

/* =========================
   NO REVIEWS
========================= */

.no_reviews {
  text-align: center;
  color: #666;
  padding: 30px;
  font-size: 16px;
}

/* =========================
   MODAL
========================= */

.review_modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.review_modal_content {
  width: 100%;
  max-width: 700px;
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.close_review_modal {
  position: absolute;
  right: 15px;
  top: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

/* =========================
   FORM
========================= */

.review_form_group {
  margin-bottom: 18px;
}

.review_form_group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

.review_form_group input,
.review_form_group textarea,
.review_form_group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
}

.review_form_group textarea {
  resize: vertical;
}

.review_form_group input:focus,
.review_form_group textarea:focus,
.review_form_group select:focus {
  outline: none;
  border-color: #111;
}

/* =========================
   IMAGE PREVIEW
========================= */

.selected_images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.selected_images img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.review_media_section {
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid #b6b5b5;
}

.review_media_heading {
  font-size: 20px;
  margin-bottom: 16px;
}

/* .review_media_wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
} */

.review_media_wrapper {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 16px;
}

.review_media_gallery {
  display: flex;
  gap: 12px;

  justify-content: center; /* NEW */

  align-items: center;

  overflow-x: auto;

  flex: 1;

  scroll-behavior: smooth;
  max-width: 900px;
}

.review_media_gallery::-webkit-scrollbar {
  display: none;
}

.review_media_nav {
  width: 42px;
  height: 42px;

  border-radius: 50%;

  border: 1px solid #ddd;

  background: #fff;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

  cursor: pointer;

  font-size: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.review_media_nav:hover {
  background: #f5f5f5;
}

.review_media_gallery img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #ddd;
}

/* =========================
   REVIEW GALLERY MODAL
========================= */

.review_gallery_modal {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.85);

  z-index: 99999;

  display: none;

  padding: 30px;
  box-sizing: border-box;
}

.gallery_layout {
  width: 100%;
  height: 100%;

  background: #fff;

  border-radius: 16px;

  overflow: hidden;

  display: grid;

  grid-template-columns: 65% 35%;
}

.gallery_left {
  position: relative;

  display: flex;

  justify-content: center;

  align-items: center;

  background: #f7f7f7;

  min-height: 700px;
}

.gallery_left img {
  position: relative;
  z-index: 1;
  max-width: 90%;
  max-height: 85vh;
  overflow: visible;
  object-fit: contain;
}

.gallery_right {
  padding: 32px;

  overflow-y: auto;

  border-left: 1px solid #ececec;
}

.gallery_reviewer {
  font-size: 22px;

  font-weight: 700;

  color: #111;
}

.gallery_rating {
  margin-top: 10px;

  font-size: 24px;

  color: #ffb400;
}

.gallery_title {
  margin-top: 24px;

  font-size: 22px;

  font-weight: 700;

  color: #111;
}

.gallery_text {
  margin-top: 16px;

  line-height: 1.8;

  font-size: 16px;

  color: #444;
}

.gallery_thumbs {
  display: flex;

  flex-wrap: wrap;

  gap: 10px;

  margin-top: 30px;
}

.gallery_thumbs img {
  width: 80px;
  height: 80px;

  object-fit: cover;

  border-radius: 10px;

  border: 2px solid transparent;

  cursor: pointer;
}

.gallery_thumbs img:hover {
  border-color: #111;
}

.gallery_thumbs img.active {
  border-color: #f5b301;
  border: 3px solid #f5b301;
  box-shadow: 0 0 0 3px rgba(245, 179, 1, 0.25);

  transform: scale(1.05);
}

.review_gallery_image.active {
  border: 3px solid #f5b301;
}

.gallery_close {
  position: absolute;

  top: 25px;
  right: 25px;

  z-index: 100000;

  width: 44px;
  height: 44px;

  border: none;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.9);

  font-size: 28px;

  cursor: pointer;

  color: #111;
}

.review_gallery_nav {
  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  width: 60px;
  height: 60px;

  z-index: 999999 !important;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.95);

  color: #111;

  border: none;

  border-radius: 50%;

  cursor: pointer;

  font-size: 32px;

  font-weight: 700;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery_prev {
  left: 25px;
}

.gallery_next {
  right: 25px;
}

.gallery_nav:hover {
  background: #fff;
}

.gallery_user_header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.gallery_avatar {
  width: 56px;
  height: 56px;

  border-radius: 50%;

  background: #f2f2f2;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 700;

  color: #444;

  flex-shrink: 0;
}

.gallery_date {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

/* =========================
   PAGINATION
========================= */

.reviews_pagination {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 8px;

  margin-top: 30px;
}

.pagination_btn {
  width: 40px;

  height: 40px;

  border: 1px solid #ddd;

  background: #fff;

  border-radius: 8px;

  cursor: pointer;

  font-size: 15px;

  transition: all 0.2s ease;
}

.pagination_btn:hover:not(:disabled) {
  background: #f5f5f5;
}

.pagination_btn.active {
  background: #f5b301;

  color: #fff;

  border-color: #f5b301;

  font-weight: 700;
}

.pagination_btn:disabled {
  opacity: 0.4;

  cursor: not-allowed;
}

/* =========================
   Tablet
========================= */

@media (max-width: 1024px) {
  .reviews_section {
    padding: 20px;
  }

  .reviews_header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reviews_summary {
    grid-template-columns: 1fr;

    gap: 24px;
  }

  .review_cta {
    justify-content: flex-start;
  }

  .write_review_btn {
    width: 100%;
  }

  .average_rating {
    font-size: 42px;
  }

  .review_modal_content {
    padding: 20px;
  }

  .review_gallery_modal {
    padding: 10px;
    overflow-y: auto;
  }

  .review_images img {
    width: 75px;
    height: 75px;
  }

  .gallery_layout {
    display: flex;
    flex-direction: column;

    width: 100%;
    height: auto;
    min-height: 100%;
  }

  .gallery_left {
    min-height: auto;
    height: 50vh;
  }

  .gallery_left img {
    max-height: 45vh;
    max-width: 100%;
  }

  .gallery_right {
    padding: 20px;
    overflow: visible;
  }

  .review_gallery_nav {
    width: 44px;
    height: 44px;
  }

  .gallery_thumbs img {
    width: 60px;
    height: 60px;
  }
}

/* =========================
   Mobile
========================= */

@media (max-width: 600px) {
  .reviews_section {
    padding: 20px;
    overflow-x: hidden;
  }

  .reviews_header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reviews_summary {
    grid-template-columns: 1fr;

    gap: 24px;
  }

  .review_cta {
    justify-content: flex-start;
  }

  .write_review_btn {
    width: 100%;
  }

  .average_rating {
    font-size: 42px;
  }

  .review_modal_content {
    padding: 20px;
  }

  .review_images img {
    width: 75px;
    height: 75px;
  }

  .review_text {
    font-size: 16px;
    line-height: 1.6;
  }

  .review_title {
    font-size: 16px;
  }

  .review_gallery_nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .gallery_prev {
    left: 10px;
  }

  .gallery_next {
    right: 10px;
  }
}
