/**
 * Mikropo B2B - Catalog & Archive Layout
 * Path: mikropo-custom/assets/css/catalog-styles.css
 * Updated: Deep enterprise styling for archive headers.
 */

.mikropo-archive-environment {
    background: var(--bg-panel); /* Subtly off-white background for depth */
}

/* --- ARCHIVE HEADER (B2B Authority) --- */
.mikropo-archive-header { 
    margin-bottom: 60px; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 40px; 
    position: relative;
}

.mikropo-archive-title { 
    font-size: 3.5rem; 
    font-weight: 900; 
    color: var(--brand-dark); 
    margin-bottom: 16px; 
    letter-spacing: -1.5px; 
}

.mikropo-archive-description { 
    font-size: 1.15rem; 
    color: var(--text-muted); 
    max-width: 800px; 
    line-height: 1.8; 
}

/* --- CATALOG CONTROLS (Sorting, Results count) --- */
.mikropo-catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 16px 24px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.woocommerce-result-count {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin: 0;
}

.woocommerce-ordering select {
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    /* Custom arrow for dropdown */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.woocommerce-ordering select:focus {
    outline: none;
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, 0.1);
}

/* Ensure pagination aligns nicely */
.mikropo-pagination-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

/* --- THE CATALOG GRID (Fixes broken category layouts) --- */
.mikropo-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

/* Ensure empty state is styled properly */
.mikropo-no-products {
    text-align: center; 
    padding: 100px 0; 
    background: var(--bg-main); 
    border: 1px dashed var(--border-color); 
    border-radius: var(--radius-lg); 
    margin-top: -40px; 
    position: relative; 
    z-index: 10; 
    box-shadow: var(--shadow-sm);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mikropo-archive-title { font-size: 2.2rem; margin-bottom: 12px; }
    .mikropo-archive-description { font-size: 1.05rem; }
    .mikropo-archive-header { margin-bottom: 40px; padding-bottom: 30px; }
    .mikropo-catalog-controls { flex-direction: column; gap: 16px; align-items: flex-start; }
    .mikropo-product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 480px) {
    .mikropo-archive-title { font-size: 1.8rem; }
    .mikropo-archive-header { margin-bottom: 30px; padding-bottom: 20px; }
    .mikropo-product-grid { grid-template-columns: 1fr; gap: 16px; }
}