/* ==============================================================
   1. Ustawienia siatki strony (Szerokość kolumny i układ Flex)
   ============================================================== */

body.archive #page #content .ast-container, 
body.blog #page #content .ast-container,
body.search #page #content .ast-container,
body.search-results #page #content .ast-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

body.archive #page #content .ast-container #primary, 
body.blog #page #content .ast-container #primary,
body.search #page #content .ast-container #primary,
body.search-results #page #content .ast-container #primary { 
    width: 80%; 
    border: 0;
}

body.search #content .ast-container #primary,
body.search-results #content .ast-container #primary {
    margin-top: 0;
    padding-top: 0;
}

/* ==============================================================
   2. Główny kontener paginacji (Wspólny dla Sklepu, Bloga i Szukajki)
   ============================================================== */
.woocommerce-pagination ul.page-numbers,
.ast-pagination .nav-links,
.top-pagination .nav-links {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end !important; /* Wyrównanie do prawej */
    gap: 8px;
    list-style: none !important;
    padding: 0 !important;
    margin: 30px 0 !important;
    width: 100% !important;
    background: none !important;
    border: none !important;
}

body.archive #primary h1.page-title, 
body.blog #primary h1,
body.search #primary h1.page-title,
body.search #primary h1,
body.search-results #primary h1.page-title,
body.search-results #primary h1 {
    border-bottom: 2px solid #f49717;
    color: #000;
    font-size: 30px;
    text-transform: none;
    font-weight: 700;
    padding-bottom: 3px;
    margin-bottom: 15px !important;
    margin-top: 28px;
}

body.archive #primary .ast-shop-toolbar-container, 
body.blog #primary .ast-shop-toolbar-container,
body.search #primary .ast-shop-toolbar-container,
body.search-results #primary .ast-shop-toolbar-container {
    flex-direction: row-reverse;
    width: 40%;
    float: left;
}

.woocommerce .woocommerce-pagination ul.page-numbers, 
.woocommerce-page .woocommerce-pagination ul.page-numbers {
    margin-top: 0px !important;
}

body #primary #main .woocommerce-pagination {
    width: 60%;
    float: right;
}

body.archive #primary .ast-shop-toolbar-container select, 
body.blog #primary .ast-shop-toolbar-container select,
body.search #primary .ast-shop-toolbar-container select,
body.search-results #primary .ast-shop-toolbar-container select {
    border: 1px solid #ccc;
    border-radius: 30px;
    background-clip: padding-box;
    padding: 6px 10px;
    float: left;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger, 
body.blog #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger {
    color: #f49717;
    background: #FFF;
    width: 45px;
    height: 45px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 38px;
    border: 5px solid #ebebeb;
    padding: 0;
    font-size: 14px;
    border-radius: 50%;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active, 
body.blog #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active {
    background: #ebebeb;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover {
    background: #ebebeb;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover svg,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover svg,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger:hover svg {
    fill: #f49717;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger svg,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger svg,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger svg {
    fill: #dbdbdb;
    width: 14px;
}

body.archive #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active svg,
body.search #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active svg,
body.search-results #primary .ast-shop-toolbar-container .ast-products-view .ast-view-trigger.active svg {
    fill: #f49717;
}

/* ==============================================================
   3. Reset struktury WooCommerce (usunięcie tła z <li>)
   ============================================================== */
