/* ==========================================================
   NeoParts Product UI 1.1.40 — katalog / kategorie / wyniki
   Przeniesione i oczyszczone z WordPress → Dodatkowy CSS.
   Ceny należą do NeoParts Pricing.
   ========================================================== */

/* Kategoria „Powietrza” */
body.term-powietrza .hero-section .ct-container{
    padding-top:10px!important;
    padding-bottom:10px!important;
}
body.term-powietrza .hero-section .entry-header::before{
    content:"";
    display:block;
    width:480px;
    max-width:100%;
    height:120px;
    background-image:url("https://neoparts.pl/wp-content/uploads/2026/09/Grafika-filtry.png");
    background-size:contain;
    background-repeat:no-repeat;
    background-position:left center;
    margin-bottom:10px;
    margin-left:-20px;
}
body.term-powietrza .hero-section .page-description,
body.term-powietrza .hero-section .term-description{
    display:none!important;
}
body.term-powietrza .products{
    transform:translateY(-35px);
}
body.term-powietrza .woocommerce-ordering{
    transform:translateY(-45px);
}

/* Sortowanie — tylko poza własną listą NeoParts */
body:not(.np-product-list-active) .woocommerce-ordering{
    max-width:100%;
}
body:not(.np-product-list-active) .woocommerce-ordering select{
    width:270px!important;
    max-width:100%;
    min-width:0!important;
    height:50px!important;
    padding:0 16px!important;
    background:#fff;
    color:#1f252b;
    border:1px solid #d8dde3;
    border-radius:6px;
    box-shadow:none;
    font-size:16px!important;
    line-height:normal;
    text-align:center!important;
    text-align-last:center!important;
    box-sizing:border-box;
}
body:not(.np-product-list-active) .woocommerce-ordering select:focus{
    border-color:#ff7900;
    outline:none;
}
body.term-powietrza:not(.np-product-list-active) .woocommerce-ordering select{
    min-width:195px!important;
    padding:7px 38px 13px 14px!important;
    font-size:14px!important;
}

/* Kategorie WooCommerce */
.woocommerce li.product-category .woocommerce-loop-category__title{
    display:none!important;
}
.woocommerce li.product-category{
    transition:transform .25s ease,box-shadow .25s ease;
}
.woocommerce li.product-category:hover{
    transform:translateY(-8px);
    box-shadow:0 10px 25px rgba(0,0,0,.10);
}
.woocommerce ul.products li.product-category .ct-media-container img{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
}

