/**
 * Mika Luxury Store - My Account Stylesheet
 * File: 08-my-account.css
 * Path: assets/css/08-my-account.css
 * Scope: WooCommerce My Account Area Only (Loaded conditionally on is_account_page())
 * Version: 1.0.0
 * Created By Pixit-ACHTUNg
 */

/* ====================================================================================================
   ---------------------- #08: My Account - Layout Spacing & Mobile Reverse Columns --------------------
   ==================================================================================================== */

/*--- #08: My Account - Layout Spacing & Mobile Reverse Columns ---*/

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   کاهش سراسری فاصله زیر سربرگ و انتقال منو در حساب کاربری (Style.css)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ۱. تنظیمات مشترک دسکتاپ (مخفی‌سازی کادر سیاه عنوان صفحه و ایجاد فاصله استاندارد از هدر) */
.woocommerce-account .page-title,
.woocommerce-account .page-title-default,
.woocommerce-account .wd-page-title {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-account .main-page-wrapper {
    padding-top: 28px !important; /* فاصله استاندارد و متوازن از زیر هدر */
    margin-top: 0 !important;
}

.woocommerce-account .site-content,
.woocommerce-account .content-layout-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   انتقال داشبورد و منوی سایدبار صفحه حساب کاربری به زیر محتویات در حالت رسپانسیو
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* ۲. بهینه‌سازی و تقارن کامل فواصل در موبایل */
@media (max-width: 768px) {

    /* تنظیم ارتفاع متقارن نوار سربرگ و فاصله دقیق ۱۴ پیکسلی تا اولین کارت (استپر) */
    .woocommerce-account .page-title,
    .woocommerce-account .page-title-default,
    .woocommerce-account .wd-page-title {
        margin-bottom: 14px !important;  /* فاصله دقیق و متقارن تا اولین باکس */
        padding-top: 18px !important;
        padding-bottom: 18px !important;
    }

    .woocommerce-account .main-page-wrapper,
    .woocommerce-account .site-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* ستونی‌کردن چیدمان حساب کاربری */
    .woocommerce-account .wd-my-account-wrapper,
    .woocommerce-account .woocommerce {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* محتوا در بالا */
    .woocommerce-account .woocommerce-MyAccount-content {
        order: 1 !important;
        width: 100% !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* فاصله انتهای آخرین المان محتوا تا منوی زیرین */
    .woocommerce-account .woocommerce-MyAccount-content > *:last-child,
    .woocommerce-account .woocommerce-column--billing-address,
    .woocommerce-account .woocommerce-customer-details {
        margin-bottom: 14px !important;
    }

    /* انتقال منوی ناوبری به انتهای صفحه */
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .wd-my-account-sidebar {
        order: 2 !important;
        width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 25px !important;
        padding-top: 0 !important;
    }

    .woocommerce-account .wd-my-account-sidebar > h4,
    .woocommerce-account .woocommerce-MyAccount-navigation .title {
        margin-bottom: 8px !important;
        padding-bottom: 8px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        color: #1e293b !important;
    }
}


/* ====================================================================================================
   --------------------------- #09: My Account - Hide Shipping Address Column --------------------------
   ==================================================================================================== */

/*--- #09: My Account - Hide Shipping Address Column ---*/

/* حذف ستون دوم آدرس (آدرس ارسال) در صفحه حساب کاربری */
.woocommerce-Addresses .col-2.woocommerce-Address {
    display: none !important;
}

/* عریض کردن ستون اول برای پر کردن فضای خالی (اختیاری) */
.woocommerce-Addresses .col-1.woocommerce-Address {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}


/* ====================================================================================================
   ------------------------- #10: My Account - Sidebar Navigation Links & Icons ------------------------
   ==================================================================================================== */

/*--- #10: My Account - Sidebar Navigation Links & Icons ---*/

/* ۱. کاهش فاصله کل منو از بالا */
.wd-my-account-sidebar .woocommerce-MyAccount-navigation {
    margin-top: -8px !important;
}

/* ۲. تنظیم فاصله بین گزینه‌های سایدبار */
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link {
    margin-bottom: 6px !important;
}

.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link a {
    padding: 10px 18px !important;
    display: flex !important;
    align-items: center;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease;
    border: none !important;
    border-radius: 20px 0 0 20px !important;
}

/* ۳. آیکون‌های اختصاصی سایدبار */
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link a:before {
    font-family: "woodmart-font" !important;
    margin-left: 12px;
    font-size: 18px;
    color: #C01157;
    display: inline-block;
    font-weight: normal;
}

.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--dashboard a:before { content: "\f144"; }
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--orders a:before { content: "\f123"; }
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--wishlist a:before { content: "\f134"; }
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--edit-address a:before { content: "\f139"; }
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--edit-account a:before { content: "\f135"; }

/* ۴. استایل هاور و گزینه فعال سایدبار */
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link a:hover {
    background-color: rgba(192, 17, 87, 0.05) !important;
    color: #C01157 !important;
}

.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link.is-active a {
    background-color: rgba(192, 17, 87, 0.1) !important;
    color: #C01157 !important;
    border-left: 5px solid #C01157 !important; 
}

/* ۵. بهینه‌سازی دکمه خروج سایدبار */
.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout {
    border-top: 1px solid rgba(0,0,0,0.1) !important;
    margin-top: 8px !important; 
    padding-top: 8px !important; 
}

.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #e53935 !important;
    border-top: none !important; /* حذف خط احتمالی از هدر */
}

.wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout a:before { 
    content: "\f137" !important; 
    color: #e53935 !important; 
}

/* ۶. تنظیمات دارک مد اختصاصی سایدبار */
html[data-wp-dark-mode-active] .wd-my-account-sidebar .woocommerce-MyAccount-navigation-link:not(.is-active):not(.woocommerce-MyAccount-navigation-link--customer-logout) a {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-wp-dark-mode-active] .wd-my-account-sidebar .woocommerce-MyAccount-navigation-link:not(.is-active):not(.woocommerce-MyAccount-navigation-link--customer-logout) a:before {
    color: rgba(192, 17, 87, 0.8) !important;
}

html[data-wp-dark-mode-active] .wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout {
    border-top: 1.5px solid rgba(255, 255, 255, 0.5) !important;
}

html[data-wp-dark-mode-active] .wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout a,
html[data-wp-dark-mode-active] .wd-my-account-sidebar .woocommerce-MyAccount-navigation-link--customer-logout a:before {
    color: #e53935 !important;
}


/* ====================================================================================================
   ----------------------------- #11: My Account - Address Card Box Display ----------------------------
   ==================================================================================================== */

/*--- #11: My Account - Address Card Box Display ---*/

/* ۱. تنظیم فونت وزیر و حذف کجی نوشته‌ها */
.woocommerce-Address address {
    font-family: "Vazirmatn", sans-serif !important;
    font-style: normal !important;
    opacity: 0;
}
.woocommerce-Address address.mk-ready { opacity: 1; }

/* ۲. کانتینر اصلی درخشان (سایه صورتی در شب) */
.woocommerce-Address {
    background: #ffffff !important;
    border-radius: 20px !important;
    padding: 30px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    border: 1px solid #eee !important;
    position: relative !important;
    transition: all 0.3s ease;
}

/* افکت درخشش صورتی مخصوص حالت شب */
html[data-wp-dark-mode-active] .woocommerce-Address {
    background: #111111 !important;
    border: 1px solid rgba(192, 17, 87, 0.3) !important;
    /* سایه صورتی با شدت متناسب */
    box-shadow: 0 0 25px rgba(192, 17, 87, 0.15) !important;
}

/* ۳. هدر کارت: عنوان در راست و خط دش ریز و پررنگ */
.woocommerce-Address-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 25px !important;
    padding-bottom: 20px !important;
    border-bottom: 1.5px dashed #aaa !important; /* دش ظریف‌تر اما پررنگ */
}

/* ۴. عنوان راست‌چین با آیکون f139 */
.woocommerce-Address-title h2 {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 20px !important;
    font-family: "Vazirmatn", sans-serif !important;
    color: #222 !important;
    margin: 0 !important;
}

.woocommerce-Address-title h2::before {
    content: "\f139" !important;
    font-family: "woodmart-font" !important;
    color: #C01157 !important;
    font-size: 24px !important;
}

/* ۵. دکمه ویرایش (روبروی عنوان در هدر) */
.woocommerce-Address-title .edit {
    background-color: rgba(192, 17, 87, 0.08) !important;
    color: #C01157 !important;
    padding: 6px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    border: 1px solid rgba(192, 17, 87, 0.1) !important;
    transition: 0.3s;
}

.woocommerce-Address-title .edit:hover {
    background-color: #C01157 !important;
    color: #fff !important;
}

/* ۶. استایل ردیف‌های داده‌ها */
.mk-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 12px !important;
    font-size: 17px !important;
    color: #444 !important;
    font-weight: 500 !important;
}

.mk-row i {
    color: #C01157 !important;
    width: 20px;
    text-align: center;
}

/* متمایز کردن ردیف نام (پررنگ‌تر و کمی درشت‌تر) */
.mk-row:first-child {
    font-weight: 800 !important; /* افزایش وزن فونت برای ضخیم شدن */
    font-size: 19px !important;   /* کمی درشت‌تر از سایر ردیف‌ها */
    color: #222 !important;       /* تیره تر برای تاکید بیشتر */
    margin-bottom: 18px !important; /* فاصله کمی بیشتر با ردیف موبایل */
}


/* آیکون خط آخر لوکیشن */
.mk-woodmart-icon::before {
    content: "\f139" !important;
    font-family: "woodmart-font" !important;
    font-size: 19px !important;
}

