/* Category cards styles */
.category-card .media-box {
  height: 180px;
  background: #f8f9fa;
  border-radius: .5rem .5rem 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-card .media-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.category-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.08);
}

/* Rating Radio button */

.rate > input{
  display: none !important;
}

.rate{
  display: inline-block;
  border: 0;
  direction: ltr;
  unicode-bidi: bidi-override;
}

.rate > label{
  float: left;
  cursor: pointer;
  color: #ddd;
  font-size: 1.5rem;
  margin-right: 5px;
}

/* Showing stars */
.rate > label:before{
  display: inline-block !important;
  font-size: 1.5rem !important;
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  content: "\f005" !important;
  margin: 0 !important;
  padding: 0.3rem .2rem !important;
  cursor: pointer !important;
  color: #ddd !important;
}

/* Half star */

.rate .half::before{
  content: "\f089";
  position: absolute;
  padding-right: 0;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
}

/* Click and hover - Left to right selection */

.rate input:checked ~ label{
  color: #ffb503 !important;
}

.rate input:checked ~ label:before{
  color: #ffb503 !important;
}

.rate label:hover ~ label{
  color: #ffb503 !important;
}

.rate label:hover ~ label:before{
  color: #ffb503 !important;
}

/* Hover highlight */
.rate input:checked + label:hover, 
.rate input:checked ~ label:hover, 
.rate input:checked ~ label:hover ~ label,
.rate label:hover ~ input:checked ~ label{
  color: #cc9000 !important;
}

.rate input:checked + label:hover:before, 
.rate input:checked ~ label:hover:before, 
.rate input:checked ~ label:hover ~ label:before,
.rate label:hover ~ input:checked ~ label:before{
  color: #cc9000 !important;
}


.rating-star i{
  color: #ffb503 !important;
}

ul.thumb{
  margin: 0 auto;
  padding: 0;
  float: left;
}

ul.thumb li{
  list-style: none;
  margin: 10px;
}

ul.thumb li img{
  width: 80px;
  height: 80px;
  border: 1px solid grey;
}

/* Star Rating System */
.rate {
    float: left;
    height: 46px;
    padding: 0 10px;
}

.rate:not(:checked) > input {
    position: absolute;
    top: -9999px;
}

.rate:not(:checked) > label {
    float: right;
    width: 1em;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    font-size: 30px;
    color: #ddd;
}

.rate:not(:checked) > label:before {
    content: '\f005';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.rate > input:checked ~ label {
    color: #ffc700;
}

.rate:not(:checked) > label:hover,
.rate:not(:checked) > label:hover ~ label {
    color: #deb217;
}

.rate > input:checked + label:hover,
.rate > input:checked + label:hover ~ label,
.rate > input:checked ~ label:hover,
.rate > input:checked ~ label:hover ~ label,
.rate > label:hover ~ input:checked ~ label {
    color: #c59b08;
}

/* Half star support */
.rate label.half:before {
    content: '\f089';
    position: absolute;
    left: 0;
    width: 50%;
    overflow: hidden;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* Rating display stars */
.rating-star {
    display: inline-block;
}

.rating-star i {
    color: #ffc700;
    font-size: 16px;
}

.rating-star i.fa-star-o {
    color: #ddd;
}

.rating-star i.fa-star-half-o {
    color: #ffc700;
}

/* Review Section Styling */
.review-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 30px;
}

/* Review Form Styling */
.review-form {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
}

.review-form h5 {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 1.4rem;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.review-form label {
  color: #34495e;
  font-weight: 500;
  margin-bottom: 8px;
  display: block;
  font-size: 1rem;
}

/* Star Rating Container */
.rate {
  margin: 15px 0 25px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.rate > label {
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rate > label:hover {
  transform: scale(1.1);
}

/* Form Inputs */
.review-form .form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fff;
  margin-bottom: 15px;
}

.review-form .form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.review-form textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Submit Button */
.review-form .btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-form .btn-primary:hover {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Customer Reviews Header */
.section-heading {
  background: #fff;
  padding: 20px 30px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
}

.section-heading h3 {
  color: #2c3e50;
  font-weight: 600;
  margin: 0;
  font-size: 1.5rem;
}

.avg-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.avg-rating i {
  color: #f39c12;
  font-size: 1.2rem;
}

.avg-rating span {
  color: #7f8c8d;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Individual Review Cards */
.review-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.review-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e9ecef;
  margin-right: 15px;
}

.review-user-info {
  flex: 1;
}

.review-user-name {
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 5px 0;
  font-size: 1.1rem;
}

.review-date {
  color: #95a5a6;
  font-size: 0.9rem;
  margin: 0;
}

.review-rating {
  margin: 8px 0;
}

.review-rating i {
  color: #f39c12;
  font-size: 1rem;
  margin-right: 2px;
}

.review-title {
  font-weight: 600;
  color: #2c3e50;
  margin: 15px 0 10px 0;
  font-size: 1.1rem;
}

.review-description {
  color: #5d6d7e;
  line-height: 1.6;
  margin: 0;
  font-size: 1rem;
}

/* Empty State */
.no-reviews {
  text-align: center;
  padding: 40px 20px;
  color: #7f8c8d;
}

.no-reviews i {
  font-size: 3rem;
  color: #bdc3c7;
  margin-bottom: 15px;
}

.no-reviews h4 {
  color: #7f8c8d;
  margin-bottom: 10px;
}

/* Review display styling */
.review-box {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: white;
}

.review-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}

.review-user-info h6 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.review-date {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.review-content h6 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.review-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Average rating display */
.avg-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avg-rating span {
    color: #666;
    font-size: 14px;
}

/* Responsive adjustments */
/* Responsive Design */
@media (max-width: 768px) {
    .rate label {
        font-size: 24px;
    }
    
    .review-form {
        padding: 20px;
    }
    
    .review-card {
        padding: 20px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .rate {
        justify-content: center;
    }
    
    .section-heading {
        padding: 15px 20px;
    }
    
    .section-heading h3 {
        font-size: 1.3rem;
    }
}
