.stock.in-stock {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 700;
    color: #00852B!important;
    background: #E9F5EC;
    padding: 8px 15px;
    border-radius: 999px;
    margin-bottom: 20px;
    width: fit-content;
}
.stock.in-stock::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231E6B33' stroke-width='3'><polyline points='20 6 9 17 4 12'/></svg>") no-repeat center / contain;
}

/* przycisk Dodaj do koszyka - pełna szerokość */

.single_add_to_cart_button {
    width: 100%;
    display: flex;
    justify-content: center;
}
.woocommerce div.product form.cart {
    width: 100%;
}

/* slider ze zdjeciami produktu */


.woocommerce-product-gallery__wrapper {
    display: block !important;
}

.flex-control-thumbs,
.woocommerce-product-gallery .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 10px !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}

.flex-control-thumbs li,
.woocommerce-product-gallery .flex-control-thumbs li {
    flex: 0 0 80px !important;
    width: 80px !important;
    scroll-snap-align: start;
}

.flex-control-thumbs::-webkit-scrollbar {
    height: 5px;
}
.flex-control-thumbs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.flex-control-thumbs,
.woocommerce-product-gallery .flex-control-thumbs {
    margin-top: 5px !important;
}

/* Ukryj informację o najniższej cenie z 30 dni — tylko w pasku sticky */
.sticky-atc-bar .wc-price-history {
    display: none !important;
}

/* Ukryj stan magazynowy — tylko w pasku sticky */
.sticky-atc-bar .stock {
    display: none !important;
}

/*przyklejenie paska dolenego */

