.reviews-popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px); z-index: 1000; }
.reviews-popup-content { position: relative; background-color: #fff; margin: 5% auto; width: 70%; max-width: 700px; border-radius: 8px; max-height: 80vh; overflow-y: auto; overflow-x: hidden; }
.reviews-popup-content h2 { padding: 0 15px;}
.show-reviews-popup { cursor: pointer; color: #166534; text-decoration: none; }
.show-reviews-popup:hover { text-decoration: underline; }

/* reveies open button */
.rating-section {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid #f0f0f0;
}

/* Tabs */
.review-tabs { display: none; gap: 10px; margin-bottom: 20px; padding: 0 15px; margin-top: 20px; }
.review-tab { padding: 8px 16px; border: none; background: transparent; color: #666; cursor: pointer; font-size: 14px; font-weight: 500; border-radius: 20px; transition: all 0.3s ease; }
.review-tab.active { background: #005959 !important; color: white !important; }
.review-tab:hover:not(.active) { background: rgba(0, 89, 89, 0.1); }

/* Animation */
.review-animation { animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Reviewed product summary element (inline) */
.reviewed-product { display: flex; align-items: center; justify-content: space-between; background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 8px; padding: 15px; margin: 15px 0; gap: 15px; }
.reviewed-product-info { flex: 1; }
.reviewed-product-title { font-size: 16px; font-weight: 600; color: #005959; margin: 0 0 5px 0; font-family: 'Poppins', sans-serif; }
.reviewed-product-price { font-size: 14px; font-weight: 500; color: #166534; }
.reviewed-product-image { width: 80px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.reviewed-product-image img { width: 100%; height: 100%; object-fit: cover; }

/* Review item list */
.review-item { background: white; padding: 15px; border-radius: 8px; margin-bottom: 10px; transition: all 0.3s ease; border-bottom: 1px solid #eee; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.reviewer-info { display: flex; align-items: center; gap: 10px; }
.reviewer-name { font-weight: 600; color: #111827; font-size: 15px; }
.review-rating { color: #FFB800; font-size: 14px; }
.review-date { color: #6B7280; font-size: 13px; }
.review-content { margin-top: 15px; font-size: 14px; color: #4B5563; line-height: 1.5; }
.reviews-list { padding: 15px; max-height: 400px; overflow-y: auto; margin-top: 10px; }
.reviews-list::-webkit-scrollbar { width: 6px; }
.reviews-list::-webkit-scrollbar-track { background: #f1f1f1; }
.reviews-list::-webkit-scrollbar-thumb { background: #005959; border-radius: 3px; }

/* Helpful */
.review-helpful { margin-top: 15px; display: flex; justify-content: flex-end; }
.helpful-btn { padding: 8px 16px; background: transparent; border: 1px solid #E5E7EB; border-radius: 20px; color: #374151; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; transition: all 0.2s ease; position: relative; overflow: hidden; }
.helpful-btn:hover { background: #F3F4F6; border-color: #D1D5DB; }
.helpful-btn i { font-size: 14px; transition: transform 0.2s ease; }
.helpful-btn:hover i { transform: scale(1.1); }
.helpful-animation { animation: helpfulPulse 0.3s ease-out; }
@keyframes helpfulPulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.helpful-btn .fas { color: #005959; }

/* Rating summary */
.reviews-container { padding: 20px; background: #f7f7f7; }
.rating-summary-top { width: 30%; display: flex; flex-direction: column; justify-content: center; }
.rating-bars { margin: 0px 0; padding: 0 15px; width: 70%; }
.rating-bar-row { display: flex; align-items: center; margin-bottom: 2px; gap: 6px; }
.star-label { min-width: 15px; color: #666; font-size: 14px; }
.progress-bar { flex: 1; height: 5px; background: #EAEAEA; border-radius: 10px; overflow: hidden; }
.progress { height: 100%; background: #FFA41C; border-radius: 10px; transition: width 0.3s ease; }
.rating-summary { border: solid 2px #dcdcdc; text-align: left; padding: 20px; display: flex; border-radius: 10px; background: white; }
.rating-big { font-size: 30px; font-weight: bold; color: #000; margin-bottom: 5px; line-height: 1; }
.rating-stars { color: #FFA41C; font-size: 11px; margin-bottom: 0px; }
.all-ratings { color: #666; font-size: 14px; margin-bottom: 20px; }

/* Reviewed-products slider */
.reviewed-products-slider { display: flex; gap: 15px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 4px; }
.reviewed-products-slider::-webkit-scrollbar { display: none; }
.reviewed-product { min-width: 250px; background: #fff; border-radius: 8px; padding: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.3s ease; }
.reviewed-product:hover { transform: translateY(-2px); }
.reviewed-product h3 { margin: 10px 0 5px; font-size: 16px; color: #333; }
.reviewed-product .price { color: #005959; font-weight: 600; }

.reviews-container { flex-direction:column; align-items: center; flex: 1 1 auto; overflow-y: auto; padding: 16px 12px 24px 12px !important; box-sizing: border-box; max-height: calc(100vh - 56px); }
/* Shared review scrollbars */
.reviews-container::-webkit-scrollbar, .reviews-popup-content::-webkit-scrollbar { width: 6px; }
.reviews-container::-webkit-scrollbar-track, .reviews-popup-content::-webkit-scrollbar-track { background: transparent; border-radius: 0 20px 20px 0; }
.reviews-container::-webkit-scrollbar-thumb, .reviews-popup-content::-webkit-scrollbar-thumb { background: #005959; border-radius: 20px; }

/* Responsive tweaks for popup */
@media (max-width: 768px) {
	.rating-section {
         border: 1px solid #f0f0f0;
		height: auto;
	    width:fit-content;
	}
	.reviews-popup-overlay { align-items: center !important; justify-content: center !important; padding: 0 !important; z-index: 99999 !important; }
  .reviews-popup-content { max-width: 90vw !important; max-height: 85vh ; }
  .reviews-container {  display: flex; align-items: center; justify-content: center }
	
  .reviews-popup-content h2 { font-size: 1.2rem !important; text-align: center; }
  .review-item { padding: 12px !important; border-bottom: 1px solid #f0f0f0 !important; }
  .review-header, .review-content, .reviewed-products, .review-helpful { padding-left: 0 !important; padding-right: 0 !important; }
  .review-tabs { display: none; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; justify-content: center; }
  .review-tab { flex: 1 1 40%; min-width: 100px; font-size: 0.95rem; padding: 8px 0; }
  .rating-summary { margin-bottom: 16px !important; width: 100%; flex-direction: column; gap: 10px;}
  .reviews-list{padding: 0; width: 100%;}

}
@media (max-width: 480px) {
	  .reviews-popup-content { width: 90% !important; max-width: 480px !important; max-height: 85vh !important; }
	.rating-section {
        border: 1px solid #f0f0f0;
		height: auto;
	    width:fit-content;
	}
	.rating-summary-top, .rating-bars{
		 width: 100%;
		padding:0;
	}   

}

