.cards-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.review-card {
    width: 300px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.review-card img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    object-fit: contain; /* Ensure the full image is shown without cropping */
}

.review-card.with-image {
    height: 100%;
    min-height: 350px; /* Adjusted to ensure proper height for cards with images */
}

.review-card.no-image {
    width: auto;
    display: inline-block;
    height: auto;
    min-height: unset; /* No minimum height for cards without images */
}

.review-card .content {
    text-align: center;
    padding: 15px; /* زيادة البادينج لتحسين المظهر */
}

.review-card.no-image .content {
    padding: 10px; /* بادينج مناسب للكروت بدون صور */
}

.review-card .content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px; /* زيادة المسافة بين العنوان والنجوم */
    color: #333;
}

.review-card .stars {
    font-size: 14px;
    margin-bottom: 5px; /* زيادة المسافة بين النجوم والنص */
    line-height: 1;
}

.review-card .stars .star {
    color: #ccc;
}

.review-card .stars .star.filled {
    color: gold;
}

.review-card p {
    font-size: 14px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* Mobile layout: Force two cards per row */
@media (max-width: 768px) {
    .cards-container {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }
    .review-card {
        width: calc(50% - 10px) !important;
        margin: 0 !important;
        flex: 0 0 calc(50% - 10px) !important;
    }
    .review-card.no-image {
        width: calc(50% - 10px) !important;
    }
    .review-card.with-image {
        min-height: 300px; /* Adjusted for mobile */
    }
}

/* Ensure two cards per row even on very small screens */
@media (max-width: 480px) {
    .review-card {
        width: calc(50% - 10px) !important;
        flex: 0 0 calc(50% - 10px) !important;
    }
    .review-card.no-image {
        width: calc(50% - 10px) !important;
    }
    .review-card.with-image {
        min-height: 250px; /* Adjusted for smaller screens */
    }
}

/* Styles for the Add Review Form */
.hsr-add-review-form {
    max-width: 400px;
    margin: 30px auto;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
}

.hsr-add-review-form h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    text-align: center;
    margin-bottom: 10px;
}

.hsr-add-review-form p {
    margin-bottom: 8px;
}

.hsr-add-review-form label {
    display: block;
    margin-bottom: 3px;
    color: #555;
    font-weight: bold;
    font-size: 14px;
}

.hsr-add-review-form label.optional-label {
    color: #aaa;
    font-weight: normal;
}

.hsr-add-review-form input,
.hsr-add-review-form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    box-sizing: border-box;
}

.hsr-add-review-form input[type="file"] {
    padding: 3px;
}

.hsr-add-review-form textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
}

.hsr-add-review-form button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
    padding: 10px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s;
}

.hsr-add-review-form button:hover {
    transform: scale(1.02);
}

.hsr-add-review-form button:active {
    background: #28a745;
}

.hsr-add-review-form button .icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Star Rating Slider */
.hsr-star-rating {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    direction: ltr;
}

.hsr-star-rating .star {
    font-size: 22px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    margin: 0 3px;
}

.hsr-star-rating .star:hover,
.hsr-star-rating .star.filled {
    color: gold;
    transform: scale(1.2);
}

.hsr-star-rating .star.hover {
    color: #ffd700;
}

.hsr-success {
    color: #28a745;
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Style for reviews section on product page */
.hsr-reviews-section {
    margin-top: 40px;
}

.hsr-reviews-section h2 {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}