/* ۷. تنظیمات حالت شب (Dark Mode) */
html[data-wp-dark-mode-active] .woocommerce-Address { background: #111111 !important; }
html[data-wp-dark-mode-active] .woocommerce-Address-title h2 { color: #fff !important; }
html[data-wp-dark-mode-active] .mk-row { color: #ddd !important; }
/* در حالت شب برای نام از رنگ روشن‌تر استفاده شود */
html[data-wp-dark-mode-active] .mk-row:first-child {
    color: #ffffff !important;
}

/* اصلاح درهم‌ریختگی نسخه موبایل */
@media (max-width: 768px) {
    /* ۱. تغییر ساختار هدر کارت به حالت عمودی */
    .woocommerce-Address-title {
        flex-direction: column !important;
        align-items: flex-start !important; /* تراز کردن محتوا به سمت راست */
        gap: 15px !important;
        padding-bottom: 15px !important;
    }

    /* ۲. تنظیم عنوان برای اشغال کامل عرض */
    .woocommerce-Address-title h2 {
        font-size: 18px !important;
        justify-content: flex-start !important; /* تراز آیکون و متن به راست */
        width: 100% !important;
    }

    /* ۳. تنظیم دکمه ویرایش در سطر دوم */
    .woocommerce-Address-title .edit {
        position: relative !important; /* خارج کردن از حالت مطلق برای موبایل */
        top: auto !important;
        left: auto !important;
        right: 0 !important;
        margin-right: 0px !important; /* تراز شدن با متن عنوان (بعد از آیکون) */
        align-self: flex-start !important;
        display: inline-flex !important;
    }

    /* ۴. اصلاح ردیف‌های داده برای موبایل */
    .mk-row {
        font-size: 15px !important; /* کمی کوچک‌تر برای جا شدن در یک خط */
        gap: 10px !important;
    }
    
    .mk-name-row {
        font-size: 17px !important;
    }

    /* ۵. کانتینر اصلی کارت در موبایل */
    .woocommerce-Address {
        padding: 20px !important; /* کاهش پدینگ برای فضای بیشتر محتوا */
    }
}


/* ====================================================================================================
   ----------------------- #12: My Account - Address Edit Form & Live Preview Box ----------------------
   ==================================================================================================== */

/*--- #12: My Account - Address Edit Form & Live Preview Box ---*/

/* ==========================================================================
   🎨 استایل کامل، استاندارد و ایزوله صفحه ویرایش آدرس حساب کاربری (My Account)
   ========================================================================== */

/* ۱. عنوان اصلی فرم و آیکون لوکیشن */
body.woocommerce-account .woocommerce-MyAccount-content form h2 {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 25px auto !important;
    font-size: 24px !important;
    font-weight: bold !important;
    color: #222222 !important;
    gap: 10px !important;
    float: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-content form h2::before {
    content: "\f139" !important;
    font-family: "woodmart-font" !important;
    color: #C01157 !important;
    font-size: 26px !important;
    display: inline-block !important;
}

/* ۲. کانتینر کارتی فرم */
body.woocommerce-account .woocommerce-address-fields {
    background: #ffffff !important;
    padding: 25px !important;
    border-radius: 20px !important;
    border: 1px solid #eeeeee !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 30px !important;
    position: relative !important;
}

/* ۳. عنوان داخلی فرم */
body.woocommerce-account .woocommerce-address-fields h3 {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    margin-bottom: 25px !important;
    font-size: 22px !important;
    font-weight: bold !important;
    color: #222222 !important;
}

/* ۴. گرید دو ستونه فیلدها */
body.woocommerce-account .woocommerce-address-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px 20px !important;
    direction: rtl !important;
}

/* ۵. فیلد آدرس تمام‌عرض */
body.woocommerce-account #billing_address_1_field, 
body.woocommerce-account .grid-item-full {
    grid-column: span 2 !important;
    width: 100% !important;
}

/* ۶. عناوین فیلدها (Labels) */
body.woocommerce-account .woocommerce-address-fields label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #334155 !important; 
    margin-bottom: 6px !important;
    display: block !important;
    text-align: right !important;
    padding-right: 2px !important;
}

/* ۷. استایل پایه و تراز مرکز تمام فیلدها (نام، ایمیل، کدپستی، استان و شهر) */
body.woocommerce-account .woocommerce-address-fields input.input-text,
body.woocommerce-account .woocommerce-address-fields select {
    font-weight: 700 !important;
    font-family: "Vazirmatn", Tahoma, sans-serif !important;
    font-size: 14.5px !important;
    height: 46px !important;
    line-height: 44px !important;
    border-radius: 12px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 14px !important;
    display: block !important;
    width: 100% !important;
    text-align: center !important; /* تراز دقیق مرکز */
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* فیلد ایمیل با تراز مرکز و جهت انگلیسی */
body.woocommerce-account .woocommerce-address-fields #billing_email_field input.input-text,
body.woocommerce-account .woocommerce-address-fields input#billing_email {
    direction: ltr !important;
    text-align: center !important;
    font-family: Arial, "Vazirmatn", sans-serif !important;
    font-weight: 700 !important;
}

/* کادرهای دراپ‌داون Select2 */
body.woocommerce-account .woocommerce-address-fields .select2-container .select2-selection--single,
body.woocommerce-account .woocommerce-address-fields .select2-container--default .select2-selection--single {
    height: 46px !important;
    border-radius: 12px !important;
    border: 1px solid #cbd5e1 !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    display: flex !important;          
    align-items: center !important;     
    position: relative !important;
}

body.woocommerce-account .woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: center !important;
    padding-right: 25px !important;
    padding-left: 25px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 46px !important;
}

/* استایل فوکوس فیلدها */
body.woocommerce-account .woocommerce-address-fields input.input-text:focus,
body.woocommerce-account .woocommerce-address-fields .select2-container--default.select2-container--open .select2-selection--single,
body.woocommerce-account .woocommerce-address-fields .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #C01157 !important;
    box-shadow: 0 0 0 3px rgba(192, 17, 87, 0.1) !important;
    outline: none !important;
}

body.woocommerce-account .woocommerce-address-fields input::placeholder {
    color: #94a3b8 !important; 
    font-size: 13px !important;
}

/* ۸. فیلد نشانی (همان وزن و فونت بولد، با تراز راست استاندارد) */
body.woocommerce-account .woocommerce-address-fields #billing_address_1_field input.input-text,
body.woocommerce-account .woocommerce-address-fields input#billing_address_1 {
    font-weight: 700 !important;
    font-family: "Vazirmatn", Tahoma, sans-serif !important;
    font-size: 14.5px !important;
    height: 52px !important;
    line-height: 50px !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    text-align: right !important; /* تنها فیلد راست‌چین */
    direction: rtl !important;
    box-sizing: border-box !important;
}

/* ==========================================================================
   🔒 استایل فیلد شماره موبایل (قفل‌شده و مرکزچین)
   ========================================================================== */

body.woocommerce-account .woocommerce-address-fields .mikada-locked-phone {
    position: relative !important;
}

body.woocommerce-account #mk-phone-control-layer-left,
body.woocommerce-account #mk-phone-control-layer-right {
    top: auto !important;
    bottom: 13px !important;
    transform: none !important;
}

/* حالت قفل‌شده موبایل - پدینگ متقارن ۸۵px برای تراز دقیق وسط */
body.woocommerce-account .woocommerce-address-fields .mikada-locked-phone input[readonly],
body.woocommerce-account .woocommerce-address-fields #billing_phone_field input[readonly],
body.woocommerce-account .woocommerce-address-fields input#billing_phone[readonly] {
    background-color: #e8e8e8 !important;
    color: #666666 !important;
    font-weight: 700 !important;
    font-family: "Vazirmatn", Tahoma, sans-serif !important;
    cursor: not-allowed !important;
    padding-left: 85px !important; 
    padding-right: 85px !important;  
    text-align: center !important;
    direction: ltr !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
}

/* حالت بازشده موبایل */
body.woocommerce-account .woocommerce-address-fields .mikada-locked-phone input.mk-force-unlocked,
body.woocommerce-account .woocommerce-address-fields #billing_phone_field input.mk-force-unlocked,
body.woocommerce-account .woocommerce-address-fields input#billing_phone.mk-force-unlocked {
    background-color: #ffffff !important;
    color: #212121 !important;
    cursor: text !important;
    border-color: #C01157 !important;
    text-align: center !important;
    direction: ltr !important;
    padding-left: 80px !important; 
    padding-right: 80px !important;
    pointer-events: auto !important;
}

/* ==========================================================================
   🚀 استایل دراپ‌داون Select2
   ========================================================================== */

body.woocommerce-account .select2-container, 
body.woocommerce-account .select2-dropdown, 
body.woocommerce-account .select2-results__option, 
body.woocommerce-account .select2-selection__rendered,
body.woocommerce-account .select2-search__field {
    font-family: "Vazirmatn", Tahoma, sans-serif !important;
    font-size: 14.5px !important;
}

body.woocommerce-account .woocommerce-address-fields #billing_state_field,
body.woocommerce-account .woocommerce-address-fields #billing_city_field,
body.woocommerce-account .woocommerce-address-fields .woocommerce-input-wrapper {
    position: relative !important;
    z-index: auto !important;
}

body.woocommerce-account .select2-container--open {
    z-index: 99999 !important;
}

body.woocommerce-account .select2-dropdown {
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    background: #ffffff !important;
    margin-top: 5px !important;
    padding: 5px 0 !important;
    z-index: 99999 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.woocommerce-account .select2-results {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.woocommerce-account .select2-results__options {
    max-height: 210px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 2px 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: block !important;
}

body.woocommerce-account .select2-container--default .select2-results__option {
    padding: 8px 12px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    text-align: center !important;
    cursor: pointer !important;
    display: block !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    transition: all 0.15s ease !important;
}

body.woocommerce-account .select2-container--default .select2-results__option--highlighted[aria-selected],
body.woocommerce-account .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #C01157 !important; 
    color: #ffffff !important;
}

body.woocommerce-account .select2-search--dropdown {
    padding: 4px 18px 6px 18px !important;
    margin-bottom: 4px !important;
    background: #ffffff !important;
    display: block !important;
    position: relative !important;
}

body.woocommerce-account .select2-search--dropdown::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 15px !important;
    height: 15px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgb(148,163,184)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    pointer-events: none !important;
    z-index: 10 !important;
    opacity: 1 !important;
    transition: opacity 0.2s ease-in-out !important;
}

body.woocommerce-account .select2-search--dropdown:hover::after,
body.woocommerce-account .select2-search--dropdown:focus-within::after {
    opacity: 0 !important;
}

body.woocommerce-account .select2-search--dropdown input.select2-search__field {
    border: 1px solid #cbd5e1 !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    height: 34px !important;
    outline: none !important;
    text-align: center !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease-in-out !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 1 !important;
    width: 100% !important;
}

body.woocommerce-account .select2-search--dropdown input.select2-search__field:focus {
    border-color: #C01157 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(192, 17, 87, 0.1) !important;
}

body.woocommerce-account .select2-results__option--selectable.select2-results__message,
body.woocommerce-account .select2-results__option.select2-results__message {
    font-size: 0 !important;
    text-align: center !important;
    padding: 10px !important;
    color: transparent !important;
}

body.woocommerce-account .select2-results__option--selectable.select2-results__message::before,
body.woocommerce-account .select2-results__option.select2-results__message::before {
    content: "نتیجه‌ای یافت نشد" !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ef4444 !important;
    font-family: "Vazirmatn", sans-serif !important;
    display: block !important;
}

body.woocommerce-account .woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;        
    position: absolute !important;
    top: 0 !important;              
    left: 10px !important;
    right: auto !important;
    display: flex !important;
    align-items: center !important;
}

body.woocommerce-account .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #64748b transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    height: 0 !important;
    width: 0 !important;
    margin-top: -2px !important;
}

/* ==========================================================================
   ✨ استایل گرادیانت و تراز دقیق آیکون‌های باکس پیش‌نمایش
   ========================================================================== */

body.woocommerce-account #mikada-address-preview {
    grid-column: span 2 !important;
    background: linear-gradient(135deg, rgba(192, 17, 87, 0.09) 0%, rgba(253, 242, 248, 0.75) 45%, #ffffff 100%) !important;
    border: 1.5px solid rgba(192, 17, 87, 0.28) !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    margin: 8px 0 18px 0 !important;
    box-shadow: 0 6px 22px rgba(192, 17, 87, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}

body.woocommerce-account #mikada-address-preview::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 3.5px !important;
    background: linear-gradient(90deg, #C01157 0%, #f472b6 50%, #fbcfe8 100%) !important;
}

body.woocommerce-account #mikada-address-preview .preview-content {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

body.woocommerce-account #mikada-address-preview .receiver-row,
body.woocommerce-account #mikada-address-preview .address-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

body.woocommerce-account #mikada-address-preview .receiver-row {
    padding-bottom: 9px !important;
    border-bottom: 1px solid rgba(192, 17, 87, 0.12) !important;
}

