/* public/assets/css/product-matrix.css */

/* ── STICKY GALERIA (desktop) ─────────────────────────────── */
.product-gallery-sticky {
    position: sticky;
    top: 80px; /* odstęp od góry (navbar) */
}

/* ── KONFIGURATOR KROK-PO-KROKU ──────────────────────────── */
.configurator-card {
    border-radius: 10px;
    background: #fff;
}

/* Etykieta kroku z numerem w kółku */
.step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--spax-dark, #333);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--spax-green);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Linia podziału między krokami */
.step-divider {
    border-top: 1px solid #e9ecef;
    margin-bottom: 1.25rem;
}

/* Krok ukryty (animowany) */
.configurator-step.step-hidden {
    display: none;
}

/* Przyciski selektora rozmiaru */
.col-btn,
.row-btn {
    width: 62px;
    min-width: 62px;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.3rem 0.4rem;
    text-align: center;
    transition: all 0.15s ease;
}

/* Aktywny przycisk selektora */
.btn-selector-active {
    background-color: var(--spax-green) !important;
    border-color: var(--spax-green) !important;
    color: #fff !important;
}


/* ── PANEL WARIANTÓW INLINE ──────────────────────────────── */
.variant-inline-table {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.85rem;
}

/* Na mobile: warianty jako karty zamiast tabeli */
@media (max-width: 575px) {
    .variant-inline-table table thead {
        display: none;
    }
    .variant-inline-table table,
    .variant-inline-table tbody,
    .variant-inline-table tr,
    .variant-inline-table td {
        display: block;
        width: 100%;
    }
    .variant-inline-table tr {
        border: 1px solid #dee2e6;
        border-radius: 6px;
        margin-bottom: 8px;
        padding: 8px;
        background: #fff;
    }
    .variant-inline-table td {
        text-align: left !important;
        padding: 3px 4px !important;
        border: none !important;
    }
    .variant-inline-table td::before {
        content: attr(data-label) " ";
        font-weight: 600;
        color: #555;
        font-size: 0.75rem;
    }
    .variant-inline-table td:last-child {
        padding-top: 8px !important;
    }
    .variant-inline-table td:last-child .btn {
        width: 100%;
    }
}

/* --- KOLORYSTYKA SPAX --- */
:root {
    /* --spax-green-dark zastąpiony przez --spax-green z custom-menu.css */
    --spax-green-row: #d0e6d0;
    --spax-green-row-alt: #e8f3e8;
    --spax-text-red: #c00;
}

/* --- SEKCJA HERO (GALERIA + INFO) --- */
.product-hero {
    background: #fff;
    padding: 0;
}

/* Galeria zdjęć */
.product-gallery {
    display: flex;
    flex-direction: column;
}

#productCarousel {
    border-radius: 8px;
    overflow: hidden;
}

#productCarousel .carousel-item img {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.product-intro h1 {
    color: var(--spax-dark, #333);
    font-size: 2rem;
    line-height: 1.2;
}

.product-description {
    line-height: 1.6;
    color: #555;
}

.product-standards {
    border-left: 4px solid var(--spax-green);
}

