/*
 Theme Name: Astra Child
 Theme URI: https://dobrymlyn.com.pl
 Description: Motyw potomny dla Astra, dla sklepu WooCommerce
 Author: ArtServ
 Author URI: https://dobrymlyn.com.pl
 Template: astra
 Version: 1.0.0
 Text Domain: astra-child
*/

.ast-plain-container.ast-no-sidebar #primary { margin-top: 0}
.ast-plain-container.ast-no-sidebar #primary { margin-bottom: 0}
.justify { text-align: justify; }
.site-header-section {
  align-items: flex-start !important;
}
h3.uagb-ifb-title {margin-bottom: 0px !important;}
h3.wp-block-heading {padding-top:15px;}

/* Kursor lupa z plusikiem – mniejsza i w kolorze #6b5127 */
a.slb img {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='%236b5127'%3E%3Ccircle cx='10' cy='10' r='7' stroke='%236b5127' stroke-width='2' fill='white'/%3E%3Cline x1='10' y1='7' x2='10' y2='13' stroke='%236b5127' stroke-width='2'/%3E%3Cline x1='7' y1='10' x2='13' y2='10' stroke='%236b5127' stroke-width='2'/%3E%3Cline x1='14' y1='14' x2='20' y2='20' stroke='%236b5127' stroke-width='2'/%3E%3C/svg%3E") 12 12, zoom-in;
  transition: transform 0.4s ease;
}
/* Mocniejszy zoom */
a.slb:hover img {
  transform: scale(1.07);
}

#fancybox-content { 
  border-color: #faf8f5 !important; 
}
.site-header-section > * {
  padding: 0 0px;
}
#page .site-content {
	margin: 30px;}

/* usuwa naglowek z katalogu sklepu */
.woocommerce-page .ast-archive-description {display: nonex;}

.woocommerce-result-count {
    display: none !important;
}

.woocommerce-ordering {
    display: none !important;
}
.woocommerce ul.products {
    gap: 65px; 
}


/* ekrany do 768px */
@media (max-width: 768px) {
  .woocommerce ul.products li.product {
    margin: 10px 0px;  
  }
  .woocommerce ul.products {
    gap: 30px;        
  }
	.ast-container, .ast-container-fluid {
  padding-left: 0px;
  padding-right: 0px;
  }
	.woocommerce ul.products li.product {
  margin: 1px 15px 1px 1px !important;
	}
	.woocommerce-js ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  margin-bottom: .5em;
  padding: 0;
  font-size: 1em!important;
  }
}

h1 {
  font-size: 30px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family:
  line-height: 1em;
}
.ast-archive-title {
	margin-bottom: 0px!important;
}
.woocommerce ul.products li.product {
    margin: 0px 15px 1px 1px; 
	-webkit-box-shadow: 0px 0px 8px -4px rgba(114, 98, 77, 1);
-moz-box-shadow: 0px 0px 8px -4px rgba(114, 98, 77, 1);
box-shadow: 0px 0px 8px -4px rgba(114, 98, 77, 1);
}
.woocommerce-js ul.products li.product .price, .woocommerce-page ul.products li.product .price {
  line-height: 1;
  font-weight: 900;
  font-size: 1.4em;
}
.woocommerce-js ul.products li.product .woocommerce-loop-product__title, .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
  margin-bottom: .5em;
  padding: 0;
  font-size: 1.2em;
}

/* === KATALOG PRODUKTÓW === */

/* Wrapper na obrazek */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: 11px;   /* bezpieczny odstęp pod ramką */
}

/* Ramka proporcji 4:5 */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link::before {
  content: "";
  display: block;
  padding-top: 125%; /* proporcja 4:5 */
}

/* Obrazek w ramce */
.woocommerce ul.products li.product .woocommerce-LoopProduct-link img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  will-change: transform;
  cursor: zoom-in;
  transform-origin: center center;
}

/* === POJEDYNCZY PRODUKT === */
.woocommerce div.product div.images {
  position: relative;
  overflow: hidden;
}

