/* Chaperabo product review form */
body.single-product .woocommerce-Reviews {
    font-family: "Vazirmatn", sans-serif !important;
}

/* Keep the review area clean: hide Woodmart summary/sorting blocks. */
body.single-product .woocommerce-Reviews .wd-rating-summary-wrap,
body.single-product .woocommerce-Reviews .woocommerce-Reviews-title,
body.single-product .woocommerce-Reviews .wd-reviews-filters,
body.single-product .woocommerce-Reviews .wd-reviews-sorting-clear {
    display: none !important;
}

body.single-product .woocommerce-Reviews #review_form_wrapper {
    margin-top: 18px !important;
}

body.single-product .woocommerce-Reviews #respond.comment-respond {
    max-width: 760px;
    margin: 0 auto !important;
    padding: 24px !important;
    background: #fff !important;
    border: 1px solid #e6e8ec !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06) !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce-Reviews .comment-reply-title {
    display: block !important;
    margin: 0 0 18px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    text-align: right !important;
    color: #16181d !important;
}

body.single-product .woocommerce-Reviews .comment-reply-title small {
    display: none !important;
}

body.single-product .woocommerce-Reviews .com-review-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #f7f8fa;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    color: #30343b;
}

body.single-product .woocommerce-Reviews .com-review-user-label {
    font-size: 13px;
    color: #777d87;
}

body.single-product .woocommerce-Reviews .com-review-user strong {
    font-size: 14px;
    font-weight: 700;
}

body.single-product .woocommerce-Reviews .com-review-user-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: auto;
    background: #e8f7ee;
    color: #1d8a4d;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
}

body.single-product .woocommerce-Reviews .com-review-success {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #edf9f1;
    color: #176a3a;
    border: 1px solid #cfead8;
    border-radius: 12px;
    line-height: 1.8;
    font-size: 14px;
}

body.single-product .woocommerce-Reviews .com-review-gate {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px;
    background: #f7f8fa;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    line-height: 1.8;
}

body.single-product .woocommerce-Reviews .com-review-gate.is-warning {
    background: #fff8e8;
    border-color: #f1dfb2;
}

body.single-product .woocommerce-Reviews .com-review-gate strong {
    font-size: 15px;
    color: #1d2128;
}

body.single-product .woocommerce-Reviews .com-review-gate span {
    color: #727983;
    font-size: 13px;
}

body.single-product .woocommerce-Reviews .com-review-login-btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 6px;
    padding: 0 18px;
    background: #151515;
    color: #fff !important;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
}

/* Locked form: Woodmart may inject upload/rating elements by hooks; hide them too. */
body.single-product .woocommerce-Reviews form.com-review-locked .comment-form-rating,
body.single-product .woocommerce-Reviews form.com-review-locked .comment-form-comment,
body.single-product .woocommerce-Reviews form.com-review-locked .comment-form-images,
body.single-product .woocommerce-Reviews form.com-review-locked .form-submit,
body.single-product .woocommerce-Reviews form.com-review-locked .comment-notes,
body.single-product .woocommerce-Reviews form.com-review-locked .logged-in-as {
    display: none !important;
}

/* Rating must remain visible for eligible buyers, even if older custom CSS hid it. */
body.single-product .woocommerce-Reviews form.com-review-eligible .comment-form-rating {
    display: block !important;
    margin: 0 0 18px !important;
}