.woocommerce-pagination ul.page-numbers li {
    display: inline-flex !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ==============================================================
   4. Domyślne SZARE KÓŁKO dla każdej strony (Wspólne dla A i SPAN)
   ============================================================== */
.woocommerce-pagination .page-numbers,
.ast-pagination .page-numbers, 
.top-pagination .page-numbers {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    background-color: #EEEEEE !important;
    color: #000 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    border-radius: 50% !important; /* Okrągły kształt */
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

/* ==============================================================
   5. Wygląd AKTYWNEJ strony - KSZTAŁT LITERY "D"
   ============================================================== */
.woocommerce-pagination .page-numbers.current,
.ast-pagination .page-numbers.current,
.top-pagination .page-numbers.current {
    background-color: #F39C12 !important; /* Pomarańczowy */
    color: #FFF !important;
    border-radius: 0 21px 21px 0 !important; /* Lewa prosta, prawa zaokrąglona */
    width: 48px !important;
}

/* ==============================================================
   6. WIELOKROPEK (Bez tła i obramowań)
   ============================================================== */
.woocommerce-pagination .page-numbers.dots,
.ast-pagination .page-numbers.dots,
.top-pagination .page-numbers.dots {
    background-color: transparent !important;
    width: auto !important;
    color: #000 !important;
    border-radius: 0 !important;
}

/* ==============================================================
   7. Przycisk Następna / Poprzednia (Biały, Gruba Ramka)
   ============================================================== */
.woocommerce-pagination .page-numbers.next,
.ast-pagination .page-numbers.next,
.top-pagination .page-numbers.next,
.woocommerce-pagination .page-numbers.prev,
.ast-pagination .page-numbers.prev,
.top-pagination .page-numbers.prev {
    background-color: #FFF !important;
    border: 4px solid #EEEEEE !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

/* ==============================================================
   8. Unifikacja strzałek
   ============================================================== */
.page-numbers.next::after {
    content: "\276F" !important; /* Gruba strzałka w prawo ❯ */
    font-size: 18px !important;
    color: #000 !important;
}
.page-numbers.prev::after {
    content: "\276E" !important; /* Gruba strzałka w lewo ❮ */
    font-size: 18px !important;
    color: #000 !important;
}

/* Ukrycie wszelkich wewnętrznych ikon motywu */
.page-numbers.next *, 
.page-numbers.prev * {
    display: none !important;
}

/* ==============================================================
   9. Efekty po najechaniu myszką (Hover)
   ============================================================== */
a.page-numbers:hover {
    background-color: #DDDDDD !important;
}
a.page-numbers.next:hover,
a.page-numbers.prev:hover {
    border-color: #DDDDDD !important;
    background-color: #FFF !important;
}

/* Ukrycie starego tekstu "Wyświetlanie 1–12 z..." */
.woocommerce-result-count {
    display: none !important;
}

/* Sortowanie do prawej krawędzi */
.ast-shop-toolbar-container {
    justify-content: flex-end !important;
}

/* Usunięcie pustego "wrapper'a" w Astrze */
.ast-shop-toolbar-aside-wrap:has(.woocommerce-result-count) {
    display: none !important;
}

/* Licznik w tytule */
h1 .wm-title-count {
    font-weight: 400;
    color: #999;
    font-size: 0.8em;
    display: inline-block;
}
#primary #main .woocommerce-products-header .wm-title-count {
    font-size: 14px;
    font-weight: 400;
    font-style: normal;
    position: relative;
    top: -2px;
}

body.woocommerce.ast-woocommerce-shop-page-list-view #page ul.products:not(.elementor-grid) {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ast-woocommerce-shop-page-list-view #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ast-woocommerce-shop-page-list-view #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .price {
    order: 3;
}

.ast-woocommerce-shop-page-list-view #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .ast-woo-shop-product-description {
    order: 2;
}

.ast-woocommerce-shop-page-list-view #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .ast-loop-product__link {
    order: 1;
}

body.ast-woocommerce-shop-page-list-view #page #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .price bdi {
    font-size: 18px;
}
body.ast-woocommerce-shop-page-list-view #page #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .ast-woo-shop-product-description p {
    font-size: 12px;
}
body.ast-woocommerce-shop-page-list-view #page #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .ast-loop-product__link h2 {
    font-size: 24px;
    line-height: 30px;
}
.ast-woocommerce-shop-page-list-view #content #primary .products .ast-grid-common-col.ast-full-width .astra-shop-summary-wrap .woocommerce-loop-product__title {
    height: auto;
    margin: 0;
}

/* ==============================================================
   10. Wpisy blogowe na archiwach
   ============================================================== */
.archive #page #primary article.type-post.post, 
.blog #page #primary article.type-post.post,
.search #page #primary article.type-post.post,
.search-results #page #primary article.type-post.post {
    padding: 22px;
    border-width: 1px 0;
    border: 5px solid #eee;
    margin-bottom: 20px;
    cursor: pointer;
    overflow: visible;
    box-shadow: none;
    position: relative;
}

