/*
Theme Name: hello-cyan
Theme URI: https://donatmarkting.ir
Author: You
Description: A lightweight theme based on Hello Elementor architecture.
Version: 1.0
Text Domain: my-custom-base
*/

/* =========================================
   1. تعریف فونت‌ها
   ========================================= */
@font-face {
    font-family: 'IRANYekanX-Bold';
    src: url('assets/fonts/IRANYekanX-Bold/IRANYekanX-Bold.woff2') format('woff2'),
         url('assets/fonts/IRANYekanX-Bold/IRANYekanX-Bold.woff') format('woff'),
         url('assets/fonts/IRANYekanX-Bold/IRANYekanX-Bold.ttf') format('ttf'),
         url('assets/fonts/IRANYekanX-Bold/IRANYekanX-Bold.svg') format('svg');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANYekanX-Regular';
    src: url('assets/fonts/IRANYekanX-Regular/IRANYekanX-Regular.woff2') format('woff2'),
         url('assets/fonts/IRANYekanX-Regular/IRANYekanX-Regular.woff') format('woff'),
         url('assets/fonts/IRANYekanX-Regular/IRANYekanX-Regular.ttf') format('ttf'),
         url('assets/fonts/IRANYekanX-Regular/IRANYekanX-Regular.svg') format('svg');
    font-weight: normal; /* اصلاح شد: 200 خیلی نازک است، معمولاً normal یا 400 است */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PofakFanum-Bold';
    src: url('assets/fonts/PofakFanum-Bold/PofakFanum-Bold.woff2') format('woff2'),
         url('assets/fonts/PofakFanum-Bold/PofakFanum-Bold.woff') format('woff'),
         url('assets/fonts/PofakFanum-Bold/PofakFanum-Bold.ttf') format('ttf'),
         url('assets/fonts/PofakFanum-Bold/PofakFanum-Bold.svg') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   2. تنظیمات پایه و متغیرها
   ========================================= */
:root {
    /* مقادیر پیش‌فرض (توسط PHP بازنویسی می‌شوند) */
    --header-top-bg: #ffffff;
    --header-bottom-bg: #0b4c84;
    --mobile-subheader-bg: #0d4778; 
    
    /* متغیرهای ثابت */
    --search-bg: #f1f2f4;
    --text-dark: #333;
    --text-light: #fff;
    --accent: #ef4056; /* رنگ قرمز دیجی‌کالایی */
    
    --zac-blue: #104c82;
    --zac-dark: #0a355c;
    --zac-text: #ffffff;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body, h1, h2, h3, h4, h5, h6, p, a, button, input, select, textarea, .elementor {
    font-family: 'IRANYekanX-Regular', Tahoma, sans-serif;
}

a {
    text-decoration: none;
}

/* =========================================
   3. کانتینر اصلی قالب (بسیار مهم برای طرح‌بندی)
   ========================================= */
.container-global {
    max-width: 1400px; /* اصلاح غلط تایپی max_width */
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box; /* برای جلوگیری از بیرون زدگی پدینگ */
}

/* حل مشکل تداخل با المنتور */
/* اگر المنتور روی حالت تمام عرض باشد، این کلاس توسط المنتور اضافه میشود و ما محدودیت را برمیداریم */
.elementor-template-full-width .container-global {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* =========================================
   4. هدر دسکتاپ
   ========================================= */
.header-top {
    background: var(--header-top-bg);
    height: 80px;
    border-bottom: 1px solid #eee;
    padding: 0 8px;
}

.header-bottom {
    background: var(--header-bottom-bg);
    height: 60px;
    color: #fff;
    padding: 0 8px;
}

.left-action a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-title-text {
    font-size: 26px;
    font-weight: 900;
    color: var(--header-bottom-bg);
}

/* سرچ باکس */
.header-search-box {
    flex: 1;
    max-width: 600px;
    margin: 0 40px;
}

.search-form-visible {
    background: var(--search-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 5px 15px;
    transition: 0.3s;
}

.search-form-visible:focus-within {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(11, 76, 132, 0.1);
}

.search-input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 10px;
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    font-family: inherit;
}

.search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
}

/* دکمه‌های کاربری */
.header-user-actions {
    display: flex;
    gap: 15px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: 0.2s;
    position: relative;
}

.action-btn:hover {
    border-color: var(--header-bottom-bg);
    color: var(--header-bottom-bg);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* منو و دکمه دسته‌بندی */
.bottom-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-pill-btn {
    background: #fff;
    color: var(--text-dark);
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.category-pill-btn:hover {
    background: #f0f0f0;
}

.main-navigation {
    width: 68%;
}

/* منوی افقی */
.horizontal-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

.horizontal-menu li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    position: relative;
    padding: 5px 0;
}

.horizontal-menu li a:hover {
    color: #fff;
    font-weight: bold;
}

.horizontal-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}

.horizontal-menu li a:hover::after {
    width: 100%;
}

/* منوی داینامیک وردپرس */
.main-menu-ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.main-menu-ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.main-menu-ul li a:hover {
    color: #ffd700;
}

/* دراپ‌داون دسته‌بندی */
.categories-wrapper {
    position: relative;
}

.cat-dropdown {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -340px;
    width: 280px;
    background-color: #fff;
    height: 100vh;
    z-index: 99999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    padding: 60px 20px 20px 20px;
    overflow-y: auto;
    display: block;
}

.cat-dropdown.active {
    right: 0;
}

.cat-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-dropdown ul li {
    display: block;
    width: 100%;
}

.cat-dropdown ul li a {
    display: block;
    padding: 12px 10px;
    border-bottom: 1px solid #f1f1f1;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.cat-dropdown ul li a:hover {
    color: var(--header-bottom-bg);
    background-color: #f9f9f9;
    padding-right: 15px;
}

.cat-dropdown ul .sub-menu {
    padding-right: 15px;
    display: none;
    background: #fafafa;
}

/* =========================================
   5. هدر موبایل
   ========================================= */
.mobile-header, .mobile-drawer { display: none; }

.mobile-subheader {
    background-color: var(--mobile-subheader-bg);
    padding: 10px 0;
    text-align: center;
}

@media (max-width: 991px) {
    /* مخفی کردن هدر دسکتاپ */
    .header-top, 
    .header-bottom,
    .header-desktop {
        display: none !important;
    }

    /* نمایش هدر موبایل */
    .mobile-header {
        display: block;
        background: #fff;
        padding: 10px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .mobile-header-wrapper {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 15px;
    }

    .mobile-toggle {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #333;
    }
    
    .mobile-toggle img,
    .mobile-left img,
    .cart-flex-item img {
        width: 34px;
        height: 34px;
    }

    /* دراور موبایل */
    .mobile-drawer {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        background: #fff;
        z-index: 99999;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    }

    .mobile-drawer.active {
        right: 0;
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    #close-mobile-drawer {
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
    }

    /* تب‌های موبایل */
    .drawer-tabs {
        display: flex;
        background: #f5f5f5;
    }

    .tab-btn {
        flex: 1;
        padding: 15px;
        border: none;
        background: transparent;
        cursor: pointer;
        font-weight: bold;
        border-bottom: 3px solid transparent;
        color: #777;
    }

    .tab-btn.active {
        background: #fff;
        color: var(--header-bottom-bg);
        border-bottom-color: var(--header-bottom-bg);
    }

    .drawer-content {
        padding: 0;
        height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .tab-pane {
        display: none;
        padding: 10px 0;
    }

    .tab-pane.active {
        display: block;
        animation: fadeIn 0.3s;
    }

    .mobile-menu-ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu-ul li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid #f9f9f9;
        color: #333;
    }

    /* آیکون‌های موبایل */
    .mobile-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-icon-btn {
        font-size: 22px;
        color: #333;
        position: relative;
    }

    .mobile-cart-count {
        position: absolute;
        top: -8px;
        right: -8px;
        background: var(--accent);
        color: #fff;
        font-size: 10px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* سرچ موبایل */
    .mobile-search-box {
        padding: 0 15px 10px 15px;
        background: #fff;
        width: 265px;
    }
    
    .search-flex-item {
        width: 88%;
    }
    
    .mobile-search-section {
        padding: 10px 15px;
    }

    .mobile-search-form {
        position: relative;
        width: 100%;
    }

    .mobile-search-input {
        width: 100%;
        background-color: #f0f0f1;
        border: none;
        border-radius: 8px;
        padding: 10px 15px 10px 40px;
        font-size: 13px;
        color: #666;
        height: 42px;
    }

    .mobile-search-input:focus {
        background-color: #fff;
        border: 1px solid #ddd;
        outline: none;
    }

    .mobile-search-submit {
        position: absolute;
        left: 5px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #888;
        font-size: 16px;
        padding: 5px 10px;
        cursor: pointer;
    }

    .mobile-calc-link {
        color: #fff !important;
        font-size: 13px;
        font-weight: bold;
        display: block;
        text-decoration: none;
    }

    .mobile-calc-link i {
        color: #ffd700;
        margin-left: 5px;
        font-size: 15px;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* پرده سیاه پشت دراور */
    .drawer-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 9990;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }
    
    .drawer-backdrop.active {
        opacity: 1;
        visibility: visible;
    }
}

/* =========================================
   6. فوتر (Footer)
   ========================================= */
.zac-footer {
    background-color: var(--zac-blue);
    color: var(--zac-text);
    font-family: 'IRANYekanX-Regular', sans-serif;
    direction: rtl;
    text-align: right;
    margin-top: 50px;
}

.footer-top {
    padding: 40px 0;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.footer-col {
    flex: 1;
}

.col-about {
    flex: 2;
    min-width: 350px;
}

.brand-title {
    display: flex;
    align-items: center;
    margin: 0 5px 15px 5px;
}

.brand-title h3 {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    margin: 0;
}

.about-text {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    text-align: justify;
    margin: 0 5px 20px 5px;
}

.address-box {
    background: rgba(0,0,0,0.1);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 5px 15px 5px;
}

.hours-container {
    display: flex;
    gap: 15px;
    margin: 5px;
}

.hour-box {
    background: rgba(0,0,0,0.1);
    padding: 10px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hour-box i { font-size: 20px; margin-bottom: 5px; }
.hour-box span { font-size: 12px; font-weight: bold; display: block; }
.hour-box small { font-size: 11px; opacity: 0.8; }

.col-buttons {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-btn {
    background: #fdfdfd;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.2s;
    margin: 5px;
}

.footer-btn:hover {
    background: #eee;
    color: #000;
}

.footer-btn i {
    font-size: 20px;
    color: #333;
}

.col-badges {
    flex: 1;
    min-width: 200px;
}

.badges-box {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    margin: 5px;
}

.badges-box img {
    max-width: 100px;
    height: auto;
}

.footer-bottom-menu {
    background-color: var(--zac-dark);
    padding: 15px 0;
    text-align: center;
}

.footer-inline-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-inline-menu li a {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    text-decoration: none;
}
.footer-inline-menu li a:hover { color: #fff; }

.footer-copyright-bar {
    background: #fff;
    color: #555;
    text-align: center;
    padding: 10px;
    position: relative;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin: 0 auto;
    max-width: 600px;
    transform: translateY(-50%);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-copyright-bar p { margin: 0; font-size: 12px; }

/* ریسپانسیو فوتر */
@media (max-width: 991px) {
    .footer-grid {
        flex-direction: column;
    }
    .col-about, .col-buttons, .col-badges {
        width: 100%;
        order: unset;
    }
    .col-about { order: 1; }
    .col-buttons { order: 2; }
    .col-badges { order: 3; }
    
    .footer-copyright-bar {
        width: 90%;
        transform: translateY(0);
        margin-top: -20px;
        border-radius: 10px;
    }
}

/* =========================================
   7. طرح‌بندی صفحات داخلی (سایدبار دار)
   ========================================= */
.sidebar-page-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.site-main-content {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.site-sidebar-column {
    width: 300px;
    flex-shrink: 0;
}

/* ابزارک‌ها */
.widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.widget-title {
    font-size: 18px;
    border-bottom: 2px solid var(--header-bottom-bg);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #333;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.widget ul li a {
    color: #555;
    transition: 0.2s;
}

.widget ul li a:hover {
    color: var(--header-bottom-bg);
    padding-right: 5px;
}

@media (max-width: 768px) {
    .sidebar-page-layout {
        flex-direction: column;
    }
    .site-sidebar-column {
        width: 100%;
    }
}

/* === تنظیمات لی‌اوت استاندارد === */

/* ۱. تنظیمات اصلی برای اینکه المنتور راحت کار کند */
.site-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ۲. فقط برای صفحاتی که با المنتور ساخته نشده‌اند (مثل قوانین و مقررات متنی) */
/* این کد میگه: اگه صفحه المنتوری نبود، محتوا رو وسط‌چین کن و حاشیه بده */
body:not(.elementor-page) .site-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ۳. حذف فاصله‌های ناخواسته المنتور */
.elementor-section.elementor-section-boxed > .elementor-container {
    /* این خط باعث میشه باکس پیش‌فرض المنتور درست کار کنه */
    max-width: 1140px; 
    margin: 0 auto;
}

/* =========================================
   استایل صفحه فروشگاه و آرشیو (Shop/Archive)
   ========================================= */

/* عنوان صفحه */
.woocommerce-products-header__title {
    font-size: 22px;
    font-weight: 900;
    color: #444;
    border-right: 4px solid #ef394e;
    padding-right: 15px;
    margin: 30px 0;
}

/* نوار ابزار بالا (مرتب سازی) */
.woocommerce-ordering select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    color: #555;
    outline: none;
}

.woocommerce-result-count {
    color: #777;
    font-size: 13px;
    margin-top: 10px;
}

/* شبکه محصولات (Grid) */
ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

ul.products li.product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: 0.3s;
    width: calc(25% - 15px); /* 4 ستونه در دسکتاپ */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

ul.products li.product:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

/* عکس محصول در آرشیو */
ul.products li.product a img {
    margin: 0 auto 15px auto;
    height: 200px;
    object-fit: contain;
    display: block;
}

/* عنوان محصول */
ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    padding: 0;
    margin: 0 0 10px 0;
    height: 42px;
    overflow: hidden;
}

/* قیمت */
ul.products li.product .price {
    display: block;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
}

ul.products li.product .price del {
    color: #aaa;
    font-size: 12px;
    margin-left: 5px;
}

ul.products li.product .price ins {
    text-decoration: none;
    color: #ef394e;
}

/* دکمه افزودن به سبد */
ul.products li.product .button {
    margin-top: auto; /* چسبیدن به پایین */
    display: block;
    background: #fff;
    border: 1px solid #00916e;
    color: #00916e;
    padding: 8px 0;
    border-radius: 50px;
    font-weight: bold;
    font-size: 13px;
    transition: 0.3s;
}

ul.products li.product .button:hover {
    background: #00916e;
    color: #fff;
}
ul.products li.product .button.loading {
    opacity: 0.5;
}

/* صفحه‌بندی (Pagination) */
.woocommerce-pagination {
    text-align: center;
    margin-top: 40px;
}

.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 10px;
    border: none !important;
}

.woocommerce-pagination ul li {
    border: none !important;
    overflow: visible !important;
}

.woocommerce-pagination ul li a, 
.woocommerce-pagination ul li span {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul li a:hover {
    background: #ef394e;
    color: #fff;
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    ul.products li.product { width: calc(33.333% - 14px); } /* 3 ستونه */
}

@media (max-width: 768px) {
    ul.products li.product { width: calc(50% - 10px); } /* 2 ستونه */
}

/* =========================================
   استایل صفحه تکی محصول (Single Product)
   ========================================= */

/* کانتینر اصلی صفحه محصول */
.woocommerce div.product {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    padding: 2px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
	margin-bottom:5px;
}

/* ستون گالری تصاویر (سمت راست) */
.woocommerce div.product div.images {
    flex: 1;
    min-width: 300px;
    margin-bottom: 5px;
    float: none !important; /* حذف فلوت‌های قدیمی ووکامرس */
    width: auto !important;
}

.woocommerce-product-gallery img {
    border-radius: 10px;
    border: 1px solid #f0f0f0;
}

/* ستون اطلاعات (سمت چپ) */
.woocommerce div.product div.summary {
    flex: 1.2;
    min-width: 300px;
    padding-right: 40px; /* فاصله از عکس */
    float: none !important;
    width: auto !important;
    display: flex;
    flex-direction: column;
}

/* عنوان محصول */
.product_title {
    font-size: 24px;
    font-weight: 900;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* قیمت */
.woocommerce div.product p.price, 
.woocommerce div.product span.price {
    color: #ef394e; /* قرمز دیجی‌کالا */
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.woocommerce div.product p.price del {
    color: #aaa;
    font-size: 14px;
    margin-left: 10px;
    display: inline-block;
}

/* توضیحات کوتاه */
.woocommerce-product-details__short-description {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 25px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-right: 3px solid #ddd;
}

/* باکس افزودن به سبد خرید */
.woocommerce div.product form.cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

/* اینپوت تعداد */
.woocommerce .quantity .qty {
    width: 60px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
}

/* دکمه افزودن به سبد خرید */
.single_add_to_cart_button {
    background-color: #ef394e !important; /* قرمز */
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: 0.3s !important;
    border: none !important;
}

.single_add_to_cart_button:hover {
    background-color: #d62f41 !important;
    transform: translateY(-2px);
}

/* اطلاعات متا (دسته بندی و...) */
.product_meta {
    font-size: 12px;
    color: #888;
    margin-top: auto; /* هل دادن به پایین */
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.product_meta a {
    color: #104c82;
    text-decoration: none;
}

/* تب‌های پایین (توضیحات و نظرات) */
.woocommerce-tabs {
    clear: both;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.woocommerce-tabs ul.tabs {
    border-bottom: 2px solid #eee !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    list-style: none !important;
    display: flex;
    gap: 20px;
}

.woocommerce-tabs ul.tabs li {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
    padding: 10px 0 !important;
    font-weight: bold !important;
    color: #777 !important;
    border-bottom: 3px solid transparent;
    display: block;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #ef394e !important;
    border-bottom-color: #ef394e;
}

/* ریسپانسیو موبایل */
@media (max-width: 768px) {
    .woocommerce div.product {
        flex-direction: column;
        padding: 15px;
    }
    
    .woocommerce div.product div.summary {
        padding-right: 0;
        margin-top: 20px;
    }
    
    .single_add_to_cart_button {
        width: 100%;
    }
}

/* =========================================
   استایل صفحه محصول (نسخه نهایی و فیکس شده)
   ========================================= */

/* ریست کردن استایل‌های مزاحم احتمالی */
.zac-product-wrapper * {
    box-sizing: border-box;
}

/* کانتینر اصلی - دسکتاپ */
.zac-product-wrapper {
    display: flex !important;
    flex-direction: row !important; /* حتما افقی */
    flex-wrap: nowrap !important;   /* اصلا نشکنه */
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
    direction: rtl;
    width: 100%;
}

/* --- ستون‌ها در دسکتاپ (عرض‌های ثابت و محکم) --- */

/* ۱. گالری (۳۲٪) */
.zac-col-gallery {
    flex: 0 0 32%; /* یعنی رشد نکن، جمع نشو، عرضت ۳۲٪ باشه */
    width: 32%;
    max-width: 32%;
}
.woocommerce-product-gallery img {
    border-radius: 12px;
    border: 1px solid #eee;
    width: 100%;
    height: auto;
    display: block;
}

/* ۲. اطلاعات وسط (۴۰٪) */
.zac-col-info {
    flex: 0 0 36%;
    width: 36%;
    max-width: 36%;
    padding: 0 15px;
}

/* ۳. باکس خرید چپ (۲۸٪) */
.zac-col-buybox {
    flex: 0 0 28%;
    width: 28%;
    max-width: 28%;
}

/* --- استایل باکس چسبان خرید --- */
.zac-sticky-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px; /* فاصله از سقف موقع اسکرول */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.zac-services-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}
.zac-services-list li {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}
.zac-services-list li i { color: #aaa; margin-left: 5px; }

/* قیمت و دکمه */
.price-show {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #ef394e;
    margin-bottom: 15px;
}
.price-show del { color: #aaa; font-size: 14px; display: block; }
.price-show ins { text-decoration: none; }

/* دکمه افزودن به سبد */
.single_add_to_cart_button {
    width: 100% !important;
    background-color: #ef394e !important;
    color: #fff !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    border: none !important;
    font-weight: bold !important;
    margin-top: 10px;
    cursor: pointer;
}
.single_add_to_cart_button:hover {
    background-color: #d62f41 !important;
}

/* استایل متغیرها (دراپ‌داون رنگ/سایز) */
.variations {
    width: 100%;
    margin-bottom: 10px;
    border: none;
}
.variations td {
    display: block; /* لیبل و سلکت زیر هم باشن */
    padding: 0 0 5px 0;
}
.variations label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}
.variations select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
}
.reset_variations {
    font-size: 11px;
    color: #104c82;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
}

/* --- اطلاعات وسط --- */
.zac-product-title {
    font-size: 22px;
    font-weight: 900;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
}
.zac-short-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}
.zac-secondhand-box {
    margin-top: 25px;
    background: #f0f8ff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
}
.zac-secondhand-box h4 { margin: 0 0 5px 0; font-size: 14px; color: #104c82; }
.zac-secondhand-box a { font-size: 12px; font-weight: bold; color: #104c82; }

/* =========================================
   ریسپانسیو (موبایل و تبلت - زیر ۹۹۱ پیکسل)
   ========================================= */
@media (max-width: 991px) {
    
    .zac-product-wrapper {
        flex-direction: column !important; /* حتما ستونی */
        flex-wrap: wrap !important;
        gap: 0;
    }

    /* ترتیب‌دهی جادویی موبایل */
    
    /* ۱. گالری عکس (اول) */
    .zac-col-gallery {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        order: 1;
        margin-bottom: 15px;
    }

    /* ۲. باکس خرید (قیمت و دکمه) دقیقا زیر عکس */
    .zac-col-buybox {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        order: 2; /* دوم باشه */
        margin-bottom: 25px;
    }

    /* ۳. اطلاعات و توضیحات (آخر) */
    .zac-col-info {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        order: 3; /* سوم باشه */
        padding: 0;
    }

    /* تغییر ظاهر باکس خرید در موبایل */
    .zac-sticky-card {
        position: static; /* دیگه چسبان نباشه */
        box-shadow: none;
        border: none;
        border-bottom: 5px solid #f4f4f4; /* خط جداکننده ضخیم */
        border-radius: 0;
        padding: 0 0 20px 0;
    }
    
    .desktop-only { display: none; }
}

/* =========================================
   اصلاحیه نهایی CSS
   ========================================= */

.zac-product-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
    direction: rtl;
    width: 100%;
}

/* ستون‌بندی */
.zac-col-gallery { flex: 0 0 32%; width: 32%; max-width: 32%; }
.zac-col-info    { flex: 0 0 36%; width: 36%; max-width: 36%; padding: 0 15px; }
.zac-col-buybox  { flex: 0 0 28%; width: 28%; max-width: 28%; }

/* --- استایل ویژگی‌های جدید (جایگزین خلاصه) --- */
.zac-custom-features ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.zac-custom-features li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    color: #444;
}
.zac-custom-features li .f-label {
    color: #888;
    font-weight: bold;
}
.zac-custom-features li .f-value {
    color: #333;
    font-weight: bold;
}

.single_add_to_cart_button {
    width: 100% !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    border: none !important;
    font-weight: bold !important;
    margin-top: 10px;
    cursor: pointer;
    color: #fff !important; /* رنگ متن همیشه سفید باشه */
    
    /* نکته: خط background-color را از اینجا پاک کردیم چون توسط تنظیمات قالب کنترل میشه */
}
/* هاور دکمه (کمی تیره‌تر میشه به صورت خودکار) */
.single_add_to_cart_button:hover {
    opacity: 0.9;
}

/* --- ریسپانسیو --- */
@media (max-width: 991px) {
    .zac-product-wrapper {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
    .zac-col-gallery { flex: 0 0 100%; width: 100%; max-width: 100%; order: 1; margin-bottom: 15px; }
    .zac-col-buybox  { flex: 0 0 100%; width: 100%; max-width: 100%; order: 2; margin-bottom: 25px; }
    .zac-col-info    { flex: 0 0 100%; width: 100%; max-width: 100%; order: 3; padding: 0; }
    
    .zac-sticky-card {
        position: static;
        box-shadow: none;
        border: none;
        border-bottom: 5px solid #f4f4f4;
        border-radius: 0;
    }
}

/* استایل باکس یادداشت ویژه */
.zac-product-alert {
    background-color: #fff3cd; /* زرد روشن */
    border: 1px solid #ffeeba;
    color: #856404; /* متن قهوه‌ای تیره */
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.zac-product-alert i {
    font-size: 18px;
    margin-top: 2px;
    color: #856404;
}
@media (max-width: 768px) {
    /* ۱. کادر اصلی کل محصول را به حالت ستونی در می‌آوریم */
    .zac-product-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* ۲. ترفند اصلی: دیواری که دورِ عنوان و توضیحات است را برمی‌داریم */
    /* این دستور باعث می‌شود بچه‌های این کلاس (مثل عنوان) مستقیم داخل کادر اصلی قرار بگیرند */
    .zac-col-info {
        display: contents;
    }

    /* ۳. حالا می‌توانیم به عنوان دستور بدهیم که برود اول صف */
    .zac-product-title {
        order: -1;          /* اولویت اول: می‌رود بالای همه */
        margin-bottom: 15px; /* فاصله با عکس */
        width: 100%;        /* تمام عرض را بگیرد */
    }

    /* ۴. گالری عکس در جایگاه دوم */
    .zac-col-gallery {
        order: 0;
        margin-bottom: 20px;
    }

    /* ۵. باکس قیمت و خرید در انتها */
    .zac-col-buybox {
        order: 10; /* عدد بالا یعنی برود آخر */
    }
}
@media (max-width: 768px) {
    /* ۱. والد اصلی را تبدیل به ستون فلکس می‌کنیم */
    .zac-product-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* ۲. دیوار دورِ عنوان و ویژگی‌ها را برمی‌داریم تا بچه‌هایش آزاد شوند */
    .zac-col-info {
        display: contents;
    }

    /* --- نوبت‌دهی (Order) --- */

    /* نوبت ۱: عنوان محصول */
    .zac-product-title {
        order: 1;
        margin-bottom: 10px; /* فاصله با یادداشت */
    }

    /* نوبت ۲: یادداشت (Alert) */
    .zac-product-alert {
        order: 2;
        margin-bottom: 20px; /* فاصله با عکس */
        width: 100%;
    }

    /* نوبت ۳: گالری عکس */
    .zac-col-gallery {
        order: 3;
        margin-bottom: 20px;
    }

    /* نوبت ۴: باکس خرید و قیمت */
    .zac-col-buybox {
        order: 4;
        margin-bottom: 30px;
    }

    /* نوبت ۵: ویژگی‌ها (بعد از خرید) */
    .zac-secondhand-box {
        order: 5;
        /* نکته مهم: چون کلاس desktop-only دارد، باید حتما آن را نمایش دهیم */
        display: block !important; 
        margin-top: 20px;
    }
}

/* عنوان سکشن */
.zac-recent-title {
    font-size: 18px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
    border-right: 4px solid #ff4d4d; /* خط رنگی کنار عنوان */
    padding-right: 10px;
}

/* گرید اصلی - چیدمان */
.zac-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* در دسکتاپ 4 تا */
    gap: 15px;
}

/* کارت محصول */
.zac-recent-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.zac-recent-card:hover {
    transform: translateY(-5px); /* حرکت به بالا موقع هاور */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* عکس محصول */
.zac-recent-img img {
    width: 100%;
    height: 150px;
    object-fit: cover; /* عکس دفرمه نشود */
    border-bottom: 1px solid #f0f0f0;
}

/* اطلاعات محصول */
.zac-recent-info {
    padding: 12px;
    text-align: center;
}

.zac-recent-info h4 {
    font-size: 13px;
    margin: 0 0 8px;
    line-height: 1.4;
    height: 36px; /* محدود کردن ارتفاع عنوان */
    overflow: hidden;
    color: #333;
}

.zac-recent-price {
    font-size: 14px;
    color: #00b894; /* رنگ سبز قیمت */
    font-weight: bold;
    display: block;
}

/* --- ریسپانسیو برای موبایل --- */
@media (max-width: 768px) {
    .zac-recent-grid {
        grid-template-columns: repeat(2, 1fr); /* در موبایل 2 تا کنار هم */
        gap: 10px;
    }
    
    .zac-recent-img img {
        height: 120px; /* عکس کوچکتر در موبایل */
    }
    
    .zac-recent-info h4 {
        font-size: 12px;
    }
}

/* --- اصلاح چیدمان گرید (رفع مشکل باکس خالی) --- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr); /* 4 ستون */
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
}

ul.products::before,
ul.products::after {
    display: none !important; /* حذف عناصر مزاحم قالب که باعث خرابی گرید میشوند */
}

/* --- استایل کارت محصول --- */
ul.products li.product {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    text-align: center !important;
    transition: all 0.3s ease;
    width: 100% !important;
    margin: 0 !important; /* حذف مارجین‌های مزاحم */
    float: none !important; /* غیرفعال کردن شناوری */
    position: relative; /* برای تنظیم پوزیشن برچسب تخفیف */
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

ul.products li.product:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    transform: translateY(-5px);
    z-index: 2;
}

/* --- اصلاح اندازه تصویر (بزرگتر شدن) --- */
ul.products li.product a img {
    height: 240px !important; /* ارتفاع بیشتر برای بزرگ دیده شدن */
    width: 100% !important;
    object-fit: contain !important; /* عکس کامل دیده شود */
    margin-bottom: 15px !important;
    padding: 5px; /* کمی فاصله از لبه‌ها */
}

/* --- استایل برچسب تخفیف (قرمز و شیک) --- */
ul.products li.product .onsale {
    background-color: #ef394e !important; /* قرمز دیجی‌کالایی */
    color: #fff !important;
    font-size: 13px !important;
    font-weight: bold !important;
    padding: 4px 12px !important;
    border-radius: 8px !important; /* گوشه‌های گرد */
    position: absolute !important;
    top: 10px !important;
    left: 10px !important; /* سمت چپ بالا */
    right: auto !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: normal !important;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(239, 57, 78, 0.3);
}

/* --- عنوان محصول --- */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    color: #444 !important;
    margin-bottom: 10px !important;
    line-height: 1.5 !important;
}

/* --- قیمت --- */
ul.products li.product .price {
    color: #000 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    display: flex;
    flex-direction: column; /* قیمت اصلی و تخفیف زیر هم */
    align-items: center;
    justify-content: center;
}

ul.products li.product .price del {
    color: #999 !important;
    font-size: 13px !important;
    margin-bottom: 5px;
    opacity: 0.7;
}

ul.products li.product .price ins {
    text-decoration: none;
    color: #ef394e !important; /* قیمت نهایی قرمز یا مشکی */
}

/* --- دکمه (کپسولی و سبز) --- */
ul.products li.product .button {
    border-radius: 50px !important;
    padding: 10px 0 !important; /* پدینگ عمودی */
    width: 100% !important; /* تمام عرض */
    background: transparent !important;
    border: 1px solid #00bf6f !important;
    color: #00bf6f !important;
    font-weight: bold !important;
    margin-top: auto;
}

ul.products li.product .button:hover {
    background: #00bf6f !important;
    color: #fff !important;
}

/* --- موبایل --- */
@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(1, 1fr) !important; /* تک ستونه */
    }
    ul.products li.product a img {
        height: auto !important; /* در موبایل ارتفاع آزاد باشد */
        max-height: 300px;
    }
}

/* تنظیمات دکمه فیلتر (فقط در موبایل) */
#zac-filter-toggle {
    display: none; /* پیش‌فرض مخفی (برای دسکتاپ) */
}

@media (max-width: 768px) {
    /* 1. نمایش دکمه فیلتر */
    #zac-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        background: #fff;
        color: #333;
        border: 1px solid #e0e0e0;
        padding: 12px;
        border-radius: 8px;
        font-weight: bold;
        font-size: 14px;
        cursor: pointer;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        transition: 0.3s;
    }
    
    #zac-filter-toggle i {
        margin-left: 8px;
        color: #00bf6f; /* سبز */
    }

    #zac-filter-toggle:hover {
        border-color: #00bf6f;
        background: #f9f9f9;
    }

    /* 2. مخفی کردن سایدبار فیلترها به صورت پیش‌فرض */
    .archive-sidebar {
        display: none; /* مخفی */
        width: 100%;
        margin-bottom: 20px;
        order: -1; /* اطمینان از اینکه بالای محصولات است */
        background: #fdfdfd;
        border: 1px solid #eee;
        padding: 15px;
        border-radius: 10px;
    }

    /* کلاسی که با جاوااسکریپت اضافه می‌شود تا فیلتر نمایش داده شود */
    .archive-sidebar.active {
        display: block !important;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* تضمین نمایش در دسکتاپ */
@media (min-width: 769px) {
    .archive-sidebar {
        display: block !important; /* حتما نمایش بده */
        width: 280px !important; /* عرض سایدبار */
        margin-left: 20px !important; /* فاصله از محصولات */
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        padding: 20px;
        height: fit-content; /* ارتفاع به اندازه محتوا */
    }
    
    
}
/* --- 1. هم‌تراز کردن هدر و محتوا (تمام عرض) --- */
/* فرض می‌کنیم کلاس هدر اصلی شما #main-header است. اگر نام دیگری دارد، آن را اینجا بنویسید */
#main-header,
header.main-header,
.container-global {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px; /* کمی فاصله از لبه‌های صفحه برای زیبایی */
    padding-right: 20px;
    box-sizing: border-box;
}

/* --- 2. کادربندی اصلی صفحه فروشگاه --- */
.zac-shop-wrapper {
    display: flex;
    /* این خط محتویات (سایدبار + محصولات) را هل می‌دهد به وسط صفحه */
    justify-content: center !important; 
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    
    /* عرض را ۱۰۰ درصد می‌کنیم تا فضای خالی سمت چپ قابل استفاده شود */
    width: 100% !important;
    
    /* یک حداکثر عرض (مثلا ۱۴۰۰ یا ۱۶۰۰) می‌دهیم که در مانیتورهای خیلی بزرگ سایت دفرمه نشود */
    max-width: 1450px !important; 
    
    /* این دو خط خودِ کادر را در صفحه وسط‌چین می‌کنند */
    margin-left: auto !important;
    margin-right: auto !important;
    
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* --- 3. تنظیم سایدبار (سمت راست) --- */
.zac-sidebar-col {
    width: 250px; /* عرض مناسب برای سایدبار */
    min-width: 250px;

}

/* --- 4. تنظیم ستون محصولات (سمت چپ) --- */
.zac-products-col {
    flex-grow: 1; /* تمام فضای باقیمانده را بگیرد */
    width: calc(100% - 265px); /* عرض کل منهای سایدبار و فاصله */
}

/* --- 5. گرید محصولات (۴ ستونه و فشرده‌تر) --- */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; /* دقیقاً 4 ستون */
    gap: 10px !important; /* فاصله کم بین محصولات برای بزرگتر شدن عکس‌ها */
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* --- 6. استایل کارت محصول --- */
ul.products li.product {
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 10px !important; /* پدینگ کمتر برای فضای بیشتر عکس */
    text-align: center !important;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-width: 0 !important;
}

/* --- کادر نگهدارنده دکمه‌ها --- */
.zac-loop-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 10px; /* فاصله بین دو دکمه */
    margin-top: auto; /* چسباندن به انتهای کارت */
    width: 100%;
}

/* --- دکمه 1: مشاهده محصول (بزرگ) --- */
.zac-btn-view-product {
    flex-grow: 2; /* فضای بیشتری اشغال کند */
    background: #fff !important;
    border: 1px solid #00bf6f !important; /* کادر سبز */
    color: #00bf6f !important;
    border-radius: 50px !important; /* کپسولی */
    padding: 8px 15px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    text-align: center;
    transition: 0.2s;
    white-space: nowrap; /* جلوگیری از شکستن متن */
}

.zac-btn-view-product:hover {
    background: #00bf6f !important;
    color: #fff !important;
}

/* --- دکمه 2: آیکون سبد خرید (کوچک) --- */
.zac-btn-cart-icon {
    flex-grow: 0; /* اندازه ثابت داشته باشد */
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #00bf6f !important; /* پس زمینه سبز */
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important; /* دایره کامل */
    font-size: 16px !important;
    transition: 0.2s;
}

.zac-btn-cart-icon:hover {
    background: #009e5f !important; /* سبز تیره‌تر موقع هاور */
    transform: scale(1.1); /* کمی بزرگتر شود */
}

/* مخفی کردن متن‌های پیشفرض ووکامرس اگر داخل آیکون افتاد */
.zac-btn-cart-icon.loading::after { display: none !important; }
.zac-btn-cart-icon.added::after { display: none !important; }

/* --- موبایل --- */
@media (max-width: 768px) {
    .zac-btn-view-product {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
}
.zac-product-alert {
    background-color: #fff3cd; /* زرد روشن */
    border: 1px solid #ffeeba;
    color: #856404; /* قهوه‌ای تیره */
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================
   استایل جدید سبد خرید (طرح دیجی‌کالایی آبی)
   ========================================= */

/* 1. تنظیم پس‌زمینه کل صفحه (آبی خیلی کمرنگ) */
body, .woocommerce-cart .site-content {
    background-color: #f5f7fa !important; /* رنگ بک‌گراند جدید */
}

/* اصلاح کانتینر اصلی برای فاصله و چیدمان */
.woocommerce-cart .woocommerce {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
    padding-bottom: 50px;
}

/* 2. استایل لیست محصولات (باکس سفید با بردر آبی) */
.woocommerce-cart .woocommerce-cart-form {
    flex: 1;
    background: #fff;
    border: 1px solid #104c82; /* بردر آبی */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(16, 76, 130, 0.05); /* سایه محو آبی */
}

/* 3. استایل سایدبار فاکتور (باکس سفید با بردر آبی) */
.woocommerce-cart .cart-collaterals {
    width: 350px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

.cart_totals {
    background: #fff;
    border: 1px solid #104c82; /* بردر آبی */
    border-radius: 12px;
    padding: 20px;
    width: 100% !important;
    float: none !important;
    box-shadow: 0 4px 15px rgba(16, 76, 130, 0.08); /* سایه کمی قوی‌تر */
}

/* 4. استایل باکس اطلاعیه (باکس تمام آبی) */
.zac-cart-notice-box {
    width: 100%;
    background: #eef5fc; /* آبی خیلی روشن برای پس‌زمینه */
    border: 1px solid #104c82; /* بردر آبی پررنگ */
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0; /* چسبیده به بالای فرم نباشد چون فلکس است */
    flex-basis: 100%; /* کل عرض را بگیرد */
    box-sizing: border-box;
}

.notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #fff;
    border-radius: 50%;
    color: #104c82;
    border: 1px solid #dbeafe;
}

.notice-content h4 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: #104c82; /* آبی پررنگ */
    font-weight: bold;
}

.notice-content p {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.notice-btn {
    margin-right: auto; /* هل دادن به چپ */
    background: #104c82;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}
.notice-btn:hover {
    background: #0a355c;
}

/* --- اصلاحات داخلی جدول و دکمه‌ها --- */

/* دکمه تسویه حساب */
.checkout-button {
    background-color: #ef394e !important; /* قرمز دیجی‌کالایی */
    color: #fff !important;
    border-radius: 8px !important;
    height: 50px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    box-shadow: 0 4px 10px rgba(239, 57, 78, 0.2);
}

/* جدول محصولات */
.shop_table.cart th {
    color: #777;
    font-weight: normal;
    border-bottom: 2px solid #f0f0f0;
}
.shop_table.cart td {
    border-bottom: 1px solid #f5f7fa;
}

/* ریسپانسیو موبایل */
@media (max-width: 991px) {
    .zac-cart-notice-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .notice-btn {
        margin-right: 0;
        width: 100%;
        text-align: center;
    }
    .woocommerce-cart .woocommerce-cart-form,
    .cart_totals {
        border-right: none;
        border-left: none;
        border-radius: 0; /* در موبایل تمام عرض شود */
    }
}

/* =========================================
   استایل نهایی سبد خرید (طرح دو ستونه چسبان)
   ========================================= */

/* 1. تنظیم رنگ پس‌زمینه کل صفحه */
body.woocommerce-cart, 
.woocommerce-cart .elementor-section, 
.woocommerce-cart .site-content {
    background-color: #f5f7fa !important; /* آبی خیلی کمرنگ */
}

/* 2. شکستن ساختار المنتور و ایجاد حالت دو ستونه */
.woocommerce-cart .woocommerce {
    display: flex !important;
    flex-direction: row !important; /* در فارسی: راست به چپ */
    align-items: flex-start !important; /* بالا تراز */
    justify-content: space-between !important;
    gap: 25px !important;
    max-width: 1600px !important;
    margin: 40px auto !important;
    padding: 0 15px !important;
    position: relative !important;
}

/* 3. ستون سمت راست (لیست محصولات) - بزرگ */
.woocommerce-cart .woocommerce-cart-form {
    width: calc(100% - 380px) !important; /* عرض کل منهای سایدبار */
    flex-grow: 1 !important;
    background: #fff !important;
    border: 1px solid #cce0f5 !important; /* آبی خیلی ملایم */
    border-radius: 12px !important;
    padding: 25px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}

/* 4. ستون سمت چپ (خلاصه وضعیت) - کوچک و چسبان */
.woocommerce-cart .cart-collaterals {
    width: 350px !important; /* عرض ثابت */
    min-width: 350px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    
    /* چسبان شدن (Sticky) */
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important; /* فاصله از سقف */
}

/* استایل باکس داخل سایدبار */
.cart_totals {
    width: 100% !important;
    float: none !important;
    background: #fff !important;
    border: 1px solid #104c82 !important; /* بردر آبی پررنگ طبق درخواست */
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 5px 20px rgba(16, 76, 130, 0.08) !important;
}

/* 5. باکس اطلاعیه آبی (بالای لیست محصولات) */
.zac-blue-notice-box {
    background: #eef5fc !important;
    border: 1px solid #104c82 !important;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px; /* فاصله از جدول */
    width: 100%;
    box-sizing: border-box;
}

.zac-notice-icon {
    width: 40px; height: 40px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #dbeafe;
    color: #104c82;
}
.zac-notice-text p { margin: 0; font-size: 13px; color: #555; }
.zac-notice-text strong { color: #104c82; display: block; margin-bottom: 2px; }

/* 6. تمیزکاری جدول محصولات */
.shop_table.cart {
    border: none !important;
    margin: 0 !important;
}
.shop_table.cart thead th {
    background: #f9f9f9 !important;
    color: #666 !important;
    padding: 15px !important;
    border-bottom: 1px solid #eee !important;
    font-size: 13px !important;
}
.shop_table.cart td {
    padding: 20px 10px !important;
    border-bottom: 1px solid #f5f7fa !important;
    font-size: 14px !important;
}
/* عکس محصول */
.product-thumbnail img {
    width: 90px !important;
    height: 90px !important;
    border-radius: 8px !important;
    border: 1px solid #eee !important;
    object-fit: contain !important;
}
/* دکمه حذف (ضربدر) */
a.remove {
    color: #ff4d4d !important;
    background: #fff0f0 !important;
    border-radius: 50% !important;
    width: 28px !important; height: 28px !important;
    line-height: 28px !important;
    font-size: 18px !important;
    display: block !important; text-align: center !important;
}

/* 7. دکمه قرمز تسویه حساب */
.wc-proceed-to-checkout { padding: 0 !important; margin-top: 20px !important; }
.checkout-button {
    background-color: #ef394e !important;
    color: #fff !important;
    border-radius: 8px !important;
    height: 52px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    display: flex !important; align-items: center; justify-content: center;
}
.checkout-button:hover { background-color: #d62f41 !important; }

/* --- ریسپانسیو موبایل --- */
@media (max-width: 991px) {
    .woocommerce-cart .woocommerce {
        flex-direction: column !important; /* زیر هم */
        gap: 15px !important;
    }
    .woocommerce-cart .woocommerce-cart-form {
        width: 100% !important;
    }
    .woocommerce-cart .cart-collaterals {
        width: 100% !important;
        min-width: 0 !important;
        position: static !important; /* دیگه نچسبه */
    }
}
/* =========================================
   استایل صفحه تسویه حساب (Checkout) - طرح دو ستونه
   ========================================= */

/* 1. تنظیم پس‌زمینه صفحه */
body.woocommerce-checkout,
.woocommerce-checkout .site-content {
    background-color: #f5f7fa !important; /* همان آبی خیلی کمرنگ سبد خرید */
}

/* 2. کانتینر اصلی فرم تسویه حساب */
form.woocommerce-checkout {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 25px !important;
    max-width: 1600px;
    margin: 40px auto !important;
    padding: 0 15px !important;
    position: relative !important;
}

/* 3. ستون سمت راست: جزئیات مشتری (فرم‌ها) */
#customer_details {
    width: calc(100% - 380px) !important; /* عرض کل منهای سایدبار */
    flex-grow: 1 !important;
    background: #fff !important;
    border: 1px solid #cce0f5 !important; /* بردر آبی ملایم */
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02) !important;
}

/* عنوان‌های بالای فرم‌ها */
#customer_details h3 {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #eee !important;
}

/* تمیزکاری فیلدهای فرم */
.woocommerce-checkout p.form-row {
    margin-bottom: 20px !important;
}
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    background: #fcfcfc !important;
}
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: #104c82 !important; /* رنگ فوکوس آبی */
    background: #fff !important;
}


#order_review_heading {
    display: none !important;
}

#order_review {

    background: #fff !important;
    border: 1px solid #104c82 !important; /* بردر آبی پررنگ مثل سبد خرید */
    border-radius: 12px !important;
    padding: 25px 20px !important;
    box-shadow: 0 5px 20px rgba(16, 76, 130, 0.08) !important;
    
    /* چسبان شدن (Sticky) */
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important; /* فاصله از بالا */
    z-index: 99;
}

/* اضافه کردن یک عنوان دستی بالای جدول سفارش */
#order_review::before {
    content: 'خلاصه سفارش و پرداخت';
    display: block;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #104c82;
}

/* استایل جدول مرور سفارش */
.woocommerce-checkout-review-order-table {
    border: none !important;
    margin-bottom: 25px !important;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    border-bottom: 1px dashed #eee !important;
    padding: 12px 0 !important;
    font-size: 14px !important;
}
.woocommerce-checkout-review-order-table thead th {
    border-bottom: 2px solid #eee !important;
    color: #777 !important;
}
/* جمع کل و مبلغ قابل پرداخت */
.order-total th, .order-total td {
    border-bottom: none !important;
    border-top: 2px solid #f0f0f0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #104c82 !important;
    padding-top: 20px !important;
}
.order-total .amount {
    color: #ef394e !important; /* قرمز برای مبلغ نهایی */
    font-size: 18px !important;
}

/* 5. استایل بخش پرداخت (Payment) */
#payment {
    background: transparent !important;
    padding: 0 !important;
}
/* لیست روش‌های پرداخت */
ul.wc_payment_methods {
    padding: 0 !important;
    margin: 20px 0 !important;
    border-bottom: none !important;
}
ul.wc_payment_methods li {
    background: #f9f9f9 !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 10px !important;
}
/* کنترل عرض باکس‌های توضیحات پرداخت (مثل اون باکس آبی بزرگ) */
.payment_box {
    margin-top: 15px !important;
    padding: 15px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    max-width: 100% !important; /* جلوگیری از بیرون زدگی */
    box-sizing: border-box !important;
}
.payment_box * {
    max-width: 100% !important;
    height: auto !important;
}

/* دکمه نهایی ثبت سفارش */
#place_order {
    background-color: #ef394e !important; /* قرمز */
    color: #fff !important;
    border-radius: 8px !important;
    height: 55px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    width: 100% !important;
    margin-top: 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
#place_order:hover {
    background-color: #d62f41 !important;
}

/* =========================================
   ریسپانسیو موبایل (Checkout)
   ========================================= */
@media (max-width: 991px) {
    form.woocommerce-checkout {
        flex-direction: column !important; /* زیر هم */
        gap: 20px !important;
    }
    
    #customer_details,
    #order_review {
        width: 100% !important;
        min-width: 0 !important;
    }
    
    #order_review {
        position: static !important; /* در موبایل نچسبه */
        order: 2; /* باکس پرداخت بره زیر فرم‌ها */
    }
    #customer_details {
        order: 1;
        padding: 20px !important;
    }
}
/* =========================================
   استایل نهایی توضیحات سفارش (روش JS)
   ========================================= */