body.woocommerce-account #mikada-address-preview i {
    color: #C01157 !important;
    font-size: 16px !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    transform: translateY(-2px) !important;
}

body.woocommerce-account #mikada-address-preview .receiver-row #p-name,
body.woocommerce-account #mikada-address-preview .receiver-row span {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
}

body.woocommerce-account #mikada-address-preview .address-row #p-address,
body.woocommerce-account #mikada-address-preview .address-row span {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    line-height: 1.6 !important;
}

/* ==========================================================================
   🔘 دکمه ذخیره نشانی + اسپینر مستقل و چرخان در مرکز
   ========================================================================== */

body.woocommerce-account .woocommerce-address-fields button.button {
    grid-column: span 2 !important;
    width: 100% !important;
    background-color: #C01157 !important;
    height: 52px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    border-radius: 12px !important;
    margin-top: 5px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(192, 17, 87, 0.25) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.woocommerce-account .woocommerce-address-fields button.button:hover {
    background-color: #9f0e48 !important;
    transform: translateY(-1px) !important;
}

/* استایل اسپینر مستقل در مرکز دکمه */
.pixit-save-spinner {
    width: 22px !important;
    height: 22px !important;
    border: 2.5px solid rgba(255, 255, 255, 0.35) !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: pixitSpinBtn 0.65s linear infinite !important;
    display: inline-block !important;
    margin: 0 !important;
}

@keyframes pixitSpinBtn {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   🌙 سازگاری کامل با حالت شب (Dark Mode)
   ========================================================================== */

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields {
    background: #111111 !important;
    border: 1px solid rgba(192, 17, 87, 0.3) !important;
    box-shadow: 0 0 25px rgba(192, 17, 87, 0.15) !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields label {
    color: #efefef !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields input.input-text,
html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields .select2-container--default .select2-selection--single {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(192, 17, 87, 0.4) !important;
    color: #ffffff !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields .mikada-locked-phone input[readonly],
html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields #billing_phone_field input[readonly],
html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields input#billing_phone[readonly] {
    background-color: #262626 !important;
    color: #888888 !important;
    border-color: #404040 !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields .mikada-locked-phone input.mk-force-unlocked,
html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields #billing_phone_field input.mk-force-unlocked,
html[data-wp-dark-mode-active] body.woocommerce-account .woocommerce-address-fields input#billing_phone.mk-force-unlocked {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #C01157 !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-dropdown {
    background: #1a1a1a !important;
    border-color: rgba(192, 17, 87, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-search--dropdown {
    background: #1a1a1a !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-search--dropdown input.select2-search__field {
    background-color: #262626 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-container--default .select2-results__option {
    color: #e2e8f0 !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview { 
    background: linear-gradient(135deg, rgba(192, 17, 87, 0.22) 0%, rgba(35, 20, 28, 0.8) 50%, #161616 100%) !important;
    border-color: rgba(192, 17, 87, 0.45) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5) !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview .receiver-row {
    border-bottom-color: rgba(192, 17, 87, 0.2) !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview i {
    color: #f472b6 !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview .receiver-row #p-name,
html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview .receiver-row span {
    color: #f8fafc !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview .address-row #p-address,
html[data-wp-dark-mode-active] body.woocommerce-account #mikada-address-preview .address-row span {
    color: #cbd5e1 !important;
}

/* ==========================================================================
   📜 استایل اختصاصی اسکرول‌بار (Scrollbar) سایت و دراپ‌داون در حساب کاربری
   ========================================================================== */

html:has(body.woocommerce-account),
body.woocommerce-account {
    scrollbar-color: #C01157 #f1f5f9 !important;
    scrollbar-width: thin !important;
}

body.woocommerce-account::-webkit-scrollbar,
html:has(body.woocommerce-account)::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

body.woocommerce-account::-webkit-scrollbar-track,
html:has(body.woocommerce-account)::-webkit-scrollbar-track {
    background: #f1f5f9 !important;
    border-radius: 10px !important;
}

body.woocommerce-account::-webkit-scrollbar-thumb,
html:has(body.woocommerce-account)::-webkit-scrollbar-thumb {
    background: #C01157 !important;
    border-radius: 10px !important;
}

body.woocommerce-account::-webkit-scrollbar-thumb:hover,
html:has(body.woocommerce-account)::-webkit-scrollbar-thumb:hover {
    background: #9f0e48 !important;
}

body.woocommerce-account .select2-results__options {
    scrollbar-color: #C01157 #f8fafc !important;
    scrollbar-width: thin !important;
}

body.woocommerce-account .select2-results__options::-webkit-scrollbar {
    width: 6px !important;
}

body.woocommerce-account .select2-results__options::-webkit-scrollbar-track {
    background: #f8fafc !important;
    border-radius: 10px !important;
    margin: 4px 0 !important;
}

body.woocommerce-account .select2-results__options::-webkit-scrollbar-thumb {
    background: #C01157 !important;
    border-radius: 10px !important;
}

body.woocommerce-account .select2-results__options::-webkit-scrollbar-thumb:hover {
    background: #9f0e48 !important;
}

html[data-wp-dark-mode-active]:has(body.woocommerce-account),
html[data-wp-dark-mode-active] body.woocommerce-account {
    scrollbar-color: #C01157 #1e1e1e !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account::-webkit-scrollbar-track,
html[data-wp-dark-mode-active]:has(body.woocommerce-account)::-webkit-scrollbar-track {
    background: #1e1e1e !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-results__options {
    scrollbar-color: #C01157 #262626 !important;
}

html[data-wp-dark-mode-active] body.woocommerce-account .select2-results__options::-webkit-scrollbar-track {
    background: #262626 !important;
}

/* ==========================================================================
   📱 ریسپانسیو موبایل
   ========================================================================== */
@media (max-width: 768px) {
    body.woocommerce-account .woocommerce-address-fields { padding: 15px !important; border-radius: 15px !important; }
    body.woocommerce-account .woocommerce-address-fields__field-wrapper { gap: 10px !important; }
    body.woocommerce-account #billing_address_1_field { grid-column: span 2 !important; }
    body.woocommerce-account .woocommerce-address-fields label { font-size: 13.5px !important; }
    body.woocommerce-account .woocommerce-address-fields h3 { font-size: 18px !important; }
}


/* ====================================================================================================
   ---------------------- #13: My Account - Dashboard Hero Banner & Navigation Grid --------------------
   ==================================================================================================== */

/*--- #13: My Account - Dashboard Hero Banner & Navigation Grid ---*/


/* ۱. حذف پیام‌های پیش‌فرض ووکامرس */
.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content > p {
    display: none !important;
}

/* ۲. بازطراحی بنر کپسولی (با قابلیت تنظیم فاصله آیکون و متن) */
.woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content::before {
    content: "\f2bd  پـیـشخوان فـروشـگاه مــیـکـا" !important;
    font-family: "Font Awesome 7 Free", "Vazirmatn", sans-serif !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    
    /* --- تنظیم فاصله بین آیکون و متن --- */
    word-spacing: 2px !important; 
    /* ------------------------------------ */
    
    color: #333 !important; 
    background-color: #ffffff !important;
    padding: 18px 45px !important;
    border-radius: 60px !important;
    border: none !important;
    box-shadow: 0 0px 0px rgba(0,0,0,0.03) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    margin: 0 auto 12px auto !important;
    width: fit-content !important;
    order: -1 !important;
    transition: all 0.3s ease !important;
}

/* ۳. استایل باکس‌ها و آیکون‌های صورتی (بدون تغییر) */
html body .wd-my-account-links li a::before {
    font-family: "Font Awesome 7 Free" !important;
    font-weight: 900 !important;
    color: #C01157 !important; 
    opacity: 0.7 !important;
    font-size: 42px !important;
    margin-bottom: 15px !important;
    display: block !important;
    transition: all 0.4s ease !important;
}

html body .wd-my-account-links li a:hover::before {
    opacity: 1 !important;
    transform: scale(1.1) rotate(3deg) !important;
}

html body .wd-my-account-links li a {
    background: #fdfdfd !important;
    border: 1px solid rgba(192, 17, 87, 0.1) !important;
    border-radius: 25px !important;
    padding: 30px 15px !important;
    min-height: 160px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

html body .wd-my-account-links li a span.nav-link-text {
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #444 !important;
}

html body .wd-my-account-links li a:hover {
    background: #ffffff !important;
    border-color: #C01157 !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 30px rgba(192, 17, 87, 0.1) !important;
}

html body .wd-my-account-links li a:hover span.nav-link-text {
    color: #C01157 !important;
}

/* ۴. تنظیمات اختصاصی حالت شب (Dark Mode) - اصلاح متن سفید */
html[data-wp-dark-mode-active] body .wd-my-account-links li a {
    background: #1a1a1a !important;
    border-color: rgba(192, 17, 87, 0.3) !important;
    box-shadow: 0 5px 20px rgba(192, 17, 87, 0.25) !important;
}

html[data-wp-dark-mode-active] body .wd-my-account-links li a:hover {
    box-shadow: 0 0 25px rgba(192, 17, 87, 0.5) !important;
    border-color: #C01157 !important;
}

/* اصلاح نهایی بنر در شب: سفید درخشان و خوانا */
html[data-wp-dark-mode-active] body .woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content::before {
    background: none !important;
    background-color: transparent !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(192, 17, 87, 0.8) !important;
    border: none !important;
}

/* ۵. باکس خروج (قرمز شدن همه‌چیز - ثابت و عالی) */
html body .wd-my-account-links li.wd-my-acc-customer-logout a:hover {
    border-color: #ff3333 !important;
}
html body .wd-my-account-links li.wd-my-acc-customer-logout a:hover::before,
html body .wd-my-account-links li.wd-my-acc-customer-logout a:hover span.nav-link-text {
    color: #ff3333 !important;
}

/* ۶. حذف ریشه‌ای آیکون‌های وودمارت */
html body .wd-my-account-links li a .wd-nav-icon,
html body .wd-my-account-links li a i:not([class*="fa-"]),
html body .wd-my-account-links li a svg,
html body .wd-my-account-links li a img {
    display: none !important;
}

/* تعریف آیکون‌ها */
html body .wd-my-acc-orders a::before { content: "\f46c" !important; }
html body .wd-my-acc-downloads a::before { content: "\f381" !important; }
html body .wd-my-acc-edit-address a::before { content: "\f3c5" !important; }
html body .wd-my-acc-edit-account a::before { content: "\f4ff" !important; }
html body .wd-my-acc-wishlist a::before { content: "\f004" !important; }
html body .wd-my-acc-customer-logout a::before { content: "\f2f5" !important; }

/* ۹. اصلاح فشرده‌سازی بنر برای موبایل (تک‌خطی قطعی) */
@media (max-width: 768px) {
    html body .wd-my-account-links {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    html body .woocommerce-account.woocommerce-dashboard .woocommerce-MyAccount-content::before {
        /* ۱. کاهش محسوس سایز فونت */
        font-size: 13px !important; 
        
        /* ۲. فشرده‌سازی فاصله بین کلمات (منفی کردن فاصله) */
        word-spacing: -2px !important; 
        
        /* ۳. کاهش پدینگ کناری برای باز شدن فضا */
        padding: 10px 15px !important; 
        
        /* ۴. جلوگیری از هرگونه شکست خط */
        white-space: nowrap !important;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        
        /* ۵. تنظیم عرض برای استفاده از حداکثر فضا */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 20px !important;
        letter-spacing: -0.2px !important; /* فشرده‌سازی حروف */
    }
}



	/* ---------------------------------------------------
   ------------------ Made By ACHTUNg ---------------
 ------------------Mehdi ----------------------------
	----------------------------------------------------- */

/* ====================================================================================================
   ----------------------- #14: My Account - Edit Account Form & Password Accordion --------------------
   ==================================================================================================== */

/*--- #14: My Account - Edit Account Form & Password Accordion ---*/

/* ۱. ایجاد کانتینر کارتی برای فرم ویرایش حساب */
.woocommerce-EditAccountForm {
    background: #ffffff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    border: 1px solid #eee !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03) !important;
    margin-bottom: 30px !important;
}

/* حالت شب (Dark Mode) */
html[data-wp-dark-mode-active] .woocommerce-EditAccountForm {
    background: #111111 !important;
    border: 1px solid rgba(192, 17, 87, 0.3) !important;
    box-shadow: 0 0 25px rgba(192, 17, 87, 0.15) !important;
}

/* ۲. مدیریت فیلد نام و نام خانوادگی */
.woocommerce-EditAccountForm p.form-row-first label {
    font-size: 0 !important;
}
.woocommerce-EditAccountForm p.form-row-first label::before {
    content: "نام و نام خانوادگی";
    font-size: 15px !important;
    font-weight: 600;
}

/* مخفی کردن فیلد اصلی نام خانوادگی */
.woocommerce-EditAccountForm p.form-row-last,
#account_last_name_field {
    display: none !important;
}

/* حذف خط فاصله clear بین فیلد اول و دوم برای قرارگیری در یک خط */
.woocommerce-EditAccountForm p.form-row-first + p.form-row-last + .clear {
    display: none !important;
}

/* 🌟 قرارگیری فیلد نام و فیلد نام نمایشی در یک ردیف (۵۰٪ هر کدام) */
.woocommerce-EditAccountForm p.form-row-first {
    width: 48.5% !important;
    float: right !important;
    clear: none !important;
    margin-bottom: 20px !important;
}

.woocommerce-EditAccountForm p:has(#account_display_name) {
    width: 48.5% !important;
    float: left !important;
    clear: none !important;
    margin-bottom: 20px !important;
}

/* فیلد ایمیل زیر آن‌ها به صورت تمام‌عرض */
.woocommerce-EditAccountForm p:has(#account_email) {
    clear: both !important;
    width: 100% !important;
}

/* ۳. استایل لیبل‌ها */
.woocommerce-EditAccountForm label {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #222 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

html[data-wp-dark-mode-active] .woocommerce-EditAccountForm label {
    color: #efefef !important;
}

/* ۴. استایل فیلدهای ورودی (فونت وزیر، وزن ضخیم و تراز در مرکز) */
.woocommerce-EditAccountForm input.input-text {
    height: 48px !important;
    border-radius: 12px !important;
    border: 1px solid #ccc !important;
    background-color: #fff !important;
    color: #222 !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important; /* قرارگیری متن در مرکز فیلد */
    padding: 0 15px !important;
    transition: 0.3s;
}

.woocommerce-EditAccountForm input.input-text:focus {
    border-color: #C01157 !important;
    box-shadow: 0 0 8px rgba(192, 17, 87, 0.1) !important;
}

html[data-wp-dark-mode-active] .woocommerce-EditAccountForm input.input-text {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(192, 17, 87, 0.4) !important;
    color: #fff !important;
}

/* ۵. باکس گذرواژه با گرادینت مدرن مشابه پیش‌نمایش آدرس */
.woocommerce-EditAccountForm fieldset {
    margin-top: 25px !important;
    padding: 16px 22px !important;
    border-radius: 16px !important;
    border: 1.5px solid rgba(192, 17, 87, 0.18) !important;
    background: linear-gradient(135deg, #ffffff 40%, rgba(192, 17, 87, 0.06) 100%) !important;
    box-shadow: 0 4px 18px rgba(192, 17, 87, 0.04) !important;
    transition: all 0.3s ease !important;
}

html[data-wp-dark-mode-active] .woocommerce-EditAccountForm fieldset {
    background: linear-gradient(135deg, #161616 40%, rgba(192, 17, 87, 0.15) 100%) !important;
    border-color: rgba(192, 17, 87, 0.35) !important;
    box-shadow: 0 0 20px rgba(192, 17, 87, 0.12) !important;
}

/* هدر آکاردئون با فلش بازشو در سمت چپ */
.woocommerce-EditAccountForm fieldset legend {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-weight: 700 !important;
    color: #C01157 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    user-select: none !important;
}

/* 🌟 فلش نشانگر آکاردئون با قابلیت چرخش */
.woocommerce-EditAccountForm fieldset legend::after {
    content: "" !important;
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    border-right: 2.5px solid #C01157 !important;
    border-bottom: 2.5px solid #C01157 !important;
    transform: rotate(45deg) !important; /* حالت فلش رو به پایین */
    transition: transform 0.3s ease !important;
    margin-left: 5px !important;
}

/* چرخش فلش رو به بالا هنگام باز شدن منو */
.woocommerce-EditAccountForm fieldset legend.is-open::after {
    transform: rotate(-135deg) !important;
}

/* ۶. دکمه ذخیره تغییرات و اسپینر لودینگ */
.woocommerce-EditAccountForm button.button {
    width: 100% !important;
    background-color: #C01157 !important;
    height: 52px !important;
    font-size: 17px !important;
    font-weight: bold !important;
    border-radius: 12px !important;
    margin-top: 25px !important;
    position: relative !important;
    transition: 0.3s !important;
}

.woocommerce-EditAccountForm button.button:hover {
    background-color: #a00e49 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 17, 87, 0.3) !important;
}

/* لودینگ چرخان دکمه */
.woocommerce-EditAccountForm button.button.mk-btn-loading {
    color: transparent !important;
    pointer-events: none !important;
}

.woocommerce-EditAccountForm button.button.mk-btn-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: mk-spin 0.7s infinite linear;
}

@keyframes mk-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   ۱. بهینه‌سازی و تراز مرکز متن توضیحات نام نمایشی
   ========================================================================== */
.woocommerce-EditAccountForm span em {
    font-family: "Vazirmatn", sans-serif !important;
    font-style: normal !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: #666 !important;
    text-align: center !important; /* تراز کاملاً در مرکز */
    margin-top: 8px !important;
    display: block !important;
    line-height: 1.6 !important;
}

html[data-wp-dark-mode-active] .woocommerce-EditAccountForm span em {
    color: #a5a5a5 !important;
}


/* ==========================================================================
   ۲. فلش آیکونیک برجسته و مدرن (دایره‌ای با انیمیشن چرخش و تغییر رنگ)
   ========================================================================== */
.woocommerce-EditAccountForm fieldset legend::after {
    content: "" !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background-color: rgba(192, 17, 87, 0.08) !important;
    border: 1px solid rgba(192, 17, 87, 0.18) !important;
    /* آیکون وکتور SVG کاملاً واضح و باکیفیت */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='15' height='15' fill='%23C01157'%3E%3Cpath d='M11.9997 13.1714L16.9495 8.22168L18.3637 9.63589L11.9997 15.9999L5.63574 9.63589L7.04996 8.22168L11.9997 13.1714Z'%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* افکت هنگام باز شدن آکاردئون (چرخش ۱۸۰ درجه و پررنگ شدن پس‌زمینه فلش) */
.woocommerce-EditAccountForm fieldset legend.is-open::after {
    transform: rotate(180deg) !important;
    background-color: #C01157 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='15' height='15' fill='%23ffffff'%3E%3Cpath d='M11.9997 13.1714L16.9495 8.22168L18.3637 9.63589L11.9997 15.9999L5.63574 9.63589L7.04996 8.22168L11.9997 13.1714Z'%3E%3C/path%3E%3C/svg%3E") !important;
}

/* حالت شب برای فلش */
html[data-wp-dark-mode-active] .woocommerce-EditAccountForm fieldset legend::after {
    background-color: rgba(192, 17, 87, 0.2) !important;
    border-color: rgba(192, 17, 87, 0.4) !important;
}

/* ۸. بهینه‌سازی ریسپانسیو در موبایل */
@media (max-width: 768px) {
    .woocommerce-EditAccountForm {
        padding: 20px 15px !important;
    }
    
    /* تبدیل دو فیلد اول به حالت تمام‌عرض در موبایل */
    .woocommerce-EditAccountForm p.form-row-first,
    .woocommerce-EditAccountForm p:has(#account_display_name) {
        width: 100% !important;
        float: none !important;
    }

    .woocommerce-EditAccountForm fieldset {
        padding: 14px 16px !important;
    }
}


/* ====================================================================================================
   -------------------------- #15: My Account - Orders List Table & Order Cards ------------------------
   ==================================================================================================== */

/*--- #15: My Account - Orders List Table & Order Cards ---*/

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۱: ساختار کلی و کارت سفارش (Desktop Grid Layout)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ۱.۱. حذف کامل سربرگ جدول */
.woocommerce-orders-table thead {
    display: none !important;
}

.woocommerce-orders-table {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    border-collapse: separate !important;
}

.woocommerce-orders-table tbody {
    display: block !important;
    width: 100% !important;
}

/* ۱.۲. کارت اصلی سفارش (تثبیت ۱۰۰٪ مختصات افقی و عمودی بدون لغزش) */
.woocommerce-orders-table tr.woocommerce-orders-table__row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 1px solid #e5e7eb !important;
    border-right-style: solid !important;
    border-right-width: 6px !important; /* نوار وضعیت لبه راست */
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.03) !important;
    padding: 14px 16px !important;
    margin-bottom: 14px !important;
    gap: 8px !important;
    position: relative !important;
    
    /* تثبیت دقیق رندرینگ جهت رفع قطعی هرگونه لغزش افقی و عمودی */
    transform-origin: center center !important;
    transform: perspective(1000px) translate3d(0, 0, 0) scale(1) !important;
    -webkit-transform: perspective(1000px) translate3d(0, 0, 0) scale(1) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    will-change: transform, box-shadow, border-color;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease !important;
    z-index: 1;
}

/* رفع خطای شکست هندسی ساب‌پیکسل و لرزش فونت‌ها */
.woocommerce-orders-table tr.woocommerce-orders-table__row,
.woocommerce-orders-table tr.woocommerce-orders-table__row * {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: geometricPrecision !important;
}

/* ایزوله‌سازی تمام آیکون‌ها برای جلوگیری از جابجایی افقی موقع Scale */
.woocommerce-orders-table tr.woocommerce-orders-table__row::before,
.woocommerce-orders-table tr.woocommerce-orders-table__row::after,
.woocommerce-orders-table tr.woocommerce-orders-table__row a::before,
.woocommerce-orders-table tr.woocommerce-orders-table__row span::before {
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* هاور کارت سفارش: بزرگ‌شدن متقارن، بدون لغزش افقی */
.woocommerce-orders-table tr.woocommerce-orders-table__row:hover {
    box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.1) !important;
    transform: perspective(1000px) translate3d(0, 0, 0) scale(1.026) !important;
    border-color: rgba(192, 17, 87, 0.35) !important;
    border-right-color: #C01157 !important;
    z-index: 10 !important;
}

/* آیکون فلش (Chevron) در منتهی‌الیه چپ کارت */
.woocommerce-orders-table tr.woocommerce-orders-table__row::after {
    order: 7 !important;
    content: '';
    display: inline-block;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / 13px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / 13px;
    margin-right: 6px !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.28s ease !important;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row:hover::after {
    background-color: #C01157;
    border-color: #C01157;
    box-shadow: 0 4px 14px rgba(192, 17, 87, 0.4);
    transform: translateX(-4px) scale(1.22) !important;
}

/* ۱.۳. ریست استایل سلول‌ها */
.woocommerce-orders-table td, 
.woocommerce-orders-table th.woocommerce-orders-table__cell {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۲: نوار رنگی وضعیت سفارش در لبه راست کارت
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-orders-table tr.woocommerce-orders-table__row--status-cancelled,
.woocommerce-orders-table tr.woocommerce-orders-table__row--status-failed {
    border-right-color: #ef4444 !important;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row--status-pending,
.woocommerce-orders-table tr.woocommerce-orders-table__row--status-on-hold {
    border-right-color: #f59e0b !important;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row--status-processing {
    border-right-color: #0284c7 !important;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row--status-completed {
    border-right-color: #10b981 !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۳: ستون‌های شناختی (شماره سفارش، تاریخ، عکس‌ها)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ۳.۱. شماره سفارش */
.woocommerce-orders-table__cell-order-number {
    order: 1;
    width: 72px !important;
    flex-shrink: 0;
}

.woocommerce-orders-table__cell-order-number a {
    background: transparent !important;
    border: none !important;
    color: #111827 !important;
    font-size: 14.5px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    transition: color 0.2s ease;
}

.woocommerce-orders-table__cell-order-number a::before {
    content: '';
    display: inline-block;
    width: 16px !important;
    height: 16px !important;
    background-color: #4b5563;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cline x1='8' y1='8' x2='16' y2='8'/%3E%3Cline x1='8' y1='12' x2='14' y2='12'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cline x1='8' y1='8' x2='16' y2='8'/%3E%3Cline x1='8' y1='12' x2='14' y2='12'/%3E%3C/svg%3E") no-repeat center / contain;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row:hover .woocommerce-orders-table__cell-order-number a {
    color: #C01157 !important;
}

.woocommerce-orders-table tr.woocommerce-orders-table__row:hover .woocommerce-orders-table__cell-order-number a::before {
    background-color: #C01157;
}

/* ۳.۲. تاریخ ثبت سفارش (رفع کامل پنهان‌شدن و لغزش آیکون تقویم) */
.woocommerce-orders-table__cell-order-date {
    order: 2;
    width: 136px !important;      /* فضای کافی برای قرارگیری کامل آیکون و متن بدون برخورد به لبه */
    min-width: 136px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 30px !important;
    padding: 5px 10px !important;
    color: #334155 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    overflow: visible !important; /* جلوگیری از برش لبه‌های آیکون توسط پس‌زمینه */
    box-sizing: border-box !important;
}

/* ایزوله‌سازی آیکون تقویم و جلوگیری از فشرده‌شدن آن */
.woocommerce-orders-table__cell-order-date::before {
    content: '';
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    flex-shrink: 0 !important;     /* جلوگیری از له شدن یا تغییر ابعاد آیکون */
    background-color: #C01157;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
    transform: translateZ(0) !important;
}

/* ۳.۳. تصاویر محصولات (رزرو ۲۰۸ پیکسل جهت رفع تداخل با قیمت) */
.woocommerce-orders-table__cell-order-thumbs {
    order: 3;
    flex: 0 0 208px !important;
    width: 208px !important;
    min-width: 208px !important;
    max-width: 208px !important;
    direction: rtl !important;
    justify-content: flex-start !important;
}

.custom-order-thumbs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px !important;
    width: 100%;
    direction: rtl !important;
}

.custom-order-thumbs .thumb-item {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.custom-order-thumbs .thumb-item:hover {
    transform: scale(1.05);
}

.custom-order-thumbs .thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* نشانگر اقلام بیشتر (+) */
.custom-order-thumbs .thumb-more {
    width: 44px !important;
    height: 44px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
    font-weight: 800;
    background: #f1f5f9;
    color: #475569;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    flex-shrink: 0;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۴: ستون قیمت (استایل پریمیوم و بدون تغییر مکان)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-orders-table__cell-order-total {
    order: 4;
    flex-shrink: 0;
    background: #fff1f6 !important;
    border: 1px solid rgba(192, 17, 87, 0.18) !important;
    border-radius: 14px !important;
    padding: 6px 14px !important;
    font-size: 0 !important;
    white-space: nowrap;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(192, 17, 87, 0.04) !important;
}

.woocommerce-orders-table__cell-order-total .woocommerce-Price-amount {
    color: #C01157 !important;
    font-size: 16.5px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    direction: rtl !important;
    display: inline-block !important;
}

.woocommerce-orders-table__cell-order-total .woocommerce-Price-currencySymbol {
    color: #C01157 !important;
    font-size: 13px !important;
    margin-right: 3px !important;
    font-weight: 800 !important;
}

.woocommerce-orders-table__cell-order-total .order-count {
    display: none !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۵: دکمه‌های عملیات و وضعیت سفارش
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ۵.۱. دکمه‌های عملیات */
.woocommerce-orders-table__cell-order-actions {
    order: 5;
    margin-right: auto !important;
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    flex-shrink: 0;
}

.woocommerce-orders-table__cell-order-actions a.button {
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

/* دکمه پرداخت */
.woocommerce-orders-table__cell-order-actions a.button.pay {
    border-radius: 50px !important;
    padding: 6px 11px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #C01157 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 3px 8px rgba(192, 17, 87, 0.25) !important;
}

.woocommerce-orders-table__cell-order-actions a.button.pay::before {
    content: '';
    display: inline-block;
    width: 13px !important;
    height: 13px !important;
    background-color: #ffffff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
}

.woocommerce-orders-table__cell-order-actions a.button.pay:hover {
    background: #9f0c47 !important;
    box-shadow: 0 5px 14px rgba(192, 17, 87, 0.35) !important;
}

/* دکمه لغو */
.woocommerce-orders-table__cell-order-actions a.button.cancel {
    border-radius: 50px !important;
    padding: 6px 11px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

.woocommerce-orders-table__cell-order-actions a.button.cancel::before {
    content: '';
    display: inline-block;
    width: 11px !important;
    height: 11px !important;
    background-color: #64748b;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center / contain;
}

.woocommerce-orders-table__cell-order-actions a.button.cancel:hover {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    background: #fef2f2 !important;
}

.woocommerce-orders-table__cell-order-actions a.button.cancel:hover::before {
    background-color: #ef4444;
}

/* دکمه آیکونی سفارش دوباره (تراز ۱۰۰٪ ریاضی در مرکز دایره) */
.woocommerce-orders-table__cell-order-actions a.button.order-again {
    position: relative !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    font-size: 0 !important;
    display: inline-block !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
    flex-shrink: 0 !important;
}

/* آیکون با مختصات مطلق در مرکز دقیق */
.woocommerce-orders-table__cell-order-actions a.button.order-again::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: #64748b;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.3'%3E%3Cpath d='M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.3'%3E%3Cpath d='M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease !important;
}

/* هاور دکمه سفارش دوباره: افکت جهش جذاب و چرخش آیکون */
.woocommerce-orders-table__cell-order-actions a.button.order-again:hover {
    background: #fff1f6 !important;
    border-color: rgba(192, 17, 87, 0.25) !important;
    box-shadow: 0 4px 12px rgba(192, 17, 87, 0.16) !important;
    transform: scale(1.08) !important;
}

.woocommerce-orders-table__cell-order-actions a.button.order-again:hover::before {
    background-color: #C01157;
    transform: translate(-50%, -50%) rotate(-180deg) !important;
}

/* تولتیپ (Tooltip) شناور بالای دکمه */
.woocommerce-orders-table__cell-order-actions a.button.order-again:hover::after {
    content: 'سفارش دوباره';
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 100;
    pointer-events: none;
    line-height: 1.4;
}

/* اسپینر بارگذاری دکمه سفارش دوباره */
.woocommerce-orders-table__cell-order-actions a.button.order-again.loading {
    background: #9f0c47 !important;
    border-color: #9f0c47 !important;
}

.woocommerce-orders-table__cell-order-actions a.button.order-again.loading::before,
.woocommerce-orders-table__cell-order-actions a.button.order-again.loading::after {
    display: none !important;
}

.woocommerce-orders-table__cell-order-actions a.button.order-again .spinner-icon {
    position: absolute;
    top: calc(50% - 7px);
    left: calc(50% - 7px);
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: wc-order-spin 0.6s linear infinite;
}

@keyframes wc-order-spin {
    to { transform: rotate(360deg); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۵.۲: نشان وضعیت سفارش (هماهنگ‌شده با رهسپار)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-orders-table__cell-order-status {
    order: 6;
    margin-right: 0 !important;
    margin-left: 0 !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 20px !important; /* پدینگ هماهنگ با رهسپار برای پوشش آزادانه متن */
    border-radius: 50px !important;
    font-size: 11.5px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    min-width: max-content !important; /* مانع فشردگی متن‌های بلند */
    text-align: center !important;
    line-height: 1.5 !important;
}

/* پالت رنگی وضعیت‌های استاندارد ووکامرس */
.woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
}

.woocommerce-orders-table__row--status-pending .woocommerce-orders-table__cell-order-status,
.woocommerce-orders-table__row--status-on-hold .woocommerce-orders-table__cell-order-status {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fcd34d !important;
}

.woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}

.woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۶: دکمه‌های صفحه‌بندی (قبلی و بعدی)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px !important;
    margin-top: 30px !important;
    padding-bottom: 20px !important;
}

.woocommerce-pagination a.woocommerce-button {
    background: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 50px !important;
    padding: 10px 24px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.25s ease-in-out !important;
    text-decoration: none !important;
}

.woocommerce-pagination a.woocommerce-button:hover {
    background: #C01157 !important;
    color: #ffffff !important;
    border-color: #C01157 !important;
    box-shadow: 0 6px 16px rgba(192, 17, 87, 0.25) !important;
    transform: translateY(-2px);
}

.woocommerce-pagination a.woocommerce-Button--next::after,
.woocommerce-pagination a.woocommerce-button--next::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
}

.woocommerce-pagination a.woocommerce-Button--previous::before,
.woocommerce-pagination a.woocommerce-button--previous::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۷: هماهنگی کامل حالت دارک‌مود (Dark Mode)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

html[data-wp-dark-mode-active] .woocommerce-orders-table tr.woocommerce-orders-table__row {
    background: #18181b !important;
    border-color: #27272a !important;
    box-shadow: none !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table tr.woocommerce-orders-table__row::after {
    background-color: #27272a;
    border-color: #3f3f46;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-number a {
    color: #f4f4f5 !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-number a::before {
    background-color: #a1a1aa !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-date {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #cbd5e1 !important;
}

html[data-wp-dark-mode-active] .custom-order-thumbs .thumb-item {
    background: #27272a !important;
    border-color: #3f3f46 !important;
}

html[data-wp-dark-mode-active] .custom-order-thumbs .thumb-more {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #d4d4d8 !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-total {
    background: rgba(192, 17, 87, 0.15) !important;
    border-color: rgba(192, 17, 87, 0.3) !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-actions a.button.cancel {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #d4d4d8 !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-actions a.button.order-again {
    background: #27272a !important;
    border-color: #3f3f46 !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-actions a.button.order-again::before {
    background-color: #94a3b8;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-actions a.button.order-again:hover {
    background: rgba(192, 17, 87, 0.18) !important;
    border-color: rgba(192, 17, 87, 0.35) !important;
}

html[data-wp-dark-mode-active] .woocommerce-orders-table__cell-order-actions a.button.order-again:hover::before {
    background-color: #f472b6;
}

html[data-wp-dark-mode-active] .woocommerce-pagination a.woocommerce-button {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #e4e4e7 !important;
    box-shadow: none !important;
}

html[data-wp-dark-mode-active] .woocommerce-pagination a.woocommerce-button:hover {
    background: #C01157 !important;
    color: #ffffff !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۸: رسپانسیو و استایل‌های نسخه موبایل (Mobile Responsive)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {

/* -------------------------------------------------------------
       ۱. منوی داشبورد در موبایل (حذف خطوط بین آیتم‌ها + کاهش فاصله تا کارت‌ها)
       ------------------------------------------------------------- */
    .woocommerce-MyAccount-navigation,
    .wd-my-account-sidebar {
        margin: 0 0 10px 0 !important; /* کاهش فاصله منو تا شروع کارت‌های سفارش */
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    /* حذف فاصله‌های بالای بخش محتوا/کارت‌ها */
    .woocommerce-MyAccount-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* عنوان MY ACCOUNT همراه با خط جداکننده زیر آن */
    .woocommerce-MyAccount-navigation > h4,
    .wd-my-account-sidebar > h4,
    .woocommerce-MyAccount-title,
    .wd-my-account-title,
    .woocommerce-MyAccount-navigation .title {
        display: block !important;
        text-align: center !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        color: #1e293b !important;
        letter-spacing: 0.5px !important;
        margin: 0 auto 12px auto !important;
        padding-bottom: 12px !important;
        border-bottom: 1px solid #f1f5f9 !important; /* تنها خط جداکننده مجاز */
    }

    /* لیست گزینه‌ها */
    .woocommerce-MyAccount-navigation ul {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background: transparent !important;
        border: none !important;
    }

    /* حذف کامل تمام خطوط و بوردرهای بین گزینه‌ها */
    .woocommerce-MyAccount-navigation ul li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;        /* حذف خطوط بین گزینه‌ها */
        border-bottom: none !important;
        border-top: none !important;
    }

    .woocommerce-MyAccount-navigation ul li::before,
    .woocommerce-MyAccount-navigation ul li::after {
        display: none !important;
        content: none !important;
    }

    /* ردیف‌های تمیز بدون خط جداکننده */
    .woocommerce-MyAccount-navigation ul li a {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        padding: 11px 14px !important;
        background: transparent !important;
        color: #334155 !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        border: none !important;
        border-radius: 12px !important;
        box-shadow: none !important;
        transition: background-color 0.2s ease !important;
    }

    /* فلش راهنما در سمت چپ هر ردیف */
    .woocommerce-MyAccount-navigation ul li a::after {
        content: '' !important;
        display: inline-block !important;
        width: 14px !important;
        height: 14px !important;
        background-color: #94a3b8 !important;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain !important;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain !important;
        margin-right: auto !important;
    }

    /* تب فعال با کادر کپسولی تمیز (رفع نهایی زائده هلالی وودمارت) */
    .woocommerce-MyAccount-navigation ul li.is-active a,
    .woocommerce-MyAccount-navigation ul li[class*="--orders"] a {
        background: #fff1f6 !important;
        color: #C01157 !important;
        font-weight: 800 !important;
        border: none !important;
        border-radius: 12px !important;
        margin: 2px 0 !important;
    }

    .woocommerce-MyAccount-navigation ul li.is-active a::after,
    .woocommerce-MyAccount-navigation ul li[class*="--orders"] a::after {
        background-color: #C01157 !important;
    }
    
    /* -------------------------------------------------------------
       ۲. ساختار کارت سفارش (تراز دقیق شماره و تاریخ)
       ------------------------------------------------------------- */
    .woocommerce-orders-table tr.woocommerce-orders-table__row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        /* شماره سفارش در راست و تاریخ در چپ */
        grid-template-areas:
            "number date"
            "status status"
            "thumbs thumbs"
            "total total"
            "actions actions" !important;
        align-items: center !important;
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: 18px !important;
        border: 1px solid #e5e7eb !important;
        
        /* نوار رنگی بالای کارت */
        border-right-width: 1px !important;
        border-right-style: solid !important;
        border-right-color: #e5e7eb !important;
        border-top-width: 5px !important;
        border-top-style: solid !important;
        
        gap: 8px !important;
        transform: none !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04) !important;
        transition: border-top-color 0.25s ease !important;
    }

    .woocommerce-orders-table tr.woocommerce-orders-table__row:hover {
        transform: none !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
        border-top-color: #C01157 !important;
    }

    /* رنگ نوار بالای کارت‌ها */
    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-cancelled,
    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-failed {
        border-top-color: #ef4444 !important;
    }

    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-pending,
    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-on-hold {
        border-top-color: #f59e0b !important;
    }

    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-processing {
        border-top-color: #0284c7 !important;
    }

    .woocommerce-orders-table tr.woocommerce-orders-table__row--status-completed {
        border-top-color: #10b981 !important;
    }

    /* حذف برچسب‌های پیش‌فرض قالب */
    .woocommerce-orders-table td::before, 
    .woocommerce-orders-table th::before,
    .woocommerce-orders-table tr.woocommerce-orders-table__row::after {
        display: none !important;
        content: none !important;
    }


    /* -------------------------------------------------------------
       ۳. سطر اول: شماره سفارش (سمت راست) و تاریخ (سمت چپ)
       ------------------------------------------------------------- */
    .woocommerce-orders-table__cell-order-number {
        grid-area: number !important;
        justify-self: start !important; /* سمت راست در RTL */
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .woocommerce-orders-table__cell-order-number a {
        font-size: 16px !important;
        font-weight: 900 !important;
    }

    .woocommerce-orders-table__cell-order-date {
        grid-area: date !important;
        justify-self: end !important; /* سمت چپ در RTL */
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 30px !important;
        padding: 4px 10px !important;
        color: #475569 !important;
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    .woocommerce-orders-table__cell-order-date::before {
        width: 13px !important;
        height: 13px !important;
    }


    /* -------------------------------------------------------------
       ۴. سطر دوم: وضعیت سفارش (مستقل در مرکز و بالای عکس‌ها)
       ------------------------------------------------------------- */
    .woocommerce-orders-table__cell-order-status {
        grid-area: status !important;
        justify-self: center !important;
        width: fit-content !important;
        margin: 4px auto 2px auto !important;
        padding: 5px 18px !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        border-radius: 50px !important;
        line-height: 1.4 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }


    /* -------------------------------------------------------------
       ۵. سطر سوم: تصاویر محصولات (مرکزچین)
       ------------------------------------------------------------- */
    .woocommerce-orders-table__cell-order-thumbs {
        grid-area: thumbs !important;
        justify-self: center !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 4px 0 8px 0 !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    .custom-order-thumbs {
        gap: 8px !important;
        justify-content: center !important;
        width: 100%;
    }

    .custom-order-thumbs .thumb-item,
    .custom-order-thumbs .thumb-more {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
        flex-shrink: 0 !important;
    }


    /* -------------------------------------------------------------
       ۶. سطر چهارم: کادر قیمت (مرکزچین)
       ------------------------------------------------------------- */
    .woocommerce-orders-table__cell-order-total {
        grid-area: total !important;
        justify-self: stretch !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        background: #fff5f8 !important;
        border: 1px solid rgba(192, 17, 87, 0.15) !important;
        border-radius: 12px !important;
        padding: 8px 14px !important;
        margin: 2px 0 8px 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        box-sizing: border-box !important;
    }

    .woocommerce-orders-table__cell-order-total::before {
        display: inline-block !important;
        content: 'مبلغ کل سفارش:' !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #475569 !important;
    }

    .woocommerce-orders-table__cell-order-total .woocommerce-Price-amount {
        font-size: 16.5px !important;
        font-weight: 900 !important;
    }


    /* -------------------------------------------------------------
       ۷. سطر پنجم: دکمه‌های عملیات (پرداخت، لغو و سفارش دوباره)
       ------------------------------------------------------------- */
    .woocommerce-orders-table__cell-order-actions {
        grid-area: actions !important;
        justify-self: stretch !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        flex-direction: row !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button.pay,
    .woocommerce-orders-table__cell-order-actions a.button.cancel {
        flex: 1 !important;
        justify-content: center !important;
        padding: 9px 12px !important;
        font-size: 12px !important;
        border-radius: 50px !important;
    }

    /* دکمه سفارش دوباره */
    .woocommerce-orders-table__cell-order-actions a.button.order-again {
        width: auto !important;
        min-width: 160px !important;
        max-width: 240px !important;
        height: 38px !important;
        min-height: 38px !important;
        aspect-ratio: auto !important;
        border-radius: 50px !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        color: #C01157 !important;
        background: #fff1f6 !important;
        border: 1px solid rgba(192, 17, 87, 0.25) !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        padding: 0 20px !important;
        margin: 0 auto !important;
        line-height: normal !important;
        white-space: nowrap !important;
        transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
        transform: none !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button.order-again::before {
        position: static !important;
        transform: none !important;
        display: inline-block !important;
        background-color: #C01157 !important;
        width: 14px !important;
        height: 14px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        transition: transform 0.35s ease, background-color 0.25s ease !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button.order-again:hover {
        background: #C01157 !important;
        color: #ffffff !important;
        border-color: #C01157 !important;
        transform: none !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button.order-again:hover::before {
        background-color: #ffffff !important;
        position: static !important;
        transform: rotate(-180deg) !important;
    }

    .woocommerce-orders-table__cell-order-actions a.button.order-again:hover::after {
        display: none !important;
    }


    /* -------------------------------------------------------------
       ۸. صفحه‌بندی در موبایل
       ------------------------------------------------------------- */
    .woocommerce-pagination {
        gap: 8px !important;
        margin-top: 20px !important;
    }

    .woocommerce-pagination a.woocommerce-button {
        padding: 8px 18px !important;
        font-size: 12px !important;
    }
}


/* ====================================================================================================
   ----------------------- #16: My Account - View Order Details & Invoice Template ---------------------
   ==================================================================================================== */

/*--- #16: My Account - View Order Details & Invoice Template ---*/

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۱: نوار وضعیت سفارش (تایپوگرافی شیک، بدون کادرهای اضافی)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-MyAccount-content > p:has(mark.order-number),
.mk-main-notice {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    background: #ffffff !important;
    padding: 16px 24px !important;
    border-radius: 16px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 25px !important;
    color: #475569 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    gap: 4px !important;
    line-height: 1.8 !important;
}

.mk-main-notice mark {
    background: transparent !important;
}

/* شماره سفارش بدون کادر با فونت درشت تیره */
.mk-main-notice mark.order-number {
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    padding: 0 !important;
    border: none !important;
    letter-spacing: -0.5px !important;
}

/* تاریخ سفارش بدون کادر */
.mk-main-notice mark.order-date {
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    padding: 0 !important;
    border: none !important;
}

/* بج کپسولی وضعیت سفارش */
.mk-main-notice mark.order-status {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 16px !important;
    border-radius: 50px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    margin: 0 4px !important;
}

/* پالت رنگی وضعیت‌ها */
.mk-main-notice.status-cancelled mark.order-status,
.mk-main-notice.status-failed mark.order-status {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
}

.mk-main-notice.status-pending mark.order-status,
.mk-main-notice.status-on-hold mark.order-status {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fcd34d !important;
}

.mk-main-notice.status-processing mark.order-status {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}

.mk-main-notice.status-completed mark.order-status {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۲: کارت‌های اصلی و عناوین هدر (تراز در مرکز)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-order-details, 
.woocommerce-column--billing-address {
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02) !important;
    margin-bottom: 25px !important;
    overflow: hidden !important;
}

.woocommerce-order-details__title, 
.woocommerce-column--billing-address .woocommerce-column__title {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    margin: 0 !important;
    text-align: center !important;
}

.woocommerce-order-details__title::before { 
    content: "\f138" !important; 
    font-family: "woodmart-font" !important; 
    color: #C01157 !important; 
    font-size: 18px !important; 
}

.woocommerce-column--billing-address .woocommerce-column__title::before { 
    content: "\f139" !important; 
    font-family: "woodmart-font" !important; 
    color: #C01157 !important; 
    font-size: 18px !important; 
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۳: جدول اقلام (تقسیم دقیق ۵۰-۵۰ ستون‌ها جهت سنتر شدن بی‌نقص)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.shop_table.order_details {
    width: 100% !important;
    margin: 0 !important;
    border: none !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}

/* ردیف هدر جدول */
.shop_table.order_details thead tr {
    position: relative !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* عنوان «تعداد» در مرکز دقیق هدر (۵۰٪) */
.shop_table.order_details thead tr::after {
    content: 'تعداد' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    pointer-events: none !important;
}

.shop_table.order_details thead th {
    background: transparent !important;
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    border: none !important;
}

/* ستون سمت راست: دقیقاً ۵۰٪ عرض کل جدول */
.shop_table.order_details thead th.product-name {
    text-align: right !important;
    width: 50% !important;
    padding: 14px 42px 14px 28px !important; /* تراز دقیق با مرکز عکس محصول */
}

/* ستون سمت چپ: دقیقاً ۵۰٪ عرض کل جدول */
.shop_table.order_details thead th.product-total {
    font-size: 0 !important;
    text-align: left !important;
    width: 50% !important;
    padding: 14px 60px !important;
}

.shop_table.order_details thead th.product-total::before {
    content: 'قیمت' !important;
    font-size: 13px !important;
    color: #64748b !important;
    font-weight: 800 !important;
    display: inline-block !important;
}

/* ردیف محصولات با فاصله عمودی متناسب */
.shop_table.order_details tbody tr.order_item {
    position: relative !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.shop_table.order_details tbody td {
    padding: 12px 28px !important;
    vertical-align: middle !important;
}

/* ساختار تصویر محصول و نام */
.mk-order-product-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    text-align: right !important;
}

.mk-product-img img {
    width: 65px !important;
    height: 65px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    object-fit: cover !important;
}

.mk-product-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
}

.mk-product-title a {
    color: #1e293b !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

/* ویژگی‌های متغیر محصول (قرمز | S) در زیر نام و در راستای عکس */
.mk-inline-variations {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.mk-pipe {
    color: #cbd5e1 !important;
    font-size: 11px !important;
}

ul.wc-item-meta {
    display: none !important;
}

/* دایره تعداد در مرکز دقیق ردیف جدول */
.mk-qty-circle {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    color: #C01157 !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    border: 1px solid #e2e8f0 !important;
    z-index: 2 !important;
}

/* تراز چپ ستون قیمت‌ها (هم‌راستا با فوتر فاکتور) */
.shop_table.order_details tbody td.product-total {
    text-align: left !important;
    padding-left: 28px !important;
    width: 50% !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۴: فوتر فاکتور (تراز دقیق ۵۰٪ بج ارسال و مرکزچین قطعی دکمه‌ها)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* فعال‌سازی کانتینر مبنا جهت مرکزچین شدن قطعی دکمه‌ها در کل کارت */
.woocommerce-order-details,
.woocommerce-order-details .responsive-table {
    position: relative !important;
}

.shop_table.order_details tfoot {
    display: table-footer-group !important;
    width: 100% !important;
}

.shop_table.order_details tfoot tr {
    display: table-row !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* ستون‌های ۵۰٪ متقارن */
.shop_table.order_details tfoot th {
    display: table-cell !important;
    padding: 13px 28px !important;
    font-size: 13.5px !important;
    color: #475569 !important;
    font-weight: 700 !important;
    text-align: right !important;
    vertical-align: middle !important;
    width: 50% !important;
}

.shop_table.order_details tfoot td {
    display: table-cell !important;
    padding: 13px 28px !important;
    text-align: left !important;
    vertical-align: middle !important;
    width: 50% !important;
    position: relative !important; /* مبنای تراز برای بج ارسال */
}

/* مبالغ */
.woocommerce-Price-amount { 
    color: #C01157 !important; 
    font-weight: 900 !important; 
    font-size: 16.5px !important; 
}

/* سطر مجموع پرداختی شما */
.shop_table.order_details tfoot tr:has(.order-actions-button) ~ tr,
.shop_table.order_details tfoot tr:nth-last-child(3) {
    background: #fff5f8 !important;
}

.shop_table.order_details tfoot tr:nth-last-child(3) th,
.shop_table.order_details tfoot tr:nth-last-child(3) td {
    padding: 16px 28px !important;
}

.shop_table.order_details tfoot tr:nth-last-child(3) .woocommerce-Price-amount {
    font-size: 20px !important;
}

/* 🌟 بج روش ارسال: ابعاد دقیق فشرده و قفل‌شده در مرکز دقیق فاکتور (خط ۵۰٪) 🌟 */
.mk-ship-method-box {
    position: absolute !important;
    right: 0 !important;           /* قرارگیری در مرز ۵۰٪ جدول */
    top: 50% !important;
    transform: translate(50%, -50%) !important; /* سنتر دقیق نسبت به کل عرض کارت */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 4px 24px !important;
    height: 30px !important;
    width: max-content !important; /* حذف عرض اضافی و چسبیدن به محتوا */
    min-width: 0 !important;
    box-sizing: border-box !important;
    z-index: 2 !important;
}

.mk-ship-method-box .mk-ship-logo-img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
    margin-left: 6px !important;
}

.mk-ship-method-box .mk-ship-icon {
    width: 16px !important;
    height: 16px !important;
    stroke: #64748b !important;
    margin-left: 6px !important;
}

.mk-ship-method-box .mk-ship-text {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* هزینه ارسال در سمت چپ */
.mk-shipping-cost-left {
    display: inline-block !important;
    text-align: left !important;
}

.pixit-cost-txt.paskeraye {
    color: #b45309 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

.pixit-cost-txt.free {
    color: #15803d !important;
    font-weight: 800 !important;
    font-size: 13px !important;
}

/* بج روش پرداخت در سمت چپ */
.mk-payment-method-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 4px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-left: -5px !important;
}

.mk-payment-method-badge::before {
    content: '' !important;
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    background-color: #C01157 !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

/* 🌟 ردیف دکمه‌های عملیات: رزرو ارتفاع و خروج قطعی از ساختار ۲ ستونه جدول 🌟 */
.woocommerce-order-details table.shop_table.order_details {
    margin-bottom: 75px !important; /* ایجاد فضای اختصاصی زیر جدول جهت میزبانی دکمه‌ها */
}

.woocommerce-order-details table.shop_table.order_details tfoot tr:last-child {
    border: none !important;
    height: 0 !important;
    line-height: 0 !important;
    background: transparent !important;
}

.woocommerce-order-details table.shop_table.order_details tfoot tr:last-child th,
.order-actions--heading {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* کانتینر دکمه‌ها: ۱۰۰٪ عرض کل کارت فاکتور و تراز در مرکز مطلق */
.woocommerce-order-details table.shop_table.order_details tfoot tr:last-child td {
    position: absolute !important;
    bottom: 20px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    justify-content: center !important; /* سنتر صددرصد در کل عرض باکس */
    align-items: center !important;
    gap: 12px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    border: none !important;
    background: transparent !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
}

/* دکمه‌های پرداخت و سفارش دوباره */
.order-actions-button.pay,
.woocommerce-order-details a.button.pay,
.order-actions-button.order-again,
.woocommerce-order-details a.button.order-again {
    min-width: 190px !important;
    height: 44px !important;
    border-radius: 50px !important;
    padding: 0 28px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #C01157 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(192, 17, 87, 0.28) !important;
    text-decoration: none !important;
    border: none !important;
    margin: 0 !important;
    transition: all 0.25s ease !important;
}

/* آیکون پرداخت */
.order-actions-button.pay::before,
.woocommerce-order-details a.button.pay::before {
    content: '' !important;
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    background-color: #ffffff !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") no-repeat center / contain !important;
    margin-left: 8px !important;
}

/* آیکون سفارش دوباره با انیمیشن چرخش */
.order-actions-button.order-again::before,
.woocommerce-order-details a.button.order-again::before {
    content: '' !important;
    display: inline-block !important;
    width: 15px !important;
    height: 15px !important;
    background-color: #ffffff !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cpath d='M21.5 2v6h-6M2.5 22v-6h6M2 11.5a10 10 0 0 1 18.8-4.3M22 12.5a10 10 0 0 1-18.8 4.2'/%3E%3C/svg%3E") no-repeat center / contain !important;
    margin-left: 8px !important;
    transition: transform 0.35s ease !important;
}

.order-actions-button.pay:hover,
.woocommerce-order-details a.button.pay:hover,
.order-actions-button.order-again:hover,
.woocommerce-order-details a.button.order-again:hover {
    background: #9f0c47 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(192, 17, 87, 0.38) !important;
}

.order-actions-button.order-again:hover::before,
.woocommerce-order-details a.button.order-again:hover::before {
    transform: rotate(-180deg) !important;
}

/* دکمه لغو با آیکون ضربدر */
.order-actions-button.cancel,
.woocommerce-order-details a.button.cancel {
    min-width: auto !important;
    height: 40px !important;
    border-radius: 50px !important;
    padding: 0 18px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.order-actions-button.cancel::before,
.woocommerce-order-details a.button.cancel::before {
    content: '' !important;
    display: inline-block !important;
    width: 12px !important;
    height: 12px !important;
    background-color: #64748b !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center / contain !important;
    margin-left: 6px !important;
}

.order-actions-button.cancel:hover,
.woocommerce-order-details a.button.cancel:hover {
    background: #fef2f2 !important;
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.order-actions-button.cancel:hover::before,
.woocommerce-order-details a.button.cancel:hover::before {
    background-color: #ef4444 !important;
}

/* حذف دکمه تکراری خارج از جدول */
.woocommerce-order-details ~ p.order-again,
p.order-again:not(.in-table) {
    display: none !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۵: کارت آدرس صورتحساب
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.woocommerce-customer-details address { 
    padding: 24px !important; 
    font-style: normal !important; 
    border: none !important; 
}

.mk-row { 
    display: flex !important; 
    align-items: center !important; 
    gap: 12px !important; 
    margin-bottom: 12px !important; 
    font-size: 14px !important; 
    color: #334155 !important;
}

.mk-name-row { 
    font-weight: 900 !important; 
    font-size: 16px !important; 
    color: #111827 !important; 
    margin-bottom: 16px !important; 
}

.mk-row i { 
    color: #C01157 !important; 
    width: 20px; 
    text-align: center; 
    font-size: 16px; 
}

.mk-woodmart-icon::before { 
    content: "\f139" !important; 
    font-family: "woodmart-font" !important; 
    font-size: 18px !important; 
}

.woocommerce-column--shipping-address { 
    display: none !important; 
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۶: هماهنگی کامل حالت دارک‌مود (Dark Mode)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

html[data-wp-dark-mode-active] .mk-main-notice,
html[data-wp-dark-mode-active] .woocommerce-order-details, 
html[data-wp-dark-mode-active] .woocommerce-column--billing-address {
    background: #18181b !important;
    border-color: #27272a !important;
}

html[data-wp-dark-mode-active] .mk-main-notice mark.order-number,
html[data-wp-dark-mode-active] .mk-product-title a,
html[data-wp-dark-mode-active] .mk-name-row {
    color: #f4f4f5 !important;
}

html[data-wp-dark-mode-active] .mk-main-notice mark.order-date,
html[data-wp-dark-mode-active] .mk-row,
html[data-wp-dark-mode-active] .mk-inline-variations {
    color: #cbd5e1 !important;
}

html[data-wp-dark-mode-active] .woocommerce-order-details__title, 
html[data-wp-dark-mode-active] .woocommerce-column--billing-address .woocommerce-column__title,
html[data-wp-dark-mode-active] .shop_table.order_details thead tr {
    background: #27272a !important;
    border-bottom-color: #3f3f46 !important;
}

html[data-wp-dark-mode-active] .shop_table.order_details thead th,
html[data-wp-dark-mode-active] .shop_table.order_details thead tr::after {
    color: #cbd5e1 !important;
}

html[data-wp-dark-mode-active] .mk-product-img img,
html[data-wp-dark-mode-active] .mk-qty-circle,
html[data-wp-dark-mode-active] .mk-ship-method-box,
html[data-wp-dark-mode-active] .mk-payment-method-badge {
    background: #202020 !important;
    border-color: #3f3f46 !important;
    color: #e2e8f0 !important;
}

html[data-wp-dark-mode-active] .order-actions-button.cancel {
    background: #27272a !important;
    border-color: #3f3f46 !important;
    color: #cbd5e1 !important;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   بخش ۷: رسپانسیو کامل موبایل (Mobile Responsive)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {

    /* ۱. باکس وضعیت سفارش: لغو فلکس دسکتاپ، تراز دوطرفه (Justify) و مرکزچین شدن سطر دوم */
    .woocommerce-MyAccount-content > p:has(mark.order-number),
    .mk-main-notice { 
        display: block !important;             /* خروج قطعی از فلکس دسکتاپ جهت فعال‌سازی Justify */
        font-size: 12.5px !important; 
        padding: 14px 16px !important; 
        text-align: justify !important;        /* تراز کامل دوطرفه خط اول */
        text-justify: inter-word !important;   /* توزیع یکدست فاصله بین کلمات */
        text-align-last: center !important;   /* مرکزچین شدن سطر پایانی حاوی بج وضعیت */
        line-height: 2.1 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .woocommerce-MyAccount-content > p:has(mark.order-number)::before,
    .mk-main-notice::before {
        display: inline-block !important;
        vertical-align: middle !important;
        margin-left: 6px !important;
        margin-bottom: 3px !important;
    }

    .mk-main-notice mark.order-number {
        display: inline !important;
        font-size: 14px !important;
        font-weight: 900 !important;
        margin: 0 2px !important;
    }

    .mk-main-notice mark.order-date {
        display: inline !important;
        font-weight: 800 !important;
        margin: 0 2px !important;
    }

    .mk-main-notice mark.order-status {
        display: inline-flex !important;
        vertical-align: middle !important;
        margin: 0 4px !important;
        padding: 2px 14px !important;
        height: 25px !important;
        line-height: 23px !important;
        font-size: 11.5px !important;
    }


    /* ۲. هدر جدول (مخفی شدن عنوان مجموع و فاصله استاندارد عنوان "قیمت" از لبه) */
    .shop_table.order_details thead th.product-name {
        width: 55% !important;
        padding: 10px 14px 10px 0 !important;
        font-size: 11.5px !important;
        text-align: right !important;
    }

    .shop_table.order_details thead th.product-total {
        width: 45% !important;
        padding: 10px 18px 10px 42px !important; /* فاصله مناسب از لبه چپ */
        font-size: 0 !important;                 /* مخفی‌سازی متن پیش‌فرض "قیمت مجموع" */
        text-align: left !important;
    }

    .shop_table.order_details thead th.product-total::before {
        content: 'قیمت' !important;
        font-size: 11.5px !important;
        color: #64748b !important;
        font-weight: 800 !important;
    }

    .shop_table.order_details thead tr::after {
        left: 45% !important;
        font-size: 11px !important;
    }


    /* ۳. بدنه اقلام سفارش (نزدیک شدن تصویر به حاشیه و تک‌خطی شدن نام محصول) */
    .shop_table.order_details tbody td { 
        padding: 12px 10px !important; 
    }

    .shop_table.order_details tbody td.product-name {
        padding-right: 6px !important;
    }

    .mk-order-product-wrapper {
        gap: 8px !important;
    }

    .mk-product-img img { 
        width: 48px !important; 
        height: 48px !important; 
        border-radius: 10px !important;
    }

    .mk-product-title a { 
        font-size: 12.5px !important; 
        white-space: nowrap !important; /* جلوگیری قطعی از دوخطی شدن نام محصول */
    }

    .mk-inline-variations {
        font-size: 10.5px !important;
        white-space: nowrap !important;
    }

    .mk-qty-circle {
        left: 45% !important;
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    /* ستون قیمت اقلام در جدول */
    .shop_table.order_details tbody td.product-total {
        padding-left: 14px !important;
        padding-right: 0 !important;
        text-align: left !important;
    }

    .shop_table.order_details tbody td.product-total .woocommerce-Price-amount {
        font-size: 13.5px !important;
    }


    /* ۴. فوتر فاکتور (تراز عمودی دقیق ستون مبالغ با بالای جدول و رفع انحراف سطر مجموع) */
    .shop_table.order_details tfoot th {
        font-size: 11.5px !important;
        padding: 12px 10px !important;
        width: 55% !important;
        text-align: right !important;
    }

    .shop_table.order_details tfoot td {
        font-size: 11.5px !important;
        padding: 12px 14px !important;
        width: 45% !important;
        text-align: left !important;
    }

    /* ردیف اختصاصی مجموع پرداختی شما */
    .shop_table.order_details tfoot tr:nth-last-child(3) th {
        padding: 14px 10px !important;
    }

    .shop_table.order_details tfoot tr:nth-last-child(3) td {
        padding: 14px 14px !important; /* تراز ۱۰۰٪ در امتداد ستون قیمت‌های بالا */
    }

    .shop_table.order_details tfoot .woocommerce-Price-amount { 
        font-size: 14.5px !important; 
    }

    .shop_table.order_details tfoot tr:nth-last-child(3) .woocommerce-Price-amount { 
        font-size: 16.5px !important; 
    }


    /* ۵. بج روش ارسال (قرارگیری دقیق در مرکز ردیف و بدون تداخل با مبلغ) */
    .mk-ship-method-box {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
        top: 50% !important;
        transform: translate(50%, -50%) !important;
        padding: 2px 10px !important;
        height: 25px !important;
        margin: 0 !important;
        z-index: 5 !important;
        white-space: nowrap !important;
    }

    .mk-ship-method-box .mk-ship-text {
        font-size: 10.5px !important;
    }

    .mk-ship-method-box .mk-ship-icon,
    .mk-ship-method-box .mk-ship-logo-img {
        width: 14px !important;
        height: 14px !important;
        margin-left: 4px !important;
    }


    /* ۶. دکمه‌های عملیات فاکتور (تراز کامل در مرکز عمودی فضای پایین) */
    .woocommerce-order-details table.shop_table.order_details {
        margin-bottom: 72px !important;
    }

    .woocommerce-order-details table.shop_table.order_details tfoot tr:last-child td {
        bottom: 15px !important;
        top: auto !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 16px !important;
    }

    .order-actions-button.order-again,
    .woocommerce-order-details a.button.order-again,
    .order-actions-button.pay,
    .woocommerce-order-details a.button.pay {
        min-width: 180px !important;
        height: 42px !important;
        font-size: 12.5px !important;
        margin: 0 auto !important;
    }


    /* ۷. کارت آدرس صورتحساب: تقارن کامل، حذف فاصله‌های کاذب قالب و تنظیم فواصل یکدست با Flex-Gap */
    .woocommerce-customer-details address { 
        padding: 16px 18px !important; 
        display: flex !important;
        flex-direction: column !important;     /* ساختار ستونی منظم */
        gap: 8px !important;                  /* فاصله کاملاً برابر، متقارن و یکدست (۸ پیکسل) بین تمام ردیف‌ها */
    }

    /* حذف تگ‌های <br> پیش‌فرض قالب که فواصل نابرابر ایجاد می‌کردند */
    .woocommerce-customer-details address br {
        display: none !important;
    }

    /* صفر کردن مارجین‌های مزاحم جهت اجرای دقیق فاصله ۸ پیکسلی */
    .woocommerce-customer-details address > *,
    .woocommerce-customer-details address .mk-row,
    .woocommerce-customer-details address .mk-name-row,
    .woocommerce-customer-details address p {
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.35 !important;
    }

    .woocommerce-customer-details address .mk-row,
    .woocommerce-customer-details address .mk-name-row {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        font-size: 12.5px !important;
    }

    .woocommerce-customer-details address .mk-name-row {
        font-size: 14.5px !important;
        font-weight: 900 !important;
    }

    /* ردیف آدرس متنی (دو خطی) */
    .woocommerce-customer-details address .mk-row:last-child {
        align-items: flex-start !important;
        text-align: justify !important;
        text-align-last: right !important;
        line-height: 1.7 !important;
    }

    .woocommerce-customer-details address .mk-row:last-child i,
    .woocommerce-customer-details address .mk-row:last-child .mk-woodmart-icon {
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }
}