.archive #page #primary article.type-post.post .ast-blog-featured-section, 
.blog #page #primary article.type-post.post .ast-blog-featured-section,
.search #page #primary article.type-post.post .ast-blog-featured-section,
.search-results #page #primary article.type-post.post .ast-blog-featured-section {
    height: 210px;
}

.archive #page #primary article.type-post.post h2 a, 
.blog #page #primary article.type-post.post h2 a,
.search #page #primary article.type-post.post h2 a,
.search-results #page #primary article.type-post.post h2 a {
    font-size: 24px;
    text-transform: uppercase;
}

.archive #page #primary article.type-post.post p, 
.blog #page #primary article.type-post.post p,
.search #page #primary article.type-post.post p,
.search-results #page #primary article.type-post.post p {
    font-size: 12px;
}

.archive #page #primary article.type-post.post .ast-blog-featured-section img, 
.blog #page #primary article.type-post.post .ast-blog-featured-section img,
.search #page #primary article.type-post.post .ast-blog-featured-section img,
.search-results #page #primary article.type-post.post .ast-blog-featured-section img {
    object-fit: contain;
}

.archive #page #primary .ast-archive-description, 
.blog #page #primary .ast-archive-description,
.search #page #primary .ast-archive-description,
.search-results #page #primary .ast-archive-description {
    padding-left: 0;
    padding-bottom: 0;
}

.archive #primary #main .top-pagination, 
.blog #primary #main .top-pagination,
.search #primary #main .top-pagination,
.search-results #primary #main .top-pagination {
    width: 50%;
    float: right;
}

.archive #primary #main .custom-post-archive-toolbar .archive-filters-form, 
.blog #primary #main .custom-post-archive-toolbar .archive-filters-form,
.search #primary #main .custom-post-archive-toolbar .archive-filters-form,
.search-results #primary #main .custom-post-archive-toolbar .archive-filters-form {
    display: flex;
    flex-direction: column;
}

.archive #primary #main .custom-post-archive-toolbar .archive-filters-form p, 
.blog #primary #main .custom-post-archive-toolbar .archive-filters-form p,
.search #primary #main .custom-post-archive-toolbar .archive-filters-form p,
.search-results #primary #main .custom-post-archive-toolbar .archive-filters-form p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #3A3A3A;
}

.archive #page #primary.content-area.primary, 
.blog #page #primary.content-area.primary,
.search #page #primary.content-area.primary,
.search-results #page #primary.content-area.primary {
    padding-left: 20px;
}

.archive #page #primary.content-area.primary .ast-archive-description, 
.blog #page #primary.content-area.primary .ast-archive-description,
.search #page #primary.content-area.primary .ast-archive-description,
.search-results #page #primary.content-area.primary .ast-archive-description {
    margin: 0;
    padding: 0;
}

.archive #page #secondary .sidebar-main .widget > p, 
.blog #page #secondary .sidebar-main .widget > p,
.search #page #secondary .sidebar-main .widget > p,
.search-results #page #secondary .sidebar-main .widget > p {
    display: none;
}

.archive #page #primary article.type-post.post:after, 
.blog #page #primary article.type-post.post:after,
.search #page #primary article.type-post.post:after,
.search-results #page #primary article.type-post.post:after {
    background: url(/wp-content/uploads/2026/08/prod_arrow.png);
    position: absolute;
    z-index: 10;
    bottom: -5px !important;
    right: -5px !important;
    content: "";
    width: 47px;
    height: 47px;
    background-color: white;
}

.archive #page #primary article.type-post.post:hover,
.search #page #primary article.type-post.post:hover,
.search-results #page #primary article.type-post.post:hover {
    border: 5px solid #f49717;
    padding: 22px !important;
}

/* ==============================================================
   11. KAFELKI PRODUKTÓW NA STRONIE WYNIKÓW WYSZUKIWANIA
   (Dopasowanie siatki produktów w szukajce do stylu kategorii)
   ============================================================== */