/* 1. تنظیم فاصله و خط جداکننده */
.woocommerce-additional-fields {
    width: 100% !important;
    clear: both !important; /* جلوگیری از بهم ریختگی */
    margin-top: 30px !important;
    padding-top: 25px !important;
    border-top: 2px dashed #eee !important; /* خط‌چین جداکننده */
    display: block !important;
}

/* 2. مخفی کردن عنوان مزاحم (اختیاری) */
/* اگر می‌خواهی تیتر "توضیحات تکمیلی" حذف شود، این را بزن */
.woocommerce-additional-fields h3 {
    display: none !important;
}

/* 3. استایل لیبل (متن: یادداشت سفارش) */
.woocommerce-additional-fields label {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #104c82 !important; /* آبی */
    margin-bottom: 10px !important;
    display: block !important;
}

/* 4. زیبا کردن کادر تایپ */
.woocommerce-additional-fields textarea {
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 15px !important;
    min-height: 100px !important;
    background-color: #f9f9f9 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

.woocommerce-additional-fields textarea:focus {
    background-color: #fff !important;
    border-color: #104c82 !important;
    box-shadow: 0 0 0 3px rgba(16, 76, 130, 0.1) !important;
}
/* =========================================
   استایل نهایی فرم تسویه حساب (طرح یکپارچه)
   ========================================= */

/* 1. حذف ستون‌بندی‌های مزاحم ووکامرس */
.woocommerce-checkout .col2-set {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-checkout .col-1, 
.woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
    max-width: 100% !important;
    padding: 0 !important;
}

/* 2. مخفی کردن بخش حمل‌ونقل اضافی (چون یادداشت رو بردیم بالا) */
.woocommerce-shipping-fields {
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px dashed #eee !important;
}

/* 3. استایل فیلد یادداشت (Textarea) شبیه بقیه اینپوت‌ها */
#billing_order_comments_field {
    margin-top: 20px !important; /* فاصله از فیلد بالایی */
}

