/* استایل‌های گالری */
.gallery-main-page {
    padding: 20px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.category-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.category-image {
    height: 200px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-image .no-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
}

.category-info {
    padding: 20px;
}

.category-info h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.items-count {
    color: #666;
    font-size: 0.9em;
}

.view-category-btn {
    background: #007cba;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.view-category-btn:hover {
    background: #005a87;
    color: white;
}

/* استایل صفحه دسته‌بندی */
.gallery-category-page {
    padding: 20px 0;
}

.category-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.back-to-gallery {
    color: #007cba;
    text-decoration: none;
}

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

.gallery-items-grid .gallery-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-items-grid .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.item-info {
    padding: 15px;
}

.item-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.item-info p {
    margin: 0;
    color: #666;
    font-size: 0.9em;
}

/* استایل‌های مدیریت */
.category-item {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-count {
    color: #666;
    font-size: 0.9em;
}

.category-actions {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.category-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.gallery-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.item-details {
    padding: 10px;
}

.item-details h4 {
    margin: 0 0 5px 0;
}

.item-actions {
    margin-top: 10px;
}