/* --- NOWOCZESNA LISTA ROZWIJANA (SELECT) - UKŁAD POZIOMY --- */

/* 1. Zmiana układu tabeli na Flexbox (Jedna linia) */
table.variations tr {
    display: flex;
    align-items: center; /* Wyrównanie w pionie do środka */
    justify-content: space-between; /* Rozsuwa elementy: Label max w lewo, Select max w prawo */
    border-bottom: 1px solid #eee; /* Opcjonalnie: linia oddzielająca, jeśli masz więcej opcji */
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* 2. Stylizacja Etykiety (Lewa strona) */
table.variations th.label {
    display: block;
    padding: 0;
    text-align: left;
    width: auto; /* Zajmuje tylko tyle miejsca ile potrzebuje tekst */
    margin-right: 20px; /* Odstęp od selecta */
}

table.variations label {
    font-size: 16px; /* WIĘKSZY FONT (było 12px) */
    font-weight: 700;
    color: #333;
    text-transform: capitalize; /* Np. "Waga" zamiast "WAGA", jeśli wolisz uppercase zostaw uppercase */
    margin: 0;
    line-height: 1;
}

/* 3. Kontener Selecta (Prawa strona) */
table.variations td.value {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Dociąga do prawej */
    width: auto;
    flex-grow: 1; /* Wypełnia dostępną przestrzeń */
    position: relative;
}

/* 4. Stylizacja Samej Kapsułki (Select) */
.variations select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 50px; /* Kapsułka */
    color: #333;
    
    font-size: 14px;
    font-weight: 600;
    
    padding: 10px 20px;
    padding-right: 40px; /* Miejsce na strzałkę */
    
    /* Szerokość */
    width: auto;      /* Dopasuj do treści */
    min-width: 150px; /* Ale nie węższy niż... */
    max-width: 250px; /* I nie szerszy niż... */
    
    cursor: pointer;
    
    /* Strzałka SVG */
    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='%230d6efd' 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 15px center;
    background-size: 16px; 
}

/* Focus - usuwamy kwadratową obwódkę systemową */
.variations select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

/* 5. Przycisk "Wyczyść" (reset_variations) */
/* Ustawiamy go obok selecta lub pod nim, zależnie od miejsca */
.reset_variations {
    font-size: 11px;
    color: #999;
    margin-left: 10px; /* Odstęp od selecta */
    display: inline-block;
}

/* --- RESPANSYWNOŚĆ (Mobile) --- */
/* Na telefonach często lepiej wygląda jednak jedno pod drugim, */
/* ale jeśli chcesz jedną linię wszędzie, usuń poniższe @media */
@media (max-width: 480px) {
    table.variations tr {
        flex-direction: column; /* Jeden pod drugim */
        align-items: flex-start;
    }
    table.variations td.value {
        width: 100%;
        justify-content: flex-start;
        margin-top: 5px;
    }
    .variations select {
        width: 100%; /* Pełna szerokość na mobile */
        max-width: none;
    }
}