.woocommerce div.product div.images img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;	
  will-change: transform;
  cursor: zoom-in;
  transform-origin: center center;
}
/* Ukrycie lupki (ikony lightbox) na stronie pojedynczego produktu */
.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
  display: none !important;
}

/* Katalog produktów */
.woocommerce ul.products li.product img {
  border: 2px solid #E4D2B4;  
  transition: transform 0.3s ease;
  display: block;
}

/* Pojedynczy produkt */
.woocommerce div.product div.images img {
  border: 2px solid #E4D2B4;  
  transition: transform 0.3s ease;
  display: block;	
}
.woocommerce-js ul.products li.product .button, .woocommerce-page ul.products li.product .button {
  margin-top: 0.1em;
  margin-bottom: .9em;
}

/* === POPRAWA FORMULARZA ZAMÓWIENIA W WOO === */

/* Ogólne poprawki struktury pól billingowych */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row {
  display: block !important;
  width: 100% !important;
  clear: both;
  margin-bottom: 12px;
}

/* Etykiety (label) */
.woocommerce-billing-fields label,
.woocommerce-shipping-fields label {
  display: block;
  width: 100%;
  white-space: normal;
  line-height: 1.3;
  font-weight: 500;
  margin-bottom: 4px;
  color: #333;
}

/* Pola tekstowe */
.woocommerce-billing-fields input.input-text,
.woocommerce-shipping-fields input.input-text,
.woocommerce-billing-fields select,
.woocommerce-shipping-fields select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  font-size: 15px;
}

/* Responsywność — poprawa układu dla telefonów */
@media (max-width: 768px) {
  .woocommerce-billing-fields__field-wrapper,
  .woocommerce-shipping-fields__field-wrapper {
    display: block !important;
  }

  .woocommerce-billing-fields .form-row,
  .woocommerce-shipping-fields .form-row {
    width: 100% !important;
    margin-bottom: 14px;
  }
}

/* Drobne poprawki kompatybilności z przeglądarkami */
@supports (-ms-ime-align:auto) { /* Edge/IE fix */
  .woocommerce-billing-fields label,
  .woocommerce-shipping-fields label {
    line-height: 1.2;
    margin-bottom: 6px;
  }
}


p.woocommerce-shipping-destination {margin-top: 12px; margin-bottom: 9px; font-size: 0.95em; margin-left: -15px; color: rgb(164, 94, 42);}
#enadawca_punkt_odbioru_wrapper > div:nth-child(1) {margin-top: 16px; margin-bottom: 10px; margin-right: 7px; font-size: 1em;}
tr.shipping:nth-child(3) > td:nth-child(1) {background-color:#fdfcfa; padding: 1px 10px 1px 0;}
a#enadwaca_map_selection {line-height: 2em; margin-right: 7px; font-size:1.1em; }
.woocommerce-privacy-policy-text > p:nth-child(1) {font-size: 0.8em;}
.woocommerce-js .select2-results__option {padding: 0px 0.7em;}
.woocommerce-page.woocommerce-checkout table.shop_table td, .woocommerce.woocommerce-checkout table.shop_table td {padding: 10px 10px 10px 0;}
ul#shipping_method li:not(.elementor-widget-woocommerce-cart #shipping_method li) {padding: 0.12em 0 0.12em 2px;}
.woocommerce-page.woocommerce-checkout table.shop_table td, .woocommerce.woocommerce-checkout table.shop_table td {padding: 7px 7px 7px 0;}
.entry-content p {margin 12px 7px 12px 0; line-height: 1.3;}
form #order_review:not(.elementor-widget-woocommerce-checkout-page #order_review) {padding: 0 1.2em 0 1.5em;}

/* Zapobieganie rozszerzaniu się sekcji "Twoje zamówienie" */
.woocommerce-checkout #order_review {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  margin: 0 auto;
}

/* Dla bezpieczeństwa wymuszamy dopasowanie tabeli */
.woocommerce-checkout #order_review table.shop_table {
  table-layout: fixed;
  width: 100%;
  word-wrap: break-word;
}

