/* Przebudowa struktury wariantów na układ pionowy (tekst nad kafelkami) */
table.variations tbody,
table.variations tr {
    display: block;
    width: 100%;
}

table.variations td.label {
    display: block;
    padding: 0 0 10px 0; /* Odstęp między napisem GRAMATURA a kafelkami */
    text-align: left;
}

table.variations td.value {
    display: block;
    width: 100%;
    padding: 0;
}

/* Twarde ukrycie domyślnego selecta */
table.variations td.value select {
    display: none !important;
}

/* Twarde ukrycie domyślnego selecta ORAZ nakładki z biblioteki Select2 */
table.variations td.value select,
table.variations td.value .select2-container {
    display: none !important;
}

/* Twarde ukrycie domyślnego selecta, nakładki Select2 ORAZ przycisku "Wyczyść" */
table.variations td.value select,
table.variations td.value .select2-container,
table.variations td.value .reset_variations {
    display: none !important;
}
/* Wygląd kontenera kafelków */
.custom-swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 0px;
}

/* Ukrycie oryginalnego selecta - dla pewności */
.custom-swatches-container + select {
    display: none !important;
}

/* Wygląd pojedynczego kafelka */
.custom-swatch-tile {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease-in-out;
    background: #fff;
    min-width: 100px;
}

/* Reakcja na hover i zaznaczenie - kolory z Twojego designu */
.custom-swatch-tile:hover,
.custom-swatch-tile.selected {
    border-color: #d25619; 
}

.custom-swatch-tile.selected {
    background: #fdf6f3;
}

/* Typografia w kafelku */
.custom-swatch-tile .swatch-name {
    display: block;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 4px;
    color: #333;
}

.custom-swatch-tile .swatch-price .amount {
    display: block;
    font-size: 14px;
    color: #d25619;
    font-weight: 600;
}

.variations th.label {
    padding-bottom:20px !important
}

.swatch-price .price {
        text-align: center !important;
        margin-top:0px !important;
        margin-bottom:0px !important
}

/* --- WIZUALNY WSKAŹNIK STANU MAGAZYNOWEGO --- */

.custom-stock-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0px; /* Odstęp od elementu poniżej */
    font-family: inherit;
    margin-top:18px !important
}

/* Ikonka (✓ lub ✕) */
.custom-stock-indicator .stock-icon {
    color: #d3a863;
    font-size: 18px !important;
    font-weight: bold;
    line-height: 1;
}

.custom-stock-indicator.out-of-stock .stock-icon {
    color: #d3a863; /* Czerwony krzyżyk dla braku na magazynie */
}

/* Tekst statusu */
.custom-stock-indicator .stock-text {
    font-size: 14px !important;
    font-weight: 600;
    color: #898989;
    font-family:"Open Sans",sans-serif;
    text-transform:none !important;
    line-height: 1.364em !important
}

/* Kontener na kreski */
.custom-stock-indicator .stock-bars {
    display: flex;
    gap: 4px;
    margin-left: 8px; /* Lekki odstęp od tekstu */
}

/* Pojedyncza, pusta kreska */
.custom-stock-indicator .bar {
    width: 16px;
    height: 4px;
    background-color: #d8d8d8; /* Szary kolor pustego paska */
    border-radius: 2px;
}

/* Zapełniona kreska */
.custom-stock-indicator .bar.active {
    background-color: #d3a863; /* Żółto-pomarańczowy kolor paska ze screena */
}

/* --- STATUS: OSTATNIE SZTUKI (1-10) --- */

/* Pomarańczowa ikona ostrzegawcza */
.custom-stock-indicator.last-pieces-stock .stock-icon {
    color: #d3a863; 
    font-size: 17px;
}

/* Czerwony kolor dla samej liczby sztuk */
.custom-stock-indicator.last-pieces-stock .stock-text .stock-number {
   color: #676767;
    font-weight: 500;
}

/* Czerwony kolor dla aktywnego paska */
.custom-stock-indicator.last-pieces-stock .bar.active {
    background-color: #f05050;
}

#qodef-woo-page.qodef--single .custom-stock-indicator.out-of-stock {
    margin: 10px 0px 0px 0px;
}