  /* =========================================================
       GLOBAL
       ========================================================= */
    :root {
        --primary-gradient: linear-gradient(135deg, #D32F2F 0%, #880E4F 100%);
        --primary-color: #D32F2F;
        --primary-dark: #880E4F;
        --accent-color: #FF5252;
        --bg-color: #F8F9FA;
        --card-bg: #FFFFFF;
        --text-main: #2D3436;
        --text-light: #636E72;
        --border-color: #F1F2F6;
        --shadow-sm: 0 2px 8px rgba(211, 47, 47, 0.08);
        --shadow-md: 0 8px 24px rgba(211, 47, 47, 0.12);
        --shadow-lg: 0 15px 35px rgba(211, 47, 47, 0.15);
    }
    * {
        box-sizing: border-box;
    }
    html {
        width: 100%;
        overflow-x: hidden;
    }
    body {
        font-family: 'Vazirmatn', sans-serif;
        background-color: var(--bg-color);
        color: var(--text-main);
        padding-bottom: 100px;
        -webkit-tap-highlight-color: transparent;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    img {
        max-width: 100%;
    }
    /* استایل‌های جدید برای Badge سبد خرید */
    .cart-badge {
        position: absolute;
        top: -5px;
        left: -5px;
        background-color: #ff0000;
        color: white;
        border-radius: 50%;
        padding: 2px 6px;
        font-size: 0.7rem;
        font-weight: bold;
        min-width: 18px;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        z-index: 10;
        display: none; /* پیش‌فرض مخفی */
    }
    .cart-badge.show {
        display: block;
    }
    /* =========================================================
       ANNOUNCEMENT BAR
       ========================================================= */
    .announcement-bar {
        color: #fff;
        text-align: center;
        padding: 8px;
        font-size: 0.8rem;
        position: relative;
        z-index: 1001;
    }
    .announcement-bar a {
        color: #fff;
        font-weight: bold;
        text-decoration: underline;
        margin-right: 10px;
    }
    /* =========================================================
       CATEGORY DRAWER
       ========================================================= */
    .category-drawer-overlay {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.55);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
        backdrop-filter: blur(2px);
    }
    .category-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .category-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: 420px;
        max-width: 92vw;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 2001;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        direction: rtl;
    }
    .category-drawer.active {
        transform: translateX(0);
    }
    .category-drawer-header {
        flex: 0 0 auto;
        min-height: 72px;
        padding: 14px 18px;
        background: var(--primary-gradient);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    }
    .category-drawer-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
        font-weight: 800;
        margin: 0;
    }
    .category-drawer-title i {
        font-size: 1.25rem;
    }
    .category-drawer-close {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .category-drawer-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
    .category-drawer-body {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
    .category-drawer-body::-webkit-scrollbar {
        width: 6px;
    }
    .category-drawer-body::-webkit-scrollbar-track {
        background: #f5f5f5;
    }
    .category-drawer-body::-webkit-scrollbar-thumb {
        background: #d0d0d0;
        border-radius: 10px;
    }
    .category-tree-row {
        width: 100%;
        min-height: 52px;
        display: flex;
        align-items: center;
        gap: 7px;
        border-bottom: 1px solid #f0f0f0;
    }
    .category-tree-toggle {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border: 1px solid #e6e6e6;
        background: #fff;
        color: var(--primary-color);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition:
            background 0.2s ease,
            color 0.2s ease,
            transform 0.2s ease;
        padding: 0;
    }
    .category-tree-toggle:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
    .category-tree-toggle:active {
        transform: scale(0.92);
    }
    .category-tree-toggle i {
        font-size: 0.85rem;
        pointer-events: none;
    }
    .category-tree-toggle-placeholder {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
    }
    .category-tree-link {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 52px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--text-main);
        text-decoration: none;
        padding: 7px 5px;
        border-radius: 10px;
        transition:
            background 0.2s ease,
            color 0.2s ease;
    }
    .category-tree-link:hover {
        color: var(--primary-color);
        background: rgba(211, 47, 47, 0.06);
    }
    .category-tree-icon {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #fff5f5;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }
    .category-tree-name {
        flex: 1;
        min-width: 0;
        font-size: 0.86rem;
        font-weight: 600;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }
    .category-tree-children {
        margin-right: 20px;
        padding-right: 14px;
        border-right: 1px solid rgba(211, 47, 47, 0.2);
    }
    .category-tree-children[hidden] {
        display: none !important;
    }
    .category-tree-item {
        width: 100%;
    }
    @media (min-width: 992px) {
        .category-drawer {
            width: 450px;
            max-width: 45vw;
        }
        .category-drawer-body {
            padding: 18px;
        }
        .category-tree-row {
            min-height: 56px;
        }
        .category-tree-link {
            min-height: 56px;
        }
        .category-tree-name {
            font-size: 0.9rem;
        }
    }
    @media (max-width: 575.98px) {
        .category-drawer {
            width: 100%;
            max-width: 100%;
        }
        .category-drawer-header {
            min-height: 68px;
            padding: 12px 14px;
        }
        .category-drawer-body {
            padding: 10px;
        }
        .category-tree-children {
            margin-right: 15px;
            padding-right: 10px;
        }
    }
    /* =========================================================
       CART DRAWER
       ========================================================= */
    .cart-drawer-overlay {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.55);
        z-index: 2002;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
        backdrop-filter: blur(2px);
    }
    .cart-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .cart-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 420px;
        max-width: 92vw;
        height: 100vh;
        height: 100dvh;
        background: #fff;
        z-index: 2003;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        direction: rtl;
    }
    .cart-drawer.active {
        transform: translateX(0);
    }
    .cart-drawer-header {
        flex: 0 0 auto;
        min-height: 72px;
        padding: 14px 18px;
        background: var(--primary-gradient);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    }
    .cart-drawer-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 1rem;
        font-weight: 800;
        margin: 0;
    }
    .cart-drawer-title i {
        font-size: 1.25rem;
    }
    .cart-drawer-close {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .cart-drawer-close:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }
    .cart-drawer-body {
        flex: 1 1 auto;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 12px;
        -webkit-overflow-scrolling: touch;
    }
    .cart-item {
        display: flex;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #eee;
        gap: 10px;
    }
    .cart-item-img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
        background: #f5f5f5;
    }
    .cart-item-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .cart-item-title {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--text-main);
        margin: 0;
        line-height: 1.4;
    }
    .cart-item-price {
        font-size: 0.8rem;
        color: var(--primary-color);
        font-weight: 700;
    }
    .cart-item-controls {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 5px;
    }
    .cart-qty-btn {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        border: 1px solid #ddd;
        background: #fff;
        color: var(--text-main);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.2s;
    }
    .cart-qty-btn:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }
    .cart-qty-value {
        font-size: 0.9rem;
        font-weight: 600;
        min-width: 20px;
        text-align: center;
    }
    .cart-drawer-footer {
        flex: 0 0 auto;
        padding: 15px;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    }
    .cart-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        font-weight: 700;
        font-size: 1.1rem;
    }
    .cart-checkout-btn {
        width: 100%;
        padding: 12px;
        background: var(--primary-gradient);
        color: #fff;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        transition: transform 0.2s;
    }
    .cart-checkout-btn:hover {
        transform: scale(1.02);
    }
    .cart-empty-msg {
        text-align: center;
        padding: 40px 20px;
        color: var(--text-light);
    }
    .cart-empty-msg i {
        font-size: 3rem;
        margin-bottom: 15px;
        opacity: 0.3;
    }
    /* =========================================================
       MOBILE BASE
       ========================================================= */
    .custom-header {
        background: var(--primary-gradient);
        min-height: 72px;
        height: auto;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        box-shadow: var(--shadow-md);
        position: relative;
        z-index: 10;
    }
    .header-logo {
        color: white;
        font-weight: 900;
        font-size: 1.05rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-width: 0;
        white-space: nowrap;
    }
    .header-logo img {
        display: block;
        width: auto;
        max-width: 90px;
        max-height: 42px;
        object-fit: contain;
    }
    .header-icons {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        min-width: 42px;
        height: 42px;
        position: relative;
    }
    .header-icons i {
        color: white;
        font-size: 1.4rem;
        margin: 0;
        cursor: pointer;
        transition: transform 0.2s ease;
        opacity: 0.95;
    }
    .header-icons i:hover {
        transform: scale(1.1);
        opacity: 1;
    }
    /* =========================================================
       MOBILE SEARCH
       ========================================================= */
    .search-box {
        display: block;
        width: calc(100% - 30px);
        height: 48px;
        margin: 0 15px 18px;
        padding: 0 18px;
        border-radius: 24px;
        border: 1px solid rgba(0, 0, 0, 0.05);
        background: rgba(255, 255, 255, 0.95);
        box-shadow: var(--shadow-sm);
        font-family: 'Vazirmatn', sans-serif;
        font-size: 0.85rem;
        transition: all 0.3s ease;
    }
    .search-box:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow:
            0 0 0 4px rgba(211, 47, 47, 0.1);
            background: #fff;
    }
    /* =========================================================
       MOBILE CATEGORY SCROLL
       ========================================================= */
    .category-scroll {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 15px 14px;
        margin-bottom: 10px;
        gap: 10px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .category-scroll::-webkit-scrollbar {
        display: none;
    }
    .cat-item {
        flex: 0 0 68px;
        width: 68px;
        min-width: 68px;
        text-align: center;
        text-decoration: none;
        transition: transform 0.2s;
        cursor: pointer;
    }
    .cat-item:hover {
        transform: translateY(-2px);
    }
    .cat-icon {
        width: 58px;
        height: 58px;
        background: white;
        border-radius: 17px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 6px;
        color: var(--primary-color);
        font-size: 1.25rem;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }
    .cat-item:hover .cat-icon {
        background: var(--primary-color);
        color: white;
        box-shadow:
            0 5px 15px rgba(211, 47, 47, 0.3);
    }
    .cat-name {
        width: 100%;
        display: block;
        color: var(--text-main);
        font-size: 0.72rem;
        line-height: 1.5;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* =========================================================
       MOBILE BANNER
       ========================================================= */
    .mobile-banner-wrapper {
        padding: 0 15px;
        margin-bottom: 18px;
    }
    .mobile-banner-wrapper img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 18px;
        box-shadow: var(--shadow-sm);
    }
    /* =========================================================
       PRODUCTS SECTION
       ========================================================= */
    .products-section {
        padding: 0 12px;
        margin-bottom: 25px;
    }
    .products-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        padding: 0 3px;
    }
    .products-header h5 {
        margin: 0;
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-main);
    }
    .products-header a {
        color: var(--primary-color);
        font-size: 0.75rem;
        text-decoration: none;
    }
    /* =========================================================
       PRODUCT GRID
       ========================================================= */
    .products-row {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }
    .product-card {
        width: 100%;
        background: var(--card-bg);
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
        border: 1px solid rgba(0, 0, 0, 0.03);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        margin-bottom: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(211, 47, 47, 0.1);
    }
    /* =========================================================
       PRODUCT IMAGE
       ========================================================= */
        .product-img-wrapper {
        position: relative;
        width: 100%;
        /* تغییر به 2/3 برای ارتفاع بیشتر */
        aspect-ratio: 2 / 3; 
        overflow: hidden;
        background-color: #ffffff;
    }
       /* =========================================================
       PRODUCT IMAGE 
       ========================================================= */
    .product-img-wrapper img {
        display: block;
        width: 100%;
        height: 100%;
        
        /* حذف کامل پدینگ برای جلوگیری از حاشیه سفید */
        padding: 0 !important;
        margin: 0;
        
        /* گوشه‌های گرد */
        border-radius: 16px;
        
        /* تنظیم نحوه نمایش تصویر:
           cover: تصویر کل کادر را پر می‌کند (برش می‌خورد اما حاشیه ندارد)
           contain: تصویر کامل دیده می‌شود (ممکن است حاشیه داشته باشد)
           اینجا cover را پیشنهاد می‌کنم تا حاشیه سفید کاملاً حذف شود
        */
        object-fit: cover; 
        
        transition: transform 0.5s ease;
    }
    /* =========================================================
       SPECIAL BADGE
       ========================================================= */
    .discount-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 45px;
        height: 45px;
        background: var(--primary-gradient);
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.75rem;
        font-weight: 800;
        box-shadow: 0 4px 10px rgba(211, 47, 47, 0.4);
        z-index: 5;
        animation: pulse 2s infinite;
    }
    @keyframes pulse {
        0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.7); }
        70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(211, 47, 47, 0); }
        100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(211, 47, 47, 0); }
    }
    /* =========================================================
       PRODUCT BODY
       ========================================================= */
       .product-body {
        position: relative;
        /* کاهش ارتفاع حداقل برای فشرده‌تر شدن کارت */
        min-height: 50px; 
        
        /* کاهش پدینگ‌ها برای نزدیک شدن متن به تصویر و هم‌دیگر */
        padding: 8px 10px 10px 10px; /* 8px بالا، 10px چپ/راست، 10px پایین */
        
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        background: white;
    }
        .product-title {
        font-size: 0.78rem;
        font-weight: 700;
        
        /* کاهش فاصله از عنصر بعدی (قیمت) به حداقل ممکن */
        margin-bottom: 4px; 
        
        color: var(--text-main);
        line-height: 1.3; /* خطوط را به هم نزدیک‌تر کنید */
        
        /* حذف محدودیت ارتفاع سخت‌گیرانه */
        min-height: auto;
        max-height: 32px; /* اگر نام طولانی است، در ۲ خط جمع شود */
        
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .product-price {
        font-weight: 800;
        color: var(--text-main);
        font-size: 0.82rem;
        line-height: 1.5;
        display: flex;
        align-items: center;
        gap: 4px;
        padding-left: 42px;
    }
    .product-price small {
        font-size: 0.58rem;
        font-weight: 500;
        color: var(--text-light);
    }
    .old-price {
        display: block;
        text-decoration: line-through;
        color: var(--text-light);
        font-size: 0.65rem;
        margin: 2px 0 0;
        font-weight: 400;
    }
    /* =========================================================
       ADD TO CART / FAVORITE BUTTON
       ========================================================= */
    .btn-add-cart {
        width:38px;
        height:38px;
        position:absolute;
        left:8px;
        bottom:8px;
        border:none;
        border-radius:50%;
        background:#fff;
        color:#bbb;
        display:flex;
        align-items:center;
        justify-content:center;
                    box-shadow:0 8px 20px rgba(0,0,0,.12);
            transition:.25s;
            z-index:10;
            cursor: pointer;
        }
        .btn-add-cart i{
            font-size:20px;
            transition:.25s;
        }
        .btn-add-cart:hover{
                           transform:scale(1.1);
        }
        .btn-add-cart.active{
            color:#ff1744;
        }
        .btn-add-cart.active i{
            transform:scale(1.15);
        }
          /* =========================================================
           MOBILE FOOTER
           ========================================================= */
        .mobile-footer {
            background-color: #2D2D2D;
            padding: 60px 0 30px 0;
        }
            .mobile-footer .container {
                padding: 0;
            }
            .mobile-footer h6 {
                color: #fff;
                font-size: 0.85rem;
                margin-bottom: 8px;
            }
            .mobile-footer p,
            .mobile-footer li {
                font-size: 0.72rem;
                line-height: 1.8;
                color: #DADADA;
            }
            /* =========================================================
               MOBILE CYBER SECTION
               ========================================================= */
            .cyber-group-desktop {
                margin-top: auto;
                background: #000;
                padding: 40px 0;
                text-align: center;
                border-top: 1px solid #333;
            }
            .cyber-group-title {
                font-size: 2.5rem;
                font-weight: 900;
                color: #fff;
                text-transform: uppercase;
                letter-spacing: 4px;
                margin: 0;
                font-family:
                    'Arial Black',
                    'Impact',
                    sans-serif;
                text-shadow:
                    0 0 10px rgba(211, 47, 47, 0.8),
                    0 0 20px rgba(211, 47, 47, 0.5);
                font-style: italic;
            }
            /* =========================================================
               MOBILE BOTTOM NAV
               ========================================================= */
            .bottom-nav {
                position: fixed;
                bottom: 10px;
                left: 10px;
                right: 10px;
                width: auto;
                height: 64px;
                background: rgba(255, 255, 255, 0.96);
                border-radius: 20px;
                box-shadow:
                    0 10px 40px rgba(0, 0, 0, 0.15);
                display: flex;
                align-items: center;
                justify-content: space-around;
                z-index: 1000;
                backdrop-filter: blur(15px);
                border: 1px solid rgba(255, 255, 255, 0.5);
            }
            .nav-item {
                height: 100%;
                min-width: 0;
                text-align: center;
                text-decoration: none;
                color: var(--text-light);
                font-size: 0.62rem;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                transition: color 0.3s;
            }
            .nav-item i {
                display: block;
                font-size: 1.2rem;
                margin-bottom: 2px;
                transition: transform 0.3s;
            }
            .nav-item.active {
                color: var(--primary-color);
            }
            .nav-item.active i {
                transform: translateY(-2px);
            }
            .fab-btn {
                width: 48px;
                height: 48px;
                background: var(--primary-gradient);
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                color: white;
                font-size: 1.25rem;
                box-shadow:
                    0 8px 20px rgba(211, 47, 47, 0.4);
                margin-top: -24px;
                border: 3px solid var(--bg-color);
                transition: transform 0.3s;
            }
            .fab-btn:hover {
                transform: scale(1.1) rotate(10deg);
            }
            /* =========================================================
               MOBILE ONLY - اصلاحات مربوط به دکمه چت موبایل
               ========================================================= */
            @media (max-width: 991.98px) {
                .desktop-only {
                    display: none !important;
                }
                .cyber-group-desktop {
                    display: block !important;
                    padding: 20px 0;
                    background: #000;
                }
                body {
                    padding-bottom: 90px;
                }

                /* اضافه کردن استایل دکمه چت موبایل در اینجا */
                .mobile-chat-fab {
                    position: fixed;
                    right: 20px;
                    bottom: 90px; /* بالاتر از منوی پایین */
                    width: 60px;
                    height: 60px;
                    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #fff;
                    font-size: 1.4rem;
                    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
                    z-index: 9999;
                    cursor: pointer;
                    transition: all 0.3s;
                    text-decoration: none;
                }
                .mobile-chat-fab:hover {
                    transform: scale(1.1);
                    color: #fff;
                }
            }
            /* =========================================================
               MOBILE PHONE
               ========================================================= */
            @media (max-width: 575.98px) {
                
                .product-body {
            padding: 6px 8px 8px 8px !important; /* بالا: 6، کناری: 8، پایین: 8 */
            min-height: auto !important; /* حذف ارتفاع اجباری */
        }

        /* کاهش فاصله بین نام محصول و قیمت */
        .product-title {
            margin-bottom: 2px !important; /* فاصله بسیار کم تا قیمت */
            line-height: 1.3 !important;
            font-size: 0.74rem !important; /* کمی کوچک‌تر برای جا شدن */
            max-height: 2.6em !important; /* محدود کردن ارتفاع به ۲ خط */
        }

        /* کاهش فاصله بین قیمت و دکمه‌ها (اگر وجود دارد) */
        .product-price {
            margin-top: 0 !important;
            margin-bottom: 2px !important;
        }
        
        /* اگر کلاس old-price دارید، فاصله آن را هم کم کنید */
        .old-price {
            margin-top: 0 !important;
            margin-bottom: 4px !important;
        }
    
                
                body {
                    padding-bottom: 110px;
                }
                .custom-header {
                    min-height: 68px;
                    padding:
                        10px 12px;
                }
                .header-logo {
                    font-size: 0.95rem;
                }
                .header-logo img {
                    max-width: 80px;
                    max-height: 38px;
                }
                .header-icons {
                    width: 38px;
                    min-width: 38px;
                    height: 38px;
                }
                .header-icons i {
                    font-size: 1.3rem;
                }
                .search-box {
                    width: calc(100% - 24px);
                    height: 46px;
                    margin-left: 12px;
                    margin-right: 12px;
                }
                .category-scroll {
                    padding-left: 12px;
                    padding-right: 12px;
                }
                .mobile-banner-wrapper {
                    padding-left: 12px;
                    padding-right: 12px;
                }
                .products-section {
                    padding-left: 10px;
                    padding-right: 10px;
                }
                .products-row {
                    --bs-gutter-x: 8px;
                    --bs-gutter-y: 8px;
                }
                .product-body {
                    min-height: 140px;
                    padding: 9px;
                }
                .product-title {
                    font-size: 0.74rem;
                }
                .product-price {
                    font-size: 0.76rem;
                }
                .btn-add-cart {
                    width: 34px;
                    height: 34px;
                    left: 7px;
                    bottom: 7px;
                }
                .bottom-nav {
                    left: 8px;
                    right: 8px;
                    bottom: 8px;
                    height: 62px;
                    border-radius: 19px;
                }
                .nav-item {
                    font-size: 0.58rem;
                }
                .nav-item i {
                    font-size: 1.15rem;
                }
                .fab-btn {
                    width: 46px;
                    height: 46px;
                    margin-top: -22px;
                }
            }
            /* =========================================================
               TABLET
               ========================================================= */
            @media (min-width: 768px) and (max-width: 991.98px) {
                body {
                    padding-bottom: 110px;
                }
                .product-img-wrapper {
                    aspect-ratio: auto;
                    height: 220px;
                }
                .product-title {
                    font-size: 0.9rem;
                }
                .product-body {
                    padding: 12px;
                }
                .bottom-nav {
                    max-width: 600px;
                    left: 50%;
                    right: auto;
                    width: calc(100% - 40px);
                    transform: translateX(-50%);
                    bottom: 20px;
                }
            }
            /* =========================================================
               DESKTOP
               ========================================================= */
            @media (min-width: 992px) {
                body {
                    padding-bottom: 0;
                }
                .mobile-only {
                    display: none !important;
                }
                .desktop-only {
                    display: block !important;
                }
                /* هدر دسکتاپ */
                .desktop-header {
                    background: #fff;
                    box-shadow: var(--shadow-md);
                    position: sticky;
                    top: 0;
                    z-index: 1000;
                    border-radius: 0;
                }
                .desktop-header-top {
                    height: 95px;
                    display: flex;
                    align-items: center;
                    padding: 0 20px;
                }
                .desktop-logo {
                    width: auto;
                    font-weight: 900;
                    font-size: 1.8rem;
                    color: var(--primary-color);
                    text-decoration: none;
                    letter-spacing: 1px;
                    flex-shrink: 0;
                    display: flex;
                    align-items: center;
                    gap: 10px;
                }
                .desktop-logo img {
                    max-height: 60px;
                    width: auto;
                }
                .desktop-search-wrapper {
                    flex: 1;
                    max-width: 650px;
                    position: relative;
                    margin: 0 30px;
                }
                .desktop-search-input {
                    width: 100%;
                    height: 46px;
                    background: #F5F5F5;
                    border: none;
                    border-radius: 25px;
                    padding: 0 60px 0 25px;
                    font-size: 0.9rem;
                    font-family: 'Vazirmatn', sans-serif;
                    transition: all 0.3s;
                }
                .desktop-search-input:focus {
                    outline: none;
                    background: #fff;
                    box-shadow:
                        0 0 0 2px var(--primary-color);
                }
                .desktop-search-btn {
                    position: absolute;
                    left: 5px;
                    top: 50%;
                    transform: translateY(-50%);
                    background: var(--primary-color);
                    color: white;
                    width: 46px;
                    height: 46px;
                    border: none;
                    border-radius: 10px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: pointer;
                    transition: all 0.3s;
                }
                .desktop-search-btn:hover {
                    background: var(--primary-dark);
                }
                .desktop-header-actions {
                    display: flex;
                    align-items: center;
                    gap: 20px;
                    margin-right: auto;
                }
                .desktop-action-btn {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    color: var(--text-main);
                    text-decoration: none;
                    font-size: 0.75rem;
                    transition: color 0.3s;
                    position: relative;
                }
                .desktop-action-btn i {
                    font-size: 1.4rem;
                    margin-bottom: 3px;
                }
                .desktop-action-btn:hover {
                    color: var(--primary-color);
                }
                /* منوی دسکتاپ */
                .desktop-navbar {
                    height: 50px;
                    background: #fff;
                    border-top: 1px solid var(--border-color);
                    display: flex;
                    align-items: center;
                }
                .desktop-nav-list {
                    display: flex;
                    list-style: none;
                    margin: 0;
                    padding: 0;
                    gap: 5px;
                }
                .desktop-nav-list li a {
                    display: block;
                    padding: 0 20px;
                    height: 50px;
                    line-height: 50px;
                    color: var(--text-main);
                    text-decoration: none;
                    font-size: 14px;
                    font-weight: 600;
                    transition: color 0.3s;
                }
                .desktop-nav-list li a:hover {
                    color: var(--primary-color);
                }
                .desktop-nav-list li a.active {
                    color: var(--primary-color);
                }
                /* فوتر دسکتاپ */
                .desktop-footer {
                    background-color: #2D2D2D;
                    color: #FFFFFF;
                    padding: 60px 0 30px 0;
                    margin-top: 50px;
                }
                .desktop-footer h5 {
                    color: #fff;
                    font-weight: 700;
                    margin-bottom: 20px;
                    font-size: 1.05rem;
                    position: relative;
                    padding-bottom: 10px;
                }
                .desktop-footer h5::after {
                    content: '';
                    position: absolute;
                    bottom: 0;
                    right: 0;
                    width: 40px;
                    height: 2px;
                    background: var(--primary-color);
                }
                .desktop-footer p,
                .desktop-footer li {
                    color: #DADADA;
                    font-size: 0.9rem;
                    line-height: 2;
                }
                .desktop-footer a {
                    color: #DADADA;
                    text-decoration: none;
                    transition: color 0.3s;
                }
                .desktop-footer a:hover {
                    color: var(--primary-color);
                }
                /* دکمه شناور دسکتاپ - فروش ویژه (چپ) */
                .desktop-fab {
                    position: fixed;
                    bottom: 30px;
                    left: 30px;
                    width: 70px;
                    height: 70px;
                    background: var(--primary-gradient);
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #fff;
                    font-size: 1.5rem;
                    box-shadow:
                        0 6px 18px rgba(211, 47, 47, 0.4);
                    z-index: 999;
                    cursor: pointer;
                    transition: all 0.3s;
                    text-decoration: none;
                }
                .desktop-fab:hover {
                    transform: scale(1.1);
                    color: #fff;
                }
                /* دکمه شناور دسکتاپ - چت آنلاین (راست) */
                .desktop-fab-chat {
                    position: fixed;
                    bottom: 30px;
                    right: 30px;
                    width: 70px;
                    height: 70px;
                    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #fff;
                    font-size: 1.5rem;
                    box-shadow:
                        0 6px 18px rgba(37, 211, 102, 0.4);
                    z-index: 9999;
                    cursor: pointer;
                    transition: all 0.3s;
                    text-decoration: none;
                }
                .desktop-fab-chat:hover {
                    transform: scale(1.1);
                    color: #fff;
                }
                /* =========================================================
                   DESKTOP SLIDER STYLES
                   ========================================================= */
                .desktop-slider {
                    position: relative;
                    width: 100%;
                    height: 450px;
                    background: #000;
                    overflow: hidden;
                    margin-bottom: 30px;
                }
                .desktop-slider-content {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    text-align: center;
                    color: #fff;
                    background-size: cover;
                    background-position: center;
                    transition: background-image 0.5s ease-in-out;
                    z-index: 1;
                }
                .desktop-slider-content::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0, 0, 0, 0.4);
                    z-index: -1;
                }
                .desktop-slider-content h1 {
                    font-size: 2.5rem;
                    font-weight: 900;
                    margin-bottom: 15px;
                    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
                }
                .desktop-slider-content p {
                    font-size: 1.2rem;
                    font-weight: 500;
                    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
                }
                .desktop-slider-arrow {
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    background: rgba(255, 255, 255, 0.2);
                    border: none;
                    color: #fff;
                    width: 50px;
                    height: 50px;
                    border-radius: 50%;
                    cursor: pointer;
                    z-index: 10;
                    transition: background 0.3s;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 1.5rem;
                }
                .desktop-slider-arrow:hover {
                    background: rgba(255, 255, 255, 0.4);
                }
                .desktop-slider-arrow.prev {
                    right: 20px;
                }
                .desktop-slider-arrow.next {
                    left: 20px;
                }
                .desktop-slider-dots {
                    position: absolute;
                    bottom: 20px;
                    left: 50%;
                    transform: translateX(-50%);
                    display: flex;
                    gap: 10px;
                    z-index: 10;
                }
                .desktop-slider-dots span {
                    width: 12px;
                    height: 12px;
                    background: rgba(255, 255, 255, 0.5);
                    border-radius: 50%;
                    cursor: pointer;
                    transition: background 0.3s;
                }
                .desktop-slider-dots span.active {
                    background: #fff;
                    transform: scale(1.2);
                }
            }
            /* =========================================================
               PROMO POPUP STYLES (Glassmorphism & Centered)
               ========================================================= */
            .promo-overlay {
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.6);
                backdrop-filter: blur(12px);
                z-index: 99999;
                display: none;
                justify-content: center;
                align-items: center;
                opacity: 0;
                transition: opacity 0.4s ease;
            }
            .promo-overlay.show {
                display: flex;
                opacity: 1;
            }
            .promo-modal {
                background: rgba(255, 255, 255, 0.85);
                backdrop-filter: blur(20px);
                border: 1px solid rgba(255, 255, 255, 0.6);
                border-radius: 24px;
                box-shadow:
                    0 20px 50px rgba(0,0,0,0.3),
                    inset 0 0 0 1px rgba(255,255,255,0.5);
                max-width: 500px;
                width: 90%;
                position: relative;
                overflow: hidden;
                transform: scale(0.9) translateY(20px);
                transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
                text-align: center;
                direction: rtl;
            }
            .promo-overlay.show .promo-modal {
                transform: scale(1) translateY(0);
            }
            .promo-close-icon {
                position: absolute;
                top: 15px;
                left: 15px;
                background: rgba(0,0,0,0.4);
                color: #fff;
                border: none;
                width: 32px;
                height: 32px;
                border-radius: 50%;
                font-size: 20px;
                cursor: pointer;
                z-index: 10;
                display: flex;
                align-items: center;
                justify-content: center;
                transition: background 0.3s, transform 0.2s;
            }
            .promo-close-icon:hover {
                background: rgba(0,0,0,0.7);
                transform: rotate(90deg);
            }
            .promo-content-wrapper {
                position: relative;
            }
            .promo-image {
                width: 100%;
                height: auto;
                display: block;
                object-fit: cover;
            }
            .promo-text-content {
                padding: 25px;
            }
            .promo-text-content h3 {
                margin: 0 0 15px;
                font-size: 1.6rem;
                color: #222;
                font-weight: 800;
            }
            .promo-text-content p {
                color: #555;
                font-size: 1.05rem;
                line-height: 1.7;
                margin-bottom: 0;
            }
            .promo-footer {
                padding: 20px 25px;
                background: rgba(253, 253, 253, 0.6);
                border-top: 1px solid rgba(255,255,255,0.5);
            }
            .promo-btn {
                display: inline-block;
                padding: 12px 30px;
                background: linear-gradient(45deg, #F3214D, #ff4d79);
                color: #fff;
                text-decoration: none;
                border-radius: 50px;
                font-weight: bold;
                font-size: 1.1rem;
                transition: all 0.3s ease;
                box-shadow: 0 5px 15px rgba(243, 33, 77, 0.4);
                margin-bottom: 15px;
            }
            .promo-btn:hover {
                transform: translateY(-3px);
                box-shadow: 0 8px 20px rgba(243, 33, 77, 0.6);
                color: #fff;
            }
            .promo-actions {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 15px;
                flex-wrap: wrap;
            }
            .promo-btn-secondary {
                padding: 8px 20px;
                background: rgba(255,255,255,0.5);
                color: #495057;
                border: 1px solid rgba(0,0,0,0.1);
                border-radius: 8px;
                font-size: 0.95rem;
                cursor: pointer;
                transition: all 0.2s;
            }
            .promo-btn-secondary:hover {
                background: rgba(255,255,255,0.8);
                color: #212529;
            }
            .promo-btn-text {
                background: none;
                border: none;
                color: #adb5bd;
                font-size: 0.85rem;
                cursor: pointer;
                text-decoration: underline;
                padding: 5px;
            }
            .promo-btn-text:hover {
                color: #6c757d;
            }
            @media (max-width: 480px) {
                .promo-modal {
                    width: 95%;
                    margin: 15px;
                }
                .promo-actions {
                    flex-direction: column;
                    gap: 10px;
                }
            }
/* =========================================================
   CHAT WIDGET STYLES (هماهنگ با رنگ آیکون)
   ========================================================= */
:root {
    /* رنگ‌های اصلی آیکون */
    --chat-primary: #4f46e5;
    --chat-secondary: #818cf8;
    --chat-gradient: linear-gradient(135deg, #4f46e5, #818cf8);
    
    /* رنگ‌های پس‌زمینه و متن */
    --chat-bg: #ffffff;
    --chat-bg-chat: #f8f9fa;
    --chat-text-dark: #1f2937;
    --chat-text-light: #6b7280;
    --chat-shadow: 0 20px 50px rgba(79, 70, 229, 0.25); /* سایه با تم آبی */
}

.chat-fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--chat-gradient);
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    cursor: pointer;
    z-index: 9998;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.5);
}

