/* --- Finalne style dla obu selektorów --- */

/* Używamy nowej, wspólnej klasy dla obu selektorów */
.product-variant-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    /* Zmieniamy margines, aby był tylko na dole */
    margin-bottom: 25px; 
    padding: 5px 0;
}

/* Etykieta - bez zmian */
.weight-selector-label {
    font-weight: 600;
    font-size: 1em;
    color: #555;
    margin: 0;
}

/* Pole wyboru <select> - bez zmian */
.weight-selector-dropdown {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 10px 36px 10px 14px;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    background-color: #fff;
    cursor: pointer;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    min-width: 150px;
}

.weight-selector-dropdown:hover {
    border-color: #a9b1b8;
}

.weight-selector-dropdown:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
/*
 * Style dla wyświetlania ceny za jednostkę
 */
.product-price-per-unit {
    font-size: 0.9rem;   /* Nieco mniejszy tekst niż główna cena */
    color: #6c757d;     /* Szary kolor, aby nie rzucał się w oczy tak jak cena */
    margin-top: 8px;    /* Niewielki odstęp od ceny głównej */
    margin-bottom: 15px;/* Większy odstęp od selektora wagi poniżej */
    clear: both;        /* Zapewnia, że będzie w nowej linii */
    line-height: 1.5;
    font-weight: 500;   /* Lekkie pogrubienie dla czytelności */
}
/* —————————————————————————————————————————————
   Wspólny wrapper: kafelek z tłem i zaokrągleniami
   ————————————————————————————————————————————— */
.product-variant-selector.variant-tile {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  box-sizing: border-box;
}

/* —————————————————————————————————————————————
   Etykieta: stała szerokość (8rem), wyrównanie do lewej
   ————————————————————————————————————————————— */
.product-variant-selector.variant-tile .variant-label {
  flex: 0 0 8rem;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: #555555;
}

/* —————————————————————————————————————————————
   Kontener <select>: rośnie na resztę miejsca
   ————————————————————————————————————————————— */
.product-variant-selector.variant-tile .variant-control {
  flex: 1 1 auto;
  position: relative;
}

/* —————————————————————————————————————————————
   Sam <select>: biały background, zaokrąglenia, padding
   ————————————————————————————————————————————— */
.product-variant-selector.variant-tile .variant-dropdown {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: #333333;
  cursor: pointer;
}

/* —————————————————————————————————————————————
   Własna strzałka po prawej w ramach .variant-control
   ————————————————————————————————————————————— */
.product-variant-selector.variant-tile .variant-control::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #888888;
  font-size: 0.8rem;
}
/* =============================================================================
   Ujednolicenie fontu w kafelkach i selektorach tak, by miały taki sam, 
   “delikatny” styl jak górne kafelki (.custom-info-list)
   ============================================================================= */

/* 1) Górne kafelki pod ceną – ten styl zostawiamy bez zmian: 
     font-weight:400; font-size:0.9rem; color:#555 */
.custom-info-list,
.custom-info-list * {
  font-family: inherit !important;
  font-size:    0.9rem    !important;
  font-weight:  400      !important;
  color:        #555555   !important;
}

/* 2) Selekto­ry wariantów (waga / inne rodzaje) – nadajemy im dokładnie te same właściwości */
.product-variant-selector.variant-tile,
.product-variant-selector.variant-tile * {
  font-family: inherit !important;
  font-size:    0.9rem    !important;
  font-weight:  400       !important;
  color:        #555555   !important;
}

/* 3) Szczególnie na samym <select> wymuszamy: */
.product-variant-selector.variant-tile .variant-dropdown {
  font-family: inherit !important;
  font-size:    0.9rem    !important;
  font-weight:  400       !important;
  color:        #555555   !important;
}




/* === ProductPro: Inne rodzaje – lista z miniaturkami === */
.productpro-types {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
}

.productpro-types .variant-control {
  width: 100%;
}

.productpro-types .pp-type-toggle {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
}