.sticky-atc-bar {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.sticky-atc-bar.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* KOSZYK
 *  STYLE KOSZYK */

.cart-trust-line {
    text-align: left;
    font-size: 16px;
    color: #000;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
}

.cart-usp-box {
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
}

/* Fonty w bloku Koszyk */
.wc-block-cart,
.wc-block-cart * {
    font-family: 'Inter', sans-serif;
}
.wc-block-cart h1,
.wc-block-cart h2,
.wc-block-cart h3,
.wc-block-cart .wc-block-components-totals-item__label,
.wc-block-cart .wc-block-components-product-name {
    font-family: 'Poppins', sans-serif;
}

/* Przycisk "Przejdź do płatności" */
.wc-block-cart__submit-button,
a.wc-block-cart__submit-button,
.wc-block-components-button.wc-block-cart__submit-button {
    background-color: #00852b!important;
    color: #ffffff!important;
    border-radius: 999px !important;
    font-weight: 700 !important;
    padding: 15px 28px !important;
    text-decoration: none !important;
}
.wc-block-cart__submit-button:hover {
    background-color: #2B2F38!important;
}

/* Linki do produktów w tabeli — granat zamiast domyślnego fioletu WP */
.wc-block-components-product-name {
	font-size: 18px!important;
    color: #20232A!important;
    font-weight: 600 !important;
}
.wc-block-components-product-name:hover {
    color: #D9900E !important;
}

/* Nagłówek "Szacowana łączna kwota" — pogrubienie zgodne z marką */
.wc-block-cart__totals-title,
.wc-block-components-totals-item__label {
    font-weight: 700 !important;
}

/* font nagłówków obu tabelek */
.wc-block-cart-items__header-image,
.wc-block-cart-items__header-product,
.wc-block-cart-items__header-total,
.wc-block-cart__totals-title,
.wc-block-components-totals-item__label {
    font-size: 16px !important;
}

.wc-block-cart-items__header-image,
.wc-block-cart-items__header-product,
.wc-block-cart-items__header-total,
.wc-block-cart__totals-title {
    font-family: 'Inter', sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Przycisk "Zastosuj" — stan domyślny (tylko ramka) */
.wc-block-components-totals-coupon__button,
.wc-block-cart .wc-block-components-totals-coupon__button {
    border-color: #000000 !important;
    color: #000000 !important;
}

/* Przycisk "Zastosuj" — stan po najechaniu (wypełnione tło) */
.wc-block-components-totals-coupon__button:hover,
.wc-block-cart .wc-block-components-totals-coupon__button:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
    border-color: #000000 !important;
}



/* Polecane produkty - pełny koszyk*/

.wc-block-product button.wc-block-components-product-button__button.has-small-font-size,
.wc-block-product a.wc-block-components-product-button__button.has-small-font-size {
    font-size: 14px !important;
}

.wc-block-product .wp-block-button__link,
.wc-block-product .wc-block-components-product-button__button {
    font-size: 13px !important;
    margin-top: auto !important;
}

.wc-block-product {
    border: 1px solid #E7E1D2;
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    padding: 0 0 16px !important;
}

.wc-block-product .wc-block-components-product-image {
    margin: 0;
}

.wc-block-product .wc-block-components-product-image img {
    border-radius: 12px 12px 0 0;
    width: 100%;
    display: block;
}

.wc-block-product .wc-block-components-product-title,
.wc-block-product .wp-block-post-title,
.wc-block-product .wc-block-grid__product-title {
    text-align: left !important;
    padding-left: 14px;
    padding-right: 14px;
}

.wc-block-product .wc-block-components-product-price {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: left !important;
    padding-left: 14px;
    padding-right: 14px;
}

.wc-block-product .wp-block-button__link,
.wc-block-product .wc-block-components-product-button__button {
    background-color: #00852B !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-left: 14px;
    margin-right: 14px;
    width: calc(100% - 28px) !important;
    display: block;
    text-align: center;
}

.wc-block-product a,
.wc-block-product .wc-block-components-product-title,
.wc-block-product .wc-block-components-product-title a,
.wc-block-product .wp-block-post-title,
.wc-block-product .wp-block-post-title a {
    text-decoration: none !important;
    font-size: 16px !important;
}

.wc-block-product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.wc-block-product > .wp-block-button,
.wc-block-product [data-block-name="woocommerce/product-button"] {
    margin-top: auto !important;
}


/* Polecane produkty - pusty koszyk */ 

ul.wc-block-grid__products li.wc-block-grid__product {
    box-sizing: border-box !important;
    border: 1px solid #E7E1D2 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-align: left;
    padding: 0 0 16px !important;
    margin: 0 12px !important;
}

.wc-block-grid__product-image {
    margin: 0;
}

.wc-block-grid__product-image img {
    border-radius: 12px 12px 0 0;
    width: 100%;
    display: block;
}

.wc-block-grid__product-title,
.wc-block-grid__product-price,
.wc-block-grid__product-link {
    text-align: left !important;
    padding-left: 14px;
    padding-right: 14px;
    text-decoration: none !important;
    font-size: 16px !important;
}

.wc-block-grid__product-price {
    font-family: 'Poppins', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
}

.wc-block-grid__product .wp-block-button__link,
.wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-grid__product a.add_to_cart_button {
    background-color: #00852B !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-left: 14px;
    margin-right: 14px;
    width: calc(100% - 28px) !important;
    display: block;
    text-align: center;
}
ul.wc-block-grid__products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

ul.wc-block-grid__products li.wc-block-grid__product {
    box-sizing: border-box !important;
    border: 1px solid #E7E1D2 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    text-align: left;
    padding: 0 0 16px !important;
    margin: 0 !important;
    flex: 0 0 calc(25% - 15px) !important;
    width: calc(25% - 15px) !important;
}



/* ZAMÓWIENIE *
 * Style - zamówienie */

.wc-block-components-checkout-place-order-button,
button.wc-block-components-checkout-place-order-button {
    background-color: #00852b !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 15px 28px !important;
}

.wc-block-components-checkout-place-order-button:hover {
    background-color: #2B2F38 !important;
    color: #ffffff !important;
}


/* !!!!!!!!!!ukrycie niepotrzebnych pól formularza */

/* ============ SEKCJA ODBIORCY (#shipping) ============ */

/* Ukryj CAŁE wrappery duplikatów płatnika — nie tylko input, całą "kratkę" */
#shipping > div:has(#shipping-billing-payer_org_name),
#shipping > div:has(#shipping-billing-payer_nip) {
    display: none !important;
}

