/* ===================== Ratings & Stars ===================== */
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.stars-container {
  display: flex;
  gap: 2px;
  align-items: center;
}

.stars-container .star {
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  color: #FFD700;
}

.stars-container .star-empty {
  color: #ddd;
}

.rating-value {
  font-size: 12px;
  color: #666;
  font-weight: 600;
  margin-right: 4px;
}

/* Product Reviews Section */
.product-reviews-section {
  margin-top: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 16px;
  border: 1px solid #e9ecef;
}

.reviews-header {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
}

.reviews-summary {
  margin-top: 15px;
}

.reviews-average {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.average-rating {
  font-size: 36px;
  font-weight: 800;
  color: #8a004a;
  background: linear-gradient(135deg, #8a004a 0%, #E91E63 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.average-stars {
  display: flex;
  gap: 4px;
}

.average-stars .star-filled,
.average-stars .star-half,
.average-stars .star-empty {
  font-size: 24px;
  line-height: 1;
  color: #FFD700;
}

.average-stars .star-empty {
  color: #ddd;
}

.average-stars .star-half {
  opacity: 0.5;
}

.total-reviews {
  font-size: 16px;
  color: #666;
  font-weight: 600;
}

.add-review-section {
  margin-top: 25px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.add-review-section h4 {
  margin: 0 0 20px 0;
  color: #8a004a;
  font-size: 18px;
  font-weight: 700;
}

.rating-input {
  margin-bottom: 15px;
}

.rating-input label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
}

.star-rating-input {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.star-input {
  font-size: 32px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  color: #FFD700;
}

.star-input:hover {
  transform: scale(1.15);
}

.selected-rating-text {
  font-size: 14px;
  color: #8a004a;
  font-weight: 600;
}

.review-comment-input {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.review-comment-input:focus {
  outline: none;
  border-color: #8a004a;
}

.submit-review-btn {
  padding: 12px 30px;
  background: linear-gradient(135deg, #8a004a 0%, #E91E63 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.submit-review-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 0, 74, 0.3);
}

.review-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
}

.review-login-prompt {
  margin-top: 20px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 12px;
  text-align: center;
}

.review-login-prompt a {
  color: #8a004a;
  font-weight: 600;
  text-decoration: none;
}

.review-login-prompt a:hover {
  text-decoration: underline;
}

.reviews-list {
  margin-top: 25px;
}

.review-item {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-initial {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a004a 0%, #E91E63 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-email {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.review-date {
  font-size: 12px;
  color: #999;
}

.review-rating {
  display: flex;
  gap: 2px;
}

.review-rating .star-filled,
.review-rating .star-empty,
.review-rating .star-half {
  font-size: 18px;
  line-height: 1;
  color: #FFD700;
}

.review-rating .star-empty {
  color: #ddd;
}

.review-comment {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 14px;
}

.no-reviews {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.reviews-error {
  text-align: center;
  padding: 20px;
  color: #dc3545;
  background: #f8d7da;
  border-radius: 8px;
}

.reviews-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

/* تقليل المسافة بين التقييم والسعر على الموبايل */
@media (max-width: 768px) {
  .product-rating {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    gap: 2px !important;
  }
  
  .product-rating .stars-container {
    gap: 1px !important;
  }
  
  .product-rating .stars-container .star {
    font-size: 10px !important;
  }
  
  .product-rating .rating-value {
    font-size: 10px !important;
    margin-right: 2px !important;
  }
  
  .price-row {
    margin-top: 0px !important;
  }
}



