/* ==================== دکمه تغییر نقش بالای بنر ==================== */
.workfield-selector {
    display: flex;
    justify-content: flex-start;
}

.btn-workfield-change {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

    .btn-workfield-change:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .btn-workfield-change i {
        font-size: 18px;
    }

/* ==================== بنر تصویری ==================== */
.hero-banner {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    background-color: white;
}

    .hero-banner img {
        width: 100%;
        height: 100%;
        /*    object-fit: cover;*/
    }

/* ==================== فیلترهای یک‌خطی ==================== */
.filters-bar {
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filters-container {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* تغییر از center به flex-end برای راست‌چین */
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

    .btn-filter:hover {
        border-color: #3B82F6;
        color: #3B82F6;
    }

.btn-filter-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
}

    .btn-filter-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

.btn-filter i {
    font-size: 16px;
}

.select-filter {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
}

    .select-filter:hover,
    .select-filter:focus {
        border-color: #3B82F6;
        outline: none;
    }

.search-box {
    display: flex;
    gap: 0;
    width: 100%;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb; /* border کامل */
    border-left: 1px solid #e5e7eb; /* تغییر از none به 1px */
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    color: #374151;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #3B82F6;
}

.search-input::placeholder {
    color: #9ca3af;
}

.btn-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-search:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1d4ed8 100%);
}

.btn-search i {
    font-size: 16px;
}

/* ==================== Grid محصولات ==================== */
.products-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.product-item {
    background: white;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .product-item:hover {
        border-color: #3B82F6;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
        transform: translateY(-2px);
        text-decoration: none;
    }

.product-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.product-icon-placeholder {
    font-size: 52px;
    color: #3B82F6;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-users {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.product-users i {
    font-size: 16px;
}

/* ==================== حالت‌های خاص ==================== */
.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

    .loading-state .spinner-border {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .empty-state i {
        font-size: 48px;
        opacity: 0.3;
        margin-bottom: 12px;
    }

    .empty-state p,
    .loading-state p {
        font-size: 14px;
        margin: 0;
    }

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .btn-workfield-change {
        font-size: 13px;
        padding: 8px 16px;
    }

    .hero-banner {
        height: 140px;
    }

    .filters-container {
        padding: 0;
    }

    .search-box {
        max-width: 100%;
    }

    .search-input {
        font-size: 13px;
        padding: 8px 12px;
    }

    .btn-search {
        font-size: 13px;
        padding: 8px 20px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .product-item {
        padding: 16px 12px;
    }

    .product-icon-wrapper {
        width: 70px;
        height: 70px;
    }

    .product-icon-img {
        width: 56px;
        height: 56px;
    }

    .product-icon-placeholder {
        font-size: 46px;
    }

    .product-title {
        font-size: 13px;
        min-height: 34px;
    }

    .product-users {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .search-box {
        max-width: 100%;
    }

    .search-input {
        font-size: 12px;
        padding: 8px 12px;
    }

    .btn-search {
        font-size: 12px;
        padding: 8px 16px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-item {
        padding: 14px 10px;
    }

    .product-icon-wrapper {
        width: 60px;
        height: 60px;
    }

    .product-icon-img {
        width: 48px;
        height: 48px;
    }

    .product-icon-placeholder {
        font-size: 40px;
    }

    .product-title {
        font-size: 12px;
        min-height: 32px;
    }

    .product-users {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .btn-workfield-change span {
        display: none;
    }

    .btn-workfield-change {
        padding: 8px 12px;
    }

    .hero-banner {
        height: 120px;
    }

    .search-input {
        font-size: 12px;
        padding: 7px 10px;
    }

    .btn-search {
        font-size: 12px;
        padding: 7px 14px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-item {
        padding: 12px 8px;
    }
}
