/* ==================== فونت ==================== */
@font-face {
    font-family: 'IranYekan';
    src: url('fonts/lc_iran_yekan_regular.ttf?v=1') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'IranYekan';
    src: url('fonts/lc_iran_yekan_medium.ttf?v=1') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'IranYekan';
    src: url('fonts/lc_iran_yekan_semi_bold.ttf?v=1') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'IranYekan';
    src: url('fonts/lc_iran_yekan_bold.ttf?v=1') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'IranYekan';
    src: url('fonts/lc_iran_yekan_extra_bold.ttf?v=1') format('truetype');
    font-weight: 800;
    font-style: normal;
}

/* ==================== متغیرهای فونت ==================== */
:root {
    --font-xs: 0.9rem;
    --font-sm: 1rem;
    --font-base: 1.15rem;
    --font-md: 1.3rem;
    --font-lg: 1.5rem;
    --font-xl: 1.8rem;
    --font-2xl: 2.4rem;
}

/* ==================== ریست ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'IranYekan', Tahoma, 'Segoe UI', sans-serif;
    font-size: var(--font-base);
    background: #ffffff;
    color: #2d3748;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

/* ==================== هدر ==================== */
.site-header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.0rem;
    padding-bottom: 0.6rem;
}

/* ==================== لوگو ==================== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-md);
    font-weight: bold;
    color: #2d3748;
    white-space: nowrap;
}

.logo img {
    display: block;
    height: 40px;
    width: auto;
}

/* ==================== دکمه دسته‌بندی ==================== */
.category-menu-wrapper { position: relative; }

.btn-category {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-category:hover,
.btn-category.active { background: #48bb78; color: #fff; border-color: #48bb78; }

.hamburger-icon { font-size: var(--font-md); }

/* ==================== مگا منو ==================== */
.mega-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 850px;
    max-width: calc(100vw - 2rem);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.mega-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-menu-inner { display: flex; gap: 0; padding: 1rem; min-height: 320px; }

.mega-column { padding: 0.5rem; overflow-y: auto; max-height: 380px; }

.categories-list { flex: 0 0 180px; border-left: 1px solid #e2e8f0; }

.categories-list .cat-item {
    padding: 0.55rem 0.7rem; border-radius: 8px; cursor: pointer;
    transition: 0.2s; font-size: var(--font-sm); margin-bottom: 0.15rem;
}

.categories-list .cat-item:hover,
.categories-list .cat-item.active { background: #f0fff4; color: #38a169; font-weight: bold; }

.subcategories-list { flex: 0 0 180px; border-left: 1px solid #e2e8f0; }

.subcategories-list .subcat-item {
    padding: 0.45rem 0.7rem; border-radius: 8px; cursor: pointer;
    transition: 0.2s; font-size: var(--font-xs); margin-bottom: 0.15rem;
}

.subcategories-list .subcat-item:hover { background: #f0fff4; color: #38a169; }

.products-preview { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

.product-mini { text-align: center; cursor: pointer; transition: 0.2s; padding: 0.4rem; border-radius: 8px; }

.product-mini:hover { background: #f7fafc; }

.product-mini img {
    width: 65px; height: 65px; object-fit: cover; border-radius: 8px;
    background: #e2e8f0; margin-bottom: 0.25rem; display: block;
}

.product-mini .mini-title { font-size: var(--font-xs); color: #4a5568; }

.product-mini .mini-price { font-size: var(--font-xs); color: #48bb78; font-weight: bold; margin-top: 0.15rem; }

/* ==================== نوار جستجو ==================== */
.search-wrapper { flex: 1 1 100%; min-width: 0; }

.search-input {
    width: 100%; padding: 0.65rem 1.2rem; border: 2px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-base); transition: 0.3s; background: #fafbfc;
}

.search-input:focus { outline: none; border-color: #48bb78; background: #fff; }

/* ==================== دکمه‌های سمت چپ ==================== */
.header-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.btn-login {
    background: #edf2f7; padding: 0.5rem 0.9rem; border-radius: 8px;
    font-size: var(--font-xs); white-space: nowrap; transition: 0.3s;
    display: flex; align-items: center; gap: 0.3rem;
}

.btn-login:hover { background: #e2e8f0; }
.login-icon { font-size: var(--font-base); }

.btn-cart {
    position: relative; background: #48bb78; color: #fff; padding: 0.5rem 0.8rem;
    border-radius: 8px; font-size: var(--font-md); transition: 0.3s;
}

.btn-cart:hover { background: #38a169; }

.cart-badge {
    position: absolute; top: -7px; left: -7px; background: #e53e3e; color: #fff;
    font-size: 0.65rem; padding: 0.12rem 0.35rem; border-radius: 50%; min-width: 16px; text-align: center;
}

/* ==================== نوتیفیکیشن - دکمه ==================== */
.btn-notification {
    position: relative; background: #f7fafc; color: #2d3748; padding: 0.5rem 0.7rem;
    border-radius: 8px; font-size: var(--font-md); transition: 0.3s; text-decoration: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer; border: none;
}

.btn-notification:hover { background: #edf2f7; }

.notif-badge {
    position: absolute; top: -6px; left: -6px; background: #e53e3e; color: #fff;
    font-size: 0.6rem; padding: 0.1rem 0.3rem; border-radius: 50%; min-width: 16px;
    text-align: center; display: none;
}

.notif-badge.show { display: inline; }

/* ==================== پنل نوتیفیکیشن ==================== */
.notif-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1999;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notif-overlay.open { opacity: 1; visibility: visible; }

.notif-panel {
    position: fixed; top: 0; left: 0; right: 0; width: 100%; max-width: 100%;
    max-height: 60vh; background: #ffffff; z-index: 2001; opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    border-radius: 0 0 16px 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    display: flex; flex-direction: column;
}

.notif-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }

.notif-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-bottom: 1px solid #e2e8f0;
}

.notif-title { font-weight: bold; font-size: var(--font-base); }

.notif-close {
    background: #f7fafc; border: none; width: 30px; height: 30px; border-radius: 50%;
    font-size: var(--font-base); cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: 0.2s;
}

.notif-close:hover { background: #e2e8f0; }

.notif-body { overflow-y: auto; padding: 0.25rem 0.5rem; }

.notif-item {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem 0.75rem;
    border-radius: 8px; transition: 0.2s; cursor: pointer; margin-bottom: 0.1rem;
}

.notif-item:hover { background: #f7fafc; }

.notif-item.unread { background: #f0fdf4; border-right: 3px solid #48bb78; }

.notif-item .notif-icon { font-size: 1.3rem; flex-shrink: 0; }
.notif-item .notif-content { flex: 1; min-width: 0; }
.notif-item .notif-text { font-size: var(--font-xs); color: #2d3748; margin-bottom: 0.1rem; }
.notif-item .notif-time { font-size: 0.65rem; color: #a0aec0; }

.notif-empty { text-align: center; color: #a0aec0; padding: 2rem 1rem; font-size: var(--font-sm); }

@media screen and (min-width: 769px) {
    .notif-panel {
        position: absolute; top: 60px; left: 1.5rem; right: auto;
        width: 360px; max-width: calc(100vw - 3rem); max-height: 400px;
        border-radius: 12px; margin: 0;
    }
}

/* ==================== لوگو موبایل ==================== */
.mobile-logo {
    display: none; font-weight: bold; color: #2d3748; white-space: nowrap;
    flex-shrink: 0; transition: all 0.3s ease;
}

.mobile-logo .mobile-logo-icon { display: none; }
.mobile-logo.collapsed .mobile-logo-full { display: none; }
.mobile-logo.collapsed .mobile-logo-icon { display: inline; font-size: 1.3rem; }

/* ==================== دکمه جستجو در موبایل ==================== */
.mobile-search-btn {
    display: none; background: #f0fdf4; border: 1px solid #86efac;
    font-size: var(--font-sm); cursor: pointer; padding: 0.5rem 1rem;
    border-radius: 10px; transition: 0.3s; flex-shrink: 0; color: #166534;
    font-family: inherit; align-items: center; gap: 0.3rem; white-space: nowrap;
}

.mobile-search-btn:hover { background: #48bb78; color: #fff; border-color: #48bb78; }
.search-btn-icon { font-size: var(--font-md); }
.search-btn-text { font-size: var(--font-sm); }
.header-inner.search-active .mobile-search-btn { display: none !important; }

/* ==================== منوی پایین موبایل ==================== */
.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #ffffff;
    border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 1500; padding: 0.3rem 0; padding-bottom: env(safe-area-inset-bottom, 0.3rem);
}

.mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.15rem; flex: 1; padding: 0.4rem 0.2rem; border: none; background: none;
    cursor: pointer; color: #a0aec0; transition: 0.2s; position: relative; font-size: inherit;
}

.mobile-nav-item.active { color: #48bb78; }
.mobile-nav-icon { font-size: 1.3rem; }
.mobile-nav-label { font-size: 0.65rem; }

.mobile-cart-badge {
    position: absolute; top: 0; right: calc(50% - 20px); background: #e53e3e;
    color: #fff; font-size: 0.6rem; padding: 0.1rem 0.3rem; border-radius: 50%;
    min-width: 14px; text-align: center;
}

/* ==================== کشوی دسته‌بندی موبایل ==================== */
/* ==================== کشوی دسته‌بندی موبایل ==================== */
.mobile-category-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1400;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-category-overlay.open { opacity: 1; visibility: visible; }

.mobile-category-drawer {
    position: fixed; top: 0; left: 0; right: 0; bottom: 70px; background: #ffffff;
    z-index: 1401; transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.mobile-category-drawer.open { transform: translateY(0); }

.drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.2rem; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.drawer-title { font-weight: bold; font-size: var(--font-md); }

.drawer-close {
    background: #f7fafc; border: none; width: 36px; height: 36px; border-radius: 50%;
    font-size: var(--font-lg); cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: 0.2s;
}
.drawer-close:hover { background: #e2e8f0; }


/* ==================== کشوی موبایل - آکاردئون ==================== */
.drawer-body {
    padding: 0.5rem 0.75rem 100px;
    overflow-y: auto;
}

.drawer-category {
    margin-bottom: 0.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.drawer-category.open {
    border-color: #48bb78;
}

.drawer-category-header,
.drawer-subcategory-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: var(--font-base);
    font-weight: bold;
    color: #2d3748;
    cursor: pointer;
    text-align: right;
    transition: background 0.2s;
}

.drawer-category-header:hover {
    background: #f0fdf4;
}

.drawer-category.open > .drawer-category-header {
    background: #f0fdf4;
    color: #38a169;
}

.drawer-subcategory-header {
    padding: 0.7rem 1rem;
    font-size: var(--font-sm);
    font-weight: normal;
    color: #4a5568;
    border-radius: 8px;
    margin: 0 0.4rem;
}

.drawer-subcategory-header:hover {
    background: #f7fafc;
}

.drawer-subcategory.open > .drawer-subcategory-header {
    color: #38a169;
    font-weight: bold;
}

.drawer-arrow {
    font-size: 0.7rem;
    color: #a0aec0;
    transition: transform 0.3s ease;
    transform: rotate(-90deg); /* RTL */
}

.drawer-category.open > .drawer-category-header .drawer-arrow,
.drawer-subcategory.open > .drawer-subcategory-header .drawer-arrow {
    transform: rotate(0deg);
    color: #48bb78;
}

/* بدنه‌های آکاردئون */
.drawer-category-body,
.drawer-subcategory-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.drawer-category.open > .drawer-category-body,
.drawer-subcategory.open > .drawer-subcategory-body {
    grid-template-rows: 1fr;
}

.drawer-category-inner,
.drawer-subcategory-inner {
    overflow: hidden;
}

.drawer-category-inner {
    padding: 0 0.4rem 0.5rem;
}

.drawer-subcategory {
    margin-bottom: 0.25rem;
    border-radius: 8px;
}

/* اسکرول افقی محصولات */
.drawer-products-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.4rem 0.5rem 0.6rem;
    scroll-behavior: smooth;
}

.drawer-products-scroll::-webkit-scrollbar {
    display: none;
}

.drawer-product-card {
    flex: 0 0 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.4rem;
    background: #f9fafb;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.drawer-product-card:hover {
    background: #f0fdf4;
}

.drawer-product-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #e2e8f0;
    display: block;
}

.drawer-product-title {
    font-size: 0.7rem;
    color: #2d3748;
    line-height: 1.2;
    height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}

.drawer-product-price {
    font-size: 0.7rem;
    color: #38a169;
    font-weight: bold;
    white-space: nowrap;
}

/* کارت مشاهده همه */
.drawer-product-more {
    background: #f0fdf4;
    border: 1px dashed #48bb78;
    justify-content: center;
}

.drawer-product-more-count {
    font-size: 1.2rem;
    font-weight: bold;
    color: #48bb78;
}

.drawer-product-more-label {
    font-size: 0.65rem;
    color: #718096;
}

.drawer-product-more-link {
    font-size: 0.65rem;
    color: #48bb78;
    margin-top: 0.2rem;
}

/* لینک مشاهده همه Level 1 */
.drawer-view-all {
    display: block;
    text-align: center;
    padding: 0.7rem;
    margin: 0.4rem 0.4rem 0.5rem;
    background: #f0fdf4;
    color: #38a169;
    border-radius: 8px;
    font-size: var(--font-sm);
    font-weight: bold;
    text-decoration: none;
    transition: 0.2s;
}

.drawer-view-all:hover {
    background: #48bb78;
    color: #fff;
}
/* ==================== متن دکمه جستجو ==================== */
.search-text-full { display: inline; }
.search-text-short { display: none; }

/* ==================== رسپانسیو ==================== */
.desktop-only { display: flex; }

@media screen and (max-width: 768px) {
    body { padding-bottom: 70px; }
    .container { padding: 0 0.6rem; }
    .desktop-only { display: none !important; }

    .site-header { position: sticky; top: 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

    .header-inner {
        padding: 0.8rem 0.8rem 0.5rem 0.8rem; gap: 0.5rem;
        position: relative; justify-content: flex-start;
    }

    .mobile-logo { display: flex; align-items: center; font-size: var(--font-base); }

    .mobile-search-btn {
        display: flex !important; align-items: center; justify-content: center;
        gap: 0.3rem; margin-left: auto;
    }

    .search-wrapper { display: none; flex: 1 1 100%; }

    .search-input { width: 100%; padding: 0.6rem 0.8rem; font-size: var(--font-sm); border-radius: 10px; }

    .header-actions { display: flex; flex-shrink: 0; }
    .btn-notification { display: flex; }

    .header-inner.search-active .mobile-logo { font-size: var(--font-sm); }
    .header-inner.search-active .mobile-search-btn { display: none !important; }

    .header-inner.search-active .search-wrapper {
        display: flex; flex: 1; margin-left: 0.5rem;
        animation: searchSlideIn 0.3s ease;
    }

    .header-inner.search-active .btn-notification { display: none; }

    @keyframes searchSlideIn {
        from { opacity: 0; transform: scaleX(0.8); }
        to { opacity: 1; transform: scaleX(1); }
    }

    .mobile-nav { display: flex; }
    .mega-menu { display: none !important; }

    .notif-panel {
        top: 0; left: 0; right: 0; width: 100%; max-width: 100%;
        max-height: 70vh; border-radius: 0 0 16px 16px;
    }

}

@media screen and (max-width: 500px) {
    .search-btn-text { font-size: var(--font-xs); }
    .mobile-search-btn { padding: 0.45rem 0.7rem; }
}

@media screen and (max-width: 420px) {
    .header-inner { padding: 0.8rem 0.8rem 0.4rem 0.8rem; gap: 0.3rem; }
    .mobile-logo { font-size: var(--font-sm); padding: 0 0 0 5px; }
    .mobile-search-btn { padding: 0.4rem 0.5rem; }
    .search-btn-icon { font-size: var(--font-md); }
    .btn-notification { padding: 0.4rem 0.5rem; font-size: var(--font-base); }
    .search-text-full { display: none; }
    .search-text-short { display: inline; }
}

/* ==================== استوری‌ها ==================== */
.stories-section { padding: 1rem 0; background: #ffffff; border-bottom: 1px solid #f0f0f0; }

.stories-wrapper { position: relative; display: flex; align-items: center; }

.stories-list {
    display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0.5rem 0.25rem; flex: 1;
}

.stories-list::-webkit-scrollbar { display: none; }

.stories-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: #ffffff; border: 1px solid #e2e8f0; width: 32px; height: 32px;
    border-radius: 50%; font-size: var(--font-base); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: 0.2s; color: #4a5568;
}

.stories-arrow:hover { background: #f7fafc; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.stories-arrow-right { right: -16px; }
.stories-arrow-left { left: -16px; }

.story-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
    cursor: pointer; flex-shrink: 0; transition: 0.2s;
}

.story-item:hover { transform: scale(1.05); }

.story-ring {
    width: 72px; height: 72px; border-radius: 50%; padding: 3px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex; align-items: center; justify-content: center;
}

.story-ring.viewed { background: #cbd5e0; }

.story-ring img {
    width: 66px; height: 66px; border-radius: 50%; object-fit: cover;
    border: 3px solid #ffffff; background: #e2e8f0;
}

.story-name {
    font-size: var(--font-xs); color: #4a5568; max-width: 75px; text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ==================== پاپ‌آپ استوری ==================== */
.story-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 3000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}

.story-overlay.open { opacity: 1; visibility: visible; }

.story-viewer {
    position: relative; width: auto; max-width: 90vw; height: 90vh; max-height: 90vh;
    aspect-ratio: 9 / 16; z-index: 3001; display: flex; flex-direction: column;
    background: #000; border-radius: 12px; overflow: hidden;
}

.story-progress-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: rgba(255,255,255,0.3); z-index: 10;
}

.story-progress-fill { height: 100%; background: #ffffff; width: 0%; transition: width 0.1s linear; }

.story-viewer-header {
    display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.2rem;
    color: #fff; position: absolute; top: 0; left: 0; right: 0; z-index: 10;
}

.story-viewer-avatar {
    width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #fff;
}

.story-viewer-name { font-weight: bold; font-size: var(--font-sm); flex: 1; }
.story-viewer-time { font-size: var(--font-xs); color: #cbd5e0; }

.story-viewer-close {
    background: none; border: none; color: #fff; font-size: var(--font-xl);
    cursor: pointer; padding: 0.25rem; line-height: 1;
}

.story-viewer-mute {
    background: none; border: none; color: #fff; font-size: var(--font-lg);
    cursor: pointer; padding: 0.25rem; line-height: 1;
}

.story-viewer-content {
    display: flex; align-items: center; justify-content: center; flex: 1; height: 100%;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}

.story-viewer-content img { width: 100%; height: 100%; object-fit: cover; }

.story-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}
.story-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: storySpin 0.8s linear infinite;
}
@keyframes storySpin {
    to { transform: rotate(360deg); }
}

/* ==================== کارت محصول روی استوری ==================== */
.story-product-card {
    position: absolute; bottom: 20px; left: 16px; right: 16px;
    background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px);
    border-radius: 12px; padding: 0.6rem 0.8rem; display: flex;
    align-items: center; gap: 0.6rem; z-index: 20;
}

.story-product-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

.story-product-info { flex: 1; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }

.story-product-title {
    font-size: var(--font-xs); color: #fff; font-weight: bold;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.story-product-price { font-size: var(--font-xs); color: #86efac; }

.story-product-add {
    background: #48bb78; color: #fff; border: none; padding: 0.5rem 0.8rem;
    border-radius: 8px; font-size: var(--font-xs); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s; flex-shrink: 0; white-space: nowrap; font-family: inherit;
}

.story-product-add:hover { background: #38a169; transform: scale(1.05); }
.story-product-add:active { transform: scale(0.95); }

/* ==================== رسپانسیو استوری ==================== */
@media screen and (max-width: 768px) {
    .stories-section { padding: 0.75rem 0; }
    .stories-list { gap: 0.75rem; }
    .story-ring { width: 62px; height: 62px; }
    .story-ring img { width: 56px; height: 56px; }
    .story-name { font-size: 0.65rem; max-width: 60px; }
    .stories-arrow { width: 28px; height: 28px; font-size: var(--font-sm); }
    .stories-arrow-right { right: -10px; }
    .stories-arrow-left { left: -10px; }

    .story-viewer {
        width: 100%; max-width: 100%; height: 100%; max-height: 100vh; border-radius: 0;
    }
}

/* ==================== بنر اسلایدر ==================== */
.banner-slider { position: relative; width: 100%; height: 350px; overflow: hidden; margin-bottom: 1.5rem; }

.banner-track {
    display: flex; width: 100%; height: 100%;
    transition: transform 1.5s cubic-bezier(0, 0, 0.2, 1); will-change: transform;
}

.banner-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

.banner-content { text-align: center; color: #fff; padding: 2rem; }

.banner-content h2 { font-size: var(--font-2xl); margin-bottom: 0.5rem; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

.banner-content p { font-size: var(--font-md); margin-bottom: 1.5rem; opacity: 0.9; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

.banner-btn {
    display: inline-block; background: #fff; color: #333; padding: 0.6rem 1.8rem;
    border-radius: 30px; font-weight: bold; font-size: var(--font-sm); transition: 0.3s; text-decoration: none;
}

.banner-btn:hover { background: #f0f0f0; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.banner-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 0.5rem; z-index: 10; }

.banner-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: 0.3s; }

.banner-dot.active { background: #fff; width: 24px; border-radius: 5px; }

@media screen and (max-width: 768px) {
    .banner-slider { height: 200px; }
    .banner-content h2 { font-size: var(--font-lg); }
    .banner-content p { font-size: var(--font-sm); }
    .banner-btn { padding: 0.5rem 1.2rem; font-size: var(--font-xs); }
}

/* ==================== دسته‌بندی‌های سریع ==================== */
.quick-categories { padding: 1.5rem 0; background: #ffffff; border-bottom: 1px solid #f0f0f0; }

.quick-categories-wrapper { position: relative; }

.quick-categories-scroll {
    display: flex; gap: 4.5rem; overflow-x: auto; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0.5rem 1.5rem;
    cursor: grab; user-select: none; -webkit-user-select: none;
}

.quick-categories-scroll::-webkit-scrollbar { display: none; }

.quick-categories-shadow {
    position: absolute; top: 0; bottom: 0; width: 50px; z-index: 5;
    pointer-events: none; transition: opacity 0.3s ease;
}

.quick-categories-shadow-right { right: 0; background: linear-gradient(to right, transparent, #ffffff); }
.quick-categories-shadow-left { left: 0; background: linear-gradient(to left, transparent, #ffffff); }

.quick-cat-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    cursor: pointer; flex-shrink: 0; transition: 0.2s; text-decoration: none;
    color: inherit; position: relative;
}

.quick-cat-item::after {
    content: ''; position: absolute; left: -2.25rem; top: 10%; height: 80%;
    width: 1px; background: #e2e8f0;
}

.quick-cat-item:hover { transform: translateY(-2px); }

.quick-cat-icon {
    width: 56px; height: 56px; border-radius: 50%; background: #f0fdf4;
    display: flex; align-items: center; justify-content: center;
    font-size: var(--font-xl); transition: 0.2s;
}

.quick-cat-item:hover .quick-cat-icon { background: #e6ffed; transform: scale(1.05); }

.quick-cat-name { font-size: var(--font-xs); color: #4a5568; text-align: center; max-width: 65px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== شگفت‌انگیزها ==================== */
.amazing-section { padding: 1.5rem 0; background: #ffffff; border-bottom: 1px solid #f0f0f0; }

.amazing-box {
    background: linear-gradient(135deg, #fff5f5, #fff0f0); border: 1px solid #fecaca;
    border-radius: 16px; padding: 1.2rem 1rem; position: relative; overflow: hidden;
}

.amazing-box::before {
    content: ''; position: absolute; top: -30px; right: -30px; width: 80px; height: 80px;
    background: #fbbf24; opacity: 0.15; border-radius: 50%;
}

.amazing-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

.amazing-title { font-size: var(--font-lg); color: #dc2626; display: flex; align-items: center; gap: 0.4rem; }

.amazing-view-all { font-size: var(--font-xs); color: #dc2626; text-decoration: none; font-weight: bold; transition: 0.2s; white-space: nowrap; }

.amazing-view-all:hover { color: #b91c1c; }

.amazing-slider-wrapper { position: relative; }

.amazing-slider {
    display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0.5rem 0.25rem;
    cursor: grab; user-select: none; -webkit-user-select: none;
}

.amazing-slider::-webkit-scrollbar { display: none; }

.amazing-card {
    flex: 0 0 220px; background: #ffffff; border-radius: 12px; padding: 0.75rem;
    text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: 0.2s;
    cursor: pointer; position: relative; overflow: visible; display: flex; flex-direction: column;
}

.amazing-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }

.amazing-card-img-wrapper { position: relative; width: 100%; height: 150px; margin-bottom: 0.5rem; }

.amazing-card-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 8px;
    background: #edf2f7; opacity: 0.5; transition: opacity 0.2s;
}

.amazing-card:hover .amazing-card-img { opacity: 1; }

.amazing-card-discount-badge {
    position: absolute; top: 8px; right: 8px; background: #e53e3e; color: #fff;
    padding: 0.2rem 0.5rem; border-radius: 10px; font-size: var(--font-xs); font-weight: bold; z-index: 2;
}

.amazing-card-title { font-size: var(--font-sm); color: #2d3748; margin-bottom: 0.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.amazing-card-old-price-row { display: flex; align-items: center; justify-content: center; gap: 0.3rem; margin-bottom: 0.15rem; }

.amazing-card-old-price { font-size: var(--font-xs); color: #a0aec0; text-decoration: line-through; }

.amazing-card-price { font-size: var(--font-md); font-weight: bold; color: #38a169; margin-bottom: 0.5rem; }

.amazing-card-stock-bar { margin-top: auto; padding: 0 0.25rem; margin-bottom: 0.5rem; }

.amazing-card-stock-header { display: flex; justify-content: space-between; font-size: 0.65rem; color: #a0aec0; margin-bottom: 0.2rem; }

.amazing-card-stock-track { width: 100%; height: 5px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }

.amazing-card-stock-fill { height: 100%; background: linear-gradient(to left, #48bb78, #38a169); border-radius: 3px; transition: width 0.3s ease; }

.amazing-card-stock-fill.low { background: linear-gradient(to left, #f6ad55, #ed8936); }
.amazing-card-stock-fill.critical { background: linear-gradient(to left, #fc8181, #e53e3e); }

.amazing-card-timer { display: flex; align-items: center; justify-content: center; gap: 0.3rem; margin-bottom: 0.5rem; }

.amazing-timer-block {
    background: #f1f5f9; color: #1a202c; padding: 0.25rem 0.35rem;
    border-radius: 6px; font-size: var(--font-xs); font-weight: bold; min-width: 28px; text-align: center;
}

.amazing-timer-separator { font-size: var(--font-xs); color: #64748b; font-weight: bold; }

.amazing-card-add {
    width: 100%; background: #48bb78; color: #fff; border: none; padding: 0.5rem;
    border-radius: 8px; font-size: var(--font-xs); font-family: inherit; cursor: pointer;
    transition: 0.2s; font-weight: bold;
}

.amazing-card-add:hover { background: #38a169; }

@media screen and (max-width: 768px) {
    .amazing-card { flex: 0 0 170px; }
    .amazing-card-img-wrapper { height: 120px; }
    .amazing-card-title { font-size: var(--font-xs); }
}

/* ==================== برندها ==================== */
.brands-section { padding: 1.5rem 0; background: #ffffff; border-bottom: 1px solid #f0f0f0; }
.brands-title { font-size: var(--font-md); color: #2d3748; margin-bottom: 1rem; }

.brands-fade-wrapper {
    position: relative;
    overflow: hidden;
}

.brands-scroll {
    overflow: hidden;
    padding: 0.5rem 0;
}

.brands-track {
    display: flex;
    width: max-content;
    animation: brandScroll 25s linear infinite;
    user-select: none;
    -webkit-user-select: none;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    cursor: pointer;
    transition: 0.2s;
    padding: 0 4rem;
}

.brands-track:hover { animation-play-state: paused; }

@keyframes brandScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

.brand-item:hover { transform: translateY(-2px); }
.brand-logo { font-size: 2.5rem; transition: 0.2s; pointer-events: none; }
.brand-item:hover .brand-logo { transform: scale(1.1); }
.brand-name { font-size: var(--font-sm); color: #4a5568; text-align: center; font-weight: 500; pointer-events: none; }

/* افکت fade در لبه‌ها */
.brands-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.brands-fade-left {
    left: 0;
    display: block; /* Added display block for better layout */
    background: linear-gradient(to right, #ffffff, transparent);
}

.brands-fade-right {
    right: 0;
    background: linear-gradient(to left, #ffffff, transparent);
}

@media screen and (max-width: 768px) {
    .brands-section { padding: 1rem 0; }
    .brand-logo { font-size: 2rem; }
    .brand-item { padding: 0 2rem; }
    .brands-fade { width: 50px; }
}

/* ==================== منتخب فروشگاه ==================== */
.featured-section {
    padding: 1.5rem 0;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.featured-box {
    background: linear-gradient(135deg, #f0fdf4, #f7fee7);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 1.2rem 1rem;
    position: relative;
    overflow: hidden;
}

.featured-box::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 60px;
    height: 60px;
    background: #48bb78;
    opacity: 0.08;
    border-radius: 50%;
}

.featured-title {
    font-size: var(--font-lg);
    color: #166534;
    margin-bottom: 0.75rem;
}

.featured-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.featured-tab {
    background: none;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: var(--font-sm);
    color: #718096;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.featured-tab:hover {
    background: rgba(255,255,255,0.6);
    color: #2d3748;
}

.featured-tab.active {
    background: #ffffff;
    color: #166534;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.featured-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.25rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.featured-slider::-webkit-scrollbar { display: none; }

.featured-card {
    flex: 0 0 220px;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.2s;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.featured-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.featured-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 150px;
    margin-bottom: 0.5rem;
}

.featured-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
}

.featured-card-discount-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #e53e3e;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
}

.featured-card-title {
    font-size: var(--font-sm);
    color: #2d3748;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
    margin-top: auto;
}

.featured-card-old-price {
    font-size: var(--font-xs);
    color: #a0aec0;
    text-decoration: line-through;
}

.featured-card-price {
    font-size: var(--font-md);
    font-weight: bold;
    color: #38a169;
}

.featured-card-add {
    width: 100%;
    background: #48bb78;
    color: #fff;
    border: none;
    padding: 0.4rem;
    border-radius: 8px;
    font-size: var(--font-xs);
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.featured-card-add:hover {
    background: #38a169;
}

.featured-subsection {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.featured-subsection:last-child {
    margin-bottom: 0;
}

.featured-subtitle {
    font-size: var(--font-md);
    margin-bottom: 0.75rem;
    color: #2d3748;
}

@media screen and (max-width: 768px) {
    .featured-section { padding: 1rem 0; }
    .featured-card { flex: 0 0 185px; }
    .featured-card-img-wrapper { height: 120px; }
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #2d3748;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    transition: all 0.3s;
    z-index: 9999;
    white-space: nowrap;
}
.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== بنر تبلیغاتی ==================== */
.promo-banner {
    width: 100%;
    background: #ffffff;
}

.promo-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #bfdbfe;
    border-radius: 0;
    padding: 1.2rem 1.5rem;
    width: 100%;
}

.promo-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.promo-text {
    font-size: var(--font-base);
    color: #1e40af;
}

.promo-text strong {
    color: #2563eb;
}

@media screen and (max-width: 768px) {
    .promo-box {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    .promo-text {
        font-size: var(--font-sm);
    }
}

/* ==================== تازه‌های امروز ==================== */
.fresh-section {
    padding: 1.5rem 0;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.fresh-box {
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
    border: 1px solid #d8b4fe;
    border-radius: 16px;
    padding: 1.2rem 1rem;
    position: relative;
    overflow: hidden;
}

.fresh-box::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    background: #a855f7;
    opacity: 0.08;
    border-radius: 50%;
}

.fresh-title {
    font-size: var(--font-lg);
    color: #6b21a8;
    margin-bottom: 1rem;
}

.fresh-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.25rem;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.fresh-slider::-webkit-scrollbar { display: none; }

.fresh-card {
    flex: 0 0 220px;
    background: #ffffff;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.fresh-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.fresh-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #48bb78;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: bold;
    z-index: 2;
}

.fresh-card-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e53e3e;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.fresh-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
    margin-bottom: 0.5rem;
}

.fresh-card-title {
    font-size: var(--font-sm);
    color: #2d3748;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fresh-card-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
    margin-top: auto;
}

.fresh-card-old-price {
    font-size: var(--font-xs);
    color: #a0aec0;
    text-decoration: line-through;
}

.fresh-card-price {
    font-size: var(--font-md);
    font-weight: bold;
    color: #38a169;
}

.fresh-card-add {
    width: 100%;
    background: #48bb78;
    color: #fff;
    border: none;
    padding: 0.4rem;
    border-radius: 8px;
    font-size: var(--font-xs);
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.fresh-card-add:hover { background: #38a169; }

@media screen and (max-width: 768px) {
    .fresh-section { padding: 1rem 0; }
    .fresh-card { flex: 0 0 170px; }
    .fresh-card-img { height: 120px; }
}

/* ==================== بخش اعتمادسازی ==================== */
.trust-section {
    padding: 2rem 0;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.trust-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.trust-item-title {
    font-size: var(--font-base);
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.trust-item-desc {
    font-size: var(--font-xs);
    color: #718096;
}

@media screen and (max-width: 768px) {
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .trust-icon { font-size: 2rem; }
}

/* ==================== فوتر ==================== */
.site-footer {
    background: #1a202c;
    color: #cbd5e0;
    padding: 2.5rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: var(--font-md);
    color: #fff;
    margin-bottom: 0.5rem;
}

.footer-desc {
    font-size: var(--font-xs);
    line-height: 1.8;
}

.footer-heading {
    font-size: var(--font-base);
    color: #fff;
    margin-bottom: 0.75rem;
}

.footer-col a,
.footer-col p {
    display: block;
    font-size: var(--font-xs);
    color: #a0aec0;
    margin-bottom: 0.5rem;
    transition: 0.2s;
}

.footer-col a:hover {
    color: #48bb78;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.footer-social a {
    font-size: 1.3rem;
    background: #2d3748;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.footer-social a:hover {
    background: #48bb78;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #2d3748;
    text-align: center;
    padding: 1rem 0;
    font-size: var(--font-xs);
    color: #718096;
}

@media screen and (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .footer-col:first-child { grid-column: 1 / -1; }
}

@media screen and (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-col:first-child { grid-column: auto; }
}

/* ==================== صفحه محصول ==================== */
.breadcrumb {
    padding: 1rem 0;
    font-size: var(--font-xs);
    color: #a0aec0;
}

.breadcrumb a {
    color: #48bb78;
    transition: 0.2s;
}

.breadcrumb a:hover {
    color: #38a169;
}

.breadcrumb span {
    margin: 0 0.3rem;
}

.breadcrumb-current {
    color: #2d3748;
    font-weight: bold;
}

.product-page {
    padding-bottom: 2rem;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* گالری */
.product-gallery {
    position: sticky;
    top: 100px;
    align-self: start;
}

.product-main-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.product-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-main-img-wrapper:hover .product-main-img {
    transform: scale(1.03);
}

.product-thumbs {
    display: flex;
    gap: 0.75rem;
}

.product-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
    background: #f7fafc;
}

.product-thumb:hover {
    border-color: #a0aec0;
}

.product-thumb.active {
    border-color: #48bb78;
}

/* اطلاعات */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-name {
    font-size: var(--font-xl);
    color: #2d3748;
    line-height: 1.4;
}

.product-meta {
    font-size: var(--font-xs);
    color: #a0aec0;
}

.product-meta a {
    color: #48bb78;
}

.product-price-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: #f0fdf4;
    padding: 1rem;
    border-radius: 12px;
}

.product-old-price {
    font-size: var(--font-base);
    color: #a0aec0;
    text-decoration: line-through;
}

.product-discount-badge {
    background: #e53e3e;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: var(--font-xs);
    font-weight: bold;
}

.product-price {
    font-size: var(--font-2xl);
    font-weight: bold;
    color: #38a169;
}

.product-stock {
    font-size: var(--font-sm);
    color: #2d3748;
}

.product-stock strong {
    color: #38a169;
}

/* انتخاب تعداد */
.product-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.product-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: #f7fafc;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
    color: #2d3748;
    font-family: inherit;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 50px;
    height: 40px;
    text-align: center;
    border: none;
    border-right: 1px solid #e2e8f0;
    border-left: 1px solid #e2e8f0;
    font-size: var(--font-base);
    font-family: inherit;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-add-btn {
    flex: 1;
    min-width: 200px;
    height: 48px;
    background: #48bb78;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--font-base);
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.product-add-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

/* توضیحات */
.product-description {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
}

.product-description h2 {
    font-size: var(--font-lg);
    color: #2d3748;
    margin-bottom: 1rem;
}

.product-description p {
    font-size: var(--font-sm);
    color: #4a5568;
    line-height: 2;
    margin-bottom: 0.75rem;
}

/* ==================== لایت‌باکس ==================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.4);
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ==================== رسپانسیو ==================== */
@media screen and (max-width: 768px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-gallery {
        position: static;
    }

    .product-name {
        font-size: var(--font-lg);
    }

    .product-price {
        font-size: var(--font-xl);
    }

    .product-actions {
        flex-direction: column;
    }

    .product-add-btn {
        width: 100%;
        flex: none;
        height: 52px;
        font-size: var(--font-base);
    }

    .product-thumb {
        width: 55px;
        height: 55px;
    }
}

/* انتخاب نوع فروش */
.product-type-selector {
    display: flex;
    gap: 0.5rem;
    background: #f7fafc;
    padding: 0.3rem;
    border-radius: 12px;
}

.type-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 10px;
    font-size: var(--font-sm);
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
    color: #718096;
}

.type-btn.active {
    background: #fff;
    color: #2d3748;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* باکس انتخاب */
.product-variant-box {
    background: #fafbfc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.variant-label {
    font-size: var(--font-sm);
    font-weight: bold;
    color: #2d3748;
    display: block;
    margin-bottom: 0.5rem;
}

.variant-sizes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.size-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: var(--font-xs);
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
    color: #4a5568;
}

.size-btn:hover { border-color: #a0aec0; }

.size-btn.active {
    border-color: #48bb78;
    background: #f0fdf4;
    color: #38a169;
    font-weight: bold;
}

.variant-price {
    font-size: var(--font-sm);
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.variant-price strong { color: #38a169; }

.variant-note {
    font-size: 0.65rem;
    color: #a0aec0;
    margin-top: 0.5rem;
}

/* استپر وزن */
.weight-stepper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.weight-value {
    font-size: var(--font-lg);
    font-weight: bold;
    color: #2d3748;
    min-width: 150px;
    text-align: center;
    display: inline-block;
}

.weight-unit {
    font-size: var(--font-sm);
    color: #718096;
}

.weight-step {
    font-size: var(--font-xs);
    color: #a0aec0;
    margin-bottom: 0.75rem;
}

/* ==================== سبد خرید ==================== */
.cart-page { 
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    min-height: 60vh; 
}

.cart-title { font-size: var(--font-xl); color: #2d3748; margin-bottom: 1.5rem; }

.cart-layout { display: grid; grid-template-columns: 1fr 350px; gap: 2rem; align-items: start; }

.cart-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cart-empty { text-align: center; padding: 5rem 1rem; color: #a0aec0; }
.cart-empty p { font-size: var(--font-lg); margin-bottom: 1.5rem; }

.cart-back-btn {
    display: inline-block; background: #48bb78; color: #fff; padding: 0.6rem 1.5rem;
    border-radius: 10px; text-decoration: none; transition: 0.2s;
}
.cart-back-btn:hover { background: #38a169; }

/* کارت محصول توی سبد */
.cart-item {
    display: flex; gap: 1rem; align-items: center;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem;
    transition: 0.2s;
}

.cart-item-img {
    width: 80px; height: 80px; border-radius: 10px; object-fit: cover; background: #f7fafc; flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-title {
    font-size: var(--font-base); font-weight: bold; color: #2d3748;
    margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.cart-item-price { font-size: var(--font-sm); color: #48bb78; font-weight: bold; margin-bottom: 0.25rem; }

.cart-item-meta { font-size: var(--font-xs); color: #a0aec0; }

.cart-item-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.cart-item-qty {
    display: flex; align-items: center; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden;
}

.cart-qty-btn {
    width: 30px; height: 30px; background: #f7fafc; border: none; font-size: 1rem;
    cursor: pointer; transition: 0.2s; color: #2d3748; font-family: inherit;
}
.cart-qty-btn:hover { background: #e2e8f0; }

.cart-qty-value {
    width: auto; min-width: 50px; text-align: center; font-size: var(--font-sm); font-weight: bold;
    border-right: 1px solid #e2e8f0; border-left: 1px solid #e2e8f0; padding: 0.25rem 0.5rem;
}

.cart-item-total { font-size: var(--font-base); font-weight: bold; color: #2d3748; min-width: 90px; text-align: center; }

.cart-item-remove {
    background: none; border: none; color: #e53e3e; font-size: 1.2rem;
    cursor: pointer; transition: 0.2s; padding: 0.25rem;
}
.cart-item-remove:hover { color: #c53030; }

/* خلاصه سفارش */
.cart-summary {
    background: #fafbfc; border: 1px solid #e2e8f0; border-radius: 16px;
    padding: 1.5rem; position: sticky; top: 100px;
}

.cart-summary-title { font-size: var(--font-lg); color: #2d3748; margin-bottom: 1rem; }

.cart-summary-row {
    display: flex; justify-content: space-between; padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0; font-size: var(--font-sm); color: #4a5568;
}

.cart-summary-total { border-bottom: none; font-weight: bold; font-size: var(--font-base); color: #2d3748; }

.cart-checkout-btn {
    width: 100%; margin-top: 1rem; background: #48bb78; color: #fff;
    border: none; padding: 0.8rem; border-radius: 10px; font-size: var(--font-base);
    font-weight: bold; font-family: inherit; cursor: pointer; transition: 0.2s;
}
.cart-checkout-btn:hover { background: #38a169; }

@media screen and (max-width: 768px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .cart-item { flex-wrap: wrap; }
    .cart-item-actions { width: 100%; justify-content: space-between; margin-top: 0.5rem; }
}

/* ==================== پاپ‌آپ ورود ==================== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.open { opacity: 1; visibility: visible; }

.login-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #fff;
    border-radius: 20px;
    padding: 5rem 1.5rem 2rem 1.5rem;
    width: 400px;
    max-width: 90vw;
    z-index: 5001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.login-modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.login-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f7fafc;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.login-close:hover { background: #e2e8f0; }

.login-title { font-size: var(--font-lg); color: #2d3748; text-align: center; margin-bottom: 0.5rem; }

.login-desc { font-size: var(--font-xs); color: #a0aec0; text-align: center; margin-bottom: 5rem; }

.login-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: var(--font-base);
    font-family: inherit;
    text-align: center;
    direction: ltr;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    transition: 0.2s;
}

.login-input:focus { outline: none; border-color: #48bb78; }

.login-submit-btn {
    width: 100%;
    height: 48px;
    background: #48bb78;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: var(--font-base);
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
}

.login-submit-btn:hover { background: #38a169; }

/* کدهای تأیید */
.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    direction: ltr;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: var(--font-xl);
    font-family: inherit;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: 0.2s;
}

.code-input:focus { outline: none; border-color: #48bb78; }

/* ==================== ارسال مجدد کد ==================== */
.resend-code-wrapper {
    text-align: center;
    margin-top: 0.75rem;
}

.resend-timer {
    font-size: var(--font-sm);
    color: #718096;
}

.resend-timer strong {
    color: #48bb78;
    font-weight: bold;
}

.resend-code-btn {
    background: none;
    border: none;
    color: #48bb78;
    font-size: var(--font-sm);
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem;
    transition: 0.2s;
    text-decoration: underline;
}

.resend-code-btn:hover {
    color: #38a169;
}

.resend-code-btn:disabled {
    color: #a0aec0;
    cursor: not-allowed;
    text-decoration: none;
}

/* ==================== رسپانسیو پاپ‌آپ ==================== */
@media screen and (max-width: 768px) {
    .login-modal {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 1.5rem 1rem 2rem;
    }

    .login-modal.open { transform: translateY(0); }
    .login-desc { margin-bottom: 2  rem; }
}

/* ==================== صفحه ثبت سفارش ==================== */
.checkout-page { padding-bottom: 2rem; }
.checkout-title { font-size: var(--font-xl); color: #2d3748; margin-bottom: 1.5rem; }

.checkout-login-required {
    text-align: center; padding: 3rem 1rem; background: #fafbfc;
    border: 1px solid #e2e8f0; border-radius: 16px;
}
.checkout-login-required p { font-size: var(--font-base); color: #4a5568; margin-bottom: 1rem; }

.checkout-login-btn {
    background: #48bb78; color: #fff; border: none; padding: 0.7rem 2rem;
    border-radius: 10px; font-size: var(--font-base); font-weight: bold;
    font-family: inherit; cursor: pointer; transition: 0.2s;
}
.checkout-login-btn:hover { background: #38a169; }

.checkout-content { display: flex; flex-direction: column; gap: 1.5rem; }

.checkout-section {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 1.5rem; margin: 12px 0;
}

.checkout-section-title { font-size: var(--font-lg); color: #2d3748; margin-bottom: 1rem; }

.checkout-user-info p { font-size: var(--font-sm); color: #4a5568; margin-bottom: 0.5rem; }
.checkout-user-info strong { color: #2d3748; font-size: var(--font-base); }

.checkout-edit-btn {
    background: none; border: 1px solid #e2e8f0; padding: 0.4rem 1rem;
    border-radius: 8px; font-size: var(--font-xs); font-family: inherit;
    cursor: pointer; transition: 0.2s; color: #4a5568; margin-top: 0.5rem;
}
.checkout-edit-btn:hover { border-color: #48bb78; color: #48bb78; }

.checkout-form { display: flex; flex-direction: column; gap: 0.75rem; }

.checkout-input {
    width: 100%; padding: 0.65rem 0.8rem; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit; transition: 0.2s;
}
.checkout-input:focus { outline: none; border-color: #48bb78; }

.checkout-textarea { min-height: 80px; resize: vertical; }

.checkout-save-btn {
    background: #48bb78; color: #fff; border: none; padding: 0.6rem 1.5rem;
    border-radius: 10px; font-size: var(--font-sm); font-weight: bold;
    font-family: inherit; cursor: pointer; transition: 0.2s; align-self: flex-start;
}
.checkout-save-btn:hover { background: #38a169; }

/* خلاصه سفارش */
.checkout-items { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }

.checkout-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 0; border-bottom: 1px solid #f0f0f0; font-size: var(--font-sm); color: #4a5568;
}

.checkout-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: var(--font-lg); padding-top: 1rem; border-top: 2px solid #e2e8f0;
}
.checkout-total strong { color: #38a169; }

.checkout-submit-btn {
    width: 100%; height: 52px; background: #48bb78; color: #fff;
    border: none; border-radius: 12px; font-size: var(--font-lg); font-weight: bold;
    font-family: inherit; cursor: pointer; transition: 0.2s; margin: 12px 0;
}
.checkout-submit-btn:hover { background: #38a169; transform: translateY(-1px); }

@media screen and (max-width: 768px) {
    .checkout-section { padding: 1rem; }
    .checkout-title { font-size: var(--font-lg); }
}

/* ==================== آیتم‌های خلاصه سفارش ==================== */
.checkout-item-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.checkout-item-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
    flex-shrink: 0;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: var(--font-sm);
    color: #4a5568;
}

@media (max-width: 480px) {
    .checkout-item-img {
        width: 36px;
        height: 36px;
    }
    .checkout-item {
        font-size: var(--font-xs);
    }
}

/* ==================== صفحه لیست محصولات ==================== */
.products-page { padding-bottom: 2rem; }

.products-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; }

/* سایدبار فیلترها */
.products-sidebar {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
    padding: 1.5rem; position: sticky; top: 100px; align-self: start; max-height: 80vh; overflow-y: auto;
}

.sidebar-title { font-size: var(--font-md); color: #2d3748; margin-bottom: 1.5rem; }

.filter-group { margin-bottom: 1.5rem; border-bottom: 1px solid #f0f0f0; padding-bottom: 1.5rem; }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.filter-label { font-size: var(--font-sm); font-weight: bold; color: #4a5568; margin-bottom: 0.75rem; }

.filter-options { display: flex; flex-direction: column; gap: 0.5rem; }

.filter-option {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: var(--font-xs); color: #4a5568; cursor: pointer; transition: 0.2s;
}
.filter-option:hover { color: #48bb78; }
.filter-option input { accent-color: #48bb78; }

/* بازه قیمت */
.price-range { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.price-input {
    width: 80px; padding: 0.4rem 0.5rem; border: 1px solid #e2e8f0;
    border-radius: 8px; font-size: var(--font-xs); font-family: inherit;
}
.price-input:focus { outline: none; border-color: #48bb78; }

.price-apply-btn {
    background: #48bb78; color: #fff; border: none; padding: 0.4rem 0.8rem;
    border-radius: 8px; font-size: var(--font-xs); font-family: inherit; cursor: pointer; transition: 0.2s;
}
.price-apply-btn:hover { background: #38a169; }

/* محتوای اصلی */
.products-main { min-width: 0; }

/* نوار ابزار */
.products-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}

.toolbar-count { font-size: var(--font-sm); color: #a0aec0; }

.toolbar-right { display: flex; gap: 0.5rem; align-items: center; }

.toolbar-filter-btn {
    display: none; background: #f7fafc; border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem; border-radius: 10px; font-size: var(--font-xs);
    font-family: inherit; cursor: pointer; transition: 0.2s;
}
.toolbar-filter-btn:hover { border-color: #48bb78; }

.toolbar-sort {
    padding: 0.5rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: var(--font-xs); font-family: inherit; background: #fff; cursor: pointer;
}

/* گرید محصولات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    transition: 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;              /* ⬅️ این خط مهم است */
    overflow: hidden;          /* جلوگیری از نشت محتوا */
}

.product-card:hover {
    border-color: #48bb78;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.1);
    transform: translateY(-2px);
}

.product-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
    margin-bottom: 0.5rem;
}

.product-card-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e53e3e;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: bold;
}

.product-card-title {
    font-size: var(--font-sm);
    color: #2d3748;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;          /* ⬅️ برای اطمینان */
    min-height: 1.5em;
    line-height: 1.5;
}

.product-card-price-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    margin-top: auto;
    margin-bottom: 0.5rem;
}

.product-card-old-price {
    font-size: var(--font-xs);
    color: #a0aec0;
    text-decoration: line-through;
}

.product-card-price {
    font-size: var(--font-base);
    font-weight: bold;
    color: #38a169;
}

.product-card-add {
    width: 100%;
    background: #48bb78;
    color: #fff;
    border: none;
    padding: 0.4rem;
    border-radius: 8px;
    font-size: var(--font-xs);
    font-family: inherit;
    cursor: pointer;
    transition: 0.2s;
    margin-top: auto;
}

.product-card-add:hover {
    background: #38a169;
}

/* Load More */
.products-loadmore { text-align: center; margin-top: 2rem; }

.loadmore-btn {
    background: #f7fafc; border: 1px solid #e2e8f0; padding: 0.7rem 2rem;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit;
    cursor: pointer; transition: 0.2s; color: #4a5568;
}
.loadmore-btn:hover { background: #edf2f7; border-color: #48bb78; }

/* فیلتر موبایل */
.mobile-filter-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 4000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-filter-overlay.open { opacity: 1; visibility: visible; }

.mobile-filter-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 85vw;
    background: #fff; z-index: 4001; transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
}
.mobile-filter-drawer.open { transform: translateX(0); }

.filter-drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.2rem; border-bottom: 1px solid #e2e8f0;
}
.filter-drawer-close { background: #f7fafc; border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }

.filter-drawer-body { flex: 1; overflow-y: auto; padding: 1rem; }

.price-clear-btn {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--font-xs);
    color: #a0aec0;
    transition: 0.2s;
}
.price-clear-btn:hover { color: #e53e3e; border-color: #e53e3e; }

/* رسپانسیو */
@media screen and (max-width: 1024px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    .products-layout { grid-template-columns: 1fr; }
    .products-sidebar { display: none; }
    .toolbar-filter-btn { display: block; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .product-card-img { height: 120px; }
    .price-input {
        width: 200px;
        padding: 0.5rem;
        font-size: var(--font-base);
    }
}

@media screen and (max-width: 420px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .product-card { padding: 0.5rem; }
}

/* ==================== پنل ادمین ==================== */
.admin-layout { display: flex; min-height: 100vh; }

/* منوی کناری */
.admin-sidebar {
    width: 260px; background: #1a202c; color: #cbd5e0;
    display: flex; flex-direction: column; flex-shrink: 0;
    transition: transform 0.3s ease;
    position: fixed; top: 0; right: 0; bottom: 0;
    z-index: 5000; transform: translateX(0);
}

.admin-sidebar-header { padding: 1.5rem; border-bottom: 1px solid #2d3748; position: relative; }
.admin-logo { font-size: var(--font-md); color: #fff; }

.admin-sidebar-close {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,0.2); border: none; color: #fff;
    width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem;
    cursor: pointer; display: none; align-items: center; justify-content: center;
}

.admin-nav { display: flex; flex-direction: column; padding: 0.5rem; }

.admin-nav-item {
    padding: 0.6rem 1rem; border-radius: 8px; font-size: var(--font-sm);
    color: #a0aec0; text-decoration: none; transition: 0.2s; margin-bottom: 0.2rem;
}

.admin-nav-item:hover,
.admin-nav-item.active { background: #2d3748; color: #fff; }

/* محتوای اصلی */
.admin-main {
    flex: 1; background: #f7fafc; min-width: 0;
    margin-right: 260px; /* جا برای منوی کناری */
}

.admin-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid #e2e8f0;
    position: sticky; top: 0; z-index: 100;margin-right: 260px;
}

.admin-menu-toggle {
    display: none; background: none; border: none; font-size: 1.5rem;
    cursor: pointer; color: #4a5568;
}

.admin-page-title { font-size: var(--font-lg); color: #2d3748; flex: 1; }
.admin-header-actions { display: flex; align-items: center; gap: 1rem; font-size: var(--font-sm); }
.admin-user { color: #4a5568; }
.admin-logout { color: #e53e3e; text-decoration: none; font-weight: bold; }

/* کارت‌های آمار */
.admin-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.5rem;
}

.admin-card {
    background: #fff; border-radius: 12px; padding: 1.5rem;
    display: flex; align-items: center; gap: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.admin-card-icon { font-size: 2rem; }
.admin-card-info { display: flex; flex-direction: column; }
.admin-card-value { font-size: var(--font-xl); font-weight: bold; color: #2d3748; }
.admin-card-label { font-size: var(--font-xs); color: #a0aec0; }

/* بخش‌ها */
.admin-section { padding: 0 1.5rem 1.5rem; }
.admin-section-title { font-size: var(--font-md); color: #2d3748; margin-bottom: 1rem; }

/* جدول */
.admin-table-wrapper { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--font-sm); }
.admin-table th {
    text-align: right; padding: 0.75rem 1rem; background: #f7fafc;
    color: #4a5568; font-weight: bold; border-bottom: 1px solid #e2e8f0; white-space: nowrap;
}
.admin-table td { padding: 0.75rem 1rem; border-bottom: 1px solid #f0f0f0; color: #2d3748; white-space: nowrap; }

/* نشان‌های وضعیت */
.admin-badge {
    padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.7rem; font-weight: bold;
}
.admin-badge-pending { background: #fefcbf; color: #975a16; }
.admin-badge-confirmed { background: #c6f6d5; color: #276749; }
.admin-badge-shipped { background: #bee3f8; color: #2a4365; }
.admin-badge-delivered { background: #c6f6d5; color: #276749; }
.admin-badge-cancelled { background: #fed7d7; color: #9b2c2c; }

.admin-link { color: #48bb78; text-decoration: none; font-weight: bold; }

/* دکمه‌ها */
.admin-btn {
    padding: 0.5rem 1rem; border-radius: 8px; font-size: var(--font-xs);
    font-family: inherit; cursor: pointer; transition: 0.2s; border: none; font-weight: bold;
}
.admin-btn-primary { background: #48bb78; color: #fff; }
.admin-btn-primary:hover { background: #38a169; }
.admin-btn-danger { background: #e53e3e; color: #fff; }
.admin-btn-danger:hover { background: #c53030; }
.admin-btn-outline { background: #fff; border: 1px solid #e2e8f0; color: #4a5568; }
.admin-btn-outline:hover { background: #f7fafc; border-color: #48bb78; }
.admin-btn-full { width: 100%; padding: 0.7rem; font-size: var(--font-base); }

/* جستجو */
.admin-search {
    width: 100%; padding: 0.6rem 1rem; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit;
}
.admin-search:focus { outline: none; border-color: #48bb78; }

.admin-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 1.5rem 0;
}

.admin-toolbar .admin-search {
    flex: 1;
}

.admin-toolbar .admin-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* صفحه‌بندی */
.admin-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.admin-page-btn {
    padding: 0.4rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: var(--font-xs); font-family: inherit; transition: 0.2s;
}
.admin-page-btn:hover { border-color: #48bb78; }
.admin-page-btn.active { background: #48bb78; color: #fff; border-color: #48bb78; }

.admin-table-img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #f7fafc; }

/* مودال */
.admin-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 6000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.admin-modal-overlay.open { opacity: 1; visibility: visible; }

.admin-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background: #fff; border-radius: 16px; width: 550px; max-width: 90vw; max-height: 85vh;
    overflow-y: auto; z-index: 6001; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.admin-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.admin-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.5rem; border-bottom: 1px solid #e2e8f0;
    position: sticky; top: 0; background: #fff; z-index: 1; border-radius: 16px 16px 0 0;
}
.admin-modal-title { font-size: var(--font-lg); color: #2d3748; }
.admin-modal-close {
    background: #f7fafc; border: none; width: 32px; height: 32px;
    border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.admin-modal-close:hover { background: #e2e8f0; }
.admin-modal-body { padding: 1.5rem; }

.admin-form-group { margin-bottom: 1rem; }
.admin-form-label {
    display: block; font-size: var(--font-sm); font-weight: bold;
    color: #4a5568; margin-bottom: 0.4rem;
}
.admin-form-input {
    width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit;
}
.admin-form-input:focus { outline: none; border-color: #48bb78; }
.admin-form-hint { font-size: 0.7rem; color: #a0aec0; margin-top: 0.3rem; }

code {
    background: #f7fafc; padding: 0.15rem 0.4rem; border-radius: 4px;
    font-size: 0.8rem; font-family: inherit; direction: ltr; display: inline-block;
}

/* سایزها */
.size-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }

/* رسپانسیو */
@media screen and (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(100%);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-sidebar-close { display: flex; }

    .admin-main { margin-right: 0; }
    .admin-menu-toggle { display: block; }
    .admin-cards { grid-template-columns: 1fr; }
    .admin-header { padding: 0.75rem 1rem; margin-right: 0;}

    .admin-section { padding: 0 1rem 1rem; }

    .admin-modal {
        border-radius: 20px 20px 0 0; top: auto; bottom: 0;
        left: 0; right: 0; transform: translateY(100%);
        width: 100%; max-width: 100%;
    }
    .admin-modal.open { transform: translateY(0); }
    .admin-modal-header { border-radius: 20px 20px 0 0; }
}

/* ==================== مدیریت محصولات ==================== */
.admin-btn {
    padding: 0.5rem 1rem; border-radius: 8px; font-size: var(--font-xs);
    font-family: inherit; cursor: pointer; transition: 0.2s; border: none; font-weight: bold;
}

.admin-btn-primary { background: #48bb78; color: #fff; }
.admin-btn-primary:hover { background: #38a169; }
.admin-btn-danger { background: #e53e3e; color: #fff; }
.admin-btn-danger:hover { background: #c53030; }
.admin-btn-outline { background: #fff; border: 1px solid #e2e8f0; color: #4a5568; }
.admin-btn-outline:hover { background: #f7fafc; border-color: #48bb78; }
.admin-btn-full { width: 100%; padding: 0.7rem; font-size: var(--font-base); }

.admin-search {
    width: 100%; padding: 0.6rem 1rem; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit;
}
.admin-search:focus { outline: none; border-color: #48bb78; }

.admin-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.admin-page-btn {
    padding: 0.4rem 0.8rem; border: 1px solid #e2e8f0; border-radius: 8px;
    background: #fff; cursor: pointer; font-size: var(--font-xs); font-family: inherit; transition: 0.2s;
}
.admin-page-btn:hover { border-color: #48bb78; }
.admin-page-btn.active { background: #48bb78; color: #fff; border-color: #48bb78; }

.admin-table-img {
    width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #f7fafc;
}

/* مودال */
.admin-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 6000;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.admin-modal-overlay.open { opacity: 1; visibility: visible; }

.admin-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.9);
    background: #fff; border-radius: 16px; width: 550px; max-width: 90vw; max-height: 85vh;
    overflow-y: auto; z-index: 6001; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
.admin-modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.admin-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 1.5rem; border-bottom: 1px solid #e2e8f0;
    position: sticky; top: 0; background: #fff; z-index: 1; border-radius: 16px 16px 0 0;
}
.admin-modal-title { font-size: var(--font-lg); color: #2d3748; }
.admin-modal-close {
    background: #f7fafc; border: none; width: 32px; height: 32px;
    border-radius: 50%; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.admin-modal-close:hover { background: #e2e8f0; }

.admin-modal-body { padding: 1.5rem; }

.admin-form-group { margin-bottom: 1rem; }
.admin-form-label {
    display: block; font-size: var(--font-sm); font-weight: bold;
    color: #4a5568; margin-bottom: 0.4rem;
}
.admin-form-input {
    width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #e2e8f0;
    border-radius: 10px; font-size: var(--font-sm); font-family: inherit;
}
.admin-form-input:focus { outline: none; border-color: #48bb78; }

.admin-form-hint { font-size: 0.7rem; color: #a0aec0; margin-top: 0.3rem; }

code {
    background: #f7fafc; padding: 0.1rem 0.4rem; border-radius: 4px;
    font-size: 0.8rem; font-family: inherit; direction: ltr; display: inline-block;
}

/* سایزها */
.size-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.remove-size-btn { flex-shrink: 0; }

/* رسپانسیو */
@media screen and (max-width: 768px) {
    .admin-modal {
        border-radius: 20px 20px 0 0; top: auto; bottom: 0;
        left: 0; right: 0; transform: translateY(100%);
        width: 100%; max-width: 100%;
    }
    .admin-modal.open { transform: translateY(0); }
    .admin-modal-header { border-radius: 20px 20px 0 0; }
}

.image-upload-wrapper { display: flex; flex-direction: column; gap: 0.5rem; }
.image-preview {
    width: 120px; height: 120px; border: 2px dashed #e2e8f0;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #f7fafc;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ==================== مدیریت کاربران ==================== */
.admin-search {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: var(--font-sm);
    font-family: inherit;

}
.admin-search:focus { outline: none; border-color: #48bb78; }

.admin-table code {
    background: #f7fafc;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: inherit;
    direction: ltr;
    display: inline-block;
}


/* ==================== صفحه حساب کاربری ==================== */
.account-page { padding-bottom: 2rem; }

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    min-height: 60vh;
}

/* منوی کناری */
.account-sidebar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    align-self: start;
}

.account-avatar {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.avatar-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }

.avatar-name {
    font-size: var(--font-md);
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.avatar-mobile {
    font-size: var(--font-xs);
    color: #a0aec0;
    direction: ltr;
}

.account-nav { display: flex; flex-direction: column; gap: 0.25rem; }

.account-nav-item {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: var(--font-sm);
    color: #4a5568;
    text-decoration: none;
    transition: 0.2s;
}

.account-nav-item:hover,
.account-nav-item.active {
    background: #f0fdf4;
    color: #38a169;
    font-weight: bold;
}

.account-nav-item.logout {
    color: #e53e3e;
    margin-top: 1rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    border-radius: 0;
}

.account-nav-item.logout:hover {
    background: #fff5f5;
    color: #c53030;
}

/* محتوای اصلی */
.account-main { min-width: 0; }

.account-welcome { margin-bottom: 1.5rem; }

.account-title {
    font-size: var(--font-xl);
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.account-subtitle { font-size: var(--font-sm); color: #a0aec0; }

/* کارت‌های آمار */
.account-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.account-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.account-card-icon { font-size: 1.8rem; }

.account-card-info { display: flex; flex-direction: column; }

.account-card-value {
    font-size: var(--font-lg);
    font-weight: bold;
    color: #2d3748;
}

.account-card-label { font-size: var(--font-xs); color: #a0aec0; }

/* بخش‌ها */
.account-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 12px 0;
}

.account-section-title {
    font-size: var(--font-md);
    color: #2d3748;
    margin-bottom: 1rem;
}

.account-table-wrapper { overflow-x: auto; }

.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-sm);
}

.account-table th {
    text-align: right;
    padding: 0.6rem 0.8rem;
    background: #f7fafc;
    color: #4a5568;
    font-weight: bold;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.account-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    color: #2d3748;
    white-space: nowrap;
}

.account-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.account-badge-pending { background: #fefcbf; color: #975a16; }
.account-badge-shipped { background: #bee3f8; color: #2a4365; }
.account-badge-delivered { background: #c6f6d5; color: #276749; }
.account-badge-cancelled { background: #fed7d7; color: #9b2c2c; }


.account-link { color: #48bb78; text-decoration: none; font-weight: bold; }
.account-link:hover { color: #38a169; }

.account-view-all {
    display: block;
    text-align: left;
    margin-top: 1rem;
    font-size: var(--font-sm);
    color: #48bb78;
    text-decoration: none;
    font-weight: bold;
}
.account-view-all:hover { color: #38a169; }

/* Overlay */
.account-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4999;
    display: none;
}

/* دکمه شناور منو (موبایل) */
.account-menu-toggle {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 4000;
    background: #48bb78;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
}

/* رسپانسیو */
@media screen and (max-width: 768px) {
    .account-layout { grid-template-columns: 1fr; }

    .account-sidebar {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        width: 280px;
        max-width: 85vw;
        z-index: 5000;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0;
        overflow-y: auto;
    }

    .account-sidebar.open { transform: translateX(0); }

    .account-menu-toggle { display: flex; }

    .account-cards { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 480px) {
    .account-cards { grid-template-columns: 1fr; }
}

/* ==================== فرم‌های حساب کاربری ==================== */
.account-form { display: flex; flex-direction: column; gap: 1rem; }
.account-alert {
    padding: 0.8rem 1rem; border-radius: 10px; margin-bottom: 1rem;
    font-size: var(--font-sm);
}
.account-alert.success {
    background: #f0fdf4; color: #276749; border: 1px solid #c6f6d5;
}
.account-alert.error {
    background: #fff5f5; color: #9b2c2c; border: 1px solid #fed7d7;
}

/* ==================== صفحه فروشنده ==================== */


.seller-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.seller-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.seller-stat-value,
.seller-stat-label {
    display: block;
}

.seller-stat-value {
    color: #2d3748;
    font-size: var(--font-xl);
    font-weight: bold;
}

.seller-stat-label {
    color: #718096;
    font-size: var(--font-sm);
}

.seller-order-detail input[type="number"] {
    width: 7rem;
    padding: 0.45rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
}

/* ==================== seller orders detailلیست آیتم‌های سفارش فروشنده ==================== */
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item-card {
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    transition: 0.2s;
}

.order-item-card:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.order-item-card.deleted {
    opacity: 0.6;
    background: #fff5f5;
    border-color: #fed7d7;
}

.order-item-deleted-tag {
    background: #e53e3e;
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: var(--font-xs);
}

.order-item-info {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.order-item-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
    flex-shrink: 0;
}

.order-item-title {
    font-weight: bold;
    color: #2d3748;
    font-size: var(--font-base);
}

.order-item-type {
    font-size: var(--font-xs);
    color: #718096;
    background: #edf2f7;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
}

.order-item-details {
    flex: 2 1 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-item-detail {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: var(--font-sm);
}

.order-item-detail .label {
    color: #a0aec0;
}

.order-item-detail .value {
    color: #2d3748;
    font-weight: bold;
}

.order-item-actions {
    flex: 0 0 auto;
    margin-right: auto;
}

@media (max-width: 700px) {
    .seller-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .order-item-details {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* ==================== seller ordersکارت‌های لیست سفارش‌ها ==================== */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-summary-card {
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    transition: 0.2s;
}

.order-summary-card:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.order-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.order-summary-number {
    font-weight: bold;
    color: #2d3748;
    font-size: var(--font-base);
}

.order-summary-date {
    color: #718096;
    font-size: var(--font-xs);
}

.order-summary-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-summary-customer {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-summary-customer .label {
    color: #a0aec0;
}

.order-summary-customer .value {
    color: #2d3748;
    font-weight: bold;
}

.order-summary-mobile {
    margin-right: auto;
    direction: ltr;
}

.order-summary-details {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.order-summary-detail {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: var(--font-sm);
}

.order-summary-detail .label {
    color: #a0aec0;
}

.order-summary-detail .value {
    color: #2d3748;
    font-weight: bold;
}

.order-summary-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .order-summary-details {
        flex-direction: column;
        gap: 0.3rem;
    }
}

/* ==================== وضعیت پیک ==================== */
.pickup-status-box {
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
}

.pickup-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pickup-status-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: bold;
    background: #edf2f7;
    color: #4a5568;
}

.pickup-status-badge.active {
    background: #c6f6d5;
    color: #22543d;
}

.pickup-status-badge.error {
    background: #fed7d7;
    color: #9b2c2c;
}

.pickup-status-details p {
    margin: 0.4rem 0;
    font-size: var(--font-sm);
    color: #4a5568;
}

#courierInfo p {
    margin: 0.3rem 0;
    font-size: var(--font-sm);
}


/* ==================== صفحه آدرس های حساب کاربری ==================== */

#mapContainer {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    z-index: 1;
}

.address-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.address-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.2rem; }
.address-default { border-color: #48bb78; background: #f0fdf4; }
.address-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; gap: 0.75rem; }
.address-title { font-weight: bold; font-size: var(--font-base); }
.address-default-radio {
    display: inline-flex; align-items: center; gap: 0.35rem;
    color: #2d3748; font-size: var(--font-sm); cursor: pointer;
    white-space: nowrap;
}
.address-default-radio input {
    width: 16px; height: 16px; accent-color: #48bb78; cursor: pointer;
}
.address-badge { background: #48bb78; color: #fff; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.7rem; }
.address-text { font-size: var(--font-sm); color: #4a5568; margin-bottom: 0.25rem; }
.address-actions { margin-top: 0.75rem; display: flex; gap: 1rem; }
.account-add-btn { background: #48bb78; color: #fff; border: none; padding: 0.5rem 1.2rem; border-radius: 8px; font-family: inherit; cursor: pointer; font-size: var(--font-sm); }
.account-link { color: #48bb78; font-size: var(--font-sm); cursor: pointer; background: none; border: none; font-family: inherit; }
.account-link:hover { text-decoration: underline; }

/* ==================== کارت کیف پول ==================== */
.wallet-balance-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(72, 187, 120, 0.25);
}

.wallet-balance-icon {
    font-size: 3.5rem;
    background: rgba(255,255,255,0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wallet-balance-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wallet-balance-label {
    font-size: var(--font-sm);
    opacity: 0.9;
}

.wallet-balance-value {
    font-size: var(--font-2xl);
    font-weight: bold;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.wallet-balance-value small {
    font-size: var(--font-sm);
    font-weight: normal;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .wallet-balance-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    .wallet-balance-value {
        justify-content: center;
    }
}

/* ==================== تراکنش‌های کیف پول ==================== */
.wallet-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: 0.2s;
}

.wallet-tx-row:hover {
    background: #fff;
    border-color: #cbd5e0;
}

.wallet-tx-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.wallet-tx-type {
    font-weight: bold;
    color: #2d3748;
    font-size: var(--font-sm);
}

.wallet-tx-desc {
    color: #718096;
    font-size: var(--font-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-tx-date {
    color: #a0aec0;
    font-size: 0.7rem;
}

.wallet-tx-amounts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.wallet-tx-amount {
    font-weight: bold;
    font-size: var(--font-sm);
}

.wallet-tx-amount.credit {
    color: #38a169;
}

.wallet-tx-amount.debit {
    color: #e53e3e;
}

.wallet-tx-balance {
    color: #a0aec0;
    font-size: 0.7rem;
}

@media (max-width: 480px) {
    .wallet-tx-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .wallet-tx-amounts {
        align-items: flex-start;
        width: 100%;
    }
}

/* ==================== فیلترهای سفارش ==================== */
.order-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.75rem 0;
}

.order-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    font-size: var(--font-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    position: relative;
}

.order-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border-color: #48bb78;
    color: #38a169;
    background: #f0fdf4;
}

.order-filter-btn.active {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #fff;
    border-color: #38a169;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
    font-weight: bold;
    transform: translateY(-2px);
}

.order-filter-btn.active:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: #fff;
    border-color: #2f855a;
}

/* شمارنده داخل دکمه */
.order-filter-btn .filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 0.4rem;
    border-radius: 11px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.7rem;
    font-weight: bold;
    transition: 0.2s;
}

.order-filter-btn:hover .filter-count {
    background: #c6f6d5;
    color: #22543d;
}

.order-filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* آیکون داخل دکمه */
.order-filter-btn .filter-icon {
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 480px) {
    .order-filters {
        gap: 0.4rem;
        padding: 0.5rem 0;
    }
    .order-filter-btn {
        padding: 0.5rem 0.85rem;
        font-size: var(--font-xs);
    }
    .order-filter-btn .filter-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
}

/* ==================== گرید تصاویر محصول ==================== */
.product-images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.product-image-item {
    position: relative;
    width: 80px;
    height: 80px;
    background: #f9fafb;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.2s;
    flex-shrink: 0;
}

.product-image-item.is-main {
    border-color: #48bb78;
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.2);
}

.product-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-item .main-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #48bb78;
    color: #fff;
    padding: 0.1rem 0.3rem;
    border-radius: 6px;
    font-size: 0.55rem;
    font-weight: bold;
}

.product-image-item .image-actions {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: 0.2s;
}

.product-image-item:hover .image-actions {
    opacity: 1;
}

.product-image-item .image-actions button {
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    padding: 0;
    background: rgba(255,255,255,0.25);
}

.product-image-item .image-actions button:hover {
    transform: scale(1.1);
}

.product-image-item .image-actions .btn-set-main {
    background: #48bb78;
}
.product-image-item .image-actions .btn-set-main:hover {
    background: #38a169;
}

.product-image-item .image-actions .btn-delete {
    background: #e53e3e;
}
.product-image-item .image-actions .btn-delete:hover {
    background: #c53030;
}

/* ==================== مودال کیف پول ==================== */
.wallet-balance-display {
    font-size: var(--font-xl);
    font-weight: bold;
    color: #38a169;
    text-align: center;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 10px;
    border: 1px solid #bbf7d0;
}

.wallet-operation-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    background: #f7fafc;
    padding: 0.25rem;
    border-radius: 10px;
}

.wallet-op-tab {
    flex: 1;
    padding: 0.5rem;
    border: none;
    background: none;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    font-size: var(--font-sm);
    color: #718096;
    transition: 0.2s;
}

.wallet-op-tab.active {
    background: #fff;
    color: #2d3748;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.wallet-op-tab[data-op="credit"].active {
    color: #38a169;
}

.wallet-op-tab[data-op="debit"].active {
    color: #e53e3e;
}

.wallet-transactions-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem;
}

.wallet-tx-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: var(--font-sm);
    gap: 0.5rem;
}

.wallet-tx-admin-item:last-child {
    border-bottom: none;
}

.wallet-tx-admin-item .tx-info {
    flex: 1;
    min-width: 0;
}

.wallet-tx-admin-item .tx-type {
    font-weight: bold;
    color: #2d3748;
    display: block;
}

.wallet-tx-admin-item .tx-date {
    font-size: 0.7rem;
    color: #a0aec0;
}

.wallet-tx-admin-item .tx-amount {
    font-weight: bold;
    white-space: nowrap;
}

.wallet-tx-admin-item .tx-amount.credit {
    color: #38a169;
}
.wallet-tx-admin-item .tx-amount.debit {
    color: #e53e3e;
}

/* ==================== مدیریت موجودی فروشنده ==================== */
.seller-stock-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.seller-stock-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.seller-stock-stat.available {
    border-color: #c6f6d5;
    background: #f0fdf4;
}

.seller-stock-stat.out {
    border-color: #fed7d7;
    background: #fff5f5;
}

.seller-stock-stat-value {
    font-size: var(--font-2xl);
    font-weight: bold;
    color: #2d3748;
}

.seller-stock-stat-label {
    font-size: var(--font-sm);
    color: #718096;
}

.seller-stock-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stock-filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stock-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-family: inherit;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: 0.2s;
}

.stock-filter-btn:hover {
    border-color: #48bb78;
    color: #38a169;
}

.stock-filter-btn.active {
    background: #48bb78;
    color: #fff;
    border-color: #48bb78;
    font-weight: bold;
}

.seller-stock-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stock-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem;
    transition: 0.2s;
}

.stock-item:hover {
    border-color: #cbd5e0;
}

.stock-item.hidden {
    display: none;
}

.stock-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    background: #f7fafc;
    flex-shrink: 0;
}

.stock-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stock-item-title {
    font-weight: bold;
    color: #2d3748;
    font-size: var(--font-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-item-sku {
    font-size: 0.75rem;
    color: #718096;
    background: #f7fafc;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    direction: ltr;
}

.stock-item-status {
    flex-shrink: 0;
}

.stock-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.stock-badge.available {
    background: #c6f6d5;
    color: #22543d;
}

.stock-badge.out {
    background: #fed7d7;
    color: #9b2c2c;
}

.stock-toggle-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.stock-toggle-btn.to-out {
    background: #fed7d7;
    color: #9b2c2c;
}

.stock-toggle-btn.to-out:hover {
    background: #fc8181;
    color: #fff;
}

.stock-toggle-btn.to-available {
    background: #c6f6d5;
    color: #22543d;
}

.stock-toggle-btn.to-available:hover {
    background: #48bb78;
    color: #fff;
}

.stock-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .stock-item {
        flex-wrap: wrap;
    }
    .stock-item-info {
        flex: 1 1 calc(100% - 76px);
    }
    .stock-item-status,
    .stock-toggle-btn {
        flex: 1 1 auto;
    }
    .stock-toggle-btn {
        width: 100%;
    }
}/* ==================== هشدار عدم دسترسی پیک ==================== */
.pickup-unavailable-warning {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.pickup-unavailable-warning .warning-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.pickup-unavailable-warning strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.pickup-unavailable-warning p {
    color: #78350f;
    font-size: var(--font-sm);
    margin: 0;
}
