/* ============================================================
   STRAT: LUXURY CUSTOMER REVIEWS STYLE FOR ASTRA
   ============================================================ */
/* نام و تاریخ زیر هم */
.ast-comment-meta.ast-row.ast-comment-author {
    display: flex;
    flex-direction: column;  /* نام و تاریخ زیر هم */
    align-items: flex-start;
}

/* متن تایید دیدگاه */
.woocommerce-review__awaiting-approval {
    font-size: 15.5px;
}
@media (max-width: 768px) {
    .woocommerce-review__awaiting-approval {
        font-size: 13px;
    }
}

@media (min-width: 600px) {
    .ast-comment-meta {
        margin-right: -40px !important;
    }
}

/* عرض ثابت */
.comments-area, 
#respond, 
.comment-respond {
    width: 100% !important;
    max-width: 800px !important; /* این عدد را می‌توانید به دلخواه بین 800 تا 1100 تغییر دهید */
}

/* کانتینر اصلی */
.comments-area {
    max-width: 800px;
    margin: 80px auto;
    padding: 0 20px;
    background: transparent;
}

/* حذف خطوط پیش‌فرض آسترا */
.comments-area, 
.comment-list, 
.comment-list .comment, 
.comment-respond, 
.comment-body {
    border: none !important;
}

/* --- استایل کارت‌های نظرات --- */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 35px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 15px 45px rgba(0,0,0,0.05) !important;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.comment-body:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.1) !important;
}

/* آواتار نویسنده */
.comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.comment-author img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    margin-left: 15px !important;
    border: 3px solid #f3f4f6 !important;
    padding: 2px;
}

.comment-author cite {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    font-style: normal;
}

/* تاریخ نظر */
.comment-meta {
    position: absolute;
    top: 35px;
    left: 35px;
    font-size: 12px;
    color: #94a3b8;
}

/* متن نظر مشتری */
.comment-content {
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    color: #475569;
    line-height: 1.8;
    font-size: 15px;
    position: relative;
}

/* اضافه کردن علامت نقل قول (آپشنال) */
.comment-content::before {
    content: "“";
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 40px;
    color: #cbd5e1;
    font-family: serif;
    opacity: 0.5;
}

/* --- استایل دکمه پاسخ --- */
.reply a {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    background: #f1f5f9;
    color: #475569;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: 0.3s;
}

.reply a:hover {
    background: #3b82f6;
    color: #fff;
}

/* --- باکس ارسال دیدگاه (فرم) --- */

.comment-reply-title {
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    color: #1a202c;
    letter-spacing: -0.5px;
    margin-top: 0px !important; /* این فاصله رو می‌تونی کم و زیاد کنی */
    margin-bottom: 15px !important;
}

.comment-respond {
    background: #FAFAFA !important; /* یک رنگ بسیار ملایم و شیک */
    border-radius: 30px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03) !important;
    border: 1px solid #f1f5f9 !important;
    padding: 40px;
}

/* اصلاح متون راهنما (بزرگتر و وسط‌چین) */
.comment-notes, .comment-form-comment label {
    font-size: 15px !important; /* بزرگتر شد */
    color: #475569 !important;
    text-align: center !important;
    display: block !important;
    margin-bottom: 15px !important;
    font-weight: 500;
}

/* مینیمال و شیک کردنِ متن "وارد شده‌اید" */
.logged-in-as {
    font-size: 14px !important;
    color: #555 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    display: block !important; /* جدا کردن از بقیه */
}

.logged-in-as a {
    color: #0073aa !important;
    text-decoration: underline !important;
    margin: 0 5px !important; /* ایجاد فاصله بین لینک‌ها */
}

