/* Selektory dla pól tekstowych i obszarów tekstowych */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 10px 20px;
    border-radius: 8px; /* Zgodnie z zaokrągleniem przycisków */
    border: 2px solid #e8e4e0; /* Delikatna ramka pasująca do Twojego designu */
    background-color: #ffffff;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
    font-size: 16px; /* Zapobiega zoomowaniu na iOS */
}

/* Efekt po kliknięciu w pole (Focus) */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color); /* Ramka zmienia się na Twój kolor primary */
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1); /* Bardzo delikatny cień wokół */
}

/* =========================================================
   AUTORSKI PREMIUM SELECT (Dropdown Sortowania)
   ========================================================= */

.woocommerce-ordering {
    position: relative !important;
    display: inline-block !important;
    margin-bottom: 30px !important;
}

/* Główny kontener autorskiego selektora */
.alma-custom-select {
    position: relative;
    width: 280px;
    font-family: inherit;
    user-select: none;
}

/* Przycisk (Box, w który się klika) */
.alma-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid var(--border-subtle, #e5e0d8);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main, #221f1d);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.alma-select-trigger:hover {
    border-color: var(--season-text, #af9072);
}

/* Strzałka SVG z płynną animacją obrotu */
.alma-select-arrow {
    color: #64748b;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

/* Stan otwarty: obrót strzałki i podświetlenie ramki */
.alma-custom-select.open .alma-select-trigger {
    border-color: var(--season-text, #af9072);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--season-text) 15%, transparent);
}

.alma-custom-select.open .alma-select-arrow {
    transform: rotate(180deg);
    color: var(--season-text, #af9072);
}

/* Lista rozwijana (Dropdown) */
.alma-select-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--border-subtle, #e5e0d8);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    overflow: hidden;
    padding: 6px;
}

/* Stan po otwarciu listy */
.alma-custom-select.open .alma-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Pojedyncza opcja na liście */
.alma-select-option {
    padding: 10px 14px;
    font-size: 14px;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.alma-select-option:hover {
    background-color: #f8fafc;
    color: var(--season-text, #af9072);
    padding-left: 18px; /* Delikatny efekt wysunięcia tekstu w prawo */
}

/* Aktywna/wybrana opcja */
.alma-select-option.selected {
    background-color: color-mix(in srgb, var(--season-text, #af9072) 10%, transparent);
    color: var(--season-text, #af9072);
    font-weight: 600;
}

/* Responsywność na telefonie */
@media (max-width: 768px) {
    .alma-custom-select {
        width: 100% !important;
    }
}

/* ========================================================================== 
   GLOBALNE STYLIZOWANIE CHECKBOXÓW (Styl z Checkoutu)
   ========================================================================== */

/* 1. Reset i nadanie kształtu WSZYSTKIM checkboxom (z wykluczeniem tych z checkoutu) */
/* 1. Reset i nadanie kształtu WSZYSTKIM checkboxom (z wykluczeniem checkoutu, modułów i filtrów) */
input[type="checkbox"]:not(.alma-account-toggle input):not(.alma-invoice-toggle input):not(.alma-terms__label input):not(.shipping_method):not(.woocommerce-widget-layered-nav input):not(.berocket_single_filter_widget input):not(.jet-filters-checkbox input) {
    
    /* Usuwa domyślny wygląd przeglądarki */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    
    /* Wymiary i ramka */
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    margin: 0 10px 0 0 !important;
    padding: 0 !important;
    
    border: 2px solid #D1D5DB !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

/* 2. Wykluczenie stanu Hover dla filtrów */
input[type="checkbox"]:not(.alma-account-toggle input):not(.alma-invoice-toggle input):not(.alma-terms__label input):not(.shipping_method):not(.woocommerce-widget-layered-nav input):not(.berocket_single_filter_widget input):not(.jet-filters-checkbox input):hover {
    border-color: #9CA3AF !important;
}

/* 3. Wykluczenie stanu Zaznaczonego dla filtrów */
input[type="checkbox"]:not(.alma-account-toggle input):not(.alma-invoice-toggle input):not(.alma-terms__label input):not(.shipping_method):not(.woocommerce-widget-layered-nav input):not(.berocket_single_filter_widget input):not(.jet-filters-checkbox input):checked {
    border-color: var(--season-text, #059669) !important; 
    background-color: var(--season-text, #059669) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-size: 14px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

input[type=checkbox].wc-block-product-filter-checkbox-list__input:checked+.wc-block-product-filter-checkbox-list__mark {
    display: none !important;
}
.wc-block-product-filter-checkbox-list__input-wrapper:before {
    background: none !important;
}

/* 4. Poprawka wymuszająca, aby tekst i nowy checkbox stały idealnie w jednej linii */
.woocommerce form .form-row label.woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    cursor: pointer;
    justify-content: center !important;
    align-items: center !important;
}

.woocommerce .woocommerce-form-login .woocommerce-form-login__rememberme {
    display: flex;
}

/* Ukrywa drobne, natywne napisy "Required" przyznawane przez niektóre wtyczki obok samego boxa */
.woocommerce form .form-row label.woocommerce-form__label-for-checkbox span {
    display: contents;
}

/* Ukrycie natywnego selecta WPC (zostaje w DOM, żeby WPC działało) */
.wpcpo-wrapper select.alma-native-hidden,
.wpcpo-content select.alma-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Pełna szerokość w opcjach produktu */
.wpcpo-wrapper .alma-custom-select,
.wpcpo-content .alma-custom-select {
    width: 100%;
}

/* Przewijanie długiej listy */
.wpcpo-wrapper .alma-select-dropdown,
.wpcpo-content .alma-select-dropdown {
    max-height: 280px;
    overflow-y: auto;
}

/* Lista otwierana do góry, gdy brakuje miejsca na dole */
.alma-custom-select.open-up .alma-select-dropdown {
    top: auto;
    bottom: calc(100% + 6px);
    transform: translateY(8px);
    box-shadow: 0 -15px 35px rgba(0,0,0,0.08);
}

.alma-custom-select.open-up.open .alma-select-dropdown {
    transform: translateY(0);
}