#billing_order_comments {
    height: 100px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    background: #fcfcfc !important;
    font-family: inherit !important;
    box-shadow: none !important;
}
#billing_order_comments:focus {
    background: #fff !important;
    border-color: #104c82 !important; /* آبی هنگام تایپ */
}

/* 4. تنظیم چیدمان فیلدها (مثل عکس image_52e8ab.png) */
/* نام و نام خانوادگی کنار هم */
#billing_first_name_field,
#billing_last_name_field {
    width: 48% !important;
    float: right !important;
    clear: none !important;
}

/* بقیه فیلدها تمام عرض */
.form-row {
    width: 100% !important;
    float: none !important;
    clear: both !important;
}
/* =========================================
   استایل چیدمان فیلدهای فرم (کنار هم)
   ========================================= */

/* فعال کردن فلکس باکس برای فرم */
.woocommerce-billing-fields__field-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important; /* فاصله بین فیلدها */
    justify-content: space-between !important;
}

/* استایل عمومی همه فیلدها */
.woocommerce-checkout p.form-row {
    margin: 0 !important; /* حذف مارجین‌های مزاحم قدیمی */
    display: block !important;
}

/* فیلدهای تمام عرض (مثل آدرس و ایمیل) */
.form-row-wide {
    width: 100% !important;
}

/* فیلدهای نصفه (نام‌ها، شهر و استان) */
.form-row-first,
.form-row-last {
    width: 48% !important; /* کمی کمتر از 50 تا جا برای فاصله باشه */
    float: none !important;
}

/* در موبایل همه چیز باید زیر هم باشه */
@media (max-width: 768px) {
    .form-row-first,
    .form-row-last {
        width: 100% !important;
    }
}