/* Kolejność i pełna szerokość dla Nazwy odbiorcy */
#shipping > div:has(#shipping-first_name)   { order: 2 !important; }
#shipping > div:has(#shipping-last_name)    { order: 3 !important; }
#shipping > div:has(#shipping-shipping-recipient_org_name) {
    order: 4 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
}
#shipping > div:has(#shipping-address_1)    { order: 5 !important; }
#shipping > div:has(#shipping-postcode)     { order: 7 !important; }
#shipping > div:has(#shipping-city)         { order: 8 !important; }
#shipping > div:has(#shipping-phone)        { order: 9 !important; }
#shipping > div:has(#shipping-shipping-recipient_nip) { order: 10 !important; }


/* ============ SEKCJA PŁATNIKA (#billing) ============ */

/* Ukryj CAŁE wrappery Imię/Nazwisko + duplikaty odbiorcy */
#billing > div:has(#billing-first_name),
#billing > div:has(#billing-last_name),
#billing > div:has(#billing-shipping-recipient_org_name),
#billing > div:has(#billing-shipping-recipient_nip) {
    display: none !important;
}

/* Nazwa płatnika jako pierwsze pole, pełna szerokość */
#billing > div:has(#billing-billing-payer_org_name) {
    order: 1 !important;
    flex: 1 1 100% !important;
    width: 100% !important;
}
#billing > div:has(#billing-address_1)  { order: 2 !important; }
#billing > div:has(#billing-postcode)   { order: 4 !important; }
#billing > div:has(#billing-city)       { order: 5 !important; }
#billing > div:has(#billing-billing-payer_nip) { order: 6 !important; }

#billing > div:has(#billing-phone) {
    display: none !important;
}

/* kolejność pól */

#shipping .wc-block-components-address-form__address_2-toggle {
    order: 6 !important;
}

#billing .wc-block-components-address-form__address_2-toggle {
    order: 4 !important;
}

ut__terms   { order: 6 !important; }
.wc-block-checkout__actions { order: 7 !important; }

/* ukrycie kraju */ 
.wc-block-components-country-input {
    display: none !important;
}