/* کنترل هوشمند باکس متن نظرات */
#comment {
    border-radius: 15px !important;
    min-height: 120px !important; /* ارتفاع اولیه کم و شیک */
    max-height: 400px !important; /* اجازه نمی‌دهد بیش از حد بلند شود و صفحه را خراب کند */
    resize: vertical !important;  /* فقط اجازه می‌دهد به سمت پایین کشیده شود، نه به عرض (چپ و راست) */
    overflow-y: auto !important;  /* اگر متن زیاد شد اسکرول داخلی بخورد */
    height: 120px !important;     /* مقدار پیش‌فرض هنگام لود شدن صفحه */
}

/* تمام فیلدهای فرم کامنت */
.comment-form input,
.comment-form textarea {
    border-radius: 15px !important;
}

/* فیلدهای نام، ایمیل و وبگاه در مقاله */
.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
    margin-top: -25px !important;
}

/* برای حذف کامل آن سه خط (اگر می‌خواهید کاربر اصلاً نتواند سایز را تغییر دهد) */
#comment {
    resize: none !important;
}

/* --- راست‌چین کردنِ فقط برچسب "دیدگاه *" بالای باکس متن --- */
#commentform .comment-form-comment label {
    text-align: right !important;
    display: block !important;
    margin-right: 15px !important; /* کمی فاصله از سمت راست */
    font-weight: bold; /* برای خوانایی بهتر */
}

.logged-in-as a {
    color: #1a202c;
    text-decoration: underline;
    font-weight: 700;
}

/* اصلاح ناحیه متن - سفید خالص برای تضاد با زمینه باکس */
#commentform textarea {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 20px !important;
    font-size: 16px;
    transition: all 0.3s ease;
    min-height: 140px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}

#commentform textarea:focus {
    border-color: #1a202c !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05) !important;
    outline: none;
}

/* دکمه ارسال وسط‌چین و متناسب */
.form-submit {
    text-align: center !important;
    margin-top: 10px;
    margin-bottom: 0px;
}

#commentform .submit, #submit {
    background: linear-gradient(135deg, #1e3a5f, #274c77) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 40px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 6px 18px rgba(30, 58, 95, 0.22) !important;
    display: inline-block !important;
}

#commentform .submit:hover, #submit:hover {
    background: linear-gradient(135deg, #274c77, #335c81) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 24px rgba(30, 58, 95, 0.28) !important;
    letter-spacing: 0.4px !important;
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    .comment-respond { 
        padding: 25px !important;
        margin-top: 0 !important; 
    }
    .logged-in-as, .comment-notes {
        font-size: 13px !important;
    }
    #commentform .submit {
        width: 100% !important;
    }
}

/* ============================================================
   EXCLUSIVE LUXURY STYLE FOR ASTRA COMMENTS
   ============================================================ */

/* عنوان بخش */
.comments-title {
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    color: #1a202c;
    letter-spacing: -0.5px;
    margin-top: 0px !important; /* این فاصله رو می‌تونی کم و زیاد کنی */
    margin-bottom: -15px !important;
}
@media (max-width: 600px) {
    .comments-title {
        font-size: 20px !important;
    }
    
    .single-post .comments-title {
        margin-bottom: 20px !important;
    }
    
}

/* عنوان بخش در مقاله */
.single-post .comments-title {
    font-size: 22px !important;
    margin-top: -20px !important;
    margin-bottom: -35px !important;
}
@media (max-width: 600px) {
    .single-post .comments-title {
        margin-top: -15px !important;
        margin-bottom: -28px !important;
    }
}

/* کانتینر اصلی هر نظر */
.ast-comment {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 30px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f0f2f5 !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.ast-comment:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1) !important;
    border-color: #3b82f6 !important;
}

/* بخش اطلاعات بالای کامنت (عکس و اسم) */
.ast-comment-info {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding-bottom: 15px !important;
}

/* استایل عکس پروفایل */
.ast-comment-avatar-wrap img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    margin-left: 15px !important; /* فاصله برای فارسی */
    border: 3px solid #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* نام نویسنده */