body.single-product .woocommerce-Reviews form.com-review-eligible .comment-form-rating > label,
body.single-product .woocommerce-Reviews form.com-review-eligible .comment-form-comment > label {
    display: block !important;
    margin: 0 0 8px !important;
    color: #2a2d33 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

body.single-product .woocommerce-Reviews .comment-form-rating .stars {
    margin: 0 !important;
    direction: rtl;
}

body.single-product .woocommerce-Reviews .comment-form-rating .stars span {
    display: inline-flex !important;
    direction: ltr;
    gap: 5px;
}

body.single-product .woocommerce-Reviews .comment-form-rating .stars a {
    width: 30px !important;
    height: 30px !important;
    font-size: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
    color: #f3b600 !important;
}

body.single-product .woocommerce-Reviews .comment-form-rating .stars a:before {
    font-size: 27px !important;
    line-height: 30px !important;
}

body.single-product .woocommerce-Reviews .comment-form-comment {
    margin: 0 0 16px !important;
}

body.single-product .woocommerce-Reviews .comment-form-comment textarea {
    width: 100% !important;
    min-height: 145px !important;
    padding: 14px 15px !important;
    background: #fbfbfc !important;
    color: #222 !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    outline: none !important;
    resize: vertical;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.9 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce-Reviews .comment-form-comment textarea:focus {
    border-color: #aeb5bf !important;
    background: #fff !important;
}

body.single-product .woocommerce-Reviews .comment-form-images {
    margin: 0 0 16px !important;
    padding: 14px !important;
    background: #fafbfc !important;
    border: 1px dashed #cfd4db !important;
    border-radius: 12px !important;
}

body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

body.single-product .woocommerce-Reviews .comment-form-images label {
    margin: 0 !important;
    font-size: 13px !important;
    color: #5b616a !important;
}

body.single-product .woocommerce-Reviews .comment-form-images button {
    min-height: 38px !important;
    padding: 0 14px !important;
    background: #fff !important;
    color: #24272c !important;
    border: 1px solid #d7dbe1 !important;
    border-radius: 9px !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

body.single-product .woocommerce-Reviews .form-submit {
    margin: 6px 0 0 !important;
    text-align: left !important;
}

body.single-product .woocommerce-Reviews .form-submit .submit {
    min-width: 150px !important;
    min-height: 46px !important;
    padding: 0 24px !important;
    background: #151515 !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 11px !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

body.single-product .woocommerce-Reviews .form-submit .submit:hover,
body.single-product .woocommerce-Reviews .form-submit .submit:focus {
    background: #2a2a2a !important;
}

/* Existing reviews area */
body.single-product .woocommerce-Reviews .wd-reviews-content {
    margin-bottom: 14px !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews #respond.comment-respond {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 18px 14px !important;
        border-radius: 14px !important;
    }

    body.single-product .woocommerce-Reviews .comment-reply-title {
        font-size: 18px !important;
    }

    body.single-product .woocommerce-Reviews .form-submit .submit,
    body.single-product .woocommerce-Reviews .com-review-login-btn {
        width: 100% !important;
    }

    body.single-product .woocommerce-Reviews .com-review-user-check {
        margin-right: 0;
    }
}

/* v2.13: guest reviews use name only; desktop and mobile use the same form fields. */
body.single-product .woocommerce-Reviews .com-review-guest-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    background: #f7f8fa;
    color: #555d68;
    border: 1px solid #e2e5e9;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.9;
}

body.single-product .woocommerce-Reviews .comment-form-author {
    margin: 0 0 14px !important;
}

body.single-product .woocommerce-Reviews .comment-form-author label {
    display: block !important;
    margin: 0 0 8px !important;
    color: #2a2d33 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

body.single-product .woocommerce-Reviews .comment-form-author input {
    width: 100% !important;
    min-height: 46px !important;
    padding: 0 14px !important;
    background: #fbfbfc !important;
    color: #222 !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 14px !important;
}

body.single-product .woocommerce-Reviews .comment-form-author input:focus {
    border-color: #aeb5bf !important;
    background: #fff !important;
}

/* v2.15 — requested refinements built on v2.13 */

/* Hide all fields/messages that can make mobile differ from desktop. */
body.single-product .woocommerce-Reviews .comment-form-email,
body.single-product .woocommerce-Reviews .comment-form-url,
body.single-product .woocommerce-Reviews .comment-form-cookies-consent,
body.single-product .woocommerce-Reviews .comment-notes,
body.single-product .woocommerce-Reviews .logged-in-as,
body.single-product .woocommerce-Reviews .com-review-gate {
    display: none !important;
}

/* Force the same useful fields to remain visible on every device. */
body.single-product .woocommerce-Reviews form.com-product-review-form .comment-form-rating,
body.single-product .woocommerce-Reviews form.com-product-review-form .comment-form-comment,
body.single-product .woocommerce-Reviews form.com-product-review-form .comment-form-author,
body.single-product .woocommerce-Reviews form.com-product-review-form .form-submit {
    display: block !important;
}

/* Upload button: red with white text. */
body.single-product .woocommerce-Reviews .comment-form-images .com-review-upload-btn,
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button {
    min-height: 40px !important;
    padding: 0 18px !important;
    background: #d1121d !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 9px !important;
    box-shadow: none !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}
body.single-product .woocommerce-Reviews .comment-form-images .com-review-upload-btn:hover,
body.single-product .woocommerce-Reviews .comment-form-images .com-review-upload-btn:focus,
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button:hover,
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button:focus {
    background: #b90f19 !important;
    color: #fff !important;
}

/* Remove Woodmart's textual upload count/guest text; show only thumbnail preview. */
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-count,
body.single-product .woocommerce-Reviews .comment-form-images label[for="wd-add-img-btn"] {
    display: none !important;
}

body.single-product .woocommerce-Reviews .com-review-image-preview {
    display: none;
    align-items: center;
    gap: 10px;
    margin-inline-start: 4px;
}
body.single-product .woocommerce-Reviews .com-review-image-preview.is-visible {
    display: flex;
    flex-wrap: wrap;
}
body.single-product .woocommerce-Reviews .com-review-image-preview__item {
    position: relative;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
}
body.single-product .woocommerce-Reviews .com-review-image-preview__item img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
}
body.single-product .woocommerce-Reviews .com-review-image-preview__remove {
    position: absolute !important;
    top: -8px !important;
    left: -8px !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: #d1121d !important;
    color: #fff !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.18) !important;
    cursor: pointer !important;
    z-index: 3;
}

/* Published reviews: use the full available width and sit close to "دیدگاه کاربران". */
body.single-product .woocommerce-Reviews #comments {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single-product .woocommerce-Reviews .wd-reviews-content {
    width: 100% !important;
    max-width: none !important;
    margin: 4px 0 8px !important;
    padding: 0 !important;
}
body.single-product .woocommerce-Reviews ol.commentlist,
body.single-product .woocommerce-Reviews ul.commentlist {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single-product .woocommerce-Reviews ol.commentlist > li.review,
body.single-product .woocommerce-Reviews ul.commentlist > li.review,
body.single-product .woocommerce-Reviews .commentlist > li {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
body.single-product .woocommerce-Reviews .commentlist .comment_container,
body.single-product .woocommerce-Reviews .commentlist .comment-text {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}
body.single-product .woocommerce-Reviews .commentlist .comment_container {
    margin: 0 !important;
    padding: 14px 16px !important;
    border: 1px solid #151515 !important;
    border-radius: 12px !important;
    background: #fff !important;
}

/* The form itself can stay centered like v2.13, but move closer to the review list. */
body.single-product .woocommerce-Reviews #review_form_wrapper {
    margin-top: 8px !important;
}

@media (max-width: 767px) {
    /* Same form structure and same visual language as desktop. */
    body.single-product .woocommerce-Reviews #review_form_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
    }

    body.single-product .woocommerce-Reviews #respond.comment-respond {
        width: calc(100% - 24px) !important;
        max-width: calc(100% - 24px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    body.single-product .woocommerce-Reviews .wd-reviews-content,
    body.single-product .woocommerce-Reviews ol.commentlist,
    body.single-product .woocommerce-Reviews ul.commentlist,
    body.single-product .woocommerce-Reviews .commentlist .comment_container {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* v2.16 — final review layout refinements */

/* Remove the two extra helper/login messages everywhere, especially mobile. */
body.single-product .woocommerce-Reviews .com-review-guest-note,
body.single-product .woocommerce-Reviews .must-log-in,
body.single-product .woocommerce-Reviews .comment-form-images .login-required,
body.single-product .woocommerce-Reviews .comment-form-images .wd-login-required {
    display: none !important;
}

/* Keep only the original/upload-file wording. */
body.single-product .woocommerce-Reviews .comment-form-images .com-review-upload-btn,
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button {
    background: #d1121d !important;
    color: #fff !important;
}

/* Registration form: same dark border as published review cards. */
body.single-product .woocommerce-Reviews #respond.comment-respond {
    border: 1px solid #151515 !important;
}

/* Make the review widget and published reviews actually stretch to the available desktop width. */
body.single-product .elementor-element-ae5baef,
body.single-product .elementor-element-ae5baef > .elementor-widget-container,
body.single-product .woocommerce-Reviews,
body.single-product .woocommerce-Reviews #reviews,
body.single-product .woocommerce-Reviews #comments,
body.single-product .woocommerce-Reviews .wd-reviews-content,
body.single-product .woocommerce-Reviews .commentlist,
body.single-product .woocommerce-Reviews .commentlist > li,
body.single-product .woocommerce-Reviews .commentlist .comment_container,
body.single-product .woocommerce-Reviews .commentlist .comment-text {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Desktop: a little breathing room after the 'دیدگاه کاربران' heading. */
@media (min-width: 768px) {
    body.single-product .elementor-element-406115a {
        margin-bottom: 10px !important;
    }
    body.single-product .elementor-element-ae5baef {
        margin-top: 0 !important;
    }
    body.single-product .woocommerce-Reviews .wd-reviews-content {
        margin-top: 8px !important;
    }
}

/* Mobile: remove the large gap between heading and first review. */
@media (max-width: 767px) {
    body.single-product .elementor-element-406115a {
        margin-bottom: 2px !important;
        padding-bottom: 0 !important;
    }
    body.single-product .elementor-element-ae5baef {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    body.single-product .woocommerce-Reviews #comments,
    body.single-product .woocommerce-Reviews .wd-reviews-content {
        margin-top: 2px !important;
        padding-top: 0 !important;
    }

    /* Keep form card border and width consistent with desktop. */
    body.single-product .woocommerce-Reviews #respond.comment-respond {
        border: 1px solid #151515 !important;
    }
}
\n\n/* v2.16.2 — minimal mobile-only corrections. Desktop review/rating/upload styles remain exactly as v2.16.0. */
@media (max-width: 767px) {
    /* Center the registration card without changing the desktop layout. */
    body.single-product .woocommerce-Reviews #review_form_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    body.single-product .woocommerce-Reviews #respond.comment-respond {
        width: calc(100% - 36px) !important;
        max-width: calc(100% - 36px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    /* If WoodMart outputs the upload trigger twice in the same wrapper, keep only the first one. */
    body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button + button {
        display: none !important;
    }
}


/* v2.16.5 — targeted layout fixes only: compact review gallery, centered mobile cards, single upload button. */

/* The review heading/tool wrapper has no visible content after our earlier hides; remove its reserved height. */
body.single-product .woocommerce-Reviews #comments > .wd-reviews-heading {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: 0 !important;
}

/* Keep uploaded images in a compact strip instead of spreading five columns across the whole review card. */
body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-grid-g {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    column-gap: 6px !important;
    row-gap: 6px !important;
    grid-template-columns: none !important;
    margin: 6px 0 0 !important;
    padding: 0 !important;
    direction: rtl !important;
}
body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-gallery-item.wd-col {
    flex: 0 0 150px !important;
    width: 150px !important;
    max-width: 150px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-gallery-item img {
    display: block !important;
    width: 150px !important;
    height: 150px !important;
    object-fit: cover !important;
    margin: 0 !important;
}

/* There must be only one upload trigger, even if WoodMart injects the same button twice. */
body.single-product .woocommerce-Reviews .comment-form-images .wd-add-img-btn-wrapper > button:nth-of-type(n+2) {
    display: none !important;
}

@media (max-width: 767px) {
    /* Remove the large blank band between the Elementor "دیدگاه کاربران" heading and reviews. */
    body.single-product .elementor-element-406115a {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    body.single-product .elementor-element-ae5baef,
    body.single-product .elementor-element-ae5baef > .elementor-widget-container,
    body.single-product .woocommerce-Reviews,
    body.single-product .woocommerce-Reviews #comments,
    body.single-product .woocommerce-Reviews .wd-reviews-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    body.single-product .woocommerce-Reviews .wd-reviews-content {
        margin-bottom: 6px !important;
    }

    /* Center every published-review card instead of letting it hug the left edge. */
    body.single-product .woocommerce-Reviews ol.commentlist,
    body.single-product .woocommerce-Reviews ul.commentlist {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    body.single-product .woocommerce-Reviews ol.commentlist > li.review,
    body.single-product .woocommerce-Reviews ul.commentlist > li.review,
    body.single-product .woocommerce-Reviews .commentlist > li.review.wd-col {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        flex: 0 0 calc(100% - 20px) !important;
        margin: 0 auto 8px !important;
        padding: 0 !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
    body.single-product .woocommerce-Reviews .commentlist .comment_container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Make the registration card a little narrower than a review card and center it robustly. */
    body.single-product .woocommerce-Reviews #review_form_wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 6px auto 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    body.single-product .woocommerce-Reviews #respond.comment-respond {
        display: block !important;
        float: none !important;
        flex: 0 0 auto !important;
        width: calc(100% - 44px) !important;
        max-width: calc(100% - 44px) !important;
        margin: 0 auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    /* Compact review photos on phones so several can sit together with only a few pixels between them. */
    body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-grid-g {
        gap: 5px !important;
        column-gap: 5px !important;
        row-gap: 5px !important;
    }
    body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-gallery-item.wd-col {
        flex: 0 0 86px !important;
        width: 86px !important;
        max-width: 86px !important;
    }
    body.single-product .woocommerce-Reviews .comment-text .wd-images-gallery .wd-gallery-item img {
        width: 86px !important;
        height: 86px !important;
    }
}

/* v2.16.7 — mobile review/form centering and heading-gap correction.
   Built on v2.16.5 to avoid the translateX regression from v2.16.6. */
@media (max-width: 767px) {
    /* Keep Elementor's review widgets in normal document flow and remove the reserved vertical gap. */
    html body.single-product .elementor-element-912a491 > .elementor-widget-wrap {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;
        row-gap: 0 !important;
    }

    html body.single-product .elementor-element-406115a,
    html body.single-product .elementor-element-406115a > .elementor-widget-container,
    html body.single-product .elementor-element-406115a .elementor-icon-box-wrapper,
    html body.single-product .elementor-element-406115a .elementor-icon-box-content {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    html body.single-product .elementor-element-406115a .elementor-icon-box-title {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Pull the reviews widget into the unused mobile space below the heading. */
    html body.single-product .elementor-element-ae5baef {
        width: 100% !important;
        max-width: 100% !important;
        margin-top: -38px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-top: 0 !important;
        box-sizing: border-box !important;
    }

    html body.single-product .elementor-element-ae5baef > .elementor-widget-container,
    html body.single-product .woocommerce-Reviews {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-top: 0 !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews #comments {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews .wd-reviews-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 6px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Use flex centering instead of positional left/right transforms. */
    html body.single-product .woocommerce-Reviews ol.commentlist,
    html body.single-product .woocommerce-Reviews ul.commentlist {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews ol.commentlist > li.review,
    html body.single-product .woocommerce-Reviews ul.commentlist > li.review,
    html body.single-product .woocommerce-Reviews .commentlist > li.review.wd-col {
        display: block !important;
        flex: 0 0 auto !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 0 0 8px !important;
        padding: 0 !important;
        float: none !important;
        position: static !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews .commentlist .comment_container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* Review form: slightly narrower than a published review and geometrically centered. */
    html body.single-product .woocommerce-Reviews #review_form_wrapper {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px 0 0 !important;
        padding: 0 !important;
        position: static !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews #respond.comment-respond {
        display: block !important;
        flex: 0 0 auto !important;
        width: calc(100% - 44px) !important;
        max-width: calc(100% - 44px) !important;
        margin: 0 !important;
        float: none !important;
        position: static !important;
        inset: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
}

/* v2.16.8 — mobile form centering only.
   #review_form sits between #review_form_wrapper and #respond, so it also must span the full width. */
@media (max-width: 767px) {
    html body.single-product .woocommerce-Reviews #review_form_wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews #review_form {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        float: none !important;
        box-sizing: border-box !important;
    }

    html body.single-product .woocommerce-Reviews #review_form #respond.comment-respond {
        width: calc(100% - 44px) !important;
        max-width: calc(100% - 44px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        box-sizing: border-box !important;
    }
}

/* v2.16.9 — final mobile vertical spacing polish only. */
@media (max-width: 767px) {
    /* Bring the form a touch closer to the last published review. */
    html body.single-product .woocommerce-Reviews ol.commentlist > li.review:last-child,
    html body.single-product .woocommerce-Reviews ul.commentlist > li.review:last-child,
    html body.single-product .woocommerce-Reviews .commentlist > li.review.wd-col:last-child {
        margin-bottom: 4px !important;
    }

    /* Keep the centered form, reduce the top gap, and leave breathing room before the footer. */
    html body.single-product .woocommerce-Reviews #review_form_wrapper {
        margin-top: 0 !important;
        margin-bottom: 22px !important;
    }
}

/* v2.16.10 — empty-review state cleanup.
   Keep the "هنوز بررسی‌ای ثبت نشده است." message centered on desktop,
   and on mobile place it cleanly below the "دیدگاه کاربران" heading before the form. */
body.single-product .woocommerce-Reviews .woocommerce-noreviews {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px auto 14px !important;
    padding: 0 12px !important;
    position: static !important;
    inset: auto !important;
    float: none !important;
    transform: none !important;
    box-sizing: border-box !important;
    text-align: center !important;
    line-height: 1.9 !important;
}

/* When there are no published reviews, do not let Woodmart/Elementor reserve or overlap review-list space. */
body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) .wd-reviews-content,
body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) #comments {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    position: static !important;
    transform: none !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    /* Desktop: center the empty-state sentence above the centered form. */
    body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) .woocommerce-noreviews {
        margin-top: 6px !important;
        margin-bottom: 16px !important;
        text-align: center !important;
    }

    body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) #review_form_wrapper {
        margin-top: 8px !important;
    }
}

@media (max-width: 767px) {
    /* Products with no reviews must not use the negative pull-up that is useful for populated review lists. */
    html body.single-product .elementor-element-ae5baef:has(.woocommerce-noreviews) {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Put the empty-state sentence directly below "دیدگاه کاربران" in normal flow. */
    html body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) .woocommerce-noreviews {
        margin: 2px auto 10px !important;
        padding: 0 14px !important;
        text-align: center !important;
    }

    /* Then give the form a small, deliberate gap below that sentence. */
    html body.single-product .woocommerce-Reviews:has(.woocommerce-noreviews) #review_form_wrapper {
        margin-top: 8px !important;
        margin-bottom: 22px !important;
    }
}

/* v2.16.11 — robust empty-review layout.
   JS adds these classes after detecting WooCommerce's actual empty-review message,
   so this does not depend on :has() or a specific Woodmart nesting structure. */
body.single-product .woocommerce-Reviews.com-reviews-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce-Reviews.com-reviews-empty #comments {
    display: none !important;
    min-height: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-product .woocommerce-Reviews .com-review-empty-message {
    display: block !important;
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 6px auto 14px !important;
    padding: 0 12px !important;
    position: static !important;
    float: none !important;
    transform: none !important;
    text-align: center !important;
    line-height: 1.9 !important;
    box-sizing: border-box !important;
}

body.single-product .woocommerce-Reviews.com-reviews-empty #review_form_wrapper {
    order: 2 !important;
    margin-top: 6px !important;
}

@media (max-width: 767px) {
    /* Disable the negative pull-up only for products with no published review. */
    html body.single-product .com-review-empty-widget,
    html body.single-product .elementor-element-ae5baef.com-review-empty-widget {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Sentence sits under the external "دیدگاه کاربران" heading, then the form. */
    html body.single-product .woocommerce-Reviews .com-review-empty-message {
        margin: 6px auto 10px !important;
        padding: 0 14px !important;
        text-align: center !important;
        font-size: 14px !important;
        line-height: 1.8 !important;
    }

    html body.single-product .woocommerce-Reviews.com-reviews-empty #review_form_wrapper {
        margin-top: 8px !important;
        margin-bottom: 22px !important;
    }
}

/* v2.16.12 — mobile empty-review state, final wording + reliable spacing.
   WoodMart can render the no-review sentence in a different mobile branch, so JS now
   adds body.com-product-no-reviews after broad-but-scoped detection. */
body.single-product .com-review-empty-message {
    text-align: center !important;
}

@media (max-width: 767px) {
    /* Critical override: v2.16.7 intentionally pulls populated reviews upward by -38px.
       On an empty product that same rule causes the sentence/title overlap. */
    html body.single-product.com-product-no-reviews .elementor-element-ae5baef,
    html body.single-product.com-product-no-reviews .com-review-empty-widget {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    html body.single-product.com-product-no-reviews .elementor-element-406115a {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Sentence directly below "دیدگاه کاربران". */
    html body.single-product.com-product-no-reviews .com-review-empty-message {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 4px auto 10px !important;
        padding: 0 14px !important;
        position: static !important;
        float: none !important;
        transform: none !important;
        text-align: center !important;
        font-size: 14px !important;
        line-height: 1.8 !important;
        box-sizing: border-box !important;
    }

    /* Form follows the sentence with a small clean gap. */
    html body.single-product.com-product-no-reviews .woocommerce-Reviews #review_form_wrapper {
        margin-top: 8px !important;
        margin-bottom: 22px !important;
    }
}

/* v2.16.13 — published review stars: render reliably on desktop and mobile. */
body.single-product .woocommerce-Reviews .commentlist .star-rating {
    position: relative !important;
    display: inline-block !important;
    width: 92px !important;
    height: 22px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 20px !important;
    line-height: 22px !important;
    letter-spacing: 0 !important;
    color: transparent !important;
}

body.single-product .woocommerce-Reviews .commentlist .star-rating::before {
    content: "☆☆☆☆☆" !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 22px !important;
    overflow: hidden !important;
    color: #b7b7b7 !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 20px !important;
    line-height: 22px !important;
    letter-spacing: 0 !important;
    text-indent: 0 !important;
}

body.single-product .woocommerce-Reviews .commentlist .star-rating > span {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    height: 22px !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

body.single-product .woocommerce-Reviews .commentlist .star-rating > span::before {
    content: "★★★★★" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 92px !important;
    height: 22px !important;
    overflow: hidden !important;
    color: #f3b600 !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 20px !important;
    line-height: 22px !important;
    letter-spacing: 0 !important;
    text-indent: 0 !important;
}

/* Prevent icon-font pseudo elements from turning into X/cross glyphs on mobile. */
@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .star-rating,
    body.single-product .woocommerce-Reviews .commentlist .star-rating::before,
    body.single-product .woocommerce-Reviews .commentlist .star-rating > span::before {
        font-family: "Vazirmatn", sans-serif !important;
    }
}

/* v2.16.14 — published review rating position.
   Keep the filled stars close to the reviewer name instead of dropping too low in the card. */
body.single-product .woocommerce-Reviews .commentlist .comment-text > .star-rating,
body.single-product .woocommerce-Reviews .commentlist .comment_container .star-rating {
    top: -8px !important;
    margin-top: 0 !important;
    margin-bottom: -8px !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .comment-text > .star-rating,
    body.single-product .woocommerce-Reviews .commentlist .comment_container .star-rating {
        top: -7px !important;
        margin-bottom: -7px !important;
    }
}

/* v2.16.15 — lift reviewer name and published rating together.
   WoodMart keeps the review meta/name and star rating on separate lines; move only
   those two elements upward without touching the review text, photos or actions. */
body.single-product .woocommerce-Reviews .commentlist .comment-text > .meta,
body.single-product .woocommerce-Reviews .commentlist .comment-text .woocommerce-review__author {
    position: relative !important;
    transform: translateY(-6px) !important;
}

body.single-product .woocommerce-Reviews .commentlist .comment-text > .meta {
    margin-top: 0 !important;
    margin-bottom: -6px !important;
}

body.single-product .woocommerce-Reviews .commentlist .comment-text > .star-rating,
body.single-product .woocommerce-Reviews .commentlist .comment_container .star-rating {
    top: 0 !important;
    transform: translateY(-14px) !important;
    margin-top: 0 !important;
    margin-bottom: -14px !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .comment-text > .meta,
    body.single-product .woocommerce-Reviews .commentlist .comment-text .woocommerce-review__author {
        transform: translateY(-7px) !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .comment-text > .meta {
        margin-bottom: -7px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .comment-text > .star-rating,
    body.single-product .woocommerce-Reviews .commentlist .comment_container .star-rating {
        top: 0 !important;
        transform: translateY(-15px) !important;
        margin-bottom: -15px !important;
    }
}


/* v2.16.16 — robust published-review header layout.
   Stop nudging the author/rating with transforms. JS groups the existing WoodMart
   author meta + rating in a normal-flow header, so stars cannot sit under/overlap text. */
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 2px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: -6px 0 5px auto !important;
    padding: 0 !important;
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    overflow: visible !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    z-index: 2 !important;
}

/* Reset the old positional fixes once the two elements are inside our header. */
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .meta,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating .woocommerce-review__author,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .meta {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.45 !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating {
    display: block !important;
    flex: 0 0 26px !important;
    width: 92px !important;
    height: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 24px !important;
    overflow: hidden !important; /* only clips partial-rating width, not the glyph vertically */
    vertical-align: top !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating::before,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating > span,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating > span::before {
    top: 0 !important;
    height: 26px !important;
    min-height: 26px !important;
    line-height: 24px !important;
    transform: none !important;
}

/* Keep review body/content safely below the author + stars. */
body.single-product .woocommerce-Reviews .commentlist .comment-text > .description,
body.single-product .woocommerce-Reviews .commentlist .comment-text > .wd-images-gallery,
body.single-product .woocommerce-Reviews .commentlist .comment-text > .wd-review-likes {
    clear: both !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating {
        margin-top: -4px !important;
        margin-bottom: 5px !important;
        gap: 1px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating {
        height: 27px !important;
        min-height: 27px !important;
        line-height: 25px !important;
        overflow: hidden !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating::before,
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating > span,
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .star-rating > span::before {
        height: 27px !important;
        min-height: 27px !important;
        line-height: 25px !important;
    }
}

/* v2.16.17 — published review header: author + stars on the far right, date on far left. */
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: -6px 0 7px !important;
    padding: 0 !important;
    position: relative !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    direction: ltr !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-published-date {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    align-self: start !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    direction: rtl !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
    direction: rtl !important;
    text-align: right !important;
    transform: none !important;
    position: relative !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header .com-review-author-rating > .meta {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.45 !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header .com-review-author-rating > .star-rating {
    align-self: flex-end !important;
    margin: 0 !important;
    transform: none !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header .woocommerce-review__dash {
    display: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header .com-review-published-date .woocommerce-review__published-date,
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header .com-review-published-date time {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
    white-space: nowrap !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header {
        margin-top: -4px !important;
        margin-bottom: 6px !important;
        column-gap: 8px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
        gap: 1px !important;
    }
}


/* v2.16.18 — profile avatar beside published review author.
   Avatar URL is provided server-side from user_meta `cr_avatar`; users without a
   custom image receive Chaperabo Profile's own default-avatar.png. */
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 9px !important;
    direction: rtl !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-profile-avatar {
    display: block !important;
    flex: 0 0 44px !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    position: static !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    gap: 2px !important;
    width: auto !important;
    max-width: calc(100% - 53px) !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    text-align: right !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .meta {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: right !important;
    direction: rtl !important;
    line-height: 1.45 !important;
    position: static !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating {
    display: block !important;
    align-self: flex-end !important;
    width: 92px !important;
    height: 26px !important;
    min-height: 26px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 24px !important;
    position: relative !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    overflow: hidden !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating::before,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating > span,
body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating > span::before {
    top: 0 !important;
    height: 26px !important;
    min-height: 26px !important;
    line-height: 24px !important;
    transform: none !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
        gap: 7px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-profile-avatar {
        flex-basis: 40px !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack {
        max-width: calc(100% - 47px) !important;
        gap: 1px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating,
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating::before,
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating > span,
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating > span::before {
        height: 27px !important;
        min-height: 27px !important;
        line-height: 25px !important;
    }
}


/* v2.16.19 — final avatar/author/rating alignment.
   Use a real two-column grid for the right-side identity block so the avatar can
   never drop below the stars, and keep the full author name on one line. */
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
    display: grid !important;
    grid-template-columns: max-content 44px !important;
    grid-template-rows: auto !important;
    column-gap: 9px !important;
    align-items: start !important;
    justify-items: end !important;
    justify-content: end !important;
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    direction: ltr !important;
    flex-direction: initial !important;
    gap: 0 9px !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-profile-avatar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start !important;
    justify-self: end !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-author-stack {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: flex-start !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 92px !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
    direction: rtl !important;
    text-align: right !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .meta {
    width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow: visible !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    margin: 0 !important;
    line-height: 1.45 !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating {
    align-self: flex-end !important;
    margin: 1px 0 0 !important;
}

/* Date remains completely independent on the far-left side of the card. */
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-published-date {
    justify-self: start !important;
    align-self: start !important;
    text-align: left !important;
    white-space: nowrap !important;
    direction: rtl !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
        grid-template-columns: max-content 40px !important;
        column-gap: 7px !important;
        gap: 0 7px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-profile-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }
}

/* v2.16.20 — compact one-line identity: avatar | author | stars (RTL visual order).
   The date stays independently on the far-left side of the review card. */
body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    justify-self: end !important;
    width: max-content !important;
    max-width: 100% !important;
    gap: 8px !important;
    direction: rtl !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-profile-avatar {
    order: 1 !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    margin: 0 !important;
    align-self: center !important;
    position: static !important;
    transform: none !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-author-stack {
    order: 2 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 0 !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    direction: rtl !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .meta {
    order: 1 !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
    line-height: 1.45 !important;
    text-align: right !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-author-stack > .star-rating {
    order: 2 !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 !important;
    position: relative !important;
    top: 0 !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    overflow: visible !important;
}

body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-published-date {
    justify-self: start !important;
    align-self: center !important;
    margin: 0 !important;
}

@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating {
        gap: 6px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-profile-avatar {
        flex-basis: 36px !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
    }

    body.single-product .woocommerce-Reviews .commentlist .com-review-published-header > .com-review-author-rating > .com-review-author-stack {
        gap: 6px !important;
    }
}


/* v2.16.21 — ensure the profile avatar sits in the same row as author + rating.
   JS now moves the avatar from either WooCommerce hook location into this row. */
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .com-review-profile-avatar {
    display: block !important;
    order: 1 !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    align-self: center !important;
}
body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .com-review-author-stack {
    order: 2 !important;
}
@media (max-width: 767px) {
    body.single-product .woocommerce-Reviews .commentlist .com-review-author-rating > .com-review-profile-avatar {
        flex-basis: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
}
