/* تنظیمات عمومی برای تمام المان‌ها */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* استایل‌های جستجو و فیلتر */
#search-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px; /* فاصله بین فیلد جستجو و دکمه "همه محصولات" */
}

#product-search {
    padding: 10px;
    font-size: 16px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#show-all-products {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#show-all-products:hover {
    background-color: #005a8d;
}

/* سایر استایل‌ها */
#category-buttons {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#category-buttons button {
    padding: 10px 20px;
    margin-right: 10px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

#category-buttons button:hover {
    background-color: #005a8d;
}

#product-list-ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.product-item {
    background-color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: calc(33% - 20px); /* نمایش 3 محصول در دسکتاپ */
    transition: transform 0.3s ease;
    text-align: center;
}

.product-item:hover {
    transform: scale(1.05);
}

.product-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}

.product-info span {
    margin-right: 10px;
}

.toggle-visibility {
    padding: 10px;
    background-color: gray;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
}

.toggle-visibility[data-status="publish"] {
    background-color: green;
}

.toggle-visibility .dashicons-lock {
    font-size: 20px;
    color: white;
}

.toggle-visibility[data-status="publish"] .dashicons-lock {
    color: white;
}

.product-visibility {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.status-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .product-item {
        width: 100%; /* یک ستون در موبایل */
    }

    #product-search {
        width: 100%; /* فیلد جستجو عرض کامل می‌گیرد */
    }

    /* دکمه‌های دسته‌بندی در موبایل */
    #category-buttons {
        flex-direction: row; /* دکمه‌ها در یک خط */
        overflow-x: auto; /* فعال کردن اسکرول افقی */
    }

    #category-buttons button {
        width: auto;
        margin-right: 10px;
    }
}