.ast-comment-cite-wrap b.fn, .ast-comment-cite-wrap a {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    text-decoration: none !important;
}

/* تاریخ نظر */
.ast-comment-time {
    font-size: 12px !important;
    color: #94a3b8 !important;
    margin-top: 5px;
}

.ast-comment-time a {
    color: #94a3b8 !important;
    text-decoration: none !important;
}

/* متن نظر مشتری */
.ast-comment-content {
    padding: 10px 5px !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: #475569 !important;
}

/* حذف حاشیه‌های پیش‌فرض آسترا در بخش محتوا */
.ast-comment-content.comment.entry-content {
    border: none !important;
    margin: 0 !important;
}

/* استایل دکمه‌های پاسخ و ویرایش */
.ast-comment-edit-reply-wrap {
    margin-top: 20px !important;
}

.ast-reply-link a, .ast-edit-link a {
    background: #f1f5f9 !important;
    color: #475569 !important;
    padding: 6px 18px !important;
    border-radius: 100px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: 0.3s !important;
    margin-left: 10px !important;
    display: inline-block !important;
}

.ast-reply-link a:hover {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

/* حذف خطوط جداکننده کل لیست */
.ast-comment-list li {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* ریسپانسیو موبایل */
@media (max-width: 600px) {
    .ast-comment { padding: 20px !important; }
    .ast-comment-info { flex-direction: row !important; }
}

/* ============================================================
   REPLY SYSTEM - MODERN & MINIMAL LUXURY
   ============================================================ */

/* 1. استایل برچسب "در پاسخ به" - شیک و مدرن */
.reply-to-tag {
    margin-bottom: 12px;
}
.reply-to-tag span {
    background: #f1f5f9; 
    color: #475569;
    font-size: 10px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 50px; /* کپسولی */
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
}

/* اضافه کردن یک آیکون کوچک قبل از متن پاسخ */
.reply-to-tag span::before {
    content: "↵";
    margin-left: 5px;
    font-size: 14px;
    line-height: 0;
}

/* 2. ساختار درختی بدون تغییر رنگ زمینه */
.children {
    margin-right: 35px !important;
    padding-right: 0 !important;
    border-right: none !important;
}

.children .ast-comment {
    background: #ffffff !important; /* رنگ زمینه دقیقاً مثل اصلی */
    border: 1px solid #e2e8f0 !important;
    margin-top: 15px !important;
    position: relative;
    transition: all 0.3s ease;
}

/* 3. افکت هاور برای تعامل بیشتر */
.ast-comment:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03) !important;
    transform: translateY(-2px);
}

/* 4. بهینه‌سازی برای موبایل */
@media (max-width: 600px) {
    .children {
        margin-right: 15px !important;
    }
    .children .ast-comment {
        padding: 15px !important;
    }
    .children .ast-comment::after {
        width: 3px; /* نوار ظریف‌تر در موبایل */
    }
    .reply-to-tag span {
        font-size: 9px;
        padding: 3px 8px;
    }
}

/* حذف خطوط اضافه پیش‌فرض آسترا در موبایل */
.ast-separate-container .ast-comment-list li.depth-1 {
    padding: 0 !important;
    margin-bottom: 25px !important;
}

/* ---- تنظیمات کاربر وارد نشده ---- */

/* کاربر وارد نشده بخش موبایل */
@media (max-width: 600px) {
    .comment-form-author {
        display: block;
        width: 100%;
        margin-top: 25px;
    }
    
    .comment-form-cookies-consent {
        margin-top: -20px;
    }
}

/* کاربر وارد نشده بخش دسکتاپ */
@media (min-width: 601px) {
.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: block;
    width: 100%;
    margin-top: 25px;
    }

.comment-form-cookies-consent {
    margin-top: -10px;
    margin-bottom: 20px;
    text-align: center;
    }

}

/* ----- درست کردن آیکون آدمک کاربر در موبایل ----- */