/* Zabezpieczenie przycisku mapy przed "rozpychaniem" */
.woocommerce-checkout #order_review button,
.woocommerce-checkout #order_review .button {
  white-space: normal;
  text-align: center;
}

/* Ujednolicenie marginesów w sekcji wysyłki */
.woocommerce-checkout #order_review .woocommerce-shipping-methods {
  margin-bottom: 10px;
}

/* Przesunięcie dropdowna Select2 (lista punktów odbioru) w górę */
.select2-container--open .select2-dropdown {
  margin-top: -23px !important; /* przesuwa dropdown wyżej */
}

/* Styl komunikatu "Wpisz minimum 3 znaki." */
.select2-results__message {
  text-align: center;
  color: #6b5127;
  font-weight: 600;
  padding: 8px 0;
}

/* Pulsująca ramka wokół pola wyszukiwania w Select2 */
.select2-search__field {
  border: 2px solid #6b5127 !important;
  border-radius: 4px;
  animation: pulseBorder 1s infinite;
}


/* --- Cień i wygląd dropdowna (listy wyników) --- */
.select2-dropdown {
  border-radius: 6px;
  border: 1px solid #d8c9ae;
  box-shadow: 0 3px 12px rgba(107, 81, 39, 0.15), 0 2px 6px rgba(107, 81, 39, 0.1);
  background-color: #faeeda; /* delikatnie ciepłe tło */
  transition: box-shadow 0.3s ease;
  z-index: 9999;
}

/* --- Efekt fade-in przy otwieraniu dropdowna --- */
.select2-dropdown {
  animation: fadeInSelect 0.25s ease-out;
}

@keyframes fadeInSelect {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Podświetlenie pola "Wybierz punkt odbioru" --- */
.select2-selection {
  transition: all 0.25s ease;
}

.select2-selection:hover,
.select2-selection:focus {
  border-color: #6b5127 !important;
  color: #6b5127 !important;
  box-shadow: 0 0 6px rgba(107, 81, 39, 0.4);
}

.select2-container--default .select2-results > .select2-results__options {
  margin-top: 2px;
}

/* --- Wyraźniejsza ramka pola wyboru "Wybierz punkt odbioru" --- */
.select2-selection {
  border: 2px solid #d8c9ae !important;
  border-radius: 6px !important;
  transition: all 0.25s ease !important;
}

.select2-selection:hover,
.select2-selection:focus,
.select2-container--open .select2-selection {
  border-color: #6b5127 !important;
  color: #6b5127 !important;
  cursor: pointer !important;
}


.woocommerce-page.woocommerce-checkout form #order_review td:last-child  {
  text-align: left;
}

.select2-search--dropdown {
  padding: 12px;
}


/* 1. Zmiana koloru tekstu placeholdera 
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6b5127 !important; 
}*/

/* 2. Ukrycie oryginalnej strzałki Select2 (element <b>) */
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}

/* 3. Modyfikacja kontenera strzałki */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    right: 1px !important; 
    top: 0 !important;
    height: 100% !important;
    width: 32px !important;
    background-color: transparent !important;
    border: none !important;
    
    /* Wyśrodkowanie wertykalne ikony */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 4. Wstawienie ikonki Font Awesome (fa-chevron-down) i jej stylizacja */
.select2-container--default .select2-selection--single .select2-selection__arrow::before {
    /* Ustawienia dla Font Awesome */
    font-family: "Font Awesome 5 Free" !important;
    content: "\f078" !important;
    font-weight: 900 !important; 
    
    /* Stylizacja samej ikonki */
    color: #6b5127 !important; 
    font-size: 16px !important; /* POWIĘKSZENIE: Zmieniono z 14px na 16px */
    line-height: 1; 
    
    /* Dodanie ramki wokół ikonki */
    display: flex; 
    align-items: center;
    justify-content: center;
    width: 24px; /* POWIĘKSZENIE: Zmieniono z 22px na 24px */
    height: 24px; /* POWIĘKSZENIE: Zmieniono z 22px na 24px */
    border: 1px solid #6b5127; 
    border-radius: 4px; 
    
    /* KOREKTA POZYCJI W PIONIE (obniżenie ikony) */
    position: relative; 
    top: 22px; /* Dodałem przesunięcie o 2px w dół (wartość do testowania) */
    right: 5px; /* Odstęp od prawej krawędzi pola */
}

