/* =========================================
   1. تعریف فونت انگلیسی (مخصوص اصلاح مدل‌ها و حروف لاتین)
========================================= */
@font-face {
    font-family: 'Yekan Bakh En';
    src: url('fonts/YekanBakh-en.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Yekan Bakh En';
    src: url('fonts/YekanBakh-SemiBold-en.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   2. تعریف فونت فارسی FaNum (همان کدهای خودتان)
========================================= */
@font-face {
    font-family: 'Yekan Bakh';
    src: url('fonts/Yekan Bakh FaNum 04 Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Yekan Bakh';
    src: url('fonts/Yekan Bakh FaNum 05 Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Yekan Bakh';
    src: url('fonts/Yekan Bakh FaNum 06 Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Yekan Bakh';
    src: url('fonts/Yekan Bakh FaNum 07 Heavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   3. متغیرها و مدیریت هوشمند فونت‌ها
========================================= */
:root {
    --primary-color: #00774a;
    --secondary-color: #f2f2f2;
    --text-color: #333333;
    --text-light: #777777;
    --bg-color: #fafafa;
    --white: #ffffff;
    --radius: 12px;
    
    /* فونت پیش‌فرض سایت: اولویت با فارسی است تا قیمت‌ها و تاریخ‌ها شمسی/فارسی بمانند */
    --font-family: 'Yekan Bakh', Tahoma, Arial, sans-serif;
    
    /* فونت ترکیبی هوشمند: اولویت با انگلیسی است تا در مدل‌های کالا، اعداد و حروف انگلیسی هم‌تراز بمانند */
    --font-mixed: 'Yekan Bakh En', 'Yekan Bakh', Tahoma, Arial, sans-serif;
}

/* اعمال فونت پیش‌فرض به متون عادی سایت */
body, p, span, div, li, ul, input, button, textarea, select, table, th, td, strong, b {
    font-family: var(--font-family) !important;
}

/* =========================================
   4. حل مشکل به هم ریختگی عناوین و مدل‌های انگلیسی
========================================= */
/* اعمال فونت ترکیبی به تمامی تیترها و نام محصولات در فروشگاه و سبد خرید */
h1, h2, h3, h4, h5, h6, 
.product_title, 
.woocommerce-loop-product__title,
.product-name a,
.card-title a {
    font-family: var(--font-mixed) !important;
    unicode-bidi: isolate !important; /* معجزه CSS: جلوگیری از جابجایی جایگاه کلمات فارسی و انگلیسی در کنار هم */
    line-height: 1.8 !important;
}

/* در صورت نیاز به استفاده در متون داخل مقاله، می‌توانید این کلاس را به متن بدهید */
.en-model-text {
    font-family: var(--font-mixed) !important;
    unicode-bidi: isolate !important;
    display: inline-block;
}

/* ریست و تنظیمات پایه */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* هدر و تاپ‌بار */
.topbar { background: var(--primary-color); color: var(--white); text-align: center; font-size: 12px; padding: 5px 0; }
.main-header { background: var(--white); padding: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-branding img { max-height: 50px; }
.header-search { flex: 1; max-width: 600px; }
/* اصلاح ردیوس باکس جستجو */
.fast-search-form { 
    display: flex; 
    background: var(--secondary-color); 
    border-radius: 5px; /* تغییر به 5 پیکسل */
    overflow: hidden; 
    border: 1px solid #e0e0e0;
}
.search-field { width: 100%; border: none; background: transparent; padding: 12px 20px; font-family: inherit; outline: none; }
.search-submit { background: var(--primary-color); border: none; color: white; padding: 0 25px; cursor: pointer; }
.header-actions { display: flex; gap: 15px; }
/* تنظیمات دراپ‌داون مدرن */
.search-dropdown {
    position: absolute; top: 110%; left: 0; width: 100%;
    background: var(--white); border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #eee;
    z-index: 1000; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.3s ease;
    overflow: hidden; /* مخفی کردن اورفلو اصلی برای گرد ماندن لبه‌ها */
}
.search-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* بخش اسکرول‌خور نتایج */
.search-results-scrollable {
    max-height: 400px; /* ارتفاع برای نمایش حدوداً 5 الی 6 محصول و اسکرول بقیه */
    overflow-y: auto;
}

/* استایل اسکرول‌بار اختصاصی */
.search-results-scrollable::-webkit-scrollbar { width: 6px; }
.search-results-scrollable::-webkit-scrollbar-track { background: #f9f9f9; }
.search-results-scrollable::-webkit-scrollbar-thumb { background: #d1d1d1; border-radius: 10px; }
.search-results-scrollable::-webkit-scrollbar-thumb:hover { background: #b1b1b1; }

.search-results-list { list-style: none; margin: 0; padding: 0; }
.search-results-list li { border-bottom: 1px solid #f5f5f5; }
.search-results-list li:last-child { border-bottom: none; }

/* استایل آیتم‌های محصول */
.search-item { display: flex; align-items: center; padding: 12px 15px; gap: 15px; transition: background 0.2s; }
.search-item:hover { background: #f4f9f7; }

.search-item-img { flex-shrink: 0; }
.search-item-img img { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; border: 1px solid #eee; padding: 2px; }

.search-item-info { display: flex; flex-direction: column; width: 100%; }
.search-item-title { font-size: 13px; font-weight: 500; color: var(--text-color); margin-bottom: 5px; line-height: 1.4; }

/* هایلایت کلمه جستجو شده (مارک) */
.search-item-title mark { 
    background: rgba(0, 119, 74, 0.1); 
    color: var(--primary-color); 
    padding: 0 2px; 
    font-weight: bold; 
    border-radius: 2px;
}

.search-item-price { font-size: 14px; font-weight: bold; color: var(--primary-color); display: flex; gap: 5px; align-items: center; }
.search-item-price del { font-size: 11px; color: var(--text-light); font-weight: normal; }

/* استایل دکمه مشاهده همه */
.search-view-all-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: #f9f9f9;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 13px;
    border-top: 1px solid #eee;
    transition: 0.3s;
}
.search-view-all-btn:hover { background: var(--primary-color); color: #fff; }
/* =========================================
   استایل‌های جدید استوری (بزرگ‌تر و واضح‌تر)
========================================= */
.stories-section { padding: 20px 0; position: relative; }
.stories-carousel { padding: 10px 40px !important; } /* فضا برای فلش‌ها */
.story-box { width: 100px !important; text-align: center; cursor: pointer; }
.story-ring {
    width: 90px; height: 90px; margin: 0 auto; border-radius: 50%;
    padding: 3px; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.story-ring img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 3px solid var(--white); }
.story-title { display: block; font-size: 13px; margin-top: 8px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* فلش‌های کروسل استوری */
.stories-nav-prev, .stories-nav-next { 
    position: absolute; top: 45%; transform: translateY(-50%); width: 35px; height: 35px; 
    background: #fff; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.15); 
    z-index: 10; display: flex; align-items: center; justify-content: center; cursor: pointer; 
}
.stories-nav-prev { right: 0; }
.stories-nav-next { left: 0; }
.stories-nav-next.swiper-button-disabled, .stories-nav-prev.swiper-button-disabled { opacity: 0; pointer-events: none; }

/* مدال پاپ‌آپ استوری */
.story-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 9999; flex-direction: column; }
.story-modal.active { display: flex; }
/* هدر پاپ‌آپ استوری (نوار پیشرفت، تایمر، دکمه بستن) */
.story-header-overlay {
    position: absolute; top: 0; left: 0; width: 100%;
    display: flex; align-items: center; gap: 15px; padding: 20px;
    z-index: 100; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 100%); /* برای دیده شدن نوار روی عکس‌های روشن */
}
.story-progress-container { flex: 1; display: flex; gap: 5px; }
.story-progress-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.3); border-radius: 4px; overflow: hidden; }
.story-progress-fill { width: 0%; height: 100%; background: #fff; border-radius: 4px; }
.story-timer { 
    color: #fff; font-size: 15px; font-weight: bold; 
    min-width: 25px; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,0.8); direction: ltr;
}
.story-close { 
    color: white; font-size: 35px; cursor: pointer; line-height: 1; 
    margin-right: 10px; position: static !important; /* لغو پوزیشن قبلی */
}
.story-content { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; width: 100%; max-width: 500px; margin: 0 auto; height: 100%; }
.story-media-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.story-media-wrapper img, .story-media-wrapper video { max-width: 100%; max-height: 100vh; object-fit: contain; }

/* دکمه‌های نامرئی چپ و راست روی تصویر */
.story-nav-left, .story-nav-right { position: absolute; top: 0; height: 100%; width: 50%; cursor: pointer; z-index: 10; }
.story-nav-left { left: 0; } .story-nav-right { right: 0; }

/* بخش کپشن و لایک (مشابه سایت نمونه) */
.story-footer-overlay { position: absolute; bottom: 30px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; z-index: 30; }
.story-description-box { background: rgba(255,255,255,0.95); color: #333; padding: 12px 15px; border-radius: 12px; font-size: 13px; font-weight: 500; max-width: 75%; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.story-like-btn { display: flex; flex-direction: column; align-items: center; color: white; cursor: pointer; }
.story-like-btn svg { width: 32px; height: 32px; fill: transparent; stroke: white; stroke-width: 2; transition: 0.3s; }
.story-like-btn.liked svg { fill: #e74c3c; stroke: #e74c3c; transform: scale(1.15); }
.story-like-count { font-size: 12px; margin-top: 5px; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

@media (max-width: 768px) {
    .story-box { width: 80px !important; }
    .story-ring { width: 70px; height: 70px; }
    .story-title { font-size: 11px; }
    .stories-carousel { padding: 10px 5px !important; }
    .stories-nav-prev, .stories-nav-next { display: none; /* مخفی کردن فلش‌ها در موبایل (چون با تاچ جابجا میشه) */ }
}

/* کارت محصول */
.product-card {
    background: var(--white); border-radius: var(--radius); padding: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02); transition: transform 0.2s; border: 1px solid #eee;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); }
.product-image { position: relative; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.onsale-badge { position: absolute; top: 5px; right: 5px; background: #e74c3c; color: white; font-size: 11px; padding: 3px 8px; border-radius: 10px; }
.product-title { font-size: 14px; margin: 0 0 10px; font-weight: 500; height: 40px; overflow: hidden; }
.product-price { font-size: 15px; font-weight: bold; color: var(--primary-color); display: flex; flex-direction: column; }
.product-price del { font-size: 12px; color: var(--text-light); font-weight: normal; }
.product-action a { display: block; text-align: center; background: var(--secondary-color); color: var(--text-color); border-radius: 8px; padding: 8px 0; font-size: 13px; margin-top: 10px; transition: 0.3s; }
.product-action a:hover { background: var(--primary-color); color: white; }


/* تنظیمات ریسپانسیو (موبایل) */
@media (max-width: 768px) {
    .product-title { font-size: 12px; height: 36px; line-height: 1.5; } /* فونت کوچک یک‌خطی در موبایل */
    .product-price { font-size: 13px; }
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; margin-top: 10px; }
    .story-box { width: 65px !important; }
    .story-ring { width: 55px; height: 55px; }
}
/* استایل‌های دراپ‌داون جستجو */
.header-search { position: relative; }
.search-dropdown {
    position: absolute; top: 110%; left: 0; width: 100%;
    background: var(--white); border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); border: 1px solid #eee;
    z-index: 1000; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.3s ease;
    max-height: 400px; overflow-y: auto;
}
.search-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.search-loading, .search-no-result { padding: 20px; text-align: center; color: var(--text-light); font-size: 13px; }

.search-results-list { list-style: none; margin: 0; padding: 0; }
.search-results-list li { border-bottom: 1px solid #f5f5f5; }
.search-results-list li:last-child { border-bottom: none; }
.search-item { display: flex; align-items: center; padding: 10px 15px; gap: 15px; transition: background 0.2s; }
.search-item:hover { background: #f9f9f9; }
.search-item-img img { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.search-item-info { display: flex; flex-direction: column; }
.search-item-title { font-size: 13px; font-weight: 500; color: var(--text-color); margin-bottom: 5px; }
.search-item-price { font-size: 14px; font-weight: bold; color: var(--primary-color); }
.search-item-price del { font-size: 11px; color: var(--text-light); font-weight: normal; margin-left: 5px; }
/* =========================================
   استایل‌های فوتر
========================================= */
.site-footer {
    background-color: #2c3e50; /* رنگ تیره و حرفه‌ای برای فوتر */
    color: #ecf0f1;
    margin-top: 50px;
    font-size: 14px;
}

/* بخش ویژگی‌ها (ارسال سریع و...) */
.footer-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 40px;
}
.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.03); /* پس‌زمینه شیشه‌ای و ملایم */
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.02);
}
.feature-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-5px); /* افکت بالا آمدن */
    border-color: rgba(255,255,255,0.1);
}
.feature-icon {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 119, 74, 0.15); /* هاله سبز رنگ پشت آیکون بر اساس رنگ اصلی سایت */
    width: 55px;
    height: 55px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 119, 74, 0.4);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-title {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
}

.feature-desc {
    color: #95a5a6;
    font-size: 12px;
    line-height: 1.4;
}

/* ریسپانسیو ویژگی‌های فوتر برای موبایل و تبلت */
@media (max-width: 992px) {
    .footer-features { 
        grid-template-columns: repeat(2, 1fr); 
    }
}
@media (max-width: 576px) {
    .footer-features { 
        grid-template-columns: 1fr; 
    }
}

/* ساختار شبکه‌ای فوتر */
.footer-widgets {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 40px;
}

.footer-title {
    color: #fff;
    font-size: 16px;
    margin: 0 0 20px 0;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-desc {
    line-height: 1.8;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.contact-list, .footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bdc3c7;
}
.contact-list a {
    direction: ltr; /* برای نمایش صحیح شماره تماس‌ها */
    display: inline-block;
}
.contact-list a:hover {
    color: var(--white);
}

.footer-menu li {
    margin-bottom: 12px;
}
.footer-menu a {
    color: #bdc3c7;
    transition: all 0.3s ease;
    display: block;
}
.footer-menu a:hover {
    color: var(--primary-color);
    transform: translateX(-5px); /* افکت حرکتی ظریف هنگام هاور */
}

/* باکس‌های نماد اعتماد */
.trust-seals {
    display: flex;
    gap: 10px;
}
.seal-box {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.seal-box img {
    max-width: 80px;
    height: auto;
}

.footer-bottom {
    background-color: #1a252f;
    padding: 20px 0;
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
}
.footer-bottom strong {
    color: #bdc3c7;
}

/* ریسپانسیو فوتر برای موبایل */
@media (max-width: 768px) {

    .footer-widgets {
        grid-template-columns: 1fr; /* در موبایل همه ستون‌ها زیر هم قرار می‌گیرند */
        gap: 40px;
    }
    .footer-title::after {
        width: 100%;
        background-color: rgba(255,255,255,0.05);
    }
}
/* تنظیمات منوی اصلی هدر */
.primary-menu { display: flex; gap: 25px; list-style: none; padding: 0; margin: 0; }
.primary-menu li a { font-weight: 500; font-size: 14px; transition: color 0.3s; }
.primary-menu li a:hover { color: var(--primary-color); }

/* تنظیمات سکشن‌ها و عناوین */
.section-title { font-size: 18px; font-weight: bold; margin-bottom: 20px; position: relative; padding-right: 15px; }
.section-title::before { content: ''; position: absolute; right: 0; top: 10%; height: 80%; width: 4px; background: var(--primary-color); border-radius: 4px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.view-all { font-size: 13px; color: var(--text-light); border: 1px solid #ddd; padding: 5px 15px; border-radius: 20px; transition: 0.3s; }
.view-all:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* گرید دسته‌بندی‌ها */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 15px; }
.cat-card { background: var(--white); border-radius: var(--radius); padding: 15px; text-align: center; border: 1px solid #eee; transition: 0.3s; }
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.cat-icon img { width: 60px; height: 60px; margin: 0 auto 10px; object-fit: contain; }
/* استایل عنوان دسته‌بندی */
.cat-title { 
    font-size: 13px; 
    margin: 0; 
    font-weight: 500;
    white-space: nowrap; /* جلوگیری از دو خطی شدن */
    overflow: hidden; 
    text-overflow: ellipsis; /* اضافه کردن سه نقطه برای متن‌های طولانی */
}

/* بنرهای دوتایی */
.dual-banners { margin: 40px 0; }
.banners-wrapper { display: flex; gap: 20px; }
.banner-box { flex: 1; border-radius: var(--radius); overflow: hidden; display: block; }
.banner-box img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); transition: transform 0.4s; }
.banner-box:hover img { transform: scale(1.03); }

/* فاصله‌های اسلایدر */
.hero-slider-section { width: 100%; margin-bottom: 30px; }
.hero-slider-section img { width: 100%; height: auto; border-radius: 12px; }

/* ریسپانسیو بنرها و منو */
@media (max-width: 768px) {
    .banners-wrapper { flex-direction: column; }
    .primary-menu { display: none; /* در موبایل باید بعدا منوی همبرگری بزنیم */ }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
}
/* استایل بنر و هدر جدید */
.topbar-banner img { width: 100%; height: auto; display: block; }
.site-header { box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.main-navigation { background: #fdfdfd; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; }
.primary-menu { display: flex; gap: 30px; padding: 15px 0; margin: 0; list-style: none; }
.action-icon { display: flex; align-items: center; justify-content: center; padding: 5px; transition: 0.3s; }
.action-icon:hover svg { stroke: var(--primary-color); }
.cart-count { position: absolute; top: 0px; right: 0px; background: #e74c3c; color: white; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; transform: translate(30%, -30%); }


/* اصلاح سرتیتر گروه‌ها (Category, Product و...) */
.search-group-title {
    font-size: 15px;
    font-weight: bold;
    color: #4db6ac; 
    padding: 8px 15px;
    background: #fdfdfd;
    border-left: 4px solid #4db6ac; /* خط رنگی در سمت چپ */
    border-right: none;
    text-transform: capitalize;
    margin-top: 5px;
    text-align: left; /* چپ‌چین کردن کلمه */
    direction: ltr; /* ساختار چپ‌چین */
}
.search-group-title:first-child { margin-top: 0; }

/* استایل آیتم‌های دو خطی */
.group-list .search-item {
    display: flex;
    justify-content: space-between; /* عکس سمت راست، متن سمت چپ */
    align-items: center;
    padding: 10px 20px;
    direction: ltr; /* چپ‌چین شدن نام‌های انگلیسی */
    text-align: left;
}
.group-list .search-item.text-only {
    padding: 8px 20px;
}

.search-item-info { display: flex; flex-direction: column; width: 100%; gap: 3px; }

/* خط اول: نام قطعه (انگلیسی) یا والد */
.search-item-line1 { 
    font-size: 14px; 
    font-weight: bold; 
    color: #333; /* تغییر رنگ به مشکی */
    text-transform: uppercase;
    text-align: left; /* چپ‌چین */
}

/* خط دوم: عنوان محصول (فارسی) */
.search-item-line2 { 
    font-size: 12px; 
    color: #666; /* رنگ خاکستری تیره */
    direction: ltr; /* چپ‌چین کردن پایه متن */
    text-align: left; /* تراز کردن متن به سمت چپ */
}

/* عکس محصول در جستجو */
.product-item .search-item-img {
    margin-left: 15px;
}
.product-item .search-item-img img {
    width: 45px; height: 45px; object-fit: contain; border: 1px solid #eee; padding: 2px;
}

/* رنگ مارک (کلمات جستجو شده) */
.group-list mark { 
    background: transparent; 
    color: var(--primary-color); /* استفاده از رنگ سبز اصلی سایت شما */
    font-weight: 900; 
}
/* اصلاح باکس سرچ: آیکون در راست و تایپ از چپ */
.fast-search-form { 
    display: flex; 
    flex-direction: row-reverse; /* انتقال آیکون جستجو به سمت راست */
    background: var(--secondary-color); 
    border-radius: 5px; 
    overflow: hidden; 
    border: 1px solid #e0e0e0;
}
.search-field { 
    width: 100%; 
    border: none; 
    background: transparent; 
    padding: 12px 20px; 
    font-family: inherit; 
    outline: none;
    text-align: left !important; /* تایپ از سمت چپ */
    direction: ltr !important; /* چپ‌چین کردن بیس اینپوت */
}

/* =========================================
   باکس اطلاعیه مینیمال بالای صفحه
========================================= */
.home-modern-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #f8f9fa; /* پس‌زمینه بسیار ملایم */
    border: 1px solid #e9ecef;
    border-radius: 8px; /* گوشه‌های نرم */
    padding: 12px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.notice-icon {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* انیمیشن ظریف تکان خوردن زنگوله */
.notice-icon svg {
    animation: gentle-ring 4s infinite ease-in-out;
}

.notice-text {
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
    width: 100%;
}

/* حذف مارجین اضافه تگ p که توسط ادیتور وردپرس ساخته می‌شود */
.notice-text p {
    margin: 0 !important;
}

.notice-text a {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
}

@keyframes gentle-ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30%, 50% { transform: rotate(10deg); }
    20%, 40% { transform: rotate(-10deg); }
    60% { transform: rotate(0deg); }
}

@media (max-width: 768px) {
    .home-modern-notice {
        padding: 10px 15px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    .notice-text {
        font-size: 13px; /* خوانایی بهتر در موبایل */
    }
}


/* =========================================
   استایل‌های کارت محصول و دکمه‌ها
========================================= */

/* استایل نام قطعه در کارت محصول */
.product-part-name-loop {
    font-size: 12px;
    color: #7f8c8d; /* رنگ خاکستری ملایم */
    margin-bottom: 10px;
    direction: ltr; /* چپ‌چین برای متون انگلیسی */
    text-align: right;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: Arial, Tahoma, sans-serif;
}

/* استایل جدید دکمه افزودن به سبد خرید */
.product-action a { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; /* فاصله بین آیکون و متن */
    background: transparent; 
    color: var(--primary-color); 
    border: 1px solid var(--primary-color); /* حاشیه سبز رنگ */
    border-radius: 8px; 
    padding: 8px 10px; 
    font-size: 12px; 
    font-weight: bold;
    margin-top: 10px; 
    transition: all 0.3s ease; 
}
.product-action a:hover { 
    background: var(--primary-color); 
    color: white; 
}
.product-action a.added {
    /* استایل دکمه وقتی محصول با موفقیت به سبد اضافه شد */
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

/* اصلاح دکمه مشاهده همه (حالت پیش‌فرض سبز) */
.view-all { 
    font-size: 13px; 
    background: var(--primary-color); /* رنگ سبز اصلی */
    color: #ffffff !important; 
    border: 1px solid var(--primary-color); 
    padding: 6px 18px; 
    border-radius: 20px; 
    transition: 0.3s;
    font-weight: 500;
}
.view-all:hover { 
    background: #005a38; /* سبز تیره‌تر هنگام هاور */
    border-color: #005a38;
}

/* اصلاح چیدمان داخلی کارت محصول برای یکدست شدن ارتفاع */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.product-action {
    margin-top: auto; /* هول دادن دکمه خرید به پایین‌ترین قسمت کارت */
}



/* =========================================
   سیستم لیبل‌ساز داینامیک محصولات
========================================= */
.product-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.product-custom-labels {
    position: absolute;
    top: 5px;
    right: 5px; /* اگر می‌خواهید سمت چپ باشد left: 5px بگذارید */
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.custom-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    white-space: nowrap;
}

.custom-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* این کد آیکون‌های مشکی را سفید می‌کند تا روی رنگ‌ها خوانا باشد */
}


/* =========================================
   جدول مشخصات و ویژگی‌ها در صفحه محصول
========================================= */
.product-custom-specs-table {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    direction: rtl;
}
.spec-label {
    color: #777;
    min-width: 120px;
}
.spec-value {
    font-weight: bold;
    color: #333;
    text-align: left;
    direction: ltr; /* برای چپ‌چین بودن قطعات انگلیسی */
}
/* تغییر رنگ لینک‌ها هنگام هاور در مشخصات */
.spec-value a {
    color: var(--primary-color);
    transition: 0.3s;
}
.spec-value a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* =========================================
   لیبل‌های روی عکس در نتایج جستجو
========================================= */
.search-item-img-wrapper {
    position: relative;
    margin-left: 15px;
    flex-shrink: 0;
}
.search-item-img-wrapper img {
    width: 50px; 
    height: 50px; 
    object-fit: contain; 
    border: 1px solid #eee; 
    padding: 2px;
    border-radius: 4px;
}
.search-item-labels {
    position: absolute;
    top: -5px;
    right: -5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.search-item-labels span {
    color: #fff;
    font-size: 9px;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}




/* =========================================
   مگامنوی هوشمند محصولات
========================================= */
/* =========================================
   مگامنوی هوشمند محصولات (نسخه دیجی‌کالا استایل)
========================================= */
.nh-mega-wrapper { position: relative; display: inline-block; z-index: 9999; }
.nh-mega-btn { display: flex; align-items: center; gap: 8px; background: var(--primary-color); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.nh-mega-btn:hover { background: #005a38; }

/* کادر اصلی مگامنو - ارتفاع ثابت و ظاهر مدرن برای جلوگیری از اسکرول کل صفحه */
.nh-mega-dropdown { 
    position: absolute; top: 120%; right: 0; width: 950px; max-width: 95vw; 
    height: 550px; /* ارتفاع ثابت */
    background: #fff; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.12); 
    display: flex; opacity: 0; visibility: hidden; transform: translateY(15px); 
    transition: all 0.3s ease; border: 1px solid #eee; overflow: hidden; 
}
.nh-mega-wrapper.open .nh-mega-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* ستون سمت راست (دسته‌های اصلی) */
.nh-mega-sidebar { 
    width: 250px; background: #fdfdfd; border-left: 1px solid #eee; 
    padding: 10px 0; list-style: none; margin: 0; 
    overflow-y: auto; /* اسکرول داخلی مستقل */
    height: 100%;
}
.nh-mega-sidebar::-webkit-scrollbar { width: 5px; }
.nh-mega-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

.nh-mega-parent-item { padding: 12px 20px; cursor: pointer; transition: 0.2s; border-right: 3px solid transparent; }
.nh-mega-parent-item.active, .nh-mega-parent-item:hover { background: #fff; border-right-color: var(--primary-color); box-shadow: -3px 0 10px rgba(0,0,0,0.02); }
.nh-parent-link { display: flex; align-items: center; gap: 10px; color: #333; font-weight: bold; font-size: 13px; text-decoration: none; pointer-events: none; }
.nh-cat-icon { width: 22px; height: 22px; object-fit: contain; }

/* پنل سمت چپ (زیرمجموعه‌ها) */
.nh-mega-panes { 
    flex: 1; padding: 25px 30px; background: #fff; 
    overflow-y: auto; /* اسکرول داخلی مستقل برای پنل چپ */
    height: 100%;
}
.nh-mega-panes::-webkit-scrollbar { width: 6px; }
.nh-mega-panes::-webkit-scrollbar-thumb { background: #d1d1d1; border-radius: 10px; }

.nh-mega-pane { display: none; animation: fadeInPane 0.3s ease; }
.nh-mega-pane.active { display: block; }

/* تغییر کلیدی: استفاده از ستون‌بندی (Masonry) به جای گرید خطی */
.nh-pane-grid { 
    display: block; 
    column-count: 3; /* تقسیم خودکار زیرمجموعه‌ها به 3 ستون */
    column-gap: 25px; 
}

/* هر بلاک از زیرمجموعه‌ها */
.nh-mega-column { 
    break-inside: avoid; /* جلوگیری از نصف شدن یک دسته بین دو ستون */
    page-break-inside: avoid;
    display: inline-block; /* کمک به حفظ یکپارچگی ستون */
    width: 100%;
    margin-bottom: 25px; 
    background: #fdfdfd; /* بک‌گراند ملایم برای تفکیک بهتر */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5f5f5;
}

.nh-column-title { 
    display: flex; align-items: center; justify-content: space-between; 
    color: var(--primary-color); font-weight: bold; font-size: 14px; 
    margin-bottom: 12px; border-bottom: 1px solid #eee; padding-bottom: 10px; 
}
.nh-column-title svg { color: #ccc; }

.nh-grandchildren { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.nh-grandchildren a { color: #555; font-size: 13px; transition: 0.2s; display: block; }
.nh-grandchildren a:hover { color: var(--primary-color); transform: translateX(-3px); }

@keyframes fadeInPane { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* ریسپانسیو مگامنو */
@media (max-width: 1024px) {
    .nh-pane-grid { column-count: 2; }
}
@media (max-width: 768px) {
    .nh-mega-dropdown { flex-direction: column; height: 80vh; width: 100%; top: 100%; position: fixed; right: 0; left: 0; z-index: 100000; border-radius: 0; }
    .nh-mega-sidebar { width: 100%; height: auto; max-height: 100%; display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; border-left: none; border-bottom: 1px solid #eee; }
    .nh-mega-parent-item { border-right: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .nh-mega-parent-item.active { border-bottom-color: var(--primary-color); }
    .nh-mega-panes { height: 65%; }
    .nh-pane-grid { column-count: 1; }
}



@media (max-width: 768px) {
    /* 1. حل مشکل نامرئی بودن منوها: کانتینر مادر نباید display:none شود */
    .main-navigation { height: 0 !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; border: none !important; overflow: visible !important; }
    .nh-mega-btn { display: none !important; } /* فقط دکمه دسکتاپ مخفی شود */
    .primary-menu-container:not(.mobile-active) { display: none !important; }

    /* 2. نوار پایین (Bottom Navigation) کاملا ثابت */
    .mobile-bottom-nav {
        display: flex !important; position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
        width: 100vw !important; background: #fff !important; box-shadow: 0 -5px 20px rgba(0,0,0,0.15) !important;
        z-index: 2147483647 !important; justify-content: space-around !important; align-items: flex-end !important;
        height: 65px !important; padding-bottom: 8px !important; border-top: 1px solid #f0f0f0 !important;
        margin: 0 !important; transform: translateZ(0) !important;
    }
    body { padding-bottom: 75px !important; }

    .mb-nav-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        color: #777; text-decoration: none; font-size: 10px; gap: 5px; flex: 1; cursor: pointer;
    }
    .mb-nav-item.active { color: var(--primary-color); }
    
    .home-item { position: relative; top: -10px; }
    .home-icon-wrap {
        background: var(--primary-color); color: #fff; width: 54px; height: 54px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0, 119, 74, 0.35);
        border: 4px solid #fff; margin-bottom: 3px;
    }
    .home-item span { font-weight: bold; color: #333; font-size: 12px; }

    .cart-item { position: relative; }
    .mb-cart-badge {
        position: absolute; top: -5px; right: 15px; background: #e74c3c; color: #fff;
        font-size: 10px; width: 18px; height: 18px; display: flex; align-items: center;
        justify-content: center; border-radius: 50%; font-weight: bold; border: 2px solid #fff;
    }

    /* =========================================
       3. مگامنوی موبایل (بدون باگ ارتفاع)
    ========================================= */
    .nh-mega-dropdown.mobile-active {
        position: fixed !important; 
        top: 0 !important; 
        left: 0 !important; 
        right: 0 !important;
        bottom: 65px !important; /* چسبیدن دقیق به بالای نوار منو بدون نیاز به calc */
        width: 100vw !important; 
        height: auto !important; /* خنثی کردن ارتفاع‌های قبلی */
        z-index: 2147483640 !important;
        background: #fff !important; 
        margin: 0 !important;
        display: flex !important; 
        flex-direction: row !important; 
        align-items: stretch !important; /* کشیدن اجباری ستون‌ها تا انتها */
        padding-top: 50px !important; /* فضا برای هدر */
        box-sizing: border-box !important;
        border-radius: 0 !important; 
        transform: none !important; 
        opacity: 1 !important; 
        visibility: visible !important;
    }
    
    .mobile-menu-header {
        position: absolute !important; 
        top: 0 !important; 
        left: 0 !important; 
        right: 0 !important; 
        width: 100% !important; 
        height: 50px !important; 
        background: #fff !important; 
        display: flex !important; 
        justify-content: space-between !important; 
        align-items: center !important; 
        padding: 0 15px !important; 
        border-bottom: 1px solid #eee !important; 
        z-index: 10 !important; 
        font-weight: bold !important; 
        color: #333 !important; 
        box-sizing: border-box !important;
    }
    .close-mobile-menu { color: #555; cursor: pointer; display: flex; align-items: center; }

    /* ستون راست (مادرها) - پر کردن قطعی فضای خالی */
    .nh-mega-dropdown.mobile-active .nh-mega-sidebar {
        width: 32% !important; 
        height: 100% !important; 
        margin: 0 !important; 
        background: #f5f5f5 !important; 
        border-left: 1px solid #e0e0e0 !important; 
        overflow-y: auto !important; 
        display: block !important; 
        border-bottom: none !important;
        padding: 0 !important; 
        box-sizing: border-box !important;
    }
    .nh-mega-dropdown.mobile-active .nh-mega-parent-item {
        padding: 18px 5px; border-right: 3px solid transparent; border-bottom: 1px solid #eee; text-align: center;
    }
    .nh-mega-dropdown.mobile-active .nh-mega-parent-item.active { background: #fff; border-right-color: var(--primary-color); }
    .nh-mega-dropdown.mobile-active .nh-parent-link { justify-content: center; font-size: 11px; text-align: center; white-space: normal; line-height: 1.4; }
    .nh-mega-dropdown.mobile-active .nh-cat-icon { display: none; }

    /* ستون چپ (زیرمجموعه‌ها) - پر کردن قطعی فضای خالی */
    .nh-mega-dropdown.mobile-active .nh-mega-panes {
        width: 68% !important; 
        height: 100% !important; 
        margin: 0 !important; 
        overflow-y: auto !important; 
        padding: 15px !important; 
        display: block !important; 
        background: #fff !important;
        box-sizing: border-box !important;
    }
    .nh-mega-dropdown.mobile-active .nh-pane-grid { column-count: 1; display: block; }
    .nh-mega-dropdown.mobile-active .nh-mega-column { padding: 5px; border: none; background: transparent; margin-bottom: 20px; width: 100%; }

    /* منوی کاربردی */
    .primary-menu-container.mobile-active {
        position: fixed !important; 
        top: 0 !important; 
        left: 0 !important; 
        right: 0 !important; 
        bottom: 65px !important;
        width: 100vw !important; 
        height: auto !important; 
        z-index: 2147483640 !important;
        border-radius: 0 !important; 
        transform: none !important; 
        opacity: 1 !important; 
        visibility: visible !important;
        background: #fff !important; 
        margin: 0 !important;
        display: block !important; 
        overflow-y: auto !important;
        padding-top: 50px !important; 
        box-sizing: border-box !important;
    }
    .primary-menu-container.mobile-active .primary-menu { display: flex; flex-direction: column; padding: 15px; list-style: none; margin-top: 0 !important; }
    .primary-menu-container.mobile-active .primary-menu li { border-bottom: 1px solid #eee; padding: 12px 0; font-size: 15px; font-weight: bold; }
    .primary-menu-container.mobile-active .primary-menu li a { color: #333; text-decoration:none; display: block; }
    /* =========================================
       استایل جدید آیتم‌های ستون چپ (زیرمجموعه‌ها)
    ========================================= */
    .nh-mega-dropdown.mobile-active .nh-grandchildren { 
        display: block !important; 
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* ایجاد خطوط جداکننده بین آیتم‌ها */
    .nh-mega-dropdown.mobile-active .nh-grandchildren li { 
        border-bottom: 1px solid #f0f0f0 !important; 
    }
    
    /* حذف خط از آخرین آیتم هر گروه برای زیبایی بیشتر */
    .nh-mega-dropdown.mobile-active .nh-grandchildren li:last-child { 
        border-bottom: none !important; 
    }
    
    /* مشکی کردن رنگ متن و تنظیم فاصله مناسب برای لمس (تاچ) */
    .nh-mega-dropdown.mobile-active .nh-grandchildren a { 
        color: #111 !important; 
        font-size: 13px !important; 
        font-weight: 500 !important;
        padding: 14px 5px !important; 
        display: block !important; 
    }
}




/* مخفی کردن قطعی و تضمینی منوی پایین موبایل در دسکتاپ */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}


/* =========================================
   طراحی صفحه محصول تکی (LCSC Style)
========================================= */
.lcsc-style-product {
    background: #f8f9fa;
    max-width: 1380px !important; /* محدود کردن عرض کل صفحه برای تراز شدن با منوی بالا */
    margin: 0 auto !important; /* وسط‌چین کردن کل محتوا */
    padding: 0 15px 20px 15px !important;
}

/* ساختار 3 ستونه بالا (خنثی کردن قطعی استایل‌های پیش‌فرض قالب) */
.product-top-section {
    display: grid !important;
    grid-template-columns: 2.5fr 5.5fr 3.5fr !important; /* نسبت دقیق ستون‌ها */
    gap: 25px !important;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    align-items: start !important;
}

/* ستون 1: گالری تصاویر (راست) */
.product-col-gallery {
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    width: 100% !important; 
    max-width: 100% !important;
    float: none !important;
}
/* کنترل کامل روی عکس‌های ووکامرس */
.product-col-gallery .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; }
.product-col-gallery .woocommerce-product-gallery__wrapper { margin: 0 !important; padding: 0 !important; }
.product-col-gallery .woocommerce-product-gallery figure { margin: 0 !important; }
.product-col-gallery .woocommerce-product-gallery img { width: 100% !important; height: auto !important; border-radius: 4px; box-shadow: none !important; }

/* ستون 2: مشخصات اصلی (وسط) */
.product-col-summary {
    width: 100% !important;
    float: none !important;
    padding: 0 10px;
}
.product-title { font-size: 20px; font-weight: bold; color: #333; margin-top: 0; margin-bottom: 20px; line-height: 1.6; }
.basic-specs-list {
    display: flex; 
    flex-direction: column; 
    gap: 0 !important; /* حذف فاصله‌های اضافی بین ردیف‌ها */
    border-top: 1px dashed #eee; 
    padding-top: 10px !important; 
}
.b-spec-row {
    display: flex; 
    font-size: 12.5px !important; /* فونت کمی ظریف‌تر و استانداردتر */
    border-bottom: 1px dashed #eaebec; 
    padding: 7px 0 !important; /* کاهش شدید فاصله بالا و پایین (پدینگ) */
    align-items: center !important;
}
.b-spec-row:last-child { 
    border-bottom: none !important; 
}
.b-spec-label { 
    width: 120px !important; /* جمع‌وجورتر شدن عرض لیبل‌ها */
    color: #666 !important; 
    font-weight: 500 !important; 
}
.b-spec-value { 
    font-weight: bold !important; 
    color: #111 !important; 
    direction: ltr !important; 
    text-align: right !important; 
    line-height: 1.4 !important;
}
.b-spec-value a { color: var(--primary-color); text-decoration: none; }
.product-short-desc { margin-top: 20px; font-size: 14px; color: #555; line-height: 1.8; border-top: 1px dashed #eee; padding-top: 15px; }

/* ستون 3: باکس خرید (چپ) */
.product-col-action {
    width: 100% !important;
    float: none !important;
    background: #fbfcff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
}
.guarantee-box { display: flex; align-items: center; gap: 8px; background: #eff6ff; color: #1d4ed8; padding: 12px; border-radius: 6px; font-size: 13px; font-weight: bold; margin-bottom: 20px; border: 1px solid #bfdbfe; }
.stock-status-box .stock { font-size: 15px; font-weight: bold; color: #059669; margin-bottom: 20px; display: inline-block; background: #d1fae5; padding: 5px 10px; border-radius: 4px; }
.stock-status-box .out-of-stock { color: #dc2626; background: #fee2e2; }
.add-to-cart-wrapper { margin-top: 15px; }
.add-to-cart-wrapper .quantity { margin-left: 10px; float: right; }
.add-to-cart-wrapper .single_add_to_cart_button { float: right; padding: 12px 25px; border-radius: 6px; font-size: 15px; }

/* =========================================
   بخش پایینی (جداول مشخصات و دیتاشیت)
========================================= */
/* =========================================
   بخش پایینی (جداول مشخصات مشابه LCSC)
========================================= */
.product-bottom-section { display: flex; flex-direction: column; gap: 20px; }
.product-bottom-section > div { background: #fff; padding: 25px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; }
.section-title { font-size: 18px; font-weight: bold; color: #222; border-bottom: 2px solid #f0f0f0; padding-bottom: 15px; margin-bottom: 20px; margin-top: 0; }

/* جدول شبکه‌ای مشخصات کامل */
.specs-grid-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.spec-table-block {
    border: 1px solid #eaebec;
    border-bottom: none;
    border-radius: 4px;
    overflow: hidden;
}
.grid-spec-row {
    display: flex;
    border-bottom: 1px solid #eaebec;
    transition: 0.2s;
}
.grid-spec-row:hover { background-color: #fcfcfc; }
.grid-spec-row.table-header {
    background-color: #f3f4f6;
    font-weight: bold;
}
.grid-spec-row.table-header .grid-spec-name,
.grid-spec-row.table-header .grid-spec-val {
    color: #374151;
    font-size: 14px;
    background: transparent;
}
.grid-spec-name {
    width: 35%;
    background: #fafafa;
    padding: 12px 15px;
    color: #555;
    font-size: 13px;
    border-left: 1px solid #eaebec;
    display: flex;
    align-items: center;
}
.grid-spec-val {
    width: 65%;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 13px;
    direction: ltr;
    text-align: right;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    word-break: break-word;
}

/* ریسپانسیو جداول مشخصات */
@media (max-width: 768px) {
    .specs-grid-table { grid-template-columns: 1fr; gap: 0; }
    .spec-table-block { border-bottom: 1px solid #eaebec; margin-bottom: 20px; }
    .grid-spec-name { width: 45%; }
    .grid-spec-val { width: 55%; }
}

/* دیتاشیت */
.datasheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px solid #f0f0f0; padding-bottom: 15px; }
.datasheet-header .section-title { border: none; margin: 0; padding: 0; }
.download-pdf-btn { background: #e2e8f0; color: #333; padding: 8px 15px; border-radius: 6px; font-size: 13px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.download-pdf-btn:hover { background: #cbd5e1; }
.datasheet-section iframe { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8f9fa; }

/* ریسپانسیو کردن صفحه محصول */
@media (max-width: 992px) {
    .product-top-section { grid-template-columns: 1fr !important; gap: 15px !important; }
    .product-col-gallery { max-width: 400px; margin: 0 auto !important; }
    .specs-grid-table { grid-template-columns: 1fr; }
    .b-spec-label { width: 120px; }
}
/* استایل جدید برای عنوان و دکمه PDF در بالا */
.product-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}
.product-header-wrap .product-title {
    margin: 0;
    flex: 1;
}
.top-pdf-btn {
    flex-shrink: 0;
    margin-top: 2px;
}
/* =========================================
   بازطراحی ۱۰۰٪ اختصاصی افزونه Tier Pricing (LCSC Style)
========================================= */

/* استایل جدول اصلی افزونه */
.custom-tier-pricing .tiered-pricing-wrapper {
    margin-bottom: 20px !important;
}
.custom-tier-pricing table.tiered-pricing-table {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #eaebec !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    margin: 0 !important;
    table-layout: fixed !important;
}
.custom-tier-pricing table.tiered-pricing-table th {
    background: #f9fafb !important;
    color: #4b5563 !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-align: center !important;
    padding: 10px !important;
    border-bottom: 1px solid #eaebec !important;
    border-right: none !important;
    border-left: none !important;
}
.custom-tier-pricing table.tiered-pricing-table td {
    padding: 12px 10px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #111 !important;
    border-bottom: 1px solid #eaebec !important;
    background: #fff !important;
    transition: 0.2s ease !important;
}
.custom-tier-pricing table.tiered-pricing-table tr:last-child td {
    border-bottom: none !important;
}

/* خنثی کردن کدهای inline افزونه و ایجاد افکت LCSC */
.custom-tier-pricing table.tiered-pricing-table tr.tiered-pricing--active td,
.custom-tier-pricing table.tiered-pricing-table tr:hover td {
    background-color: #f0fdf4 !important; /* سبز بسیار ملایم (پس‌زمینه ردیف فعال/هاور) */
    color: #166534 !important; /* رنگ سبز تیره برای متن */
    font-weight: bold !important;
}
.custom-tier-pricing table.tiered-pricing-table tr.tiered-pricing--active span.woocommerce-Price-amount,
.custom-tier-pricing table.tiered-pricing-table tr:hover span.woocommerce-Price-amount {
    color: #dc2626 !important; /* رنگ قرمز برای قیمت در حالت فعال (دقیقاً مثل LCSC) */
}

/* رنگ قرمز برای ستون تخفیف */
.custom-tier-pricing table.tiered-pricing-table td:nth-child(2) span {
    color: #dc2626 !important;
    font-size: 12px !important;
    font-weight: normal !important;
}

/* =========================================
   استایل بخش انتخاب تعداد، دکمه و باکس خلاصه قیمت
========================================= */

/* مرتب‌سازی بخش دکمه خرید و فیلد تعداد */
.custom-tier-pricing form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 0 !important;
}
.custom-tier-pricing .quantity {
    float: none !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
}
.custom-tier-pricing .quantity input.qty {
    width: 70px !important;
    height: 42px !important;
    text-align: center !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    font-weight: bold !important;
}

.custom-tier-pricing button.single_add_to_cart_button {
    float: none !important;
    margin: 0 !important;
    flex: 1; /* کشیده شدن دکمه تا انتهای کادر */
    background: var(--primary-color) !important;
    color: #fff !important;
    padding: 12px 25px !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    font-weight: bold !important;
    border: none !important;
    cursor: pointer !important;
    transition: 0.3s ease !important;
}
.custom-tier-pricing button.single_add_to_cart_button:hover {
    filter: brightness(0.9);
}

/* استایل کادر خلاصه قیمت (Summary Table) */
.custom-tier-pricing .tier-pricing-summary-table {
    width: 100% !important;
    margin-top: 20px !important;
    background: #fafafa !important;
    border: 1px solid #eaebec !important;
    border-radius: 6px !important;
    padding: 15px !important;
}
.custom-tier-pricing .tier-pricing-summary-table__top,
.custom-tier-pricing .tier-pricing-summary-table__bottom {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 14px !important;
    color: #444 !important;
}
.custom-tier-pricing .tier-pricing-summary-table__top {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px dashed #ccc !important;
}
.custom-tier-pricing .tier-pricing-summary-table__bottom {
    font-weight: bold !important;
    color: #111 !important;
}
.custom-tier-pricing .tier-pricing-summary-table__total .woocommerce-Price-amount {
    font-size: 18px !important;
    color: #dc2626 !important; /* قرمز شدن قیمت نهایی پرداختی */
}

/* =========================================
   بخش کتابخانه قطعات (EDA Models)
========================================= */
.eda-library-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
.eda-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.eda-box {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
}
.eda-title {
    font-size: 15px;
    color: #444;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
}
.eda-box img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
}

/* ریسپانسیو بخش EDA */
@media (max-width: 768px) {
    .eda-grid { grid-template-columns: 1fr; gap: 15px; }
}




/* =========================================
   گالری تصاویر اضافی (ACF 3-Column)
========================================= */
.extended-gallery-section {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}
.extended-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 ستون هم‌اندازه */
    gap: 20px;
}
.gallery-grid-item {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    overflow: hidden;
}
.gallery-grid-item img {
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.3s ease;
}
/* افکت زوم ملایم هنگام قرار گرفتن موس */
.gallery-grid-item:hover img {
    transform: scale(1.05);
}

/* ریسپانسیو کردن گالری تصاویر اضافی */
@media (max-width: 992px) {
    .extended-gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* در تبلت 2 ستونه */
    }
}
@media (max-width: 576px) {
    .extended-gallery-grid {
        grid-template-columns: 1fr; /* در موبایل 1 ستونه */
    }
}







/* =========================================
   طراحی صفحه محصول تکی (نسخه نهایی)
========================================= */
.lcsc-style-product { padding: 20px 0; }

/* =========================================
   تراز شدن و استایل برادکرامب
========================================= */
/* =========================================
   تراز شدن و استایل برادکرامب (داخل باکس)
========================================= */
.custom-minimal-breadcrumb {
    background: #f8fafc !important; /* پس‌زمینه خاکستری/آبی بسیار ملایم */
    padding: 6px 15px !important; /* پدینگ ظریف */
    border-radius: 50px !important; /* گوشه‌های کاملا گرد (مدرن) */
    font-size: 12px !important;
    color: #64748b !important;
    margin-bottom: 18px !important; /* فاصله مناسب با عنوان */
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    border: 1px solid #e2e8f0 !important; /* کادر بسیار محو */
}
.custom-minimal-breadcrumb a { 
    color: #475569 !important; 
    font-weight: 500 !important; 
    text-decoration: none !important; 
    transition: 0.2s !important; 
}
.custom-minimal-breadcrumb a:hover { 
    color: var(--primary-color) !important; 
}
.custom-minimal-breadcrumb .sep { 
    color: #cbd5e1 !important; 
    font-size: 10px !important; 
    margin: 0 2px !important; 
}
.custom-minimal-breadcrumb .current { 
    color: #94a3b8 !important; 
}

/* اصلاح فاصله گرید از منوی هدر (چون نوار برادکرامب برداشته شد) */
.product-main-layout {
    margin-top: 15px !important;
}

/* =========================================
   استایل مینیمال و حرفه‌ای کارت محصولات مرتبط
========================================= */
.custom-rel-card {
    border: 1px solid #f0f0f0 !important; 
    border-radius: 8px !important; 
    padding: 15px !important; 
    text-align: center !important; 
    background: #fff !important;
    transition: 0.3s !important; 
    display: flex !important; 
    flex-direction: column !important; 
    height: 100% !important; 
    justify-content: space-between !important;
}
.custom-rel-card:hover {
    border-color: var(--primary-color) !important; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.05) !important;
}
.rel-img-wrap { 
    height: 160px !important; 
    margin-bottom: 15px !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
}
.rel-title { 
    font-size: 13.5px !important; 
    font-weight: 500 !important; 
    margin-bottom: 15px !important; 
    flex-grow: 1 !important; 
    line-height: 1.6 !important; 
}
.rel-title a { color: #333 !important; }
.rel-price { 
    font-size: 15px !important; 
    font-weight: 900 !important; 
    color: var(--primary-color) !important; 
    margin-bottom: 15px !important; 
}
/* دکمه "مشاهده محصول" حرفه‌ای و فول‌ارز */
.rel-view-btn {
    display: block !important; 
    width: 100% !important;
    padding: 10px 0 !important; 
    background: #f8f9fa !important; 
    color: #555 !important;
    border: 1px solid #eaebec !important;
    border-radius: 6px !important; 
    font-size: 13px !important; 
    font-weight: bold !important; 
    text-decoration: none !important; 
    transition: 0.2s !important;
}
.rel-view-btn:hover { 
    background: var(--primary-color) !important; 
    color: #fff !important; 
    border-color: var(--primary-color) !important;
}

/* ساختار گرید اصلی (راست محتوا / چپ سایدبار چسبان) */
/* ساختار گرید اصلی (دسکتاپ) */
.product-main-layout {
    margin-top: 10px !important;
    display: grid !important;
    /* گالری کوچکتر (2.2) | مشخصات بزرگتر (5) | باکس قیمت (2.8) */
    grid-template-columns: 2.2fr 5fr 2.8fr !important; 
    gap: 25px !important;
    align-items: start !important;
}
.product-right-content {
    grid-column: 1 / 3; /* اشغال 2 ستون سمت راست برای محتوا */
    display: flex; flex-direction: column; gap: 25px;
}
.product-left-sidebar {
    grid-column: 3 / 4; /* اشغال ستون آخر سمت چپ */
    position: sticky !important;
    top: 90px !important; /* چسبنده تا انتهای صفحه */
    z-index: 10;
}
.product-top-row {
    display: grid;
    grid-template-columns: 1.5fr 1.8fr; /* گالری و مشخصات هم‌اندازه در دل محتوا */
    gap: 25px;
}

/* استایل باکس‌ها (تایتل پررنگ و خطوط جداکننده) */
.product-col-summary, .product-col-gallery, .product-bottom-section > div, .related-products-section { 
    background: #fff; padding: 25px !important; border-radius: 10px; border: 1px solid #f0f0f0; box-shadow: 0 2px 10px rgba(0,0,0,0.02); 
}
.product-title {
    font-size: 21px; font-weight: 900; color: #111; 
    border-bottom: 2px solid #eaebec; /* خط پررنگ‌تر زیر تایتل */
    padding-bottom: 15px; margin-bottom: 15px; line-height: 1.6;
}
.b-spec-row {
    display: flex; font-size: 13.5px;
    border-bottom: 1px dashed #eaebec; padding: 12px 0;
}
.b-spec-row:last-child { border-bottom: none; }
.b-spec-label { width: 140px; color: #666; font-weight: 500; }
.b-spec-value { font-weight: bold; color: #111; direction: ltr; text-align: right; }

/* سایدبار چسبان سمت چپ (زاگرس استایل با سایه زیبا) */
.sticky-action-box {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
}
.stock-status-wrap { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: bold; color: #10b981; margin-bottom: 25px; }
.stock-status-wrap svg { color: #10b981; }
/* استایل جدید قیمت اصلی (سمت چپ + عبارت قیمت واحد) */
.single-main-price { 
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important; /* هدایت کل محتوا به سمت چپ */
    gap: 8px !important; /* فاصله بین نوشته و مبلغ */
    font-size: 24px !important; 
    font-weight: 900 !important; 
    color: #111 !important; 
    margin-bottom: 15px !important; 
}

/* استایل کلمه "قیمت واحد" */
.unit-price-label {
    font-size: 16px !important; /* بزرگ‌تر شدن سایز */
    color: #555 !important;
    font-weight: 600 !important;
}

/* تنظیم جهت نمایش مبلغ ووکامرس */
.single-main-price .woocommerce-Price-amount {
    direction: rtl !important;
    display: inline-flex !important;
    gap: 4px !important;
}
.zagros-tier-list { border-top: 1px solid #f1f5f9; padding-top: 15px; }
.z-tier-row { 
    display: flex !important; 
    flex-direction: row !important; /* تضمین چینش افقی */
    justify-content: space-between !important; 
    align-items: center !important; 
    padding: 10px 0 !important; 
    border-bottom: 1px dashed #f1f5f9 !important; 
    font-size: 14px !important; 
    direction: rtl !important; /* اجبار به راست‌چین بودن */
}
.z-tier-row:last-child { border-bottom: none; }
.z-tier-qty { color: #dc2626 !important; font-weight: bold !important; text-align: right !important; }
.z-tier-price { font-weight: bold !important; color: #475569 !important; text-align: left !important; }

/* دکمه اختصاصی افزودن به سبد خرید */
.custom-popup-cart-btn {
    width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px;
    background: var(--primary-color); color: #fff; padding: 15px; border-radius: 8px;
    font-size: 16px; font-weight: bold; border: none; cursor: pointer; transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 119, 74, 0.2); margin-top: 20px;
}
.custom-popup-cart-btn:hover { background: #00603c; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 119, 74, 0.3); }



/* =========================================
   پاپ‌آپ محاسبه‌گر (Modal Zagros Style)
========================================= */
.zagros-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6);
    z-index: 999999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.zagros-modal-overlay.active { opacity: 1; visibility: visible; }
.zagros-modal-box {
    background: #fff; width: 90%; max-width: 500px; border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2); overflow: hidden; transform: translateY(20px); transition: 0.3s ease;
}
.zagros-modal-overlay.active .zagros-modal-box { transform: translateY(0); }
.zm-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #f0f0f0; }
.zm-header h3 { margin: 0; font-size: 18px; font-weight: bold; color: #111; }
.zm-close { font-size: 24px; color: #999; cursor: pointer; transition: 0.2s; line-height: 1; }
.zm-close:hover { color: #dc2626; }
.zm-body { padding: 20px; }
.zm-calc-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.zm-qty-controls { display: flex; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
.zm-qty-controls button { background: #f8f9fa; border: none; width: 40px; height: 40px; font-size: 20px; cursor: pointer; color: #333; }
.zm-qty-controls button:hover { background: #e2e8f0; }
.zm-qty-controls input { width: 60px; height: 40px; border: none; border-left: 1px solid #ccc; border-right: 1px solid #ccc; text-align: center; font-weight: bold; font-size: 16px; pointer-events: none; }
.zm-price-display { font-size: 18px; font-weight: bold; color: #0284c7; }
.zm-summary-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 15px; }
.zm-stock-status { display: flex; align-items: center; gap: 5px; color: #16a34a; font-weight: bold; font-size: 14px; margin-bottom: 10px; }
.zm-math { font-size: 14px; color: #15803d; font-weight: 500; direction: ltr; text-align: right; }
.zm-total-price { font-weight: bold; font-size: 16px; }
.zm-footer { display: flex; gap: 10px; padding: 15px 20px; border-top: 1px solid #f0f0f0; background: #fafafa; justify-content: flex-end; }
.zm-btn-cancel, .zm-btn-confirm { padding: 10px 20px; border-radius: 6px; font-size: 15px; font-weight: bold; cursor: pointer; border: none; }
.zm-btn-cancel { background: #ef4444; color: #fff; }
.zm-btn-confirm { background: #22c55e; color: #fff; }
/* =========================================
   4. فعال‌سازی قابلیت تایپ در فیلد تعدادِ پاپ‌آپ
========================================= */
.zm-qty-controls input { 
    width: 60px !important; 
    height: 40px !important; 
    border: none !important; 
    border-left: 1px solid #ccc !important; 
    border-right: 1px solid #ccc !important; 
    text-align: center !important; 
    font-weight: bold !important; 
    font-size: 16px !important; 
    pointer-events: auto !important; /* این خط قابلیت کلیک و تایپ را برمی‌گرداند */
}
/* ریسپانسیو */
/* =========================================
   ریسپانسیو و اصلاح قطعی چیدمان موبایل
========================================= */
/* =========================================
   ریسپانسیو، ترتیب ستون‌ها و پدینگ موبایل
========================================= */
/* =========================================
   ریسپانسیو و اصلاح چیدمان موبایل (بدون دستکاری PHP)
========================================= */
@media (max-width: 992px) {
    /* 1. ایجاد فاصله از کناره‌های گوشی برای کل بدنه */
    .product-main-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        padding: 0 15px 25px 15px !important; 
        box-sizing: border-box !important;
    }

    /* 2. شکستن ساختار راست و چپ برای مرتب‌سازی مجدد */
    .product-right-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        width: 100% !important;
    }
    
    .product-top-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* 3. تعیین ترتیب دقیق نمایش در موبایل */
    /* عکس (اول) */
    .product-col-gallery { order: 1 !important; width: 100% !important; box-sizing: border-box !important; }
    
    /* مشخصات اصلی (دوم) */
    .product-col-summary { order: 2 !important; width: 100% !important; box-sizing: border-box !important; }
    
    /* سایدبار قیمت (سوم - کشیده شده از کانتینر چپ به زیر مشخصات) */
    .product-left-sidebar { 
        order: 3 !important; 
        position: relative !important; 
        top: 0 !important; 
        width: 100% !important; 
        box-sizing: border-box !important;
    }
    .sticky-action-box { width: 100% !important; box-sizing: border-box !important; }
    
    /* مابقی محتواها در رتبه‌های بعدی */
    .related-products-section { order: 4 !important; width: 100% !important; box-sizing: border-box !important; }
    .full-description-section { order: 5 !important; width: 100% !important; box-sizing: border-box !important; }
    .detailed-specs-section { order: 6 !important; width: 100% !important; box-sizing: border-box !important; }
    .extended-gallery-section { order: 7 !important; width: 100% !important; box-sizing: border-box !important; }
    .datasheet-section { order: 8 !important; width: 100% !important; box-sizing: border-box !important; }
    .eda-library-section { order: 9 !important; width: 100% !important; box-sizing: border-box !important; }

    /* 4. اصلاح جدول ویژگی‌ها (جلوگیری از کوچکی بیش از حد در موبایل) */
    .specs-grid-table { display: flex !important; flex-direction: column !important; gap: 15px !important; }
    .spec-table-block { width: 100% !important; border-bottom: 1px solid #eaebec !important; }
}
/* =========================================
   استایل لیبل‌های روی تصویر (ACF Badges)
========================================= */
.custom-acf-labels {
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 99;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.acf-badge {
    background: #f59e0b; /* رنگ زرد/نارنجی جذاب برای لیبل */
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    display: inline-block;
    letter-spacing: 0.5px;
}
/* =========================================
   استایل بخش "انواع دیگر این محصول" (Cross-sells LCSC Style)
========================================= */
.custom-cross-sells-wrapper {
    margin-top: 30px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 20px;
}
.cross-sells-title {
    font-size: 15px;
    font-weight: 900;
    color: #111;
    margin-bottom: 15px;
    display: inline-block;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}
.cross-sells-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cross-sell-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 15px;
    transition: 0.2s ease;
}
.cross-sell-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* تصویر */
.cs-image { width: 45px; height: 45px; flex-shrink: 0; margin-left: 15px; }
.cs-image img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; border: 1px solid #f1f5f9; }

/* مشخصات میانی */
.cs-details { flex-grow: 1; display: flex; flex-direction: column; }
.cs-title { 
    font-size: 13px; font-weight: bold; color: #333; text-decoration: none; 
    display: flex; align-items: center; gap: 5px; line-height: 1.5;
}
.cs-title svg { color: #94a3b8; flex-shrink: 0; }
.cs-title:hover { color: var(--primary-color); }

/* بخش اکشن (موجودی، قیمت و سبد) */
.cs-action { display: flex; align-items: center; gap: 15px; }
.cs-stock-price { display: flex; flex-direction: column; align-items: flex-end; }
.cs-stock { font-size: 11px; color: #10b981; font-weight: bold; }
.cs-price { font-size: 13px; font-weight: 900; color: #111; direction: ltr; }
.cs-cart-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 6px;
    background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
    transition: 0.2s;
}
.cs-cart-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* ریسپانسیو برای موبایل */
@media (max-width: 576px) {
    .cross-sell-item { flex-direction: column; align-items: stretch; gap: 15px; position: relative; }
    .cs-image { position: absolute; top: 15px; right: 15px; }
    .cs-details { margin-right: 60px; margin-bottom: 10px; }
    .cs-action { justify-content: space-between; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
    .cs-stock-price { align-items: flex-start; }
}




/* =========================================
   استایل‌های صفحه لیست محصولات (آرشیو فروشگاه)
========================================= */
.custom-shop-container {
    max-width: 1380px;
    margin: 30px auto;
    padding: 0 15px;
}

/* 1. استایل بخش برندها (بالا) */
.shop-brands-wrapper {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid #f0f0f0;
    margin-bottom: 30px;
}
.brands-sec-title {
    font-size: 16px; font-weight: 900; margin-bottom: 20px; color: #111;
}
.shop-brands-grid {
    display: flex; gap: 15px; overflow-x: auto; padding-bottom: 10px;
}
.shop-brands-grid::-webkit-scrollbar { height: 6px; }
.shop-brands-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.brand-card {
    min-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 10px;
    border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px; text-decoration: none;
    transition: 0.2s; background: #fafafa;
}
.brand-card:hover { border-color: var(--primary-color); box-shadow: 0 4px 12px rgba(0,0,0,0.05); background: #fff; }
.brand-card img { width: 60px; height: 60px; object-fit: contain; mix-blend-mode: multiply; }
.brand-name { font-size: 12px; font-weight: bold; color: #475569; }

/* 2. ساختار اصلی: فیلترها (راست) / محصولات (چپ) */
.shop-main-layout {
    display: grid;
    grid-template-columns: 280px 1fr; /* سایدبار 280 پیکسل، بقیه برای محصولات */
    gap: 30px;
    align-items: start;
}

/* سایدبار فیلترها */
.shop-sidebar {
    position: sticky;
    top: 90px;
}
.shop-filter-widget {
    background: #fff; border: 1px solid #f0f0f0; padding: 20px;
    border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.filter-title { font-size: 15px; font-weight: 900; border-bottom: 1px dashed #e2e8f0; padding-bottom: 15px; margin-bottom: 15px; color: #222; }

/* 3. گرید محصولات (4 ستونه) */
.shop-products-area .page-title { font-size: 22px; font-weight: 900; margin-bottom: 20px; }
.shop-products-area ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important; /* اجبار به 4 ستون */
    gap: 20px;
    margin: 0; padding: 0;
}
.shop-products-area ul.products li.product {
    width: 100% !important; margin: 0 !important;
    background: #fff; border: 1px solid #f0f0f0; border-radius: 8px;
    padding: 15px; transition: 0.3s;
}
.shop-products-area ul.products li.product:hover { border-color: var(--primary-color); box-shadow: 0 8px 25px rgba(0,0,0,0.05); }

/* 4. باکس سئو (پایین) */
.shop-seo-content {
    margin-top: 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.seo-inner-box { font-size: 14px; color: #475569; line-height: 1.8; text-align: justify; }
.seo-inner-box h1, .seo-inner-box h2, .seo-inner-box h3 { color: #111; margin-top: 25px; margin-bottom: 15px; }

/* ریسپانسیو موبایل */
@media (max-width: 992px) {
    .shop-main-layout { grid-template-columns: 1fr; } /* سایدبار می‌رود بالای محصولات */
    .shop-sidebar { position: relative; top: 0; }
    .shop-products-area ul.products { grid-template-columns: repeat(2, 1fr) !important; } /* 2 ستونه در تبلت/موبایل */
}
@media (max-width: 576px) {
    .shop-products-area ul.products { grid-template-columns: 1fr !important; } /* 1 ستونه در موبایل‌های کوچک */
}


/* =========================================
   تولبار بالای محصولات (دکمه‌های گرید/لیست)
========================================= */
.shop-toolbar {
    display: flex; justify-content: space-between; align-items: center; 
    background: #fff; padding: 15px 20px; border-radius: 8px; 
    border: 1px solid #f0f0f0; margin-bottom: 25px; box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.shop-toolbar .page-title { margin: 0; font-size: 18px; font-weight: 900; color: #111; }
.view-toggles { display: flex; align-items: center; gap: 10px; }
.view-label { font-size: 13px; color: #666; font-weight: bold; }
.view-btn { 
    background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; 
    width: 36px; height: 36px; border-radius: 6px; cursor: pointer; transition: 0.2s; 
    display: flex; align-items: center; justify-content: center;
}
.view-btn:hover { background: #e2e8f0; color: #111; }
.view-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* =========================================
   حل قطعی مشکل 4 ستونه شدن (نادیده گرفتن ووکامرس)
========================================= */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important; margin: 0 !important; padding: 0 !important;
}
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: 100% !important; margin: 0 !important; float: none !important; clear: none !important; }

/* =========================================
   طراحی مدرن کارت محصول (پایه / حالت شبکه‌ای)
========================================= */
/* =========================================
   طراحی مدرن کارت محصول (حالت شبکه‌ای - Grid)
========================================= */
/* =========================================
   طراحی مدرن کارت محصول (حالت شبکه‌ای - Grid)
========================================= */
.modern-product-card .card-inner {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px;
    display: flex; flex-direction: column; height: 100%; transition: 0.3s ease; position: relative;
    overflow: hidden;
}
.modern-product-card .card-inner:hover {
    border-color: var(--primary-color); box-shadow: 0 10px 30px rgba(0,0,0,0.08); transform: translateY(-3px);
}
.card-image { position: relative; display: block; margin-bottom: 15px; height: 180px; display: flex; align-items: center; justify-content: center; }
.card-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card-badge { position: absolute; top: 10px; right: 10px; background: #ef4444; color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 4px; font-weight: bold; }

.card-content { display: flex; flex-direction: column; flex-grow: 1; }
.card-info { flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 14px; font-weight: 700; color: #111; text-decoration: none; line-height: 1.6; margin-bottom: 15px; text-align: center; }
.card-title:hover { color: var(--primary-color); }

/* نمایش ویژگی‌ها در حالت شبکه‌ای */
.modern-product-card .card-specs { 
    display: flex !important; /* جلوگیری قطعی از مخفی شدن */
    flex-direction: column; gap: 6px; 
    margin-bottom: 15px; background: #f8fafc; padding: 12px; border-radius: 8px; border: 1px solid #f1f5f9;
}
.modern-product-card .c-spec-row { display: flex; justify-content: space-between; font-size: 11px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 5px; }
.modern-product-card .c-spec-row:last-child { border-bottom: none; padding-bottom: 0; }
.modern-product-card .c-spec-name { color: #64748b; }
.modern-product-card .c-spec-val { font-weight: bold; color: #111; direction: ltr; }

/* دکمه و قیمت در حالت شبکه‌ای (زیر هم) */
.card-action { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: auto; border-top: 1px dashed #e2e8f0; padding-top: 15px; }
.card-price { text-align: center; font-size: 18px; font-weight: 900; color: #111; }
.modern-product-card .card-add-btn { width: 100%; }
.modern-product-card .card-add-btn .add_to_cart_button { width: 100%; padding: 12px !important; font-size: 14px !important; }

/* دکمه افزودن به سبد خرید اختصاصی با آیکون */
.modern-product-card .card-add-btn .add_to_cart_button {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
    background: #f8fafc !important; color: var(--primary-color) !important;
    padding: 8px 14px !important; border-radius: 8px !important;
    font-size: 13px !important; font-weight: 900 !important; border: 1px solid #e2e8f0 !important;
    transition: 0.3s ease !important; text-decoration: none !important;
}
.modern-product-card .card-add-btn .add_to_cart_button::before {
    content: ''; display: inline-block; width: 18px; height: 18px; background-color: currentColor;
    mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path><line x1="12" y1="9" x2="18" y2="9"></line><line x1="15" y1="6" x2="15" y2="12"></line></svg>') no-repeat center / contain;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="21" r="1"></circle><circle cx="20" cy="21" r="1"></circle><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"></path><line x1="12" y1="9" x2="18" y2="9"></line><line x1="15" y1="6" x2="15" y2="12"></line></svg>') no-repeat center / contain;
}
.modern-product-card .card-add-btn .add_to_cart_button:hover {
    background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 119, 74, 0.3) !important; transform: translateY(-2px);
}
.modern-product-card .card-add-btn .added_to_cart { display: none !important; }

/* =========================================
   طراحی شگفت‌انگیز حالت لیستی (List View - مشابه بنچمارک)
========================================= */
ul.products.list-view { grid-template-columns: 1fr !important; }
ul.products.list-view .modern-product-card .card-inner { flex-direction: row; align-items: stretch; gap: 30px; padding: 25px; }
ul.products.list-view .card-image { width: 160px; height: 160px; margin-bottom: 0; flex-shrink: 0; background: #fafafa; border-radius: 8px; padding: 10px; border: 1px solid #f1f5f9; }

/* بخش محتوای میانی در حالت لیستی */
ul.products.list-view .card-content { flex-direction: row; flex-grow: 1; align-items: center; justify-content: space-between; }
ul.products.list-view .card-info { flex-grow: 1; display: flex; flex-direction: column; align-items: center; } /* وسط‌چین کردن کل محتوا */
ul.products.list-view .card-title { font-size: 16px; margin-bottom: 20px; text-align: center; }

/* نمایش ویژگی‌ها با نقطه آبی در حالت لیستی */
ul.products.list-view .card-specs { 
    display: flex !important; /* جلوگیری قطعی از مخفی شدن */
    flex-direction: column; gap: 12px; background: transparent; padding: 0; border: none; width: 100%; max-width: 450px; margin: 0; 
}
ul.products.list-view .c-spec-row { display: flex; justify-content: space-between; font-size: 13px; border-bottom: none; padding-bottom: 0; }
ul.products.list-view .c-spec-name { width: 140px; color: #64748b; font-weight: 500; position: relative; padding-right: 15px; text-align: right; }
/* ایجاد نقطه آبی کنار ویژگی‌ها */
ul.products.list-view .c-spec-name::before { 
    content: ''; position: absolute; right: 0; top: 6px; width: 6px; height: 6px; 
    background: #3b82f6; 
    border-radius: 50%; 
}
ul.products.list-view .c-spec-val { font-weight: 900; color: #111; direction: ltr; text-align: left; }

/* بخش اکشن (قیمت و سبد خرید) جدا شده با خط‌چین عمودی */
ul.products.list-view .card-action { 
    flex-direction: column; min-width: 200px; 
    border-top: none; border-right: 1px dashed #cbd5e1; /* خط‌چین عمودی تفکیک‌کننده */
    padding-top: 0; padding-right: 30px; margin-right: 30px; 
    gap: 20px; align-items: center; justify-content: center; 
}
ul.products.list-view .card-price { text-align: center; font-size: 22px; }
ul.products.list-view .card-add-btn { width: 100%; }
ul.products.list-view .card-add-btn .add_to_cart_button { width: 100%; padding: 12px 14px !important; font-size: 14px !important; }

/* ریسپانسیو موبایل */
@media (max-width: 992px) { ul.products { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 768px) { 
    ul.products.list-view .modern-product-card .card-inner { flex-direction: column; gap: 15px; } 
    ul.products.list-view .card-image { width: 100%; height: 200px; }
    ul.products.list-view .card-content { flex-direction: column; gap: 15px; }
    ul.products.list-view .card-info { border-left: none; padding-left: 0; }
    ul.products.list-view .card-action { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; border-right: none; padding-right: 0; margin-right: 0; border-top: 1px dashed #e2e8f0; padding-top: 15px; }
    ul.products.list-view .card-add-btn { width: auto; }
}
/* مخفی کردن شماره صفحات قدیمی و استایل لودینگ جدید */
.woocommerce-pagination { display: none !important; }
.infinite-scroll-loading {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    padding: 30px; font-weight: bold; color: var(--primary-color); grid-column: 1 / -1;
}
.infinite-scroll-loading svg { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================
   استایل اختصاصی سایدبار فیلترهای ووکامرس
========================================= */
.shop-filter-widget {
    background: #fff; border: 1px solid #f1f5f9; padding: 25px;
    border-radius: 12px; margin-bottom: 25px; box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.filter-title { font-size: 15px; font-weight: 900; color: #111; position: relative; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.filter-title::after { content: ''; position: absolute; bottom: -1px; right: 0; width: 40px; height: 2px; background: var(--primary-color); }

/* ابزارک فیلتر قیمت */
.widget_price_filter .price_slider_wrapper .ui-widget-content { background: #e2e8f0; border: none; height: 6px; border-radius: 4px; }
.widget_price_filter .ui-slider .ui-slider-range { background: var(--primary-color); }
.widget_price_filter .ui-slider .ui-slider-handle { background: #fff; border: 2px solid var(--primary-color); width: 18px; height: 18px; border-radius: 50%; top: -6px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); cursor: ew-resize; outline: none; }
.widget_price_filter .price_slider_amount { display: flex; align-items: center; justify-content: space-between; flex-direction: row-reverse; margin-top: 25px; }
.widget_price_filter .price_slider_amount .button { background: #f1f5f9 !important; color: #475569 !important; border: none !important; padding: 8px 16px !important; border-radius: 6px !important; font-size: 13px !important; font-weight: bold !important; transition: 0.2s !important; }
.widget_price_filter .price_slider_amount .button:hover { background: var(--primary-color) !important; color: #fff !important; }
.widget_price_filter .price_label { font-size: 13px; color: #64748b; font-weight: bold; }

/* ابزارک دسته‌بندی‌ها */
.widget_product_categories ul { list-style: none; padding: 0; margin: 0; }
.widget_product_categories ul li { padding: 10px 0; border-bottom: 1px dashed #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.widget_product_categories ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget_product_categories ul li a { color: #475569; text-decoration: none; font-size: 14px; transition: 0.2s; display: flex; align-items: center; gap: 8px; font-weight: 500; }
.widget_product_categories ul li a::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; transition: 0.2s; }
.widget_product_categories ul li a:hover { color: var(--primary-color); }
.widget_product_categories ul li a:hover::before { background: var(--primary-color); transform: scale(1.5); }
.widget_product_categories ul li .count { background: #f8fafc; color: #94a3b8; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: bold; border: 1px solid #f1f5f9; }

/* ابزارک محصولات اخیر */
.product_list_widget { list-style: none; padding: 0; margin: 0; }
.product_list_widget li { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px dashed #f1f5f9; }
.product_list_widget li:last-child { border-bottom: none; padding-bottom: 0; }
.product_list_widget li img { width: 65px; height: 65px; object-fit: contain; border-radius: 6px; border: 1px solid #f1f5f9; padding: 2px; background: #fff; }
.product_list_widget li .product-title { display: block; font-size: 13px; font-weight: bold; color: #333; text-decoration: none; margin-bottom: 8px; line-height: 1.4; }
.product_list_widget li .product-title:hover { color: var(--primary-color); }
.product_list_widget li .woocommerce-Price-amount { font-size: 14px; font-weight: 900; color: var(--primary-color); }

/* ریسپانسیو موبایل برای کارت‌ها */
@media (max-width: 992px) { ul.products { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 576px) { 
    ul.products { grid-template-columns: 1fr !important; } 
    ul.products.list-view .modern-product-card .card-inner { flex-direction: column; gap: 15px; } 
    ul.products.list-view .card-image { width: 100%; height: 200px; }
    ul.products.list-view .card-content { flex-direction: column; gap: 15px; }
    ul.products.list-view .card-info { border-left: none; padding-left: 0; border-bottom: 1px dashed #e2e8f0; padding-bottom: 15px; }
    ul.products.list-view .card-action { flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
    ul.products.list-view .card-add-btn { width: auto; }
}

/* =========================================
   رید مور (مشاهده بیشتر) متن سئو
========================================= */
.seo-inner-box {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* نمایش فقط 3 خط */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.seo-inner-box.expanded {
    -webkit-line-clamp: unset;
    display: block;
}
.read-more-btn {
    background: none; border: none; color: var(--primary-color); font-weight: 900; font-size: 14px; 
    cursor: pointer; display: flex; align-items: center; gap: 5px; margin-top: 15px; padding: 0;
}
.read-more-btn svg { transition: 0.3s; }
.read-more-btn.expanded svg { transform: rotate(180deg); }

/* ریسپانسیو */
@media (max-width: 992px) { ul.products { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 576px) { ul.products { grid-template-columns: 1fr !important; } ul.products.list-view .modern-product-card .card-inner { flex-direction: column; } ul.products.list-view .card-image { width: 100%; height: 200px; } }





/* =========================================
   بازطراحی کارت محصولات در اسلایدرهای صفحه اصلی
========================================= */

/* 1. هم‌ارتفاع کردن قطعی اسلایدرها و استایل پایه کارت */
.product-slider .swiper-slide { height: auto !important; display: flex; }
.hm-product-card {
    display: flex; flex-direction: column; width: 100%; height: 100%;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px;
    transition: 0.3s ease; box-sizing: border-box; box-shadow: none;
}
.hm-product-card:hover { 
    border-color: var(--primary-color); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); 
    transform: translateY(-3px); 
}

/* 2. تصویر و مدیریت لیبل‌ها (رفع تداخل) */
.hm-card-image { 
    height: 160px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 15px; 
    position: relative !important; /* حیاتی برای نگه داشتن لیبل در کادر */
    border-radius: 8px; 
}
.hm-card-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* لیبل‌های سفارشی (HIGH COPY و...) -> بالا سمت راست */
.hm-card-image .product-custom-labels {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    z-index: 15 !important;
    margin: 0 !important;
}

/* لیبل‌های سیستمی (تخفیف / ناموجود) -> بالا سمت چپ */
.hm-card-image .hm-card-badge, 
.hm-card-image .onsale-badge { 
    position: absolute !important; 
    top: 10px !important; 
    left: 10px !important; /* انتقال به چپ برای جلوگیری از تداخل */
    right: auto !important; 
    margin: 0 !important; 
    font-size: 11px !important; 
    font-weight: bold !important; 
    padding: 4px 8px !important; 
    border-radius: 6px !important; 
    color: #fff !important; 
    z-index: 15 !important; 
    line-height: 1 !important; 
}
.hm-card-image .hm-card-badge.out-of-stock { background: #ef4444 !important; }
.hm-card-image .hm-card-badge.on-sale,
.hm-card-image .onsale-badge { background: #ef4444 !important; }

/* 3. محتوای کارت (هول دادن فوتر به پایین) */
.hm-card-details { display: flex; flex-direction: column; flex-grow: 1; }
.hm-card-title { 
    font-size: 13px; font-weight: 700; color: #111; 
    line-height: 1.6; margin-bottom: 15px; text-align: center; text-decoration: none;
}
.hm-card-title:hover { color: var(--primary-color); }

/* 4. ویژگی‌های بولت‌دار (نقطه آبی و کنترل متون طولانی) */
.hm-card-specs { 
    list-style: none; padding: 10px 12px; margin: 0 0 15px 0; 
    background: #f8fafc; border-radius: 8px; border: 1px solid #f1f5f9; 
}
.hm-card-specs li { 
    display: flex; justify-content: space-between; align-items: center; gap: 8px; 
    font-size: 11px; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px dashed #e2e8f0; 
}
.hm-card-specs li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.hm-spec-name { 
    color: #64748b; position: relative; padding-right: 12px; 
    flex-shrink: 0; white-space: nowrap; 
}
.hm-spec-name::before { 
    content: ''; position: absolute; right: 0; top: 7px; 
    width: 5px; height: 5px; border-radius: 50%; background: #3b82f6; 
}
.hm-spec-val { 
    font-weight: bold; color: #111; direction: ltr; text-align: left; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}

/* 5. فوتر کارت (قیمت و دکمه) */
.hm-card-footer { 
    margin-top: auto; border-top: 1px dashed #e2e8f0; padding-top: 15px; 
    display: flex; flex-direction: column; gap: 12px; 
}
.hm-card-price { text-align: center; font-size: 16px; font-weight: 900; color: #111; display: block; }
.hm-card-price del { font-size: 12px; color: #94a3b8; font-weight: normal; margin-left: 5px; }
.hm-card-price ins { text-decoration: none; color: #dc2626; }

/* 6. استایل دکمه سبد خرید در صفحه اصلی */
.hm-card-action .add_to_cart_button {
    display: flex !important; align-items: center; justify-content: center; gap: 8px;
    width: 100%; background: #fff !important; color: var(--primary-color) !important;
    border: 1px solid var(--primary-color) !important; padding: 10px !important;
    border-radius: 8px !important; font-size: 13px !important; font-weight: 900 !important;
    transition: 0.3s ease !important; margin-top: 0 !important; text-decoration: none !important;
}
.hm-card-action .add_to_cart_button svg { transition: 0.3s; }
.hm-card-action .add_to_cart_button:hover {
    background: var(--primary-color) !important; color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 119, 74, 0.2) !important;
}




/* =========================================
   اصلاح قطعی فواصل خالی و کانتینر
========================================= */
body.woocommerce-cart .custom-shop-container[style] { margin-top: 20px !important; margin-bottom: 40px !important; }
body.woocommerce-cart .custom-shop-container > p, body.woocommerce-cart .woocommerce > p { display: none !important; margin: 0 !important; }
.woocommerce-notices-wrapper:empty { display: none !important; margin: 0 !important; }

/* =========================================
   اسکلت‌بندی بی‌نقص صفحه با CSS Grid (قفل کردن ردیف‌ها)
========================================= */
.woocommerce-cart .woocommerce {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 350px !important; /* ستون راست: منعطف / ستون چپ: 350 پیکسل */
    gap: 30px !important; /* فاصله بین ستون‌ها */
    max-width: 1380px; 
    margin: 0 auto !important; 
    align-items: start !important;
}

/* =========================================
   1. نوار پیشرفت (ردیف اول - تمام عرض)
========================================= */
.modern-checkout-stepper-wrapper {
    grid-column: 1 / -1 !important; 
    grid-row: 1 !important; /* قفل در ردیف اول */
    background: #fff; border: 1px solid #f0f0f0; border-radius: 12px;
    padding: 20px 30px !important; margin: 0 0 10px 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); box-sizing: border-box;
}
.modern-checkout-stepper { display: flex; align-items: center; justify-content: space-between; max-width: 800px; margin: 0 auto; }
.step-item { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #94a3b8; position: relative; width: 100px; z-index: 2; }
.step-icon { width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 2px solid #e2e8f0; display: flex; align-items: center; justify-content: center; transition: 0.3s ease; }
.step-icon svg { transition: 0.3s; color: #94a3b8; width: 24px; height: 24px; }
.step-label { font-size: 13px; font-weight: bold; white-space: nowrap; }

.step-item.completed .step-icon { background: var(--primary-color); border-color: var(--primary-color); }
.step-item.completed .step-icon svg { color: #fff; }
.step-item.completed .step-label { color: var(--primary-color); }
.step-item.active .step-icon { border-color: var(--primary-color); background: #fff; box-shadow: 0 0 0 5px rgba(0, 119, 74, 0.1); }
.step-item.active .step-icon svg { color: var(--primary-color); animation: bounce-icon 2s infinite ease-in-out; }
.step-item.active .step-label { color: #111; font-weight: 900; }

@keyframes bounce-icon { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* خط‌چین متحرک */
.step-line {
    flex-grow: 1; height: 3px; position: relative; top: -15px; margin: 0 10px;
    background-image: linear-gradient(to right, #e2e8f0 50%, transparent 50%);
    background-size: 16px 3px; background-repeat: repeat-x; z-index: 1;
}
.step-line.completed { background: var(--primary-color); }
.step-line.animated {
    background-image: linear-gradient(to right, var(--primary-color) 50%, #e2e8f0 50%);
    background-size: 16px 3px; animation: dash-move-rtl 1s linear infinite;
}
@keyframes dash-move-rtl { 0% { background-position: 16px 0; } 100% { background-position: 0 0; } }

/* =========================================
   2. باکس پیام‌ها (ردیف دوم)
========================================= */
.woocommerce-notices-wrapper { 
    grid-column: 1 / -1 !important; 
    grid-row: 2 !important; 
    margin: 0 !important; 
}

/* =========================================
   3. جدول سبد خرید (ردیف سوم - ستون راست)
========================================= */
.woocommerce-cart .woocommerce-cart-form { 
    grid-column: 1 / 2 !important; 
    grid-row: 3 !important; /* قفل در ردیف سوم */
    margin: 0 !important; padding: 0 !important; min-width: 100% !important;
}

.woocommerce-cart-form table.shop_table { 
    border: none !important; border-collapse: separate !important; border-spacing: 0 15px !important; 
    background: transparent !important; width: 100% !important; table-layout: auto !important; margin: 0 !important;
}
.woocommerce-cart-form table.shop_table thead { display: none !important; }
.woocommerce-cart-form table.shop_table tbody { display: table-row-group !important; }
.woocommerce-cart-form table.shop_table tr.cart_item { 
    display: table-row !important; background: #fff !important; box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}
.woocommerce-cart-form table.shop_table td {
    display: table-cell !important; border-top: 1px solid #f0f0f0 !important; border-bottom: 1px solid #f0f0f0 !important; 
    background: #fff !important; padding: 20px 15px !important; vertical-align: middle !important; border-left: none !important; border-right: none !important;
}
.woocommerce-cart-form table.shop_table td:first-child { border-right: 1px solid #f0f0f0 !important; border-radius: 0 12px 12px 0 !important; }
.woocommerce-cart-form table.shop_table td:last-child { border-left: 1px solid #f0f0f0 !important; border-radius: 12px 0 0 12px !important; }

/* جزئیات داخل جدول */
.woocommerce-cart-form table.shop_table td.product-thumbnail { width: 90px; text-align: center; }
.woocommerce-cart-form table.shop_table td.product-thumbnail img { width: 70px !important; height: 70px !important; object-fit: contain !important; border-radius: 8px !important; border: 1px solid #f1f5f9 !important; padding: 5px !important; }
.woocommerce-cart-form table.shop_table td.product-name a { font-weight: bold !important; color: #111 !important; font-size: 14px !important; text-decoration: none !important; display: block; line-height: 1.6; }
.woocommerce-cart-form table.shop_table td.product-name a:hover { color: var(--primary-color) !important; }
.woocommerce-cart-form table.shop_table td.product-price, 
.woocommerce-cart-form table.shop_table td.product-subtotal { font-weight: 900 !important; color: var(--primary-color) !important; font-size: 16px !important; white-space: nowrap; text-align: center; }
.woocommerce-cart-form table.shop_table td.product-quantity { width: 120px; text-align: center; }
.woocommerce-cart-form table.shop_table td.product-remove { width: 50px; text-align: center; }
.woocommerce-cart-form table.shop_table td.product-remove a {
    color: #ef4444 !important; font-size: 24px !important; font-weight: normal !important; background: #fee2e2 !important; border-radius: 8px !important;
    display: inline-flex !important; width: 35px !important; height: 35px !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; transition: 0.3s !important; line-height: 1 !important; margin: 0 auto;
}
.woocommerce-cart-form table.shop_table td.product-remove a:hover { background: #ef4444 !important; color: #fff !important; }

/* دکمه‌های پایین جدول */
.woocommerce-cart-form table.shop_table tr:last-child { display: table-row !important; }
.woocommerce-cart-form table.shop_table td.actions { text-align: right !important; padding: 20px !important; border: 1px solid #f0f0f0 !important; border-radius: 12px !important; background: #fff !important; margin: 0 !important; }
.woocommerce-cart-form .actions .coupon { display: inline-flex; gap: 10px; float: right; }
.woocommerce-cart-form .actions .coupon input { border: 1px solid #e2e8f0 !important; border-radius: 8px !important; padding: 10px 15px !important; width: 220px; }
.woocommerce-cart-form .actions .button { background: #f8fafc !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; border-radius: 8px !important; padding: 10px 20px !important; font-weight: bold !important; cursor: pointer; transition: 0.3s; margin-right: 10px; float: left; }
.woocommerce-cart-form .actions .button[name="update_cart"] { background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important; }

/* =========================================
   4. فاکتور نهایی (ردیف سوم - ستون چپ) -> حل ۱۰۰٪ مشکل بریده شدن
========================================= */
.woocommerce-cart .cart-collaterals { display: contents !important; }

.woocommerce-cart .cart-collaterals .cart_totals { 
    grid-column: 2 / 3 !important; 
    grid-row: 3 / 5 !important; 
    position: sticky !important; top: 90px !important; 
    background: #fff !important; border-radius: 12px !important; padding: 25px !important; 
    border: 1px solid #f0f0f0 !important; box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important; 
    box-sizing: border-box !important; margin: 0 !important; 
    
    /* کلید اصلی: ارتفاع خودکار و پاک‌سازی فضای شناور برای رفع بیرون‌زدگی دکمه */
    height: auto !important; 
    display: block !important; 
    overflow: hidden !important; 
}
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals {
  float: left;
  width: 100% !important;
}
.cart_totals h2 { font-size: 18px !important; border-bottom: 1px dashed #e2e8f0 !important; padding-bottom: 15px !important; margin-top: 0 !important; font-weight: 900 !important; color: #111; }
.cart_totals table.shop_table { border: none !important; border-collapse: collapse !important; width: 100% !important; margin-bottom: 20px !important; }
.cart_totals table.shop_table th, .cart_totals table.shop_table td { display: table-cell !important; border: none !important; border-bottom: 1px dashed #f1f5f9 !important; padding: 15px 0 !important; background: transparent !important; vertical-align: middle !important; }
.cart_totals table.shop_table th { text-align: right !important; color: #64748b !important; font-weight: bold !important; width: 40%; }
.cart_totals table.shop_table td { text-align: left !important; } /* چپ‌چین کردن مقادیر برای زیبایی بیشتر */
.cart_totals table.shop_table tr.order-total td { font-size: 22px !important; font-weight: 900 !important; color: #dc2626 !important; }

.wc-proceed-to-checkout { 
    display: block !important; 
    clear: both !important; 
    float: none !important; 
    width: 100% !important; 
    margin-top: 20px !important; 
}
.wc-proceed-to-checkout a.checkout-button { 
    background: var(--primary-color) !important; color: #fff !important; padding: 15px !important; border-radius: 8px !important; font-size: 16px !important; 
    font-weight: bold !important; width: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; gap: 10px !important; margin: 0 !important; transition: 0.3s !important; box-sizing: border-box; text-decoration: none;
}
.wc-proceed-to-checkout a.checkout-button:hover { box-shadow: 0 5px 20px rgba(0, 119, 74, 0.3) !important; transform: translateY(-2px) !important; }

/* =========================================
   5. محصولات پیشنهادی (ردیف چهارم - ستون راست - 3 ستونه)
========================================= */
.woocommerce-cart .cart-collaterals .cross-sells { 
    grid-column: 1 / 2 !important; /* قفل در ستون راست دقیقاً زیر جدول */
    grid-row: 4 !important; /* قفل در ردیف چهارم */
    width: 100% !important; 
    margin: 0 !important; padding: 0 !important; 
}
.woocommerce-cart .cross-sells h2 { font-size: 16px !important; font-weight: 900 !important; margin-bottom: 20px !important; border-bottom: 2px solid #e2e8f0 !important; padding-bottom: 10px !important; color: #111; }
.woocommerce-cart .cross-sells ul.products { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; /* دقیقا 3 ستون در کنار هم */
    gap: 20px !important; margin: 0 !important; padding: 0 !important; 
}

/* =========================================
   ریسپانسیو
========================================= */
@media (max-width: 992px) {
    .woocommerce-cart .woocommerce { grid-template-columns: 1fr !important; }
    .modern-checkout-stepper-wrapper { grid-column: 1 / -1 !important; grid-row: 1 !important; padding: 15px !important; }
    .woocommerce-notices-wrapper { grid-column: 1 / -1 !important; grid-row: 2 !important; }
    .woocommerce-cart .woocommerce-cart-form { grid-column: 1 / -1 !important; grid-row: 3 !important; }
    .woocommerce-cart .cart-collaterals .cart_totals { grid-column: 1 / -1 !important; grid-row: 4 !important; position: relative !important; top: 0 !important; }
    .woocommerce-cart .cart-collaterals .cross-sells { grid-column: 1 / -1 !important; grid-row: 5 !important; margin-top: 20px !important; }
    .woocommerce-cart .cross-sells ul.products { grid-template-columns: repeat(2, 1fr) !important; }
    .woocommerce-cart-form .actions .coupon { width: 100%; display: flex; flex-direction: column; margin-bottom: 10px; float: none; }
    .woocommerce-cart-form .actions .coupon input { width: 100%; }
    .woocommerce-cart-form .actions .button { width: 100%; float: none; margin-right: 0; }
    .step-icon { width: 40px !important; height: 40px !important; }
    .step-icon svg { width: 18px !important; height: 18px !important; }
    .step-label { font-size: 11px !important; }
}
@media (max-width: 768px) {
    .woocommerce-cart-form table.shop_table td { display: block !important; width: 100% !important; text-align: center !important; border: none !important; padding: 10px !important; }
    .woocommerce-cart-form table.shop_table tr.cart_item { display: flex !important; flex-direction: column !important; position: relative; padding: 20px !important; }
    .woocommerce-cart-form table.shop_table td.product-remove { position: absolute; top: 10px; right: 10px; width: auto !important; padding: 0 !important; }
    .woocommerce-cart-form table.shop_table td.product-thumbnail { margin: 0 auto; }
}
@media (max-width: 576px) {
    .woocommerce-cart .cross-sells ul.products { grid-template-columns: 1fr !important; }
}






/* =========================================
   بازطراحی صفحه تسویه حساب (دو ستونه مدرن با CSS Grid)
========================================= */

/* 1. اسکلت‌بندی دو ستونه */
.woocommerce-checkout form.checkout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 400px !important; /* ستون راست: منعطف / ستون چپ: 400 پیکسل */
    gap: 30px !important;
    align-items: start !important;
    margin-top: 10px !important;
}

/* 2. ستون راست (فرم اطلاعات مشتری) */
.woocommerce-checkout #customer_details {
    grid-column: 1 / 2 !important;
    background: #fff !important;
    padding: 30px !important;
    border-radius: 12px !important;
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
    margin: 0 !important;
}
.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
    width: 100% !important; /* تمام عرض کردن فرم صورتحساب و حمل و نقل */
    float: none !important;
    padding: 0 !important;
}
.woocommerce-checkout h3 {
    font-size: 18px !important;
    font-weight: 900 !important;
    color: #111 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding-bottom: 10px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* استایل فیلدهای فرم اطلاعات */
.woocommerce-checkout .form-row { margin-bottom: 15px !important; }
.woocommerce-checkout .form-row label {
    display: block !important; margin-bottom: 8px !important;
    font-weight: bold !important; color: #333 !important; font-size: 13px !important;
}
.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select,
.select2-container .select2-selection--single {
    width: 100% !important; padding: 12px 15px !important; height: auto !important;
    border: 1px solid #e2e8f0 !important; border-radius: 8px !important;
    background: #f8fafc !important; font-size: 14px !important;
    transition: 0.3s !important; box-sizing: border-box !important; color: #333 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow { top: 12px !important; left: 10px !important; right: auto !important; }
.woocommerce-checkout .form-row input.input-text:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: var(--primary-color) !important; background: #fff !important;
    box-shadow: 0 0 0 3px rgba(0, 119, 74, 0.1) !important; outline: none !important;
}

/* 3. ستون چپ (سفارش، روش ارسال و درگاه پرداخت) */
.woocommerce-checkout #order_review_heading { display: none !important; /* مخفی کردن تیتر اضافه */ }
.woocommerce-checkout #order_review {
    grid-column: 2 / 3 !important;
    position: sticky !important; top: 90px !important;
    background: #fff !important; padding: 25px !important;
    border-radius: 12px !important; border: 1px solid #f0f0f0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06) !important;
    box-sizing: border-box !important; margin: 0 !important;
}

/* جدول سفارش داخل ستون چپ */
.woocommerce-checkout table.shop_table {
    width: 100% !important; border-collapse: collapse !important; border: none !important; margin-bottom: 20px !important;
}
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    border: none !important; border-bottom: 1px dashed #e2e8f0 !important;
    padding: 15px 0 !important; text-align: left !important; background: transparent !important;
}
.woocommerce-checkout table.shop_table th { text-align: right !important; color: #64748b !important; font-weight: bold !important; width: 40%; }
.woocommerce-checkout table.shop_table tbody td.product-name { font-size: 13px !important; font-weight: bold !important; color: #111 !important; text-align: right !important; line-height: 1.6 !important; }
.woocommerce-checkout table.shop_table tbody td.product-total { font-weight: bold !important; color: var(--primary-color) !important; }
.woocommerce-checkout table.shop_table tfoot tr.order-total td { font-size: 22px !important; font-weight: 900 !important; color: #dc2626 !important; }

/* باکس انتخاب درگاه پرداخت */
.woocommerce-checkout #payment {
    background: #f8fafc !important; border-radius: 8px !important;
    padding: 20px !important; border: 1px solid #e2e8f0 !important;
}
.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px dashed #cbd5e1 !important; padding: 0 0 15px 0 !important; margin: 0 0 15px 0 !important;
}
.woocommerce-checkout #payment ul.payment_methods li { list-style: none !important; margin-bottom: 10px !important; }
.woocommerce-checkout #payment ul.payment_methods li label { font-weight: bold !important; color: #111 !important; cursor: pointer; display: inline-block; margin-right: 8px; }
.woocommerce-checkout #payment div.payment_box {
    background: #fff !important; padding: 15px !important; border-radius: 8px !important;
    font-size: 12px !important; color: #64748b !important; margin-top: 10px !important;
    border: 1px solid #e2e8f0 !important; position: relative !important; line-height: 1.6;
}
.woocommerce-checkout #payment div.payment_box::before {
    content: ''; position: absolute; top: -6px; right: 20px; width: 10px; height: 10px;
    background: #fff; border-top: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; transform: rotate(-45deg);
}

/* دکمه نهایی ثبت سفارش */
.woocommerce-checkout #payment .place-order { padding: 0 !important; margin: 0 !important; }
.woocommerce-checkout #payment .place-order .button {
    width: 100% !important; background: var(--primary-color) !important; color: #fff !important;
    padding: 15px !important; border-radius: 8px !important; font-size: 16px !important;
    font-weight: 900 !important; border: none !important; transition: 0.3s !important; cursor: pointer !important; margin-top: 10px !important;
}
.woocommerce-checkout #payment .place-order .button:hover {
    box-shadow: 0 5px 20px rgba(0, 119, 74, 0.3) !important; transform: translateY(-2px) !important;
}

/* ریسپانسیو صفحه تسویه حساب برای موبایل و تبلت */
@media (max-width: 992px) {
    .woocommerce-checkout form.checkout { grid-template-columns: 1fr !important; }
    .woocommerce-checkout #customer_details { grid-column: 1 / -1 !important; grid-row: 1 !important; padding: 20px !important; }
    .woocommerce-checkout #order_review { grid-column: 1 / -1 !important; grid-row: 2 !important; position: relative !important; top: 0 !important; }
}







/* =========================================
   بازطراحی صفحه تکمیل سفارش (تشکر از خرید)
========================================= */

/* مخفی کردن پیام متنی پیش‌فرض و زشت ووکامرس */
.woocommerce-order > p.woocommerce-notice { display: none !important; }

/* اصلاح رفتار استپر در صفحه آخر */
.step-item.active.completed .step-icon {
    background: #fff !important; border-color: var(--primary-color) !important; box-shadow: 0 0 0 5px rgba(0, 119, 74, 0.1) !important;
}
.step-item.active.completed .step-icon svg {
    color: var(--primary-color) !important; animation: bounce-icon 2s infinite ease-in-out !important;
}
.step-item.active.completed .step-label { color: #111 !important; font-weight: 900 !important; }

/* 1. کادر پیام موفقیت (بسیار جمع‌وجور و مرتب با Grid) */
.modern-thankyou-actions { text-align: center; margin-top: 10px; margin-bottom: 30px; }
.success-message-box { 
    display: grid !important;
    grid-template-columns: 60px 1fr !important; /* آیکون در کنار متن */
    gap: 5px 20px !important;
    max-width: 480px !important; /* کوچک و فشرده کردن کادر */
    margin: 0 auto 20px auto !important;
    padding: 20px !important;
    background: #f0fdf4 !important; border: 1px solid #bbf7d0 !important; border-radius: 12px !important;
}
.success-icon { 
    grid-column: 1; grid-row: 1 / span 2; margin: 0 !important; width: 60px !important; height: 60px !important; 
    background: #22c55e; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3); animation: scale-up 0.5s ease;
}
.success-icon svg { width: 30px; height: 30px; }
@keyframes scale-up { 0% { transform: scale(0); } 80% { transform: scale(1.1); } 100% { transform: scale(1); } }
.success-message-box h2 { grid-column: 2; grid-row: 1; align-self: end !important; margin: 0 !important; font-size: 18px !important; color: #166534 !important; font-weight: 900; text-align: right; }
.success-message-box p { grid-column: 2; grid-row: 2; align-self: start !important; margin: 0 !important; font-size: 13px !important; color: #15803d !important; text-align: right; }

.action-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.btn-dashboard { background: #1e293b; color: #fff !important; text-decoration: none !important; padding: 12px 25px; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-weight: bold; transition: 0.3s; }
.btn-dashboard:hover { background: #0f172a; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.btn-print { background: #fff; color: #475569; border: 1px solid #cbd5e1; padding: 12px 25px; border-radius: 8px; display: flex; align-items: center; gap: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; font-family: inherit; font-size: 15px; }
.btn-print:hover { background: #f8fafc; color: #111; border-color: #94a3b8; transform: translateY(-2px); }

/* 2. استایل اطلاعات کلی سفارش (قرارگیری دقیق 5 باکس در یک ردیف) */
ul.order_details { 
    display: grid !important; 
    grid-template-columns: repeat(5, 1fr) !important; /* تنظیم روی 5 ستون */
    gap: 15px !important; margin: 0 0 30px 0 !important; padding: 0 !important; border: none !important; 
}
ul.order_details li { 
    list-style: none !important; background: #fff !important; border: 1px solid #e2e8f0 !important; 
    border-radius: 12px !important; padding: 15px 10px !important; text-align: center !important; 
    border-right: none !important; float: none !important; width: 100% !important; 
    box-sizing: border-box !important; color: #64748b !important; text-transform: none !important; font-size: 12px !important;
}
ul.order_details li strong { display: block !important; font-size: 14px !important; color: #111 !important; margin-top: 5px !important; }

/* 3. باکس فاکتور و جزئیات */
.woocommerce-order-details { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 30px; margin-bottom: 40px; box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.woocommerce-order-details h2 { font-size: 18px; font-weight: 900; margin-top: 0; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; }
.woocommerce-order-details table.shop_table { width: 100%; border-collapse: collapse; border: none; margin: 0; }
.woocommerce-order-details table.shop_table thead th { background: #f8fafc; padding: 15px; text-align: right; border: none; border-radius: 8px; color: #64748b; }
.woocommerce-order-details table.shop_table tbody td, .woocommerce-order-details table.shop_table tfoot td { border: none; border-bottom: 1px dashed #e2e8f0; padding: 15px; text-align: left; vertical-align: middle; }
.woocommerce-order-details table.shop_table tbody th, .woocommerce-order-details table.shop_table tfoot th { border: none; border-bottom: 1px dashed #e2e8f0; padding: 15px; text-align: right; font-weight: bold; }
.woocommerce-order-details table.shop_table tbody td.product-name a { color: #111; font-weight: bold; text-decoration: none; }
.woocommerce-order-details table.shop_table tfoot tr:last-child th, .woocommerce-order-details table.shop_table tfoot tr:last-child td { border-bottom: none; }
.woocommerce-order-details table.shop_table tfoot tr:last-child td { font-size: 22px; font-weight: 900; color: #dc2626; }

/* 4. باکس آدرس صورتحساب */
.woocommerce-customer-details { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.woocommerce-customer-details h2 { font-size: 18px; font-weight: 900; margin-top: 0; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 15px; }
.woocommerce-customer-details address { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 25px; font-style: normal; line-height: 1.8; color: #475569; margin: 0; }

/* ریسپانسیو */
@media (max-width: 992px) {
    ul.order_details { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
    ul.order_details { grid-template-columns: repeat(2, 1fr) !important; }
    .woocommerce-customer-details { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .success-message-box { grid-template-columns: 1fr !important; text-align: center; }
    .success-icon { grid-row: 1; margin: 0 auto !important; }
    .success-message-box h2, .success-message-box p { grid-column: 1; text-align: center; }
    ul.order_details { grid-template-columns: 1fr !important; }
}

/* =========================================
   مبدل صفحه به فاکتور رسمی PDF در زمان پرینت / دانلود
========================================= */
@media print {
    @page { size: A4 portrait; margin: 1cm; }
    
    /* مخفی کردن تمام المان‌های سایت به جز فاکتور */
    .site-header, .site-footer, .mobile-bottom-nav, 
    .modern-checkout-stepper-wrapper, .modern-thankyou-actions,
    .woocommerce-notices-wrapper, #wpadminbar, .store-notice { display: none !important; }
    
    /* تنظیمات برگه A4 */
    body, html { background: #fff !important; color: #000 !important; padding: 0 !important; margin: 0 !important; }
    .custom-shop-container { margin: 0 !important; padding: 0 !important; max-width: 100% !important; }
    
    /* اضافه کردن تیتر فاکتور اختصاصی */
    .woocommerce-order::before {
        content: 'فاکتور رسمی فروش - قطعات الکترونیک نگاه ایمن';
        display: block; text-align: center; font-size: 20px; font-weight: bold;
        margin-bottom: 25px; padding-bottom: 15px; border-bottom: 2px solid #000; color: #000;
    }
    
    /* استایل ۵ باکس بالا در حالت چاپ (خطی و کادربندی شده) */
    ul.order_details { 
        display: grid !important; grid-template-columns: repeat(5, 1fr) !important; gap: 0 !important;
        border: 2px solid #000 !important; border-radius: 0 !important; box-shadow: none !important;
        padding: 0 !important; margin-bottom: 30px !important;
    }
    ul.order_details li { border: none !important; border-left: 1px solid #000 !important; padding: 10px 5px !important; color: #000 !important; text-align: center !important; font-size: 11px !important; }
    ul.order_details li:last-child { border-left: none !important; }
    ul.order_details li strong { color: #000 !important; font-size: 12px !important; margin-top: 5px !important; }
    
    /* استایل استاندارد جدول فاکتور (سیاه و سفید) */
    .woocommerce-order-details { border: none !important; box-shadow: none !important; padding: 0 !important; margin-bottom: 30px !important; }
    .woocommerce-order-details h2 { font-size: 16px !important; color: #000 !important; border-bottom: 1px solid #000 !important; padding-bottom: 5px !important; margin-bottom: 15px !important; }
    .woocommerce-order-details table.shop_table { border-collapse: collapse !important; width: 100% !important; border: 2px solid #000 !important; }
    .woocommerce-order-details table.shop_table th, 
    .woocommerce-order-details table.shop_table td { border: 1px solid #000 !important; padding: 10px !important; color: #000 !important; font-size: 12px !important; }
    .woocommerce-order-details table.shop_table thead th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .woocommerce-order-details table.shop_table tbody td.product-name a { color: #000 !important; }
    .woocommerce-order-details table.shop_table tfoot tr.order-total td { font-size: 16px !important; color: #000 !important; }
    
    /* باکس آدرس‌ها در فاکتور */
    .woocommerce-customer-details { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px !important; margin-top: 0 !important; }
    .woocommerce-customer-details section { border: 2px solid #000 !important; padding: 15px !important; border-radius: 0 !important; }
    .woocommerce-customer-details h2 { font-size: 14px !important; border-bottom: 1px solid #000 !important; margin-bottom: 10px !important; color: #000 !important; }
    address { border: none !important; background: transparent !important; padding: 0 !important; color: #000 !important; line-height: 1.8 !important; font-size: 12px !important; }
}









/* =========================================
   سبد خرید کشویی (Mini Cart) هدر
========================================= */
.header-cart-wrapper { position: relative; display: inline-flex; align-items: center; }

/* کادر اصلی دراپ‌داون (مخفی به صورت پیش‌فرض) */
.mini-cart-dropdown {
    position: absolute; top: 100%; left: 50%; 
    width: 350px; background: #fff; border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1); border: 1px solid #f1f5f9;
    padding: 20px; opacity: 0; visibility: hidden;
    transform: translate(-50%, 20px); /* تنظیم دقیق مرکز آیکون */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999; pointer-events: none; margin-top: 20px;
}

/* فلش (مثلث) بالای کادر */
.mini-cart-dropdown::before {
    content: ''; position: absolute; top: -7px; left: 50%; 
    width: 14px; height: 14px; background: #fff; 
    border-top: 1px solid #f1f5f9; border-right: 1px solid #f1f5f9; 
    transform: translateX(-50%) rotate(-45deg);
}

/* نمایش کادر با هاور روی آیکون */
.header-cart-wrapper:hover .mini-cart-dropdown {
    opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto;
}

/* ================== محتویات داخل سبد ================== */
.widget_shopping_cart_content .woocommerce-mini-cart {
    max-height: 320px; overflow-y: auto; margin: 0 !important; padding: 0 !important; list-style: none !important;
}

/* اسکرول‌بار اختصاصی ظریف */
.widget_shopping_cart_content .woocommerce-mini-cart::-webkit-scrollbar { width: 4px; }
.widget_shopping_cart_content .woocommerce-mini-cart::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* هر آیتم محصول */
.widget_shopping_cart_content .woocommerce-mini-cart-item {
    display: flex !important; align-items: center; gap: 15px;
    padding-bottom: 15px !important; margin-bottom: 15px !important;
    border-bottom: 1px dashed #f1f5f9 !important; position: relative;
}

/* دکمه X حذف محصول */
.widget_shopping_cart_content .woocommerce-mini-cart-item a.remove {
    position: absolute; top: 0; left: 0; color: #ef4444 !important; font-size: 18px !important;
    text-decoration: none !important; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
    background: #fee2e2 !important; border-radius: 50% !important; transition: 0.3s; font-weight: normal !important; line-height: 1 !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item a.remove:hover { background: #ef4444 !important; color: #fff !important; }

/* تصویر محصول */
.widget_shopping_cart_content .woocommerce-mini-cart-item img {
    width: 65px !important; height: 65px !important; object-fit: contain !important; 
    border: 1px solid #f1f5f9 !important; border-radius: 8px !important; padding: 3px !important; float: right !important; margin: 0 !important;
}

/* نام محصول */
.widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove) {
    display: block !important; font-size: 13px !important; font-weight: bold !important; color: #111 !important; text-decoration: none !important; line-height: 1.6 !important; margin-bottom: 5px !important; padding-left: 30px;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item a:not(.remove):hover { color: var(--primary-color) !important; }

/* قیمت و تعداد */
.widget_shopping_cart_content .woocommerce-mini-cart-item .quantity {
    font-size: 12px !important; color: #64748b !important; font-weight: bold !important; display: block;
}
.widget_shopping_cart_content .woocommerce-mini-cart-item .quantity .amount { color: var(--primary-color) !important; font-size: 15px !important; margin-right: 5px; }

/* جمع کل (پایین لیست) */
.widget_shopping_cart_content .woocommerce-mini-cart__total {
    display: flex !important; justify-content: space-between !important; align-items: center !important;
    font-size: 15px !important; font-weight: 900 !important; color: #111 !important; margin: 0 0 15px 0 !important; padding-top: 5px !important; border: none !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__total .amount { color: #dc2626 !important; font-size: 18px !important; }

/* دکمه‌های سبد خرید و تسویه حساب */
.widget_shopping_cart_content .woocommerce-mini-cart__buttons {
    display: flex !important; gap: 10px !important; margin: 0 !important; padding: 0 !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a {
    flex: 1 !important; text-align: center !important; padding: 12px !important; border-radius: 8px !important; font-weight: bold !important; font-size: 13px !important; text-decoration: none !important; transition: 0.3s !important; display: block !important; margin: 0 !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a:not(.checkout) {
    background: #f8fafc !important; color: #475569 !important; border: 1px solid #e2e8f0 !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a:not(.checkout):hover { background: #e2e8f0 !important; color: #111 !important; }
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a.checkout {
    background: var(--primary-color) !important; color: #fff !important; border: none !important;
}
.widget_shopping_cart_content .woocommerce-mini-cart__buttons a.checkout:hover {
    box-shadow: 0 5px 15px rgba(0, 119, 74, 0.3) !important; transform: translateY(-2px) !important;
}

/* حالت سبد خرید خالی */
.widget_shopping_cart_content .woocommerce-mini-cart__empty-message { text-align: center !important; color: #94a3b8 !important; font-weight: bold !important; padding: 20px 0 !important; margin: 0 !important; font-size: 14px !important; }







/* =========================================
   صفحه تماس با ما - طراحی مدرن
========================================= */

/* 1. بخش هیرو (شعار بالای صفحه) */
.contact-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 80px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.contact-hero-content h1 { color: #fff; font-size: 32px; font-weight: 900; margin: 0 0 15px 0; }
.contact-hero-content p { color: #94a3b8; font-size: 16px; margin: 0; max-width: 600px; margin: 0 auto; line-height: 1.8; }

/* 2. کارت‌های اطلاعات تماس (4 ستونه) */
.contact-info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px; margin-bottom: 50px;
    margin-top: -80px; /* کشیدن کارت‌ها روی بخش هیرو */
}
.contact-card {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 16px;
    padding: 30px 20px; text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
}
.contact-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: var(--primary-color); }
.contact-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-color); opacity: 0; transition: 0.3s; }
.contact-card:hover::before { opacity: 1; }

.contact-card .card-icon {
    width: 60px; height: 60px; background: #f8fafc; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px auto; color: var(--primary-color); transition: 0.3s;
}
.contact-card:hover .card-icon { background: var(--primary-color); color: #fff; }
.contact-card .card-icon svg { width: 28px; height: 28px; }
.contact-card h3 { font-size: 16px; font-weight: 900; color: #111; margin: 0 0 10px 0; }
.contact-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.8; }

/* 3. گرید دو ستونه (فرم و نقشه) */
.contact-grid-section {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; margin-bottom: 60px;
}

/* 4. باکس فرم تماس */
.contact-form-box {
    background: #fff; padding: 40px; border-radius: 16px; border: 1px solid #f0f0f0; box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}
.contact-form-box h2 { font-size: 22px; font-weight: 900; color: #111; margin: 0 0 10px 0; }
.contact-form-box > p { font-size: 14px; color: #64748b; margin: 0 0 30px 0; }

/* استایل عمومی برای فرم‌ها (گرویتی فرم یا استاندارد) */
.form-wrapper input[type="text"], .form-wrapper input[type="email"], .form-wrapper textarea {
    width: 100%; padding: 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 14px; font-family: inherit; margin-bottom: 20px; transition: 0.3s; box-sizing: border-box;
}
.form-wrapper input:focus, .form-wrapper textarea:focus {
    border-color: var(--primary-color); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 74, 0.1);
}
.form-wrapper input[type="submit"], .form-wrapper button[type="submit"] {
    background: var(--primary-color); color: #fff; border: none; padding: 15px 30px; font-size: 16px; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.3s; width: 100%; font-family: inherit;
}
.form-wrapper input[type="submit"]:hover, .form-wrapper button[type="submit"]:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 119, 74, 0.2); }

/* 5. باکس سایدبار (نقشه و شبکه‌های اجتماعی) */
.contact-sidebar-box { display: flex; flex-direction: column; gap: 30px; }
.contact-sidebar-box h2 { font-size: 20px; font-weight: 900; color: #111; margin: 0 0 15px 0; }
.map-container { border-radius: 16px; overflow: hidden; border: 1px solid #e2e8f0; height: 300px; }
.map-container iframe { width: 100%; height: 100%; }

.social-links-section { background: #f8fafc; padding: 30px; border-radius: 16px; border: 1px solid #e2e8f0; text-align: center; }
.social-links-section h3 { font-size: 16px; font-weight: bold; color: #333; margin: 0 0 20px 0; }
.social-icons { display: flex; gap: 15px; justify-content: center; }
.social-icon { 
    width: 45px; height: 45px; background: #fff; border: 1px solid #e2e8f0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #64748b; transition: 0.3s;
}
.social-icon svg { width: 22px; height: 22px; }
.social-icon:hover { transform: translateY(-3px); color: #fff; border-color: transparent; }
.social-icon.telegram:hover { background: #0088cc; box-shadow: 0 5px 15px rgba(0, 136, 204, 0.3); }
.social-icon.instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3); }
.social-icon.whatsapp:hover { background: #25D366; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }
.social-icon.linkedin:hover { background: #0077b5; box-shadow: 0 5px 15px rgba(0, 119, 181, 0.3); }

/* ریسپانسیو */
@media (max-width: 1024px) {
    .contact-info-cards { grid-template-columns: repeat(2, 1fr); margin-top: 30px; }
    .contact-hero { border-radius: 0 0 20px 20px; padding: 60px 20px; }
}
@media (max-width: 768px) {
    .contact-grid-section { grid-template-columns: 1fr; gap: 30px; }
    .contact-form-box { padding: 25px; }
}
@media (max-width: 576px) {
    .contact-info-cards { grid-template-columns: 1fr; }
}




/* =========================================
   بازطراحی حساب کاربری (داشبورد مدرن) - نسخه نهایی با Grid
========================================= */

/* تنظیمات کانتینر اصلی صفحه */
body.woocommerce-account .custom-shop-container { margin-top: 40px !important; margin-bottom: 60px !important; }

/* اسکلت‌بندی دو ستونه با Grid (قفل قطعی در کنار هم) */
.woocommerce-account .woocommerce {
    display: grid !important;
    /* در سایت راست‌چین: ستون اول(راست) 300px، ستون دوم(چپ) بقیه فضا */
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 30px !important;
    max-width: 1380px; 
    margin: 0 auto !important;
    align-items: start !important;
}

/* حذف المان‌های نامرئی مزاحم ووکامرس که باعث افتادگی می‌شوند */
.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
    display: none !important;
}

/* =========================================
   1. منوی سایدبار حساب کاربری (ستون راست)
========================================= */
.woocommerce-account .woocommerce-MyAccount-navigation {
    grid-column: 1 / 2 !important; /* قفل در ستون راست */
    grid-row: 1 !important;
    width: 100% !important; max-width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important;
}

.woocommerce-MyAccount-navigation ul {
    background: #fff !important; border: 1px solid #f0f0f0 !important; border-radius: 16px !important;
    padding: 15px !important; margin: 0 !important; list-style: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02) !important;
}
.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px dashed #f1f5f9 !important; margin-bottom: 5px !important; padding-bottom: 5px !important; display: block !important; width: 100% !important;
}
.woocommerce-MyAccount-navigation ul li:last-child { border-bottom: none !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.woocommerce-MyAccount-navigation ul li a {
    display: flex !important; align-items: center !important; padding: 12px 15px !important; color: #475569 !important; font-weight: bold !important; font-size: 14px !important;
    border-radius: 8px !important; transition: 0.3s !important; text-decoration: none !important; width: 100% !important; box-sizing: border-box !important;
}
.woocommerce-MyAccount-navigation ul li a:hover {
    background: #f8fafc !important; color: var(--primary-color) !important; padding-right: 25px !important;
}
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: var(--primary-color) !important; color: #fff !important; box-shadow: 0 5px 15px rgba(0, 119, 74, 0.2) !important;
}

/* =========================================
   2. باکس محتوای حساب کاربری (ستون چپ)
========================================= */
.woocommerce-account .woocommerce-MyAccount-content {
    grid-column: 2 / 3 !important; /* قفل در ستون چپ */
    grid-row: 1 !important;
    width: 100% !important; max-width: 100% !important; float: none !important;
    background: #fff !important; border: 1px solid #f0f0f0 !important; border-radius: 16px !important;
    padding: 35px !important; box-shadow: 0 10px 30px rgba(0,0,0,0.02) !important; box-sizing: border-box !important; margin: 0 !important;
}

/* استایل تیترها و متون */
.woocommerce-MyAccount-content > p { font-size: 15px !important; color: #475569 !important; line-height: 1.8 !important; margin-bottom: 25px !important; }
.woocommerce-MyAccount-content > p a { color: var(--primary-color) !important; font-weight: bold !important; text-decoration: none !important; }
h3.custom-dashboard-title, .woocommerce-MyAccount-content h3, .woocommerce-MyAccount-content h2 { font-size: 20px !important; font-weight: 900 !important; margin-top: 0 !important; margin-bottom: 15px !important; color: #111 !important; border-bottom: 2px solid #f1f5f9 !important; padding-bottom: 15px !important; }
p.custom-dashboard-desc { color: #64748b !important; margin-bottom: 25px !important; font-size: 14px !important; }

/* استایل جداول (سفارشات، آدرس‌ها و دانلودها) */
.woocommerce-MyAccount-content table.shop_table { width: 100% !important; border-collapse: collapse !important; border: none !important; margin-bottom: 30px !important; }
.woocommerce-MyAccount-content table.shop_table thead th { background: #f8fafc !important; padding: 15px !important; text-align: right !important; border: none !important; border-radius: 8px !important; color: #64748b !important; font-weight: bold !important; }
.woocommerce-MyAccount-content table.shop_table tbody td { border: none !important; border-bottom: 1px dashed #e2e8f0 !important; padding: 15px !important; text-align: right !important; vertical-align: middle !important; font-size: 14px !important; }
.woocommerce-MyAccount-content table.shop_table tbody tr:last-child td { border-bottom: none !important; }
.woocommerce-MyAccount-content table.shop_table tbody td.woocommerce-orders-table__cell-order-actions a.button { background: #f8fafc !important; color: #111 !important; padding: 8px 15px !important; border-radius: 6px !important; text-decoration: none !important; border: 1px solid #e2e8f0 !important; font-size: 12px !important; transition: 0.3s !important; margin-right: 5px !important; display: inline-block !important; }
.woocommerce-MyAccount-content table.shop_table tbody td.woocommerce-orders-table__cell-order-actions a.button:hover { background: var(--primary-color) !important; color: #fff !important; border-color: var(--primary-color) !important; }

/* =========================================
   3. فرم‌های حساب کاربری (ویرایش آدرس، پیگیری)
========================================= */
.modern-order-tracking-wrapper form.track_order,
.woocommerce-EditAccountForm, .woocommerce-address-fields { background: #f8fafc !important; padding: 30px !important; border-radius: 12px !important; border: 1px solid #e2e8f0 !important; max-width: 600px !important; margin-top: 20px !important; }
.woocommerce-MyAccount-content .form-row { margin-bottom: 20px !important; width: 100% !important; float: none !important; }
.woocommerce-MyAccount-content .form-row label { display: block !important; margin-bottom: 8px !important; font-weight: bold !important; font-size: 13px !important; color: #111 !important; }
.woocommerce-MyAccount-content input.input-text, .woocommerce-MyAccount-content textarea { width: 100% !important; padding: 12px 15px !important; border-radius: 8px !important; border: 1px solid #cbd5e1 !important; font-family: inherit !important; font-size: 14px !important; box-sizing: border-box !important; background: #fff !important; transition: 0.3s !important; }
.woocommerce-MyAccount-content input.input-text:focus, .woocommerce-MyAccount-content textarea:focus { border-color: var(--primary-color) !important; box-shadow: 0 0 0 3px rgba(0, 119, 74, 0.1) !important; outline: none !important; }
.woocommerce-MyAccount-content .button { background: var(--primary-color) !important; color: #fff !important; padding: 12px 25px !important; border: none !important; border-radius: 8px !important; font-size: 15px !important; font-weight: bold !important; cursor: pointer !important; transition: 0.3s !important; }
.woocommerce-MyAccount-content .button:hover { box-shadow: 0 5px 15px rgba(0, 119, 74, 0.3) !important; transform: translateY(-2px) !important; }

/* ریسپانسیو */
@media (max-width: 992px) {
    .woocommerce-account .woocommerce { grid-template-columns: 1fr !important; }
    .woocommerce-account .woocommerce-MyAccount-navigation { grid-column: 1 / -1 !important; grid-row: 1 !important; }
    .woocommerce-account .woocommerce-MyAccount-content { grid-column: 1 / -1 !important; grid-row: 2 !important; padding: 25px !important; }
    .woocommerce-MyAccount-navigation ul { display: flex !important; flex-wrap: wrap !important; gap: 10px !important; padding: 10px !important; }
    .woocommerce-MyAccount-navigation ul li { border-bottom: none !important; margin: 0 !important; flex: 1 1 calc(50% - 10px) !important; padding: 0 !important; }
    .woocommerce-MyAccount-navigation ul li a { justify-content: center !important; text-align: center !important; }
}
@media (max-width: 576px) {
    .woocommerce-MyAccount-navigation ul li { flex: 1 1 100% !important; }
    .woocommerce-account .woocommerce-MyAccount-content { padding: 20px !important; }
}







/* =========================================
   صفحه وبلاگ / مجله آموزشی - طراحی مدرن
========================================= */

/* 1. بخش هیرو (عنوان مجله) */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #064e3b 100%);
    padding: 70px 20px; text-align: center;
    border-radius: 0 0 40px 40px; margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.blog-hero-content h1 { color: #fff; font-size: 32px; font-weight: 900; margin: 0 0 10px 0; }
.blog-hero-content p { color: #d1fae5; font-size: 16px; margin: 0; max-width: 600px; margin: 0 auto; }

/* 2. گرید مقالات (3 ستونه) */
.modern-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; margin-bottom: 50px;
}

/* 3. کارت اختصاصی هر مقاله */
.modern-blog-card {
    background: #fff; border: 1px solid #f0f0f0; border-radius: 16px;
    overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03); transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modern-blog-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.08); border-color: #cbd5e1; }

/* بخش تصویر بندانگشتی */
.card-thumb-link { display: block; overflow: hidden; position: relative; }
.card-thumb { width: 100%; height: 220px; position: relative; overflow: hidden; background: #f8fafc; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; display: block; }
.modern-blog-card:hover .card-thumb img { transform: scale(1.08); }

/* برچسب دسته‌بندی روی تصویر */
.card-category {
    position: absolute; top: 15px; right: 15px;
    background: #fff; color: var(--primary-color); font-size: 12px; font-weight: bold;
    padding: 5px 12px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 2;
}

/* بخش محتوای متنی کارت */
.card-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }

.card-meta { display: flex; gap: 15px; margin-bottom: 12px; color: #64748b; font-size: 12px; }
.card-meta span { display: flex; align-items: center; gap: 5px; }

.card-title { font-size: 18px; font-weight: 900; margin: 0 0 12px 0; line-height: 1.5; }
.card-title a { color: #111; text-decoration: none; transition: 0.3s; }
.card-title a:hover { color: var(--primary-color); }

.card-excerpt { color: #475569; font-size: 14px; line-height: 1.8; margin-bottom: 20px; flex-grow: 1; }
.card-excerpt p { margin: 0; }

.card-footer { border-top: 1px dashed #e2e8f0; padding-top: 15px; margin-top: auto; }
.read-more-btn {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--primary-color); font-size: 14px; font-weight: bold; text-decoration: none; transition: 0.3s;
}
.read-more-btn svg { transition: transform 0.3s; }
.read-more-btn:hover { color: #047857; }
.read-more-btn:hover svg { transform: translateX(-5px); }

/* 4. صفحه‌بندی (Pagination) مدرن */
.modern-pagination { text-align: center; margin-bottom: 60px; }
.modern-pagination ul.page-numbers { display: inline-flex; gap: 8px; list-style: none; padding: 0; margin: 0; align-items: center; }
.modern-pagination ul.page-numbers li { display: inline-block; }
.modern-pagination ul.page-numbers a, .modern-pagination ul.page-numbers span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 8px; background: #fff;
    border: 1px solid #e2e8f0; color: #475569; font-weight: bold; font-size: 14px;
    text-decoration: none; transition: 0.3s;
}
.modern-pagination ul.page-numbers a:hover { background: #f8fafc; border-color: #cbd5e1; color: #111; }
.modern-pagination ul.page-numbers span.current { background: var(--primary-color); color: #fff; border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(0, 119, 74, 0.2); }
.modern-pagination ul.page-numbers a.prev, .modern-pagination ul.page-numbers a.next { width: auto; padding: 0 15px; }

/* ریسپانسیو */
@media (max-width: 992px) {
    .modern-blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-hero { border-radius: 0 0 20px 20px; padding: 50px 20px; }
}
@media (max-width: 576px) {
    .modern-blog-grid { grid-template-columns: 1fr; }
    .card-thumb { height: 200px; }
}



/* =========================================
   صفحه داخلی مقاله (Single Post)
========================================= */

.modern-single-article { padding-top: 50px; padding-bottom: 80px; background: #fafcff; }

/* 1. هدر مقاله */
.article-header { text-align: center; max-width: 900px; margin: 0 auto 40px auto; padding: 0 20px; }
.article-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; color: #64748b; font-size: 13px; font-weight: bold; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.meta-cat a { color: var(--primary-color); text-decoration: none; padding: 4px 12px; background: rgba(0, 119, 74, 0.1); border-radius: 20px; }
.article-title { font-size: 34px; font-weight: 900; color: #111; line-height: 1.6; margin: 0; }

/* 2. تصویر شاخص */
.article-featured-image { max-width: 1000px; margin: 0 auto 50px auto; padding: 0 20px; }
.article-featured-image img { width: 100%; height: auto; border-radius: 24px; box-shadow: 0 20px 40px rgba(0,0,0,0.06); display: block; }

/* 3. بدنه مقاله و تایپوگرافی */
.article-main-container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.article-content { font-size: 17px; line-height: 2.2; color: #334155; text-align: justify; }
.article-content h2, .article-content h3, .article-content h4 { color: #111; font-weight: 900; margin-top: 50px; margin-bottom: 20px; line-height: 1.5; }
.article-content h2 { font-size: 24px; }
.article-content h3 { font-size: 20px; }
.article-content p { margin-bottom: 25px; }
.article-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 30px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.article-content ul, .article-content ol { margin-bottom: 25px; padding-right: 25px; }
.article-content li { margin-bottom: 10px; }
.article-content blockquote { border-right: 4px solid var(--primary-color); background: #fff; padding: 20px 25px; margin: 30px 0; border-radius: 12px 0 0 12px; font-style: italic; color: #475569; box-shadow: 0 5px 15px rgba(0,0,0,0.02); }

/* 4. برچسب‌ها */
.article-tags { margin-top: 50px; border-top: 1px dashed #e2e8f0; padding-top: 30px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tags-title { font-weight: bold; color: #111; margin-left: 10px; }
.article-tags a { background: #fff; border: 1px solid #e2e8f0; color: #64748b; padding: 8px 15px; border-radius: 8px; font-size: 13px; text-decoration: none; transition: 0.3s; }
.article-tags a:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* 5. باکس نویسنده */
.article-author-box { display: flex; align-items: center; gap: 20px; background: #fff; padding: 30px; border-radius: 16px; margin-top: 40px; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }
.author-avatar img { border-radius: 50%; width: 80px; height: 80px; border: 3px solid #f8fafc; }
.author-info h4 { margin: 0 0 8px 0; font-size: 18px; font-weight: 900; color: #111; }
.author-info p { margin: 0; font-size: 14px; color: #64748b; line-height: 1.8; }

/* 6. مقالات مرتبط */
.article-related-posts { margin-top: 50px; }
.article-related-posts h3 { font-size: 20px; font-weight: 900; color: #111; margin-bottom: 20px; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.related-card { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; text-decoration: none; transition: 0.3s; }
.related-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.05); border-color: #cbd5e1; }
.related-thumb { height: 160px; overflow: hidden; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.related-card:hover .related-thumb img { transform: scale(1.05); }
.related-title { padding: 20px; }
.related-title h4 { font-size: 15px; font-weight: bold; color: #111; margin: 0 0 10px 0; line-height: 1.6; }
.related-title span { font-size: 13px; color: var(--primary-color); font-weight: bold; }

/* 7. بخش نظرات */
.article-comments-section { margin-top: 60px; background: #fff; padding: 40px; border-radius: 16px; border: 1px solid #e2e8f0; box-shadow: 0 10px 30px rgba(0,0,0,0.02); }

/* ریسپانسیو */
@media (max-width: 768px) {
    .article-title { font-size: 24px; }
    .related-grid { grid-template-columns: 1fr; }
    .article-author-box { flex-direction: column; text-align: center; }
}





/* =========================================
   استایل‌دهی مدرن به قیمت‌های تخفیف‌خورده (حراج)
========================================= */

/* تبدیل باکس قیمت به یک ستون مرتب (برای قرارگیری زیر هم) */
.zagros-price-box .single-main-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin-bottom: 15px;
}

/* استایل کلمه "قیمت واحد:" */
.zagros-price-box .single-main-price .unit-price-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
    font-weight: bold;
}

/* 1. استایل قیمت خط خورده (اصلی) */
.zagros-price-box .single-main-price del {
    display: block;
    color: #000 !important; /* رنگ خاکستری ملایم */
    font-size: 15px !important;
    font-weight: 500;
    text-decoration: line-through !important;
    text-decoration-color: #ef4444 !important; /* خط نازک قرمز روی قیمت */
    text-decoration-thickness: 1.5px !important; /* ضخامت خط */
    opacity: 0.8;
}

/* 2. استایل قیمت نهایی (تخفیف خورده) */
.zagros-price-box .single-main-price ins {
    display: block;
    color: var(--primary-color) !important; /* استفاده از رنگ سبز اصلی قالب */
    font-size: 26px !important; /* سایز بزرگ و جذاب */
    font-weight: 900 !important;
    text-decoration: none !important; /* حذف زیرخط زشت پیش‌فرض مرورگر */
    background: transparent !important;
    margin-top: -2px;
}

/* 3. استایل برای زمانی که محصول تخفیف ندارد (فقط یک قیمت عادی دارد) */
.zagros-price-box .single-main-price > .woocommerce-Price-amount.amount {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 900;
}
/* =========================================
   بازطراحی مدرن قیمت تخفیف خورده و نشان درصد
========================================= */
.zagros-price-box .single-main-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
}
.zagros-price-box .unit-price-label {
    font-size: 14px;
    color: #64748b;
    font-weight: bold;
    margin-bottom: 8px;
}

/* گرید هوشمند برای چیدمان قیمت‌ها و نشان تخفیف */
.advanced-price-layout {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 2px;
}

/* 1. قیمت اصلی (خط خورده) */
.advanced-price-layout del {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    color: #475569 !important; /* رنگ تیره و کاملاً خوانا */
    font-size: 17px !important;
    font-weight: bold;
    text-decoration: line-through !important;
    text-decoration-color: #ef4444 !important; /* خط قرمز نئونی واضح */
    text-decoration-thickness: 2.5px !important; /* خط ضخیم‌تر برای جلب توجه */
    opacity: 1;
}

/* 2. نشان درصد تخفیف */
.discount-percent-badge {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    background: #ef4444; /* پس‌زمینه قرمز */
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    padding: 3px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

/* 3. قیمت نهایی (سبز و بزرگ) */
.advanced-price-layout ins,
.advanced-price-layout > .woocommerce-Price-amount.amount {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    color: var(--primary-color) !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    background: transparent !important;
    margin-top: 5px;
}







/* =========================================
   1. وسط‌چین کردن باکس اطلاعیه بالای صفحه
========================================= */
.home-modern-notice {
    justify-content: center !important;
}
.home-modern-notice .notice-text {
    text-align: center !important;
    width: auto !important;
}
.home-modern-notice .notice-text p {
    text-align: center !important;
}

/* =========================================
   2. اصلاح فاصله‌های سکشن‌ها و تیترهای صفحه اصلی
========================================= */
/* ایجاد تنفس و فاصله استاندارد (60 پیکسل) بین تمام سکشن‌های صفحه اصلی */
.categories-section, 
.products-carousel-section, 
.dual-banners, 
.best-sellers, 
.stories-section {
    margin-top: 60px !important;
    margin-bottom: 60px !important;
}

/* حذف خط طوسی/سبز از تیترها و تنظیم فاصله دقیق آن‌ها */
.section-title {
    font-size: 22px !important;
    font-weight: 900 !important;
    color: #111 !important;
    margin-bottom: 30px !important;
    padding-right: 0 !important;
    border: none !important; /* حذف خطوط زیرین */
}
/* حذف خطوط تزئینی (سبز رنگ سمت راست یا خطوط اضافه) */
.section-title::before, 
.section-title::after {
    display: none !important;
}

.section-header {
    margin-bottom: 30px !important;
    border: none !important;
    padding-bottom: 0 !important;
}

/* =========================================
   3. بازطراحی فوق‌مدرن و جهانی استوری‌ها
========================================= */
.stories-carousel {
    padding: 20px 10px !important; /* ایجاد فضا برای سایه استوری‌ها */
}
.story-box {
    width: 110px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.story-box:hover {
    transform: translateY(-5px) !important; /* افکت بالا آمدن جذاب هنگام هاور */
}

/* حلقه دور استوری (تغییر از رنگ اینستاگرام به گرادیانت سازمانی بسیار شیک) */
.story-ring {
    width: 95px !important; 
    height: 95px !important; 
    margin: 0 auto !important; 
    border-radius: 50% !important;
    padding: 3px !important; 
    background: linear-gradient(45deg, var(--primary-color), #22c55e, #10b981) !important;
    position: relative !important;
    box-shadow: 0 8px 20px rgba(0, 119, 74, 0.2) !important;
    transition: 0.3s !important;
}

/* ایجاد فاصله (حلقه سفید) بین گرادیانت و عکس اصلی (استاندارد جهانی UI) */
.story-ring::before {
    content: '';
    position: absolute;
    top: 3px; right: 3px; bottom: 3px; left: 3px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
}

/* استایل عکس داخل استوری */
.story-ring img { 
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    border-radius: 50% !important; 
    border: 3px solid #fff !important; /* حاشیه سفید برای تفکیک دقیق */
    box-sizing: border-box !important;
}

.story-box:hover .story-ring {
    box-shadow: 0 12px 25px rgba(0, 119, 74, 0.35) !important;
}

/* متن زیر استوری */
.story-title { 
    display: block !important; 
    font-size: 13px !important; 
    margin-top: 12px !important; 
    font-weight: 700 !important; 
    color: #475569 !important;
    transition: 0.3s !important;
}
.story-box:hover .story-title {
    color: var(--primary-color) !important;
}

/* ریسپانسیو استوری‌ها برای موبایل */
@media (max-width: 768px) {
    .story-box { width: 90px !important; }
    .story-ring { width: 80px !important; height: 80px !important; }
    .story-title { font-size: 11px !important; margin-top: 8px !important; }
    
    .categories-section, .products-carousel-section, .dual-banners, .best-sellers, .stories-section {
        margin-top: 40px !important; margin-bottom: 40px !important;
    }
}

/* =========================================
   1. بازطراحی هدر سکشن‌ها و دکمه «مشاهده همه»
========================================= */
/* ایجاد یک کادر مدرن برای یکپارچه کردن تیتر و دکمه */
.section-header {
    background: #f8fafc !important; /* پس‌زمینه بسیار ملایم */
    border: 1px solid #f1f5f9 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02) !important;
}

/* استایل تیترها و اضافه کردن خط سبز کناری */
.section-title {
    position: relative !important;
    padding-right: 18px !important;
    color: #111 !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
}

/* خط سبز نازک و مدرن کنار تیترها */
.section-title::before {
    content: '' !important;
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 5px !important;
    height: 22px !important;
    background: var(--primary-color) !important;
    border-radius: 5px !important;
    display: block !important;
}

/* حذف فاصله اضافه زیر تیتر وقتی داخل کادر هدر قرار دارد */
.section-header .section-title {
    margin-bottom: 0 !important;
}

/* حفظ فاصله استاندارد برای تیترهایی که بیرون کادر هستند (مثل دسته‌بندی‌ها) */
section > .section-title {
    margin-bottom: 30px !important;
}


/* =========================================
   2. اصلاح خط شکسته‌شده زیر نام محصولات
========================================= */
/* حذف خطوط چسبیده به متن و ایجاد فضای تنفس */
.product-card .product-title,
.hm-product-card .hm-card-title,
.card-title,
.woocommerce-loop-product__title {
    border: none !important; /* حذف قطعی خط چسبیده به متن */
    padding-bottom: 0 !important;
    margin-bottom: 15px !important;
    height: 55px !important; /* ارتفاع ثابت برای تراز شدن عناوین ۱ یا ۲ خطی در تمام کارت‌ها */
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.6 !important;
}

/* ایجاد یک خط استاندارد و فاصله‌دار در بالای بخش قیمت (فوتر کارت) */
.product-card .product-price,
.product-card .product-action,
.hm-product-card .hm-card-footer,
.card-action {
    border-top: 1px dashed #e2e8f0 !important; /* خط چین ظریف و زیبا */
    padding-top: 15px !important;
    margin-top: auto !important; /* هول دادن اجباری بخش قیمت به پایین کارت */
}

/* مخفی کردن تگ‌های hr که ممکن است قالب به صورت پیش‌فرض تولید کرده باشد */
.product-card hr,
.hm-product-card hr,
.product-card .divider {
    display: none !important;
}






/* =========================================
   حل قطعی مشکل اسکرول افقی (بیرون‌زدگی از کادر)
========================================= */

/* قفل کردن محور افقی برای بدنه اصلی سایت */
html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
    position: relative;
}

/* اصلاح المان‌هایی که با 100vw باعث اسکرول افقی می‌شدند */
.mobile-bottom-nav,
.nh-mega-dropdown.mobile-active,
.primary-menu-container.mobile-active,
.zagros-modal-overlay,
.story-modal {
    width: 100% !important; 
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* اطمینان از عدم بیرون‌زدگی اسلایدرها و کانتینرها */
.container,
.swiper,
.site-header,
.site-main,
.site-footer,
.product-main-layout {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* جلوگیری از خروج متون طولانی، لینک‌ها و تصاویر از باکس‌هایشان */
* {
    box-sizing: border-box !important;
}

img, video, iframe {
    max-width: 100% !important;
}







/* کنترل حداکثر عرض سایت برای جلوگیری از کشیدگی در مانیتورهای بزرگ */
.container, 
.site-header .container, 
.main-header .container {
    max-width: 1380px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* اصلاح موقعیت سبد خرید کشویی (جلوگیری از خروج از سمت چپ صفحه) */
.mini-cart-dropdown {
    left: 0 !important; /* تراز شدن با لبه چپ */
    right: auto !important;
    transform: translateY(15px) !important; /* حذف translate افقی که باعث بیرون زدگی میشد */
}

/* اصلاح فلش بالای سبد خرید */
.mini-cart-dropdown::before {
    left: 25px !important; /* تنظیم فلش دقیقاً زیر آیکون سبد خرید */
    transform: rotate(-45deg) !important;
}

.header-cart-wrapper:hover .mini-cart-dropdown {
    transform: translateY(0) !important;
}





/* =========================================
   فعال‌سازی استیکی بدون تداخل در چیدمان قالب
========================================= */

/* 1. اجازه به کارکرد ویژگی استیکی در کل مرورگر (به جای hidden از clip استفاده می‌کنیم) */
html, body {
    overflow-x: clip !important;
}

/* 2. اطمینان از هم‌ارتفاع شدن ستون‌ها (تا ریل اسکرول ساخته شود) */
.product-main-layout {
    align-items: stretch !important; 
    overflow: visible !important;
}

/* 3. ستون چپ (ریل حرکت) محدودیت ارتفاع نداشته باشد */
.product-left-sidebar {
    height: auto !important; 
    overflow: visible !important;
    max-height: none !important;
}

/* 4. باکسی که استیکی می‌شود */
.sticky-action-box {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 90px !important; /* فاصله از سقف */
    margin-bottom: 25px !important; /* ترمز برای جلوگیری از برخورد با فوتر */
    z-index: 99 !important;
    transition: top 0.3s ease;
}

/* 5. جلوگیری از بلاک شدن استیکی توسط والدهای بزرگتر */
.site-main, .container {
    overflow: visible !important;
}