/* Modern Product Archive - For Category Pages Demo 1 */

/* ابزارک بالای صفحه */
.site-main > .widget {
    margin: 20px 40px; /* فاصله از دو طرف */
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* المان‌های بالای صفحه که چسبیده به دیواره هستن */
.site-main {
    padding: 0 40px; /* فاصله کلی از دو طرف */
}

/* اگر المان‌های خاصی چسبیده باشن */
.mlm-archive-top,
.mlm-archive-bottom,
.mlm-widget {
    margin-left: 40px;
    margin-right: 40px;
}

.modern-product-archive {
    margin: 20px 0;
    padding: 0 40px; /* فاصله از دو طرف */
}

/* Product Grid - 4 cards per row */
.modern-product-archive .modern-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Product Item Wrapper */
.modern-product-archive .modern-product-item {
    width: 100%;
}

/* Page Header Styling */
.modern-product-archive + .mlm-navigation {
    margin-top: 40px;
}

/* Archive Header Styling */
.page-header {
    background: white;
    padding: 25px 65px; /* 25px بالا/پایین + 40px چپ/راست */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.page-header .page-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}

.page-header .page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FFA726 0%, #FF9800 100%);
    border-radius: 2px;
}

.page-header .taxonomy-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-top: 10px;
}

/* Breadcrumbs Styling */
.page-header .breadcrumb {
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}

.page-header .breadcrumb-item {
    color: #666;
}

.page-header .breadcrumb-item a {
    color: #FFA726;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-header .breadcrumb-item a:hover {
    color: #FF9800;
}

/* Pagination Styling */
.mlm-navigation {
    text-align: center;
    margin: 40px 0;
    padding: 0 40px; /* فاصله از دو طرف */
}

.mlm-navigation .page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mlm-navigation .page-numbers a,
.mlm-navigation .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mlm-navigation .page-numbers a {
    background: #f8f9fa;
    color: #666;
}

.mlm-navigation .page-numbers a:hover {
    background: #FFA726;
    color: white;
    transform: translateY(-2px);
}

.mlm-navigation .page-numbers .current {
    background: linear-gradient(135deg, #FFA726 0%, #FF9800 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 167, 38, 0.3);
}

.mlm-navigation .page-numbers .prev,
.mlm-navigation .page-numbers .next {
    background: #e9ecef;
    color: #495057;
    font-size: 12px;
}

.mlm-navigation .page-numbers .prev:hover,
.mlm-navigation .page-numbers .next:hover {
    background: #FFA726;
    color: white;
}

/* Empty State */
.modern-product-archive:empty + .mlm-navigation {
    display: none;
}

/* ========== Responsive Design ========== */

/* Tablet Large - 3 cards */
@media (max-width: 1200px) {
    .modern-product-archive .modern-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Tablet - 2 cards */
@media (max-width: 768px) {
    .site-main {
        padding: 0 20px; /* کمتر در تبلت */
    }
    
    .mlm-archive-top,
    .mlm-archive-bottom,
    .mlm-widget {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .site-main > .widget {
        margin: 15px 20px; /* کمتر در تبلت */
        padding: 15px;
    }
    
    .modern-product-archive {
        padding: 0 20px; /* کمتر در تبلت */
    }
    
    .modern-product-archive .modern-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .page-header {
        padding: 20px 45px; /* کمتر در تبلت */
    }
    
    .page-header .page-title {
        font-size: 20px;
    }
}

/* Mobile - 1 card */
@media (max-width: 480px) {
    .site-main {
        padding: 0 15px; /* کمتر در موبایل */
    }
    
    .mlm-archive-top,
    .mlm-archive-bottom,
    .mlm-widget {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .site-main > .widget {
        margin: 10px 15px; /* کمتر در موبایل */
        padding: 15px;
    }
    
    .modern-product-archive {
        padding: 0 15px; /* کمتر در موبایل */
    }
    
    .modern-product-archive .modern-product-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 15px 30px; /* کمتر در موبایل */
    }
    
    .page-header .page-title {
        font-size: 18px;
    }
    
    .mlm-navigation {
        padding: 0 15px; /* کمتر در موبایل */
    }
    
    .mlm-navigation .page-numbers {
        padding: 10px 15px;
        gap: 5px;
    }
    
    .mlm-navigation .page-numbers a,
    .mlm-navigation .page-numbers span {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