.product-standards h6 {
    color: var(--spax-dark, #333);
}

/* Sekcja materiałów */
.product-materials {
    margin-top: 2rem;
}

.product-materials h6 {
    color: var(--spax-dark, #333);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 1.5rem;
}

.material-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.material-tag:hover {
    border-color: var(--spax-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-tag--active {
    border-color: var(--spax-green) !important;
    background: #f0faf0 !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--spax-green) 30%, transparent);
}
.filter-tag--active small {
    color: var(--spax-green) !important;
    font-weight: 600;
}

.material-tag .mat-symbol {
    margin-right: 0;
    margin-bottom: 8px;
}

.material-tag small {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.3;
}

/* GŁÓWNY KONTENER KARTY */
.product-sheet {
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 4px;
}

/* --- STARY KOMPONENT (opcjonalny fallback) --- */
.desc-header { font-weight: bold; margin-bottom: 5px; color: #000; }
.desc-text { font-size: 0.9rem; line-height: 1.4; color: #333; margin-bottom: 20px; text-align: justify;}

.tech-drawings img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

/* SYMBOL MATERIAŁOWY (UNIWERSALNY) */
.mat-symbol {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 0.85rem;
    flex-shrink: 0;
}
/* Kolory symboli */
.sym-h { background: #e0e0e0; color: #000; } 
.sym-a2 { background: #6cace4; color: #fff; } 
.sym-zn-b { background: #fff; border: 2px solid #333; color: #333; } 
.sym-zn-a { background: #fff700; color: #333; } 
.sym-br { background: #a0522d; color: #fff; } 
.sym-wir { background: #e8e8e8; color: #333; border: 1px solid #999;} 


/* --- NAGŁÓWEK TABELI --- */
.matrix-header-label {
    color: var(--spax-text-red);
    font-weight: bold;
    font-size: 1.1rem;
}

.mini-legend {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mini-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-legend i {
    font-size: 0.9rem;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .mini-legend {
        font-size: 0.75rem;
        gap: 8px;
    }

    .mini-legend span {
        gap: 3px;
    }
}

/* TABELA */
.spax-table {
    width: auto;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.85rem;
}

/* Nagłówek Tabeli (Góra) */
.spax-table thead th {
    background-color: var(--spax-green);
    color: white;
    padding: 8px 2px;
    font-weight: normal;
    text-align: center;
    border: none;
    width: 80px;
    min-width: 80px;
}

/* Narożnik (pusty) */
.spax-table .axis-corner {
    width: auto;
    min-width: 0;
    background-color: var(--spax-green);
    border: none;
    padding: 0;
}

/* Wiersz z etykietą osi kolumn (np. "średnica") */
.spax-table .axis-label-row {
    background-color: var(--spax-green);
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    width: auto;
    min-width: 0;
}

/* Kolumna z etykietą osi wierszy (np. "długość"), obrócona 90° */
.spax-table .axis-label-col {
    background-color: var(--spax-green);
    color: white;
    text-align: center;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 2px;
    width: 28px;
    min-width: 28px;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    border-right: 1px solid rgba(255,255,255,0.3);
}

/* Wartości wierszy (np. "10", "12", "16") */
.spax-table tbody th.row-val {
    background-color: var(--spax-green);
    color: white;
    text-align: center;
    font-weight: bold;
    padding: 5px;
    width: 35px;
    min-width: 35px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

/* Wiersze (Paski) */
.spax-table tbody tr:nth-child(even) td { background-color: var(--spax-green-row); }
.spax-table tbody tr:nth-child(odd) td { background-color: var(--spax-green-row-alt); }

/* Komórki */
.spax-table td {
    text-align: center;
    padding: 4px;
    vertical-align: middle;
    border: none;
    width: 80px;
    min-width: 80px;
}

/* Kropki w tabeli */
.dot-link { text-decoration: none; display: inline-block; margin: 1px; }
.dot-link i {
    font-size: 1.25rem;
    font-weight: 900;
    transition: transform 0.2s;
    filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.35));
}
.dot-link:hover i { transform: scale(1.3); }

/* Kolory ikon koszyczka */
.color-stainless { color: #4a8ec2; }
.color-white { color: #555555; }
.color-yellow { color: #c49a00; }
.color-wirox { color: #7a5a0a; }     
.color-inactive { color: transparent; border: 1px solid #ccc; border-radius: 50%; width: 12px; height: 12px; display:inline-block; }
/* --- POPRAWIONE PODŚWIETLANIE (DARK CROSSHAIR) --- */
/* --- POPRAWIONE PODŚWIETLANIE (DARK CROSSHAIR) --- */

/* Cały wiersz - wymuszamy kolor na wszystkich komórkach w wierszu */
.spax-table tr.highlight-row td,
.spax-table tr.highlight-row th {
    background-color: #bcdbc8 !important; /* Ciemniejsza zieleń */
}

/* Cała kolumna */
.spax-table td.highlight-col, 
.spax-table th.highlight-col {
    background-color: #bcdbc8 !important;
}

/* Nagłówki (Oś X i Oś Y) - najciemniejsze tło i biały tekst */
.spax-table tr.highlight-row th:first-child,
.spax-table thead th.highlight-col {
    background-color: var(--spax-dark) !important;
    color: white !important;
}

/* Komórka pod myszką - Punkt centralny */
.spax-table td.highlight-cell {
    background-color: var(--spax-green) !important;
    color: white !important;
}

/* Animacja focus dla macierzy */
@keyframes focus-pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--spax-green), 0 0 15px rgba(0, 128, 0, 0.3); }
    50% { box-shadow: 0 0 0 4px var(--spax-green), 0 0 20px rgba(0, 128, 0, 0.6); }
}

.table-responsive.focus-highlight {
    animation: focus-pulse 0.5s ease-in-out 4;
    border-radius: 4px;
}

/* Responsywne touch targets na mobile */
@media (max-width: 576px) {
    .spax-table thead th,
    .spax-table tbody th {
        padding: 6px 4px;
        font-size: 0.78rem;
    }

    .spax-table td {
        padding: 6px 2px;
    }

    .dot-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        min-height: 32px;
        margin: 2px;
    }

    .dot-link i {
        font-size: 1.1rem;
    }

    /* Legenda pionowo na bardzo małych ekranach */
    .mini-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}