﻿.product-comment-card {
    background: #eef4ff;
    border-radius: 18px;
    box-shadow: 0 4px 18px 0 #7291c328;
    padding: 1.3rem 1.4rem;
    margin-bottom: 1.7rem;
    direction: rtl;
    width: 100%;
    transition: box-shadow 0.2s;
    border: 1.5px solid #7291c340;
}

    .product-comment-card:hover {
        box-shadow: 0 6px 28px 0 #0a297120;
    }

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.7rem;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #7291c3;
    background: #fff;
}

.comment-author {
    font-weight: 700;
    color: #0a2971;
    font-size: 1.5rem;
    display: block;
}

.comment-date {
    font-size: .88rem;
    color: #7291c3;
    margin-top: 2px;
    display: block;
}

.comment-rating {
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #7291c325;
    border-radius: 12px;
    padding: 2px 12px 2px 9px;
}

.rating-number {
    font-size: .98rem;
    font-weight: 700;
    color: #0a2971;
}

.rating-star {
    color: #ffd055;
    font-size: 1.1rem;
}

.comment-body {
    color: #263159;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.95;
}

.comment-replies {
    margin-right: 3rem;
    margin-top: .7rem;
    border-right: 2px dashed #7291c325;
    padding-right: 1.2rem;
}

.product-comment-card.reply {
    background: #fff;
    border: 1.5px solid #7291c328;
    margin-bottom: 0; /* داخل comment-replies */
    box-shadow: none;
    padding: .95rem 1rem;
}

@media (max-width: 600px) {
    .product-comment-card, .product-comment-card.reply {
        max-width: 100%;
        padding: 1rem .55rem;
        font-size: 0.97rem;
    }
    .reviews{
        margin-top: 50px !important;
    }
/*    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 7px;
    }*/

    .comment-replies {
        margin-right: 1.1rem;
        padding-right: 0.7rem;
    }
}
}



.comment-form-box {
    background: #eef4ff;
    border-radius: 14px;
    border: 1.4px solid #7291c335;
    box-shadow: 0 2px 10px #7291c318;
    padding: 1.2rem 1.15rem 1.3rem;
    margin-bottom: 2rem;
    max-width: 440px;
}

.comment-form-label {
    color: #0a2971;
    font-weight: 700;
    font-size: 1.07rem;
    margin-bottom: 8px;
    display: block;
}

.rating-stars-input {
    direction: ltr; /* ستاره‌ها از راست به چپ باشند */
    unicode-bidi: bidi-override;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-bottom: 13px;
}

    .rating-stars-input input[type="radio"] {
        display: none;
    }

    .rating-stars-input label {
        font-size: 1.44rem;
        color: #7291c3;
        cursor: pointer;
        transition: color .18s;
        padding: 0 1.5px;
    }

        .rating-stars-input input[type="radio"]:checked ~ label,
        .rating-stars-input label:hover,
        .rating-stars-input label:hover ~ label {
            color: #ffd055;
        }

.comment-form-textarea {
    width: 100%;
    border-radius: 12px;
    border: 1.2px solid #7291c372;
    background: #fff;
    padding: 10px 13px;
    font-family: inherit;
    min-height: 48px;
    font-size: 1.04rem;
    margin-bottom: 1rem;
    resize: vertical;
    color: #2f336c;
    transition: border .18s;
}

    .comment-form-textarea:focus {
        border-color: #0a2971;
        background: #eef4ff;
        outline: none;
    }

.comment-form-submit {
    background: #7291c3;
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 7px 28px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px #7291c318;
    transition: background .18s, box-shadow .18s;
    cursor: pointer;
    float: left;
    display: flex;
    align-items: center;
    margin-bottom : 20px;
}

    .comment-form-submit:hover {
        background: #0a2971;
        box-shadow: 0 4px 12px #0a297120;
    }

.comment-form-alert {
    background: #fff8e5;
    border: 1.4px solid #eedb9b99;
    color: #9a7900;
    padding: 1rem 1.2rem;
    border-radius: 11px;
    font-size: 1.06rem;
    max-width: 420px;
    margin-bottom: 2rem;
    font-weight: 500;
}

@media (max-width: 600px) {
    .comment-form-box, .comment-form-alert {
        max-width: 100%;
    }

    .comment-form-textarea {
        font-size: .97rem;
    }

    .rating-stars-input label {
        font-size: 1.15rem;
    }

    .comment-form-submit {
        font-size: .95rem;
        padding: 7px 18px;
    }
}