/* Styl pojedynczego kafelka produktu w siatce */
body.search #primary article.product,
body.search #primary article.type-product,
body.search-results #primary article.product,
body.search-results #primary article.type-product {
    overflow: visible !important;
    box-shadow: none !important;
}
body.search #primary .ast-row{
	column-gap: 20px;
}
body.search #secondary {
    margin: 0 !important;
    margin-right: 10px !important;
}

body.search #primary article.product .ast-article-inner,
body.search #primary article.type-product .ast-article-inner,
body.search-results #primary article.product .ast-article-inner,
body.search-results #primary article.type-product .ast-article-inner{
	box-shadow: none;
	padding: 0;
}

body.search #primary article.product .ast-article-inner .post-thumb-img-content,
body.search #primary article.type-product .ast-article-inner .post-thumb-img-content,
body.search-results #primary article.product .ast-article-inner .post-thumb-img-content,
body.search-results #primary article.type-product .ast-article-inner .post-thumb-img-content{
	width: 100%;
}
	
body.search #primary article.product,
body.search #primary article.type-product,
body.search-results #primary article.product,
body.search-results #primary article.type-product {
    background: #fff;
	max-width: 260px;
    border: 5px solid #eee;
    padding: 15px;
    position: relative;
    cursor: pointer;
    overflow: visible;
    box-sizing: border-box;
    height: 100%;
	height: 404px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease-in-out;
}

/* Hover na kafelek produktu */
body.search #primary article.product:hover .ast-article-inner,
body.search #primary article.type-product:hover .ast-article-inner,
body.search-results #primary article.product:hover .ast-article-inner,
body.search-results #primary article.type-product:hover .ast-article-inner {
    border-color: #f49717;
}

/* Pomarańczowa strzałka w prawym dolnym rogu */
body.search #primary article.product .ast-article-inner:after,
body.search #primary article.type-product .ast-article-inner:after,
body.search-results #primary article.product .ast-article-inner:after,
body.search-results #primary article.type-product .ast-article-inner:after {
    background: url(/wp-content/uploads/2026/08/prod_arrow.png) no-repeat center center / contain;
    position: absolute;
    z-index: 10;
    bottom: -5px !important;
    right: -5px !important;
    content: "";
    width: 47px;
    height: 47px;
}

/* Zdjęcie produktu */
body.search #primary article.product .ast-blog-featured-section,
body.search #primary article.product .post-thumb-img-content,
body.search #primary article.type-product .ast-blog-featured-section,
body.search #primary article.type-product .post-thumb-img-content,
body.search-results #primary article.product .ast-blog-featured-section,
body.search-results #primary article.product .post-thumb-img-content,
body.search-results #primary article.type-product .ast-blog-featured-section,
body.search-results #primary article.type-product .post-thumb-img-content {
    height: 210px;
    max-height: 210px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

body.search #primary article.product .post-thumb-img-content a,
body.search #primary article.type-product .post-thumb-img-content a,
body.search-results #primary article.product .post-thumb-img-content a,
body.search-results #primary article.type-product .post-thumb-img-content a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

body.search #primary article.product .post-thumb-img-content a img,
body.search #primary article.type-product .post-thumb-img-content a img,
body.search-results #primary article.product .post-thumb-img-content a img,
body.search-results #primary article.type-product .post-thumb-img-content a img {
    height: 100%;
    width: 100%;
    max-height: 210px;
    object-fit: contain;
}

/* Tytuł produktu (nagłówek H2) - identyczny z kategorią: 14px uppercase */
body.search #primary article.product h2.entry-title,
body.search #primary article.type-product h2.entry-title,
body.search-results #primary article.product h2.entry-title,
body.search-results #primary article.type-product h2.entry-title {
    margin-top: 0;
    margin-bottom: 10px;
    height: 80px;
    overflow: hidden;
}