.productpro-types .pp-type-toggle-text {
  flex: 1;
  text-align: left;
  margin-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.productpro-types .pp-type-current {
  display: block;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.productpro-types .pp-type-toggle-arrow {
  font-size: 0.7rem;
}

.productpro-types .pp-type-dropdown {
  display: none;
  position: absolute;
  z-index: 50;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.productpro-types.pp-open .pp-type-dropdown {
  display: block;
}

.productpro-types .pp-type-list {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.productpro-types .pp-type-item + .pp-type-item {
  border-top: 1px solid #f1f5f9;
}

.productpro-types .pp-type-link {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  text-decoration: none;
  font-size: 0.85rem;
  color: #111827;
}

.productpro-types .pp-type-link:hover {
  background: #f3f4f6;
}

.productpro-types .pp-type-thumb {
  flex: 0 0 50px;
  margin-right: 8px;
}

.productpro-types .pp-type-thumb img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  display: block;
}

.productpro-types .pp-type-title {
  flex: 1 1 auto;
  margin-right: 8px;
  line-height: 1.3;
}

.productpro-types .pp-type-price-block {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.productpro-types .pp-type-price-new {
  font-weight: 600;
  font-size: 0.85rem;
}

.productpro-types .pp-type-price-old {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.productpro-types .pp-type-badge {
  /* Styl spójny z globalną etykietą .label-sale / WYPRZEDAŻ */
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  font-weight: 600;
  color: #ffffff;
  border-radius: 3px;
  text-transform: uppercase;
  line-height: 1;
  background-color: #ef6c00 !important; /* identyczny pomarańczowy */
}




/* ==========================================================================
   OVERRIDES – final behavior & layout for "Inne rodzaje" (ProductPro)
   ========================================================================== */

/* Kafelek "Inne rodzaje" – label po lewej, dropdown po prawej (tak jak "Dostępne wagi") */
.product-variant-selector.variant-tile.productpro-types {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* Etykieta */
.product-variant-selector.variant-tile.productpro-types .variant-label {
  flex: 0 0 8rem;
  margin: 0 20px 0 0;
  text-align: left;
  white-space: nowrap;
}

/* Prawa część zajmuje resztę szerokości */
.product-variant-selector.variant-tile.productpro-types .variant-control {
  flex: 1 1 auto;
  margin-top: 0;
  min-width: 0; /* <-- DODANA POPRAWKA: Zapobiega rozciąganiu przez długą treść */
}

/* Kontener dropdownu – widoczny zawsze, lista chowana osobno */
.productpro-types .pp-type-dropdown {
  position: relative;
  display: block !important;
  max-height: none;
  overflow: visible;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Przycisk z aktualną nazwą – pełna szerokość, jak select */
.productpro-types .pp-type-toggle {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  background-color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Tekst aktualnego wariantu */
.productpro-types .pp-type-current {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Strzałka z głównego CSS (variant-control::after) zostaje, nie dodajemy drugiej */

/* Lista wariantów – chowana w dropdownie */
.productpro-types .pp-type-list {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  background-color: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  z-index: 50;
}

/* Pokazujemy listę, gdy dropdown ma klasę is-open (dodawaną w JS) */
.productpro-types .pp-type-dropdown.is-open .pp-type-list {
  display: block;
}

/* Wiersze i wnętrze listy zostawiamy z poprzednich styli (miniatura, tytuł, ceny, badge) */

/* Mobile – label nad dropdownem */
@media (max-width: 767.98px) {
  .product-variant-selector.variant-tile.productpro-types {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 15px;
  }
  .product-variant-selector.variant-tile.productpro-types .variant-label {
    margin: 0 0 6px 0;
  }
}



/* ============================================================
   SUPER FINAL – "Inne rodzaje" dropdown as static block INSIDE tile
   ============================================================ */

/* Kontener z listą: dropdown pod przyciskiem, lista wysuwana absolutnie
   żeby szare tło nie rozciągało się na pełną wysokość listy */
.product-variant-selector.variant-tile.productpro-types .pp-type-dropdown {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-top: 0.35rem !important;
}

/* Strzałka w przycisku "Inne rodzaje" – jak w klasycznym select */
.product-variant-selector.variant-tile.productpro-types .pp-type-toggle {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding-right: 2.2rem;
}

.product-variant-selector.variant-tile.productpro-types .pp-type-toggle::after {
  content: "▾";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 0.8rem;
  color: #888888;
}

/* Sama lista produktów – pełna szerokość, wysuwana nad treścią */
.product-variant-selector.variant-tile.productpro-types .pp-type-list {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 4px 0 0 !important;
  padding: 4px 0 !important;
  background: #ffffff !important;
  border: 1px solid #d0d5dd !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12) !important;
  list-style: none !important;
  display: none !important;
}

/* Pokazujemy listę tylko gdy dropdown ma klasę .is-open (dodaje JS) */
.product-variant-selector.variant-tile.productpro-types .pp-type-dropdown.is-open .pp-type-list {
  display: block !important;
}
/* Mobile – bardziej kompaktowy układ "Inne rodzaje" */
@media (max-width: 768px) {
  .product-variant-selector.variant-tile.productpro-types {
    flex-direction: column;
    align-items: stretch;
  }

  .product-variant-selector.variant-tile.productpro-types .variant-label {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 0 0.35rem 0;
    text-align: left;
    white-space: normal;
  }

  .product-variant-selector.variant-tile.productpro-types .variant-control {
    flex: 0 0 auto;
    width: 100%;
  }
}
/* --- Ukrywanie napisu Polityka zwrotów / Podatki pod ceną --- */
.product-prices .tax-shipping-delivery-label {
    display: none !important;
}
/* ==========================================================================
   NOWY UKŁAD: BIAŁE KAFELKI W JEDNEJ LINII - FINALNA POPRAWKA
   ========================================================================== */

/* 1. KONTENER GŁÓWNY - Musi być przezroczysty! (To tu był problem szarego tła) */
.custom-info-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;       /* Odstęp między kafelkami */
    margin-bottom: 25px !important; /* Odstęp od selektorów poniżej */
    margin-top: 10px !important;
    width: 100% !important;
    
    /* KLUCZOWE: Resetujemy stare style kontenera (tło i ramkę) */
    background-color: transparent !important; 
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* 2. STYLIZACJA POJEDYNCZYCH KAFELKÓW (PIGUŁY) */
.custom-info-list .custom-stock-bar,
.custom-info-list .custom-unit-price-bar {
    /* Szerokość: 50% minus połowa odstępu */
    flex: 1 1 calc(50% - 15px) !important;
    
    /* Wygląd: Białe tło i ramka */
    background-color: #ffffff !important; 
    border: 1px solid #ced4da !important; 
    border-radius: 6px !important;
    padding: 10px 15px !important;
    
    /* Układ wewnątrz: Tekst po lewej, wartość po prawej */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    /* Reset marginesów, żeby nie odstawały */
    margin: 0 !important; 
    min-height: 45px !important;
}

/* 3. PASEK DOSTAWY (jeśli się pojawi) - na całą szerokość */
.custom-info-list .custom-delivery-bar {
    flex: 1 1 100% !important;
    background-color: #ffffff !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    padding: 10px 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
}

/* 4. TEKSTY WEWNĄTRZ (Dopasowanie kolorów) */
.custom-info-list span,
.custom-info-list strong {
    font-size: 0.9rem !important;
    color: #555 !important;
    font-weight: 400 !important;
    font-family: inherit !important;
}
.custom-info-list strong {
    color: #333 !important; /* Wartości nieco ciemniejsze */
}

/* 5. MOBILE - Jeden pod drugim na małych ekranach */
@media (max-width: 575px) {
    .custom-info-list .custom-stock-bar,
    .custom-info-list .custom-unit-price-bar {
        flex: 1 1 100% !important; /* Pełna szerokość */
        margin-bottom: 10px !important; /* Odstęp w pionie */
    }
}

/* ============================================================
   [FINAL V4] STYL BADGE'A "ŁAP OKAZJE" + CENA POMARAŃCZOWA + MNIEJSZA STARA CENA
   ============================================================ */

/* 1. Kontener ceny i badge'a (Prawa strona) */
.productpro-types .pp-type-price-block {
    display: flex !important;
    flex-direction: column !important; /* Układ pionowy */
    align-items: flex-end !important;  /* Wyrównanie do prawej */
    justify-content: center !important;
    min-width: 110px;
}

/* 2. Styl "ŁAP OKAZJE" - Pomarańczowy, lekko zaokrąglony */
.productpro-types .pp-type-badge-pill {
    display: inline-block;
    
    /* Kolor tła: Twój pomarańczowy */
    background-color: #ef6c00 !important; 
    color: #ffffff !important;
    
    /* Typografia */
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    
    /* Kształt */
    border-radius: 4px !important;
    padding: 3px 8px !important;
    
    /* Odstępy */
    margin-bottom: 5px !important;
    line-height: 1.2;
    border: none !important;
    
    /* Cień */
    box-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}

/* 3. Cena AKTUALNA (Pomarańczowa) */
.productpro-types .pp-type-price-new {
    font-size: 14px !important;
    font-weight: 700 !important;
    
    /* ZMIANA: Kolor pomarańczowy */
    color: #ef6c00 !important; 
    
    line-height: 1.2 !important;
    margin-top: 2px !important;
}

/* 4. Cena STARA (Zmniejszona i przekreślona) */
.productpro-types .pp-type-price-old {
    /* ZMIANA: Zmniejszona czcionka z !important */
    font-size: 10px !important; 
    
    color: #999 !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}
/* ==========================================================================
   POPRAWKA: ZMNIEJSZENIE ODSTĘPU ETYKIETY "INNE RODZAJE"
   ========================================================================== */

/* 1. Etykieta - Zmieniamy ze sztywnej szerokości na dopasowaną do tekstu */
.product-variant-selector.variant-tile.productpro-types .variant-label {
    flex: 0 0 auto !important;    /* Nie 8rem, tylko auto */
    width: auto !important;       /* Szerokość tylko taka jak tekst */
    margin-right: 15px !important; /* Mały odstęp od pola wyboru (zamiast wielkiej dziury) */
    white-space: nowrap !important;
}

/* 2. Pole wyboru - Rozciągamy na całą pozostałą przestrzeń */
.product-variant-selector.variant-tile.productpro-types .variant-control {
    flex: 1 1 auto !important;    /* Zajmij wszystko co zostało */
    width: 100% !important;
}

/* 3. Przycisk w środku - Też na 100% */
.productpro-types .pp-type-toggle {
    width: 100% !important;
    max-width: 100% !important;
}