.chat-fab.hidden {
    transform: translateY(100px) scale(0);
    opacity: 0;
    pointer-events: none;
}

.chat-wrapper {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    border-radius: 24px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    
    /* انیمیشن ورود */
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.chat-wrapper.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* هدر چت با گرادیانت آیکون */
.chat-header {
    background: var(--chat-gradient);
    padding: 18px 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chat-header h6 {
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.chat-header small {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    opacity: 0.9;
}

.chat-header .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80; /* سبز روشن */
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--chat-bg-chat);
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 20px 20px;
}

/* استایل اسکرول‌بار */
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.chat-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}
.chat-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.date-divider {
    text-align: center;
    margin: 20px 0;
}

.date-divider span {
    background: rgba(255, 255, 255, 0.8);
    color: var(--chat-text-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* چیدمان پیام‌ها */
.message.user { align-items: flex-start; } /* کاربر سمت راست */
.message.admin { align-items: flex-end; } /* ادمین سمت چپ */

.bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    word-wrap: break-word;
    position: relative;
}

/* حباب پیام کاربر (سفید) */
.message.user .bubble {
    background: white;
    color: var(--chat-text-dark);
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* حباب پیام ادمین (آبی گرادیانت) */
.message.admin .bubble {
    background: var(--chat-gradient);
    color: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.msg-meta {
    font-size: 10px;
    color: var(--chat-text-light);
    margin-top: 4px;
    display: block;
    padding: 0 4px;
}

.message.user .msg-meta { text-align: right; }
.message.admin .msg-meta { text-align: left; color: #9ca3af; }

/* فوتر و ورودی */
.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 25px;
    padding: 12px 20px;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.chat-input:focus {
    background: white;
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--chat-gradient);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
}

.send-btn:disabled { 
    opacity: 0.6; 
    cursor: not-allowed; 
    transform: none;
    box-shadow: none;
}

.send-btn i {
    font-size: 16px;
    transform: rotate(180deg); /* برای RTL چرخش آیکون */
}

@media (max-width: 768px) {
    .chat-wrapper {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
    }
    .chat-fab {
        bottom: 90px;
        right: 20px;
    }
}