.produkty {
	padding: 65px 0;
	background: #fafafa;
}

.produkty>.container>.produkty-layout-wrapper>.flex-container {
	gap: 45px;
}

.produkty .sidebar {
	width: 275px;
}

.produkty .content {
	width: calc(100% - 320px);
}

.product-sidebar a {
    text-decoration: none;
    color: #333;
}

/* --- Nagłówek i breadcrumbs --- */
.sidebar-header {
    margin-bottom: 2rem;
}

.main-title {
    color: var(--KTI-GREY, #363844);
   	margin: 0 auto 8px auto;
	/* Desktop/Headers/h2 */
	font-family: Archivo;
	font-size: 45px;
	font-style: normal;
	font-weight: 400;
	line-height: 130%; /* 58.5px */
	letter-spacing: -1.35px;
    text-transform: uppercase;
}

.subcategories li a {
    padding-left: 35px !important;
}

.breadcrumbs {
	margin: 0 auto 64px auto;
}
.breadcrumbs a {
    color: var(--KTI-GREY, var(--KTI-LIGHT-GREY, #D7D7D7));
	font-family: Inter;
	font-size: 16px;
	font-style: normal;
	font-weight: 300;
	line-height: 145%; /* 27.55px */
	letter-spacing: -0.38px;
}
.breadcrumbs span {
    color: var(--KTI-GREY, #363844);
	font-family: Inter;
	font-size: 19px;
	font-style: normal;
	font-weight: 300;
	line-height: 145%;
	letter-spacing: -0.38px;
}

/* --- Pole wyszukiwania --- */
.search-section {
    border-bottom: 1px solid #363844;
    margin: 0 auto 0 auto;
}

.search-section + p {
    color: var(--gray-gray-200, #B9B9B9);
    font-family: Inter;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
    padding: 0 10px;
    margin: 10px auto 40px auto;
}

.search-form {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-field {
    width: 100%;
    border: none;
    padding: 15px 12px;
    color: var(--KTI-GREY, #363844);
	leading-trim: both;
    background: transparent;
	text-edge: cap;
	font-family: Inter;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 140%; /* 22.4px */
	letter-spacing: -0.48px;
}

.search-field::placeholder {
    color: var(--KTI-GREY, #363844);
	leading-trim: both;
	text-edge: cap;
	font-family: Inter;
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 140%; /* 22.4px */
	letter-spacing: -0.48px;
}

.search-submit {
    background: none;
    border: none;
    cursor: pointer;
    padding-right: 12px;
}

.search-submit svg {
    width: 12px;
	height: 12px;
	aspect-ratio: 1/1;
}

/* Ukrycie domyślnej etykiety */
.screen-reader-text {
    display: none;
}

/* --- Struktura Harmonijki --- */

.accordion-header {
    width: 100%;
    padding: 15px 12px;
    color: #363844;
	font-family: Inter;
	font-size: 16px;
	font-style: normal;
	text-align: left;
	background: none;
	border: none;
	font-weight: 400;
	line-height: 140%; /* 22.4px */
	letter-spacing: -0.48px;
	display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #363844;
}

.accordion-icon {
    font-size: 1.5rem;
    font-weight: normal;
    transition: transform 0.3s ease;
}

.accordion-icon svg + svg {
    display: none;
}

/* Stan aktywny - ikona minusa */
.accordion-header.active svg {
    display: none;
}

.accordion-header.active svg + svg {
    display: block;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-content li a {
    display: block;
    padding: 15px 12px;
    color: var(--KTI-GREY, #363844);
	leading-trim: both;
	text-edge: cap;
	font-family: Inter;
	font-size: 12px;
	font-style: normal;
	font-weight: 300;
	line-height: 140%; /* 16.8px */
	letter-spacing: -0.36px;
	border-bottom: 0.5px solid var(--KTI-GREY, #363844);
}

.accordion-content li a:hover {
    color: #000; /* Kolor linku po najechaniu */
}

/* --- Główny kontener strony produktów --- */
.produkty-container {
    display: flex;
    gap: 30px; /* Odstęp między sidebarem a listingiem */
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.produkty-sidebar {
    width: 280px; /* Szerokość paska bocznego */
    flex-shrink: 0;
}

.produkty-listing {
    flex-grow: 1;
}

.produkty-listing h2 {
	margin: 0 auto;
}

/* --- Siatka dla kart --- */
.listing-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* --- Ogólny styl kart --- */
.card {
    display: block;
    flex-basis: calc(33.3% - 20px);
    max-width: calc(33.3% - 20px);
    text-decoration: none;
    color: #333;
    transition: 300ms;
}

.card-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1/1;
}

.placeholder-image {
    color: #aaa;
}

.card-content {
    padding: 15px 0;
    text-align: left;
}

/* --- Style dla kart kategorii --- */
.category-card .parent-category-name {
    color: var(--KTI-GREY, #363844);
    margin: 0 auto;
	font-family: Inter;
	font-size: 14px;
	font-style: normal;
	font-weight: 300;
	line-height: 150%;
}

.category-card .child-category-name {
    color: var(--KTI-GREY, #363844);
	font-family: Inter;
	font-size: 19px;
	font-style: normal;
	font-weight: 400;
	line-height: 145%; /* 27.55px */
	letter-spacing: -0.38px;
	margin: 0 auto;
}

/* --- Style dla kart produktów --- */
.product-card .product-category-path {
    color: var(--KTI-GREY, #363844);
    margin: 0 auto;
	font-family: Inter;
	font-size: 14px;
	font-style: normal;
	font-weight: 300;
	line-height: 150%;
}

.product-card .product-name {
    color: var(--KTI-GREY, #363844);
	font-family: Inter;
    margin: 0 auto;
	font-size: 19px;
	font-style: normal;
	font-weight: 400;
	line-height: 145%; /* 27.55px */
	letter-spacing: -0.38px;
}

/* --- Styl dla aktywnego linku w sidebarze --- */
.accordion-content li a.active {
    font-weight: 500;
    color: #000; /* Przykładowy kolor aktywnego linku */
}

/* --- Style dla Paginacji --- */
.produkty-listing .pagination {
	margin-top: 40px;
	text-align: right;
	display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px; /* Dodaje odstęp między przyciskami a numerami */
}

.produkty-listing .pagination .page-numbers {
	padding: 0 15px; /* Minimalnie zmniejszony padding dla lepszego dopasowania */
	color: var(--KTI-LIGHT-GREY, #D7D7D7);
	font-family: Archivo;
	font-size: 19px;
	font-style: normal;
	font-weight: 400;
	height: 36px;
	line-height: 36px;
	transition: color 300ms ease;
    display: inline-block; /* Zapewnia prawidłowe wymiary */
    text-decoration: none;
}

.produkty-listing .pagination .page-numbers:hover {
	color: var(--KTI-GREY, #363844);
}

.produkty-listing .pagination .page-numbers.current {
	color: var(--KTI-GREY, #363844);
	font-weight: bold; /* Wyróżnienie aktywnej strony */
}

/* Styl dla strzałek (linków prev/next) */
.produkty-listing .pagination .prev,
.produkty-listing .pagination .next {
    padding: 0; /* Usuwamy padding, bo strzałki mają własny rozmiar */
}

/* --- Styl dla co 7-go elementu na siatce (desktop) --- */

/* Używamy media query, aby efekt był widoczny tylko na ekranach
   o szerokości 1024px lub większej, gdzie 4 kolumny mają sens. */
/* --- Styl dla co 7-go elementu na siatce (wersja 3-kolumnowa) --- */

/* Używamy media query, aby efekt był widoczny tylko na ekranach
   o szerokości 768px lub większej, gdzie 3 kolumny mają sens. */
@media (min-width: 768px) {
    .listing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .listing-grid > .card .card-image-wrapper {
        width: 100%;
    }

    .listing-grid > .card .card-content {
        width: 100%;
        text-align: left;
        padding: 20px 0;
    }

     .listing-grid:has(.card:hover) > .card {
        flex-basis: calc(28% - 20px);
        max-width: calc(28% - 20px);
      }

      /* a TĘ pod kursorem — POWIĘKSZ */
      .listing-grid:has(.card:hover) > .card:hover {
        flex-basis: calc(44% - 20px);
        max-width: calc(44% - 20px);
      }
}

/* === STYLE DLA WERSJI MOBILNEJ FILTRÓW === */

/* Przycisk otwierający filtry - domyślnie ukryty */
.mobile-filter-trigger {
    display: none; /* Pokażemy go tylko na mobile */
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: #363844;
    color: #fff;
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    text-align: center;border-radius: 60px;
    line-height: 50px;
}

.sidebar-mobile {display: none;}

/* Przycisk zamykający wewnątrz sidebara - domyślnie ukryty */
.close-sidebar-button {
    display: none; /* Pokażemy go tylko na mobile w otwartym sidebarze */
    position: absolute;
    top: 10px;
    right: 0;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #333;
    cursor: pointer;
}

/* === MEDIA QUERY DLA MOBILE (< 992px) === */
@media (max-width: 991px) {
    .produkty > .container > .produkty-layout-wrapper > .flex-container {
        flex-direction: column;
    }

    .sidebar-header {
        position: relative;
    }

    .produkty .sidebar {
        width: 100%;
        margin-top: 50px;
    }

    .close-sidebar-button {
        display: block;
    }

    .product-sidebar .accordion-menu{
        height: 70%;
        overflow-y: scroll;
    }

    .product-sidebar {
        position: fixed;
        background: #fff;
        width: 100%;
        left: 0;
        padding: 100px 15px 20px 15px;
        top: -100vh;
        height: 100dvh;
        transition: 300ms;
        z-index: 999;
    }

    .breadcrumbs {
        display: none !important;
    }

    .produkty .content {
        width: 100%;
    }

    .sidebar-mobile {
        display: block;
    }

    .sidebar-is-open .product-sidebar {
        top: 0;
    }

    .card {
        flex-basis: calc(50% - 20px);
        max-width: calc(50% - 20px);
    }

    .listing-grid .card:first-of-type,
    .listing-grid .card:nth-child(10n) {
        flex-basis: calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
}