/* استایل‌های صفحات کارخانه */
.factory-taxonomy-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: #f8f9fa;
    padding: 20px 0;
}

.factory-taxonomy-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Breadcrumb */
.factory-breadcrumb {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.factory-breadcrumb a {
    color: #0073aa;
    text-decoration: none;
    margin: 0 5px;
}

.factory-breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 8px;
}

.breadcrumb-current {
    color: #666;
    font-weight: 600;
}

/* هدر کارخانه */
.factory-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
    text-align: center;
}

.factory-title {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.factory-description {
    font-size: 18px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.factory-meta {
    margin-top: 20px;
}

.factory-count {
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 16px;
    display: inline-block;
}

/* گرید محصولات */
.factory-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.factory-product-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.factory-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* تصویر محصول */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.factory-product-item:hover .product-image {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* اطلاعات محصول */
.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #0073aa;
}

/* رتبه‌بندی */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.rating-count {
    font-size: 14px;
    color: #777;
}

/* قیمت */
.product-price {
    font-size: 22px;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 20px;
}

.product-price del {
    color: #999;
    font-size: 16px;
    margin-left: 10px;
}

.product-price ins {
    background: transparent;
    text-decoration: none;
}

/* دکمه‌ها */
.product-buttons {
    display: flex;
    gap: 10px;
}

.product-buttons .button {
    flex: 1;
    text-align: center;
    padding: 12px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.view-details {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.view-details:hover {
    background: #e9ecef;
    color: #333;
}

.add-to-cart {
    background: #0073aa;
    color: #fff;
}

.add-to-cart:hover {
    background: #005a87;
    color: #fff;
}

.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
}

/* صفحه‌بندی */
.factory-pagination {
    margin: 50px 0;
    text-align: center;
}

.factory-pagination .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.factory-pagination .page-numbers li {
    display: inline-block;
}

.factory-pagination .page-numbers a,
.factory-pagination .page-numbers span {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.factory-pagination .page-numbers a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.factory-pagination .page-numbers .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* محصولی یافت نشد */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.no-products-icon {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products-found h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 15px;
}

.no-products-found p {
    color: #999;
    margin-bottom: 30px;
    font-size: 16px;
}

.back-to-shop {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-to-shop:hover {
    background: #005a87;
    color: #fff;
    transform: translateY(-2px);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .factory-title {
        font-size: 28px;
    }
    
    .factory-header {
        padding: 30px 20px;
    }
    
    .factory-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .product-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .factory-products-grid {
        grid-template-columns: 1fr;
    }
}