/* ==========================================================================
   Product Catalog Presentation Matrix
   ========================================================================== */
.matrix-container {
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Structural Fix: Keeps heavy 68-row tables from exploding parent layouts */
.matrix-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #edf2f7;
    background: #ffffff;
}

/* Grid Mode Layout Template */
.catalog-grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ==========================================================================
   Line Mode Spreadsheet Table Structure
   ========================================================================== */
.catalog-line-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin: 0;
}

.catalog-line-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.catalog-line-table th, 
.catalog-line-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #edf2f7;
}

/* Subtle row alternating for long data views */
.catalog-line-table tbody tr:nth-child(even) {
    background-color: #fcfdfe;
}

.catalog-line-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Cell alignment utilities */
.cell-code {
    font-family: monospace;
    font-weight: 600;
    color: #64748b;
}

.cell-desc {
    color: #1e293b;
}

.cell-bv {
    text-align: center;
    font-weight: 600;
    color: #475569;
}

.cell-price {
    text-align: right;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    color: #334155;
}

/* Action Strip bar rules */
.spreadsheet-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #e2e8f0;
}

.sheet-meta {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.btn-print {
    background-color: #107c41; /* Green World Corporate Green */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-print:hover {
    background-color: #0b592e;
}

/* ==========================================================================
   Price List / Metadata Sub-Styles
   ========================================================================== */
.sheet-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 4px solid #107c41;
}

.sheet-header h2 {
    font-size: 13px;
    color: #107c41;
    margin: 0;
    font-weight: 700;
    letter-spacing: 1.5px;
}

 Tar.sheet-header h1 {
    font-size: 20px;
    letter-spacing: 0.5px;
    margin: 6px 0;
    color: #1e293b;
    font-weight: 800;
}

.sheet-sub {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.sheet-spec-inline {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    font-style: italic;
}

.text-retail {
    color: #2b579a; /* Deep corporate blue to separate retail columns cleanly */
}

/* ==========================================================================
   Print Optimization Rules
   ========================================================================== */
@media print {
    .no-print { 
        display: none !important; 
    }
    .matrix-container { 
        padding: 0; 
        max-width: 100%;
    }
    .matrix-table-wrapper {
        border: none;
        box-shadow: none;
    }
    .catalog-line-table th {
        background-color: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    tr { 
        page-break-inside: avoid; 
    }
    thead { 
        display: table-header-group; 
    }
}