:root {
            --bg-page: #f6f7fb;
            --accent: #4b3ef0;
            --accent-hover: #b8860b;
            --muted: #7d7d7d;
            --danger: #8c2131;
            --radius-lg: 24px;
            --radius-md: 14px;
            --box-shadow-special: 0 12px 28px rgba(236, 208, 144, 0.4);
            font-family: 'Vazir', 'IRANSans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
        }


        /* ====== Page wrapper ====== */
        .shop-shell {
            background: var(--bg-page);
            padding: 24px;
            margin-top: 75px;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            box-sizing: border-box;
            direction: rtl;
        }

        /* ====== Container ====== */
        .container-shop {
            width: 100%;
            background: #fff;
            border-radius: var(--radius-lg);
            padding: 20px 24px;
            box-shadow: 0 16px 40px rgba(20, 20, 40, 0.05);
            box-sizing: border-box;
        }

        /* ====== Top banner ====== */
        .shop-top-banner {
            background: linear-gradient(90deg, #fff8ed, #fffaf7);
            border-radius: 20px;
            padding: 16px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 8px 20px rgba(20, 20, 40, 0.04);
            margin-bottom: 18px;
        }
        .shop-top-banner h1 { font-size: 22px; margin:0; font-weight:800; color:#3a2b11;}
        .shop-top-banner p { font-size:14px; margin:0; color:var(--muted);}
        .shop-top-banner .cta {
            background: linear-gradient(180deg, #efe2b8, #e6d09a);
            padding: 8px 16px;
            border-radius: 12px;
            font-weight:800;
            color:#332b22;
            text-decoration:none;
            font-size:14px;
            box-shadow: 0 8px 20px rgba(236,208,144,0.12);
        }

        /* ====== Search ====== */
        .shop-search {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            align-items: center;
        }
        .search-input {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            background: #fff;
            padding: 12px 16px;
            border-radius: 16px;
            border: 1px solid rgba(20,20,40,0.04);
            box-shadow: 0 8px 18px rgba(20,20,40,0.03);
        }
        .search-input input { border:0; outline:none; font-size:15px; background:transparent; color:#222; width:100%; }
        .btn-filter { background:#fff; border:0; padding:12px; border-radius:12px; box-shadow:0 8px 18px rgba(20,20,40,0.03); cursor:pointer; }

        /* ====== Categories ====== */
        .shop-cats { display:flex; gap:12px; overflow-x:auto; padding-bottom:6px; margin-bottom:18px; }
        .shop-cats a { flex:0 0 auto; padding:10px 16px; border-radius:999px; background:#fff; box-shadow:0 6px 18px rgba(10,10,10,0.04); text-decoration:none; color:#333; font-weight:800; font-size:14px; white-space:nowrap; }
        .shop-cats a.active { background: var(--gold-accent);color:var(--brand-color); box-shadow:0 10px 30px rgba(75,62,240,0.12); }

        /* ====== Filters ====== */
        .shop-filters { display:flex; gap:12px; margin-bottom:20px; align-items:center; flex-wrap:wrap; }
        .filter-toggle { padding:10px 12px; border-radius:12px; background:#fff; border:1px solid rgba(0,0,0,0.04); font-weight:800; cursor:pointer; font-size:14px; box-shadow:0 8px 18px rgba(10,10,10,0.03); text-decoration: none; color: #333;}
        .filter-toggle.active { background:#fbeecf; border-color:#edd4a0; box-shadow:0 8px 20px rgba(236,208,144,0.09); }

        /* ====== Grid ====== */
        .shop-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:26px; }

        /* ====== Product card ====== */
        .card-shop {
            background:#fff;
            border-radius:28px;
            display:flex;
            flex-direction: row-reverse;
            align-items:stretch;
            gap:14px;
            padding:20px;
            box-shadow:0 12px 28px rgba(20,20,40,0.08);
            transition: transform .18s ease, box-shadow .18s ease;
            overflow: hidden;
            border: 2px solid transparent;
            text-decoration: none;
            color: inherit;
        }
        .card-shop:hover { transform:translateY(-6px); box-shadow:0 20px 40px rgba(20,20,40,0.1); }

        /* استایل اختصاصی برای محصولات ویژه */
        .card-shop.card-shop-special {
            border: 2px solid #edc26b;
            box-shadow: var(--box-shadow-special);
        }

        /* تصویر کارت */
        .card-img-wrap {
            flex: 0 0 200px;
            aspect-ratio: 1 / 1;
            position: relative;
            border-radius: 24px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(180deg, #f6f7fb, #fff);
        }
        .card-img-wrap img {
            width:100%;
            height:100%;
            object-fit:cover;
            display:block;
            transition: transform 0.3s ease;
        }
        .card-shop:hover .card-img-wrap img {
            transform: scale(1.05);
        }

        /* استایل برای بج تخفیف و جدید */
        .card-badge {
            position: absolute;
            top: 12px;
            right: 12px;
            padding: 4px 10px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 700;
            color: #fff;
            z-index: 2;
        }
        .card-badge.sale { background-color: var(--danger); }
        .card-badge.new { background-color: var(--gold-accent); }

        /* بدنه کارت */
        .card-body { flex:1; display:flex; flex-direction:column; justify-content:space-between; text-align:right; }
        .card-title { font-size:20px; font-weight:900; color:#111; margin:0 0 8px 0; line-height:1.2; }
        .card-desc { font-size:14px; color:#444; margin:0 0 12px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

        /* قیمت و دکمه */
        .price-row {
            display:flex;
            align-items:flex-end;
            justify-content:space-between;
            gap:12px;
            flex-direction: row-reverse;
        }
        .price-wrap {
            display:flex;
            flex-direction:column;
            align-items:flex-start;
            text-align: left;
        }
        .price-new {
            font-size:1.8rem;
            font-weight:900;
            color:var(--danger);
            display: flex;
            align-items: baseline;
            gap: 4px;
        }
        .price-new::after {
            content: "تومان";
            font-size: 14px;
            font-weight: 700;
            color: var(--muted);
        }
        .price-old {
            font-size:14px;
            color:#a7a7a7;
            text-decoration:line-through;
            margin-top:60px;
            display: flex;
            align-items: baseline;
            gap: 4px;
        }
        .price-old::after {
            content: "تومان";
            font-size: 12px;
            font-weight: 700;
            color: #a7a7a7;
        }

        .view-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            background: #fff;
            color: #444;
            border-radius: 50%;
            border: 1px solid rgba(0,0,0,0.06);
            box-shadow: 0 4px 10px rgba(0,0,0,0.05);
            transition: all .2s ease-in-out;
            cursor: pointer;
        }
        .view-icon:hover {
            background-color: var(--gold-accent);
            color: #fff;
            box-shadow: 0 8px 20px rgba(75,62,240,0.2);
            transform: scale(1.05);
        }

        /* Breadcrumb */
        .breadcrumb {
            padding: 10px 0;
            margin-bottom: 15px;
            font-size: 14px;
            color: var(--muted);
        }
        .breadcrumb a {
            color: var(--brand-color);
            text-decoration: none;
        }
        .breadcrumb span {
            margin: 0 5px;
        }

        /* ====== Responsive Breakpoints ====== */
        @media (max-width: 992px) {
            .shop-grid { grid-template-columns: repeat(2, 1fr); }
            .card-shop { flex-direction: row; }
        }

        @media (max-width:768px) {
            .shop-shell { padding: 12px; }
            .container-shop { padding: 16px; }
            .shop-grid {
                grid-template-columns: 1fr;
                gap: 14px;
            }
            .card-shop {
                flex-direction: row-reverse;
                align-items: center;
                padding: 12px;
                border-radius: 18px;
                box-shadow: 0 6px 18px rgba(0,0,0,0.06);
                gap: 12px;
            }
            .card-img-wrap {
                flex: 0 0 35%;
                height: auto;
                aspect-ratio: 1/1;
                border-radius: 12px;
            }
            .card-body { flex: 1; padding-right: 0; }
            .card-title { font-size: 16px; }
            .card-desc { font-size: 13px; -webkit-line-clamp:2; }
            .price-new { font-size: 1.5rem; }
            .price-old { font-size: 12px; }
            .view-icon { width: 36px; height: 36px; }
        }




        /* بازطراحی بخش تب‌ها و فیلترهای موبایل */
.filter-section-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

/* اسکرول بار مخفی برای زیبایی */
.custom-scroll-wrapper {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
.custom-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* استایل دکمه‌های کپسولی مدرن */
.modern-chip {
    flex: 0 0 auto;
    padding: 8px 18px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid #eee;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.modern-chip.active {
    background: #edc26b; /* یا رنگ برند شما */
   color: var(--brand-color);
    border-color: #edd4a0;
    box-shadow: 0 4px 12px rgba(75, 62, 240, 0.3);
}

/* استایل فیلترهای ویژه (تیک‌دار) */
.special-filters-row {
    display: flex;
    gap: 10px;
}

.special-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff8ed;
    border: 1px dashed #edc26b;
    color: #8c6d1f;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.special-chip.active {
    background: #edc26b;
    color: #fff;
    border-style: solid;
}

@media (max-width: 768px) {
    .modern-chip {
        padding: 7px 15px;
        font-size: 12px;
    }
}
        /* =========================================
   اصلاحات هدفمند ریسپانسیو کارت‌ها
========================================= */

/* 1. رفع مشکل بیرون زدن متن از کارت */
.card-body {
    min-width: 0 !important;
}

/* 2. اصلاح مارجین اشتباه و بزرگ قیمت قبلی */
.price-old {
    margin-top: 0 !important;
    margin-bottom: 2px !important;
}

/* 3. اصلاحات اختصاصی فقط برای موبایل */
@media (max-width: 768px) {
    /* الف: جلوگیری از کوچیک شدن بیش از حد عکس (حذف درصد و استفاده از سایز ثابت) */
    .card-img-wrap {
        flex: 0 0 110px !important;
        width: 110px !important;
        height: 110px !important;
    }

    /* ب: اصلاح سایز فونت‌ها که تو موبایل خیلی بزرگ بودن */
    .price-new {
        font-size: 1.1rem !important;
    }

    .card-title {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }

    .card-desc {
        font-size: 12px !important;
        /* محدود کردن توضیحات به دو خط در موبایل برای جلوگیری از شلوغی */
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* ج: اصلاح موقعیت و ظاهر بج تخفیف روی عکس تو سایز موبایل */
    .card-badge {
        top: 6px !important;
        right: 6px !important;
        padding: 3px 6px !important;
        font-size: 10px !important;
        border-radius: 6px !important;
    }

    /* د: متناسب کردن سایز آیکون چشم */
    .view-icon {
        width: 36px !important;
        height: 36px !important;
    }
}

/* بهینه‌سازی برای گوشی‌های خیلی کوچیک (مثل iPhone SE) */
@media (max-width: 400px) {
    .card-img-wrap {
        flex: 0 0 90px !important;
        width: 90px !important;
        height: 90px !important;
    }
    .price-new {
        font-size: 1rem !important;
    }
}
        /* =========================================
   طراحی دکمه شناور (FAB) و منوی فیلتر موبایل
========================================= */
/* در دسکتاپ دکمه کاملا مخفی است */
.mobile-filter-fab {
    display: none;
}

@media (max-width: 768px) {
    /* استایل دکمه شناور جمع‌وجور در سمت راست */
    .mobile-filter-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: fixed;
        bottom: 90px; /* قرارگیری بالاتر از منوی پایین صفحه */
        right: 20px; /* انتقال به سمت راست (چون چپ دکمه پشتیبانیه) */
        left: auto;
        transform: none; /* حذف وسط‌چین شدن قبلی */
        background: var(--brand-color); /* هماهنگی کامل با رنگ بنفش سایت */
        color: #fff;
        border: 1px solid var(--brand-light);
        padding: 9px 18px; /* سایز کوچیک‌تر و ظریف‌تر */
        border-radius: 50px;
        font-size: 13px;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(86, 3, 173, 0.35); /* سایه هماهنگ با تم بنفش */
        z-index: 1010;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .mobile-filter-fab:active {
        transform: scale(0.95);
    }

    /* تبدیل کانتینر فیلتر فعلی به منوی کشویی از پایین */
    .filter-section-container {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 100%;
        background: #f6f7fb;
        z-index: 1060; /* 🔴 ارتقا از 1001 به 1060 تا روی تمام منوهای سایت قرار بگیره */
        padding: 24px 16px 40px; /* 🔴 افزایش پدینگ پایین برای جلوگیری از گیر کردن آخرین فیلترها */
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
        transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 90vh; /* 🔴 اجازه میدیم منو تا ۹۰ درصد ارتفاع گوشی بالا بیاد */
        overflow-y: auto;
        margin-bottom: 0;
    }

    /* کلاسی که با JS اضافه میشه تا منو بیاد بالا */
    .filter-section-container.show-mobile {
        bottom: 0;
    }

    /* پس‌زمینه تاریک پشت منو برای تمرکز کاربر */
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(3px);
        z-index: 1050; /* 🔴 ارتقا از 1000 به 1050 تا روی هدر و فوتر قرار بگیره */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .filter-overlay.show {
        display: block;
        opacity: 1;
    }
}
        /* =========================================
   طراحی مدرن بج تخفیف و جدید (UI/UX)
========================================= */
.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 8px 0 8px 8px; /* یک فرم هندسی جذاب و متفاوت */
    font-size: 8px;
    font-weight: 900;
    color: #fff;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); /* سایه نرم برای جدا شدن از پس‌زمینه عکس */
    backdrop-filter: blur(2px);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* استایل تخفیف (قرمز جذاب) */
.card-badge.sale {
    background-color: var(--danger, #e63946);
}

/* استایل محصول جدید (طلایی/زرد) */
.card-badge.new {
    background-color: var(--gold-accent, #f59e0b);
    color: #222; /* رنگ تیره برای خوانایی بهتر روی پس‌زمینه روشن */
}

/* =========================================
   بهینه‌سازی بج تخفیف برای موبایل
========================================= */
@media (max-width: 768px) {
    .card-badge {
        top: 6px;
        right: 6px;
        padding: 3px 8px;
        font-size: 5px; /* کوچکتر شدن برای هماهنگی با عکس ۱۱۰ پیکسلی */
        border-radius: 8px 0 4px 4px;
    }
}


            @keyframes spin { 100% { transform: rotate(360deg); } }