/* Efekt HOVER na ikonce strzałki Select2 - Zmiana tła wewnątrz ramki */

/* Stan HOVER: Zmiana tła, które jest generowane przez pseudoelement ::before */
.select2-container--default .select2-selection--single .select2-selection__arrow:hover::before {
    /* 1. Ustawienie tła na #d7b68f (to ma być "wypełnienie" ikonki) */
    background-color: #faeeda !important;
    
    /* 2. Zapewnienie, że kolor ramki i ikonki pozostają oryginalne */
    border-color: #6b5127 !important; /* Ramka pozostaje brązowa */
    color: #6b5127 !important; /* Ikona V pozostaje brązowa */

    /* 3. Dodanie delikatnego przejścia, aby efekt był płynny */
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Stan HOVER: Zapewnienie, że kontener nie ma niechcianego tła */
.select2-container--default .select2-selection--single .select2-selection__arrow:hover::after {
    background-color: transparent !important;
}


/* Stylizacja linku mapy Pocztexu na przycisk */
#enadwaca_map_selection {
    /* 1. Wygląd przycisku */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    background-color: #bc8543 !important; /* Tło przycisku (jasny brąz) */
    color: #ffffff !important; /* Kolor tekstu (ciemny brąz) */
    
    padding: 8px 16px !important; /* Wewnętrzny margines (nieco większy) */
    margin-top: 15px !important; /* Oddzielenie od pola wyboru */
    
    border: 1px solid #6b5127 !important; /* Cienka ramka */
    border-radius: 4px !important; /* Zaokrąglenie rogów */
    
    cursor: pointer !important; 
    text-decoration: none !important; /* Usunięcie podkreślenia */
    font-weight: 600 !important; /* Pogrubienie tekstu */
    
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* 2. Efekt HOVER na przycisku */
#enadwaca_map_selection:hover {
    background-color: #6b5127 !important; /* Zmiana tła na ciemny brąz */
    color: #ffffff !important; /* Zmiana koloru tekstu na biały */
    border-color: #6b5127 !important; /* Ramka zostaje ciemna */
}

/* 3. Kluczowe Klatki Animacji (Keyframes) dla "bounce" - podskakiwania */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px); /* Wysokość podskoku */
    }
    60% {
        transform: translateY(-4px); /* Lekkie odbicie */
    }
}

/* 4. Stylizacja ikonki mapy Font Awesome (oddzielny kolor, animacja hover) */
#enadwaca_map_selection::before {
    font-family: "Font Awesome 5 Free" !important;
    content: "\f3c5" !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    margin-right: 10px !important;
    
    /* Oddzielny kolor ikonki (np. wyraźny czerwony dla wyróżnienia) */
    color: #faeeda !important; /* Czerwony kolor ikonki */
    
    /* Dodanie delikatnego przejścia dla koloru, jeśli będzie zmieniany na hover */
    transition: color 0.2s ease, transform 0.3s ease-out;
}

/* 5. Efekt HOVER na ikonce (zmiana koloru i uruchomienie animacji) */
#enadwaca_map_selection:hover::before {
    color: #f1c40f !important; /* Zmiana koloru ikonki na żółty podczas hover */
    animation: bounce 0.8s ease-in-out infinite; /* Uruchomienie animacji "bounce" */
}

.woocommerce-js ul.cart_list li > a, .woocommerce-js ul.product_list_widget li > a {
   color: #6b5127;
}
p.woocommerce-shipping-destination {
  line-height: 1.4em;
}

/* Natychmiastowe ukrycie sekcji Pocztex na starcie 
#enadawca_punkt_odbioru_wrapper,
#enadwaca_map_selection {
    display: none !important;
}*/