/* zdjecia na stronie produktu */ 
.gallery-columns-3 {
    display: flex !important;
    gap: 12px;
    margin: 0 0 24px 0 !important;
}
.gallery-columns-3 .gallery-item {
    width: 33.333% !important;
    margin: 0 !important;
    float: none !important;
}
.gallery-columns-3 .gallery-icon {
    width: 100%;
}
.gallery-columns-3 .gallery-icon img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* mobile - slider */
@media (max-width: 767px) {
    .gallery-columns-3 {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    .gallery-columns-3 .gallery-item {
        width: 100% !important;
        flex: 0 0 100% !important;
        scroll-snap-align: center;
    }
}

.gallery-dots {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

@media (max-width: 767px) {
    .gallery-dots {
        display: flex;
    }
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E7E1D2;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gallery-dot.active {
    background: #20232A;
}

/* Chowamy domyślny link "Zobacz koszyk" pod przyciskiem - tekst przenosi się do przycisku */
.products a.added_to_cart.wc-forward {
    display: none !important;
}

.add_to_cart_button.kodujmata-view-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gallery{
    display: grid !important;
    gap: 1.5em 2%;
    margin: 0 0 1.5em !important;
    float: none !important;
}
.gallery.gallery .gallery-item{
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    min-width: 0 !important;
    width: auto !important;
}
.gallery.gallery .gallery-item img{
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.gallery.gallery-columns-1{ grid-template-columns: repeat(1, 1fr) !important; }
.gallery.gallery-columns-2{ grid-template-columns: repeat(2, 1fr) !important; }
.gallery.gallery-columns-3{ grid-template-columns: repeat(3, 1fr) !important; }
.gallery.gallery-columns-4{ grid-template-columns: repeat(4, 1fr) !important; }
.gallery.gallery-columns-5{ grid-template-columns: repeat(5, 1fr) !important; }
.gallery.gallery-columns-6{ grid-template-columns: repeat(6, 1fr) !important; }
.gallery.gallery-columns-7{ grid-template-columns: repeat(7, 1fr) !important; }
.gallery.gallery-columns-8{ grid-template-columns: repeat(8, 1fr) !important; }
.gallery.gallery-columns-9{ grid-template-columns: repeat(9, 1fr) !important; }

@media (max-width: 767px){
    .gallery.gallery-columns-1,
    .gallery.gallery-columns-2,
    .gallery.gallery-columns-3,
    .gallery.gallery-columns-4,
    .gallery.gallery-columns-5,
    .gallery.gallery-columns-6,
    .gallery.gallery-columns-7,
    .gallery.gallery-columns-8,
    .gallery.gallery-columns-9{
        grid-template-columns: none !important;
        grid-auto-flow: column !important;
        grid-auto-columns: 85% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 0 6px !important;
    }
}

/* === Koszyk boczny (Elementor Menu Cart) - przyciski stopki === */
.elementor-menu-cart__footer-buttons,
.elementor-menu-cart__checkout-buttons {
    display: flex;
    gap: 12px;
}

.elementor-menu-cart__footer-buttons a,
.elementor-menu-cart__checkout-buttons a,
.elementor-menu-cart__view-cart-button,
.elementor-menu-cart__checkout-button {
    flex: 1 1 0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    line-height: 1;
    padding: 0 12px;
    border-radius: 999px; /* pełne zaokrąglenie, jak "Dodaj do koszyka" */
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

/* === Koszyk boczny (Elementor Menu Cart) - przyciski stopki === */
.elementor-menu-cart__footer-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.elementor-menu-cart__footer-buttons a.elementor-button {
    width: 100%;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 400px) {
    .elementor-menu-cart__footer-buttons a.elementor-button {
        font-size: 12px;
        padding: 0 6px;
    }
}

/* Zobacz koszyk - secondary, outline navy */
.elementor-menu-cart__footer-buttons a.elementor-button--view-cart {
    background-color: transparent;
    border: 2px solid #00324E;
    color: #00324E;
}
.elementor-menu-cart__footer-buttons a.elementor-button--view-cart:hover {
    background-color: #00324E;
    color: #fff;
}

/* Zamówienie - primary, zielony (spójny z "Dodaj do koszyka") */
.elementor-menu-cart__footer-buttons a.elementor-button--checkout {
    background-color: #00852B;
    border: 2px solid #00852B;
    color: #fff;
}
.elementor-menu-cart__footer-buttons a.elementor-button--checkout:hover {
    background-color: #006D22;
}



/* === Komunikat "dodano do koszyka" na stronie produktu === */
.woocommerce-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
    max-width: 1200px; /* dopasuj do realnej szerokości kontenera headera */
    margin: 0 auto 30px;
    padding: 16px 24px;
    background-color: #F5F5F5;
    border: none;
    border-radius: 20px;
    text-align: left;
    font-size: 16px;
    line-height: 1.6;
}

/* Tekst komunikatu - może się skurczyć, ale nigdy nie znika pod przyciskiem */
.woocommerce-message {
    color: #333;
}

.woocommerce-message::before {
    position: static;
    flex-shrink: 0;
    margin-right: 10px;
    color: #00852B;
}

/* Przycisk "Zobacz koszyk" */
.woocommerce-message a.button.wc-forward {
    flex-shrink: 0;
    background-color: transparent;
    border: 1px solid #00852B;
    color: #00852B;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    padding: 10px 20px;
    height: auto;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.woocommerce-message a.button.wc-forward:hover {
    background-color: #00852B;
    color: #fff;
}

/* Mobile: komunikat + przycisk w kolumnie, przycisk wyśrodkowany */
@media (max-width: 767px) {
    .woocommerce-message {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 16px 20px;
    }

    .woocommerce-message a.button.wc-forward {
        align-self: center;
        margin-top: 8px;
    }
}