@media (max-width: 600px) {
    .ast-comment-avatar-wrap img {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important; /* جلوگیری از فشرده شدن */
        object-fit: cover !important; /* مهم: تصویر را کراپ می‌کند تا بیضی نشود */
        aspect-ratio: 1 / 1 !important; /* حفظ نسبت مربع */
        border-radius: 50% !important;
        border: 3px solid #fff !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }
}

/* اصلاح تراز در موبایل که باعث می‌شود والد به تصویر فشار بیاورد */
@media (max-width: 600px) {
    .ast-comment-info {
        display: flex !important;
        align-items: center !important;
        /* مطمئن می‌شویم فلکس روی آیتم‌ها اثر مخرب نمی‌گذارد */
        flex-wrap: nowrap !important;
    }
    
    .ast-comment-time {
        margin-top: -8px !important;
    }
    
    .ast-comment-avatar-wrap {
        flex: 0 0 65px !important; /* آواتار نباید کوچک یا بزرگ شود */
    }
}

/* ====== به بالا چسباندن باکس ===== */

/* --- رفع فاصله اضافه بالای بخش نظرات --- */
.site-main article .comments-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* اگر همچنان مشکل بود، این را هم امتحان کنید */
.site-content .comments-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* و اگر مشکل از خود ناحیه اصلی قالب بود */
.ast-container .comments-area {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* مطمئن شویم که کل کارت کامنت هم فاصله اضافی ندارد */
.custom-customer-comment-card {
    margin-top: 0 !important;
    padding-top: 35px !important; /* اگر بخوایم فاصله داخل کارت رو نگه داریم */
}

/* در صورتی که لیست کامنت‌ها خودش فاصله داشت */
.custom-customer-comments-list {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* --- کاهش فاصله بیش از حد پایین بخش نظرات و فوتر --- */

/* حذف مارجین و پدینگ اضافی از ظرف اصلی نظرات */
.comments-area {
    margin-bottom: 40px !important;
    padding-bottom: 0 !important;
}

/* در ساختار Astra گاهی بخش پاسخ‌دهی یا لیست نظرات مارجین پایینی بزرگی دارند */
.comment-respond {
    margin-bottom: 0px !important;
}

.comment-list-wrap {
    margin-bottom: 40px !important;
}

/* حذف فواصل اضافی از بخش محتوای اصلی که نظرات داخل آن هستند */
.site-main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.ast-article-single {
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;
}

/* تراز کردن فاصله داخلی کانتینر صفحه در موبایل و دسکتاپ */
#post-wrapper, #primary {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}


/* ===== افزودن فاصله به پایین فرم دیدگاه ها در حالت پاسخ دهی ===== */

/* هدف‌گیری باکس پاسخ به دیدگاه */
#respond:has(#comment_parent[value="65"]) {
    margin-bottom: 40px !important;
}

/* یا اگر می‌خواهید برای همه باکس‌های پاسخ‌دهی اعمال شود */
.comment-body + #respond {
    margin-bottom: 40px !important;
    margin-top: 20px !important;
}

/* ===== اورراید بخش صفحه محصول ====== */

/* حذف کادر اضافی */
.single-product #respond {
    border: none !important; /* حذف حاشیه */
    background: transparent !important; /* حذف پس‌زمینه */
    box-shadow: none !important; /* حذف سایه */
}

/* متن امتیاز شما */
/*.single-product .comment-respond {

}*/

/* متن دیدگاه شما */
.single-product .comment-notes, .comment-form-comment label {
    margin-bottom: 5px !important;
}

/* تنظیم فاصله های متن های راهنما در بخش کاربر وارد نشده */
.scui-single .comment-form-author label,
.scui-single .comment-form-email label {
    margin-bottom: 11px !important;
}
.scui-single .comment-form-author {
    margin-bottom: 8px !important;
}
.scui-single .comment-form-email {
    margin-bottom: 20px !important;
}