/* =========================================
   هدر اختصاصی فروشگاه/پروفایل
   ========================================= */
.page-header {
    /* ترکیب با متغیرهای سراسری آبی */
    display: flex;
    flex-direction: row; /* در نسخه گلوبال column بود، اینجا برای قرارگیری لوگو کنار متن row می‌کنیم */
    align-items: center;
    justify-content: flex-start;
    gap: clamp(20px, 4vw, 30px);
    text-align: start;
    flex-wrap: wrap;
}

/* استایل‌های مربوط به لوگو و تیک آبی */
.mall-logo-wrapper {
    position: relative;
    display: inline-block;
    z-index: 2;
    flex-shrink: 0;
}

.mall-logo {
    width: clamp(90px, 12vw, 120px);
    height: clamp(90px, 12vw, 120px);
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-lg);
    background: var(--white);
    display: block;
}

/* هوشمندسازی تیک آبی با Logical Properties */
.verified-badge {
    position: absolute;
    inset-block-end: 5px; /* جایگزین bottom */
    inset-inline-end: 0;  /* جایگزین right - در LTR و RTL خودکار تنظیم می‌شود */
    background: var(--primary); /* هماهنگ با پالت آبی */
    color: var(--white);
    width: clamp(28px, 4vw, 34px);
    height: clamp(28px, 4vw, 34px);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.header-content {
    flex: 1;
    z-index: 2;
    min-width: 250px;
}

.header-content h1 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-block-end: 8px;
    color: var(--white);
}

.header-content p {
    opacity: 0.95;
    max-width: 600px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--primary-light);
}

.mall-badge {
    display: inline-block;
    margin-block-start: 14px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   نوار آمار (Stats Bar)
   ========================================= */
.stats-bar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(14px, 3vw, 18px) clamp(18px, 4vw, 24px);
    margin-block-end: clamp(20px, 4vw, 30px);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.stats-bar .count {
    font-size: 0.95rem;
    color: var(--gray);
}

.stats-bar strong {
    color: var(--primary);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-inline-start: 6px;
}

.mall-link {
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.mall-link:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* =========================================
   گرید محصولات
   ========================================= */
.products-grid {
    display: grid;
    /* گرید هوشمند بدون نیاز به مدیا کوئری‌های زیاد */
    grid-template-columns: repeat(auto-fill, minmax(clamp(240px, 40vw, 280px), 1fr));
    gap: clamp(16px, 3vw, 24px);
    margin-block-end: 40px;
}

/* =========================================
   کارت محصول (Product Card)
   ========================================= */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 102, 255, 0.2);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--light-gray);
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px; /* راست‌چین/چپ‌چین هوشمند */
    background: var(--danger);
    color: var(--white);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.product-content {
    padding: clamp(14px, 3vw, 18px);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    font-weight: 600;
    margin-block-end: 10px;
    line-height: 1.5;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-seller {
    font-size: 0.85rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-block-end: 12px;
}

.product-seller img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.product-stats {
    display: flex;
    gap: 14px;
    font-size: 0.8rem;
    color: var(--gray);
    padding-block: 12px;
    margin-block-end: 12px;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-item img {
    width: 16px;
    opacity: 0.7;
}

.product-price {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    color: var(--danger); /* در صورت نیاز می‌توانید به --primary تغییر دهید */
    margin-block-start: auto;
    display: flex;
    align-items: center;
}

.product-price del {
    color: var(--gray);
    font-size: 0.9rem;
    margin-inline-end: 8px; /* جایگزین margin-right */
    font-weight: 400;
}

/* =========================================
   بخش صفحه‌بندی (Pagination)
   ========================================= */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-block: clamp(30px, 5vw, 50px);
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-800);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 102, 255, 0.2);
}

/* =========================================
   دکمه بارگذاری بیشتر (Load More)
   ========================================= */
.load-more-container {
    text-align: center;
    margin-block: clamp(20px, 4vw, 40px);
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    /* سایه هوشمند متناسب با رنگ آبی */
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.25);
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.35);
}

/* =========================================
   وضعیت خالی (Empty State)
   ========================================= */
.empty-state {
    grid-column: 1 / -1;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: clamp(40px, 8vw, 80px) 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px dashed var(--border);
}

.empty-state img {
    width: clamp(90px, 15vw, 130px);
    opacity: 0.6;
    margin-inline: auto;
    margin-block-end: 20px;
}

.empty-state h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--text);
    margin-block-end: 10px;
}

.empty-state p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-block-end: 20px;
}

/* =========================================
   دکمه‌های اکشن (Action Buttons) اختصاصی این بخش
   ========================================= */
.action-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block-start: 15px;
}


@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }

    .mall-logo-wrapper {
        margin-inline: auto;
    }

    .stats-bar {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    
    .mall-link {
        width: 100%;
        text-align: center;
    }

 .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .product-image-wrapper {
        aspect-ratio: 16/9; /* تصویر عریض‌تر و بزرگ‌تر */
    }

    .product-content {
        padding: 10px 12px;
    }

    .product-title {
        font-size: 0.85rem;
        margin-block-end: 6px;
        -webkit-line-clamp: 1; /* یک خط کافیه */
    }

    .product-seller {
        font-size: 0.75rem;
        margin-block-end: 6px;
    }

    .product-stats {
        font-size: 0.72rem;
        gap: 10px;
        padding-block: 6px;
        margin-block-end: 6px;
    }

    .product-price {
        font-size: 0.9rem;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .product-price del {
        font-size: 0.75rem;
        margin-inline-end: 0;
        margin-block-end: 0;
    }
    .product-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .btn {
        width: 100%;
        text-align: center;
    }
}
/* =========================================
   استایل‌های دارک‌مود (Dark Mode)
   ========================================= */

/* لوگو */
[data-theme="dark"] .mall-logo {
    background: #18191a;
    border-color: rgba(255, 255, 255, 0.15);
}

/* نوار آمار */
[data-theme="dark"] .stats-bar {
    background: #242526;
    border-color: #3e4042;
}
[data-theme="dark"] .stats-bar .count {
    color: #b0b3b8;
}

/* کارت محصول */
[data-theme="dark"] .product-card {
    background: #242526;
    border-color: #3e4042;
}
[data-theme="dark"] .product-card:hover {
    border-color: rgba(0, 102, 255, 0.5);
}
[data-theme="dark"] .product-image-wrapper {
    background: #18191a;
}
[data-theme="dark"] .product-title {
    color: #e4e6eb;
}
[data-theme="dark"] .product-seller,
[data-theme="dark"] .product-stats {
    color: #b0b3b8;
}
[data-theme="dark"] .product-stats {
    border-top-color: #3e4042;
    border-bottom-color: #3e4042;
}
[data-theme="dark"] .product-seller img {
    border-color: #3e4042;
}
[data-theme="dark"] .product-price del {
    color: #94a3b8;
}

/* صفحه‌بندی */
[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span {
    background: #242526;
    border-color: #3e4042;
    color: #e4e6eb;
}
[data-theme="dark"] .pagination a:hover {
    background: #3a3b3c;
    border-color: #555;
}

/* وضعیت خالی */
[data-theme="dark"] .empty-state {
    background: #242526;
    border-color: #3e4042;
}
[data-theme="dark"] .empty-state h3 {
    color: #e4e6eb;
}
[data-theme="dark"] .empty-state p {
    color: #b0b3b8;
}


