/* REVIEW SECTION */
.product_rating {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.product_rating input {
  display: none;
}

.product_rating label {
  cursor: pointer;
  padding: 0.15rem;
}

.product_rating label i {
  color: #ddd;
}

.product_rating:hover label i {
  color: #ddd !important;
}

/* hover effect */
.product_rating label:hover i,
.product_rating label:hover ~ label i {
  color: orange !important;
}
/* select effect */
.product_rating input:checked + label i,
.product_rating input:checked ~ label i {
  color: orange;
}

/* .review {  
    display: flex;  
    border: 1px solid rgb(236, 137, 8); 
    padding: 1rem;
    margin: 1rem;
    gap: 3rem;   
}

div {
    display: block;
    gap: 1rem;
    align-items: center;
}

.star i {
    font-size: 2em;
    color: lightgray;    
    cursor: pointer;
}

input[type="radio"]:checked + .star i,
.star i:hover,
.star i:hover ~ .star i {
    color: gold;
}

h2 {
    color: #dd831d;
    margin-top: 2rem;
} */

.write-review-cards-wrapper,
#reviews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}

.write-review-card {
  display: flex;
  flex-direction: row;
  width: 48%;
  min-width: 300px;
  background-color: #fff;
  border: 1px solid var(--cp-primary-color-200);
  border-radius: 10px;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
  height: 100%; /* Make all cards the same height */
  box-sizing: border-box;
}

.product-img-wrapper {
  width: 8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.5rem;
  margin-right: 1.25rem;
}

.product-details {
  flex: 1;
}

.heading {
  font-size: 1rem;
  margin-bottom: 0px;
  margin-top: 0px;
  color: var(--cp-secondary-color-400);
}

.product-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  margin-top: 0px;
  color: var(--cp-primary-color-600);
}

.write-review-btn {
  margin-top: 10px;
  border: 1px solid var(--cp-primary-color-200);
}

.write-review-btn:hover {
  background-color: var(--cp-primary-color-100);
}

@media (max-width: 768px) {
  .write-review-card {
    width: 100%;
    flex-direction: row;
    text-align: center;
  }

  .product-image img {
    margin: 0 0 0 0;
  }

  .product-title {
    font-size: 1rem;
  }
}

/* SUBMIT REVIEW CARD */
.submit-review-card {
  display: flex;
  flex-direction: column;
  border: 2px solid #ccc;
  border-radius: 12px;
  padding: 20px;
  background-color: white;
  max-width: 700px; /* 🔧 Change width here */
  margin: 0 auto;
  gap: 1.5rem;
}

/* Upper section: image + product info */
.upper-section {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* Right side product info */
.product-details {
  flex: 1;
}

.heading {
  font-size: 1rem;
  margin-bottom: 0px;
  margin-top: 0px;
  color: var(--cp-secondary-color-400, #888);
}

.product-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  margin-top: 0px;
  color: var(--cp-primary-color-600, #333);
}

/* Lower section: review form */
.review-form {
  width: 100%;
}

.btn-outline-dark {
  border: 1px solid #333;
  background-color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.btn-outline-dark:hover {
  background-color: #f5f5f5;
}

/* Responsive behavior */
@media (max-width: 768px) {
  .upper-section {
    flex-direction: column;
    text-align: center;
  }

  .product-img-wrapper {
    margin-bottom: 1rem;
  }

  .product-title {
    font-size: 1rem;
  }

  .submit-review-card {
    width: 95%;
  }
}