/* Standardowe kafelki produktów. Własny NP Product List ma swój CSS. */
body:not(.np-product-list-active) .woocommerce ul.products li.product:not(.product-category){
    text-align:center;
    transition:transform .25s ease,box-shadow .25s ease;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product:not(.product-category):hover{
    transform:translateY(-8px);
    box-shadow:0 10px 25px rgba(0,0,0,.10);
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .woocommerce-loop-product__title{
    width:100%;
    min-height:62px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    text-align:center!important;
    font-size:16px!important;
    font-weight:600!important;
    line-height:1.3!important;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .woocommerce-loop-product__title a{
    font-size:inherit!important;
    font-weight:inherit!important;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .price,
body:not(.np-product-list-active) .woocommerce ul.products li.product .ct-woo-card-stock{
    width:100%;
    text-align:center!important;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .price{
    margin-top:0!important;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .ct-woo-card-actions{
    width:100%;
    justify-content:center!important;
}
body:not(.np-product-list-active) .woocommerce ul.products li.product .ct-woo-card-actions .button{
    margin-left:auto!important;
    margin-right:auto!important;
}

/* Nagłówek „Kategorie produktów” na stronie Sklep */
body.woocommerce-shop .site-main::before{
    content:"";
    display:block;
    width:1120px;
    max-width:calc(100% - 40px);
    height:190px;
    background-image:url("https://neoparts.pl/wp-content/uploads/2026/09/Kategorie-produktow-bez-tla.png");
    background-size:560px auto;
    background-repeat:no-repeat;
    background-position:left center;
    margin:0 auto -35px auto;
    transform:translateX(-40px);
}

/* Wyniki wyszukiwania nie dostają grafiki „Kategorie produktów”. */
body.search.woocommerce .site-main::before{
    content:none!important;
    display:none!important;
}
body.search.woocommerce:not(.np-product-list-active) ul.products li.product .woocommerce-loop-product__title{
    min-height:2.8em!important;
    line-height:1.4!important;
}

@media (max-width:600px){
    body.tax-product_cat:not(.np-product-list-active) ul.products{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:28px 16px!important;
    }
    body.tax-product_cat:not(.np-product-list-active) ul.products li.product{
        min-width:0;
        width:100%!important;
        margin:0!important;
    }
    body.tax-product_cat:not(.np-product-list-active) ul.products li.product .woocommerce-loop-product__title{
        min-height:4.2em!important;
        font-size:15px!important;
        line-height:1.4!important;
    }
    body.tax-product_cat:not(.np-product-list-active) ul.products li.product .price{
        font-size:16px!important;
    }
    body.tax-product_cat:not(.np-product-list-active) .ct-woo-card-actions .button{
        min-width:0!important;
        width:100%;
        padding:10px 6px!important;
        font-size:13px!important;
        line-height:1.3;
        box-sizing:border-box;
    }
    body.tax-product_cat:not(.np-product-list-active) .ct-woo-card-stock .stock{
        font-size:12px;
        line-height:1.4;
    }
}

/* ==========================================================
   NeoParts Product UI 1.2.17 — wspólny katalog desktop + kafelki mobile
   ========================================================== */

/* Delikatne uniesienie produktów na desktopie. */
@media (hover:hover) and (pointer:fine) and (min-width:701px){
    body.np-product-list-active .np-list-card{
        transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease!important;
    }
    body.np-product-list-active .np-list-card:hover{
        transform:translateY(-4px)!important;
        border-color:#d0d5dd!important;
        box-shadow:0 10px 24px rgba(16,24,40,.09)!important;
    }

    body:not(.np-product-list-active) .woocommerce ul.products li.product:not(.product-category),
    body.single-product .upsells.products ul.products li.product,
    body.single-product .related.products ul.products li.product{
        transition:transform .18s ease,box-shadow .18s ease!important;
    }
    body:not(.np-product-list-active) .woocommerce ul.products li.product:not(.product-category):hover,
    body.single-product .upsells.products ul.products li.product:hover,
    body.single-product .related.products ul.products li.product:hover{
        transform:translateY(-4px)!important;
        box-shadow:0 10px 24px rgba(16,24,40,.09)!important;
    }
}

/* Jakość produktu w poziomym widoku desktopowym. */
body.np-product-list-active .np-list-card__quality{
    margin-top:1px;
    color:#667085;
    font-size:13px;
    line-height:1.4;
    text-align:left!important;
}
body.np-product-list-active .np-list-card__quality strong{
    color:#344054;
    font-weight:600;
}

/* Badge WYPRZEDANE — kolory NeoParts bez mylenia go z CTA. */
.woocommerce .np-sold-out-badge,
.woocommerce .out-of-stock-badge.np-sold-out-badge,
.woocommerce [class*="out-of-stock"].np-sold-out-badge{
    background:#20262d!important;
    color:#fff!important;
    border:1px solid #FF7900!important;
    border-radius:4px!important;
    box-shadow:none!important;
}

/* Mobile pozostaje kafelkowy także w podkategoriach i wynikach wyszukiwania.
   Natywny markup Woo/Blocksy jest zachowany w DOM, a własny wiersz NeoParts
   jest na telefonie ukryty. */
@media (max-width:700px){
    body.np-product-list-active ul.products,
    body.np-product-list-active .products,
    body.np-product-list-active .ct-products-container ul.products,
    body.np-product-list-active .ct-products-container .products{
        display:grid!important;
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:28px 16px!important;
        width:100%!important;
        max-width:100%!important;
        margin-left:0!important;
        margin-right:0!important;
    }

    body.np-product-list-active ul.products>li.product:not(.product-category),
    body.np-product-list-active .products>li.product:not(.product-category){
        display:block!important;
        grid-column:auto!important;
        width:100%!important;
        min-width:0!important;
        max-width:100%!important;
        margin:0!important;
        padding:0!important;
        text-align:center!important;
        overflow:visible!important;
    }

    /* Przywrócenie natywnych elementów kafelka ukrytych na desktopie. */
    body.np-product-list-active ul.products>li.product:not(.product-category)>*:not(.np-list-card),
    body.np-product-list-active .products>li.product:not(.product-category)>*:not(.np-list-card){
        display:revert!important;
    }
    body.np-product-list-active .np-list-card{
        display:none!important;
    }

    body.np-product-list-active .woocommerce-loop-product__title,
    body.np-product-list-active .ct-product-title{
        display:flex!important;
        align-items:flex-start!important;
        justify-content:center!important;
        width:100%!important;
        min-height:4.2em!important;
        margin-left:auto!important;
        margin-right:auto!important;
        text-align:center!important;
        font-size:15px!important;
        line-height:1.4!important;
    }
    body.np-product-list-active .woocommerce-loop-product__title a,
    body.np-product-list-active .ct-product-title a{
        width:100%!important;
        text-align:center!important;
    }

    body.np-product-list-active ul.products li.product .price,
    body.np-product-list-active ul.products li.product .neoparts-price,
    body.np-product-list-active ul.products li.product .np-price,
    body.np-product-list-active ul.products li.product .ct-woo-card-stock,
    body.np-product-list-active ul.products li.product .np-status-block{
        width:100%!important;
        margin-left:auto!important;
        margin-right:auto!important;
        text-align:center!important;
        align-items:center!important;
        justify-content:center!important;
    }

    body.np-product-list-active ul.products li.product .ct-woo-card-actions{
        display:flex!important;
        align-items:stretch!important;
        justify-content:center!important;
        width:100%!important;
    }
    body.np-product-list-active ul.products li.product .ct-woo-card-actions .button,
    body.np-product-list-active ul.products li.product .np-inquiry-button--loop{
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:100%!important;
        min-width:0!important;
        min-height:56px!important;
        padding:10px 8px!important;
        box-sizing:border-box!important;
        text-align:center!important;
        line-height:1.25!important;
    }

    /* Mniejsze i czytelniejsze sortowanie. */
    body.np-product-list-active .woocommerce-ordering{
        width:min(100%,240px)!important;
        max-width:240px!important;
        margin-left:auto!important;
        margin-right:auto!important;
    }
    body.np-product-list-active .woocommerce-ordering select,
    body.np-product-list-active .woocommerce-ordering select.orderby{
        width:100%!important;
        min-height:44px!important;
        height:44px!important;
        padding:0 14px!important;
        font-size:14px!important;
        line-height:44px!important;
        text-align:center!important;
        text-align-last:center!important;
    }
}


/* ==========================================================
   NeoParts Product UI 1.2.18 — kategorie bez tymczasowych kafelków podkategorii
   ========================================================== */

body.tax-product_cat.np-product-list-active ul.products>li.product-category,
body.tax-product_cat.np-product-list-active .products>li.product-category{
    display:none!important;
}

@media (hover:hover) and (pointer:fine) and (min-width:701px){
    .wc-block-grid__product,
    .wp-block-woocommerce-product-template .wc-block-product,
    .wp-block-woocommerce-product-collection .wc-block-product,
    .wp-block-woocommerce-product-template>li.product{
        transition:transform .18s ease,box-shadow .18s ease!important;
    }
    .wc-block-grid__product:hover,
    .wp-block-woocommerce-product-template .wc-block-product:hover,
    .wp-block-woocommerce-product-collection .wc-block-product:hover,
    .wp-block-woocommerce-product-template>li.product:hover{
        transform:translateY(-4px)!important;
        box-shadow:0 10px 24px rgba(16,24,40,.09)!important;
    }
}