body.search #primary article.product h2.entry-title a,
body.search #primary article.type-product h2.entry-title a,
body.search-results #primary article.product h2.entry-title a,
body.search-results #primary article.type-product h2.entry-title a {
    text-transform: uppercase;
    line-height: 20px;
    font-size: 14px;
    color: #000;
    font-weight: 500;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 450px) {
    body.search #primary article.product h2.entry-title,
    body.search #primary article.type-product h2.entry-title,
    body.search-results #primary article.product h2.entry-title,
    body.search-results #primary article.type-product h2.entry-title {
        height: fit-content;
    }
}

/* Ukrycie niepotrzebnego tekstu (zajawki) oraz zbędnych metadanych */
body.search #primary article.product .ast-excerpt-container,
body.search #primary article.type-product .ast-excerpt-container,
body.search-results #primary article.product .ast-excerpt-container,
body.search-results #primary article.type-product .ast-excerpt-container,
body.search #primary article.product .entry-meta,
body.search #primary article.type-product .entry-meta,
body.search-results #primary article.product .entry-meta,
body.search-results #primary article.type-product .entry-meta,
body.search #primary article.product .onsale,
body.search-results #primary article.product .onsale {
    display: none !important;
}

/* ==============================================================
   12. Responsywność i Media Queries
   ============================================================== */
@media(max-width: 1455px){
    body.archive #page #content .ast-container #primary, 
    body.blog #page #content .ast-container #primary,
    body.search #page #content .ast-container #primary,
    body.search-results #page #content .ast-container #primary {
        width: calc(100% - 280px);
    }
}

@media(max-width: 1435px){
    body #primary #main .woocommerce-pagination {
        width: 100%;
    }
    body.archive #page #content .ast-container #primary,
    body.search #page #content .ast-container #primary,
    body.search-results #page #content .ast-container #primary {
        width: calc(100% - 280px);
    }
}

@media(max-width: 1270px){
    body.archive #page #content .ast-container #primary,
    body.search #page #content .ast-container #primary,
    body.search-results #page #content .ast-container #primary {
        width: calc(100% - 280px);
    }
}

@media(max-width: 1167px){
    body #page #content .woocommerce ul.products:not(.elementor-grid), 
    .woocommerce-page ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width: 875px){
    body #page #content #primary #main .woocommerce ul.products:not(.elementor-grid), 
    .woocommerce-page ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    body.archive #page #content .ast-container #primary, 
    body.blog #page #content .ast-container #primary,
    body.search #page #content .ast-container #primary,
    body.search-results #page #content .ast-container #primary {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ast-shop-toolbar-container {
        justify-content: center !important;
    }
    .custom-post-archive-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media(max-width: 650px){
    body #page #content #primary #main .woocommerce ul.products:not(.elementor-grid), 
    .woocommerce-page ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media(max-width: 450px){
    body #page #content #primary #main .woocommerce ul.products:not(.elementor-grid), 
    .woocommerce-page ul.products:not(.elementor-grid) {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

.custom-post-archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 2em;
    padding-bottom: 15px;
    gap: 25px;
}

.custom-post-archive-toolbar .archive-results-count {
    margin: 0;
    font-size: 16px;
    color: #8C8C8C;
}

.custom-post-archive-toolbar .archive-filters-form {
    display: flex;
    gap: 0px;
    margin: 0;
}

.custom-post-archive-toolbar select {
    font-size: 12px;
    outline: none;
    cursor: pointer;
    border: none;
    background: none;
    box-shadow: none;
    font-weight: 600;
    color: #3A3A3A;
    padding: 0;
}

#page #primary .term-description p {
    font-size: 12px;
    color: #000;
    line-height: 24px;
}
#page #primary .term-description li{
    font-size: 12px;
}

#page #primary .term-description h2 {
    font-size: 14px;
    font-weight: 700;
    margin: 30px 0 20px;
    padding-bottom: 5px;
    color: #000;
    text-transform: none;
    width: fit-content;
    border-bottom: 2px solid #f49717;
    padding-right: 15px;
}

body.search #page #content .ast-container #primary, body.search-results #page #content .ast-container #primary{
	width: 78%;
}
.search-results #page #content article.product .ast-search-product-price del{
	margin-top: -10px;
}
.search-results #page #content article.product .ast-search-product-price > .woocommerce-Price-amount > bdi{
	color: #f49717;
}