/* Strona kategorii (odwzorowanie brendz.com) */

.pbc__list--always { display: flex; }
.pbc__inner { min-height: 40px; padding-block: 0; }

/* ---------- Baner ---------- */
.chero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 155px;
	overflow: hidden;
	background: #1d2a1a;
	color: #fff;
	isolation: isolate;
}
@media (min-width: 768px) { .chero { min-height: 256px; } }
.chero .chero__image { position: absolute; inset: 0; z-index: -2; width: 100%; max-width: none; height: 100%; object-fit: cover; }
.chero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 70%); }
.chero--plain { background: linear-gradient(120deg, #1d2a1a, #2f6b3a); }
.chero__inner { padding-block: 24px; }
.chero__title { margin: 0 0 12px; font-family: "Baloo 2", var(--font); font-size: 26px; font-weight: 700; line-height: 1.25; color: #fff; }
@media (min-width: 768px) { .chero__title { margin-bottom: 17.5px; font-size: 35px; line-height: 43.75px; } }
.chero__text { max-width: 540px; margin: 0; font-size: 14px; line-height: 22.4px; color: #fff; }
.chero__title--plain { margin: 32px 0 0; color: #1a1b1d; }

/* ---------- Układ ---------- */
.catalog { display: block; padding-block: 24px 56px; }
@media (min-width: 992px) {
	.catalog { display: grid; grid-template-columns: 318px minmax(0, 1fr); column-gap: 32px; align-items: start; padding-top: 42px; }
	.catalog--nofilters { display: block; }
}

/* Filtry */
.catalog__sidebar { background: #fff; border-radius: 7px; padding: 21px; box-shadow: 0 4.2px 21.35px -5.25px rgba(0, 0, 0, 0.1); }
.catalog__sidebar-close { display: none; }
@media (max-width: 991px) {
	.catalog__sidebar {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 1100; width: min(340px, 100%); overflow-y: auto; border-radius: 0;
		transform: translateX(-100%); visibility: hidden; transition: transform 0.3s ease, visibility 0s 0.3s;
	}
	.catalog__sidebar.is-open { transform: none; visibility: visible; transition: transform 0.3s ease; }
	.catalog__sidebar-close { position: absolute; top: 10px; right: 10px; display: flex; padding: 8px; border: 0; background: none; color: var(--text-soft); cursor: pointer; }
	.catalog__sidebar .filters { padding-top: 24px; }
	.catalog__backdrop { position: fixed; inset: 0; z-index: 1099; background: rgba(15, 20, 30, 0.45); opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s 0.3s; }
	.catalog__backdrop.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s ease; }
}
@media (min-width: 992px) { .catalog__backdrop { display: none; } }

.filters__group { padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.filters__group:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filters__heading { display: flex; align-items: center; justify-content: space-between; min-height: 40px; font-size: 16px; font-weight: 700; line-height: 26px; color: #1a1b1d; list-style: none; cursor: pointer; }
.filters__heading::-webkit-details-marker { display: none; }
.filters__arrow { width: 16px; height: 10px; background: #1a1b1d; -webkit-mask: url("../img/icons/chevron-down.svg") center / contain no-repeat; mask: url("../img/icons/chevron-down.svg") center / contain no-repeat; transition: transform 0.2s ease; }
.filters__group[open] .filters__arrow { transform: rotate(180deg); }
.filters__list { padding-top: 6px; }
.fcheck { display: flex; align-items: center; gap: 8px; min-height: 26px; font-size: 14px; line-height: 22px; color: var(--text-soft); text-decoration: none; }
.fcheck:hover { color: var(--green); }
.fcheck__box { flex: none; width: 16px; height: 16px; border: 1px solid #b6bfc8; border-radius: 3px; background: #fff; }
.fcheck.is-active .fcheck__box { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat; }
/* Chipy (Maksymalna jasność) */
.filters__swatches { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 8px; margin: 0; padding: 8px 0 4px; list-style: none; }
.fswatch { display: block; padding: 6px 7px; border: 1px solid var(--border); border-radius: 4px; background: #fff; font-size: 12px; line-height: 18px; color: var(--muted); text-decoration: none; transition: border-color 0.15s, color 0.15s; }
.fswatch:hover { border-color: var(--green); color: var(--green); }
.fswatch.is-active { border-color: var(--green); background: #eaf7ec; color: var(--green); font-weight: 700; }

/* Cena: suwak z dwoma uchwytami + pola */
.filters__price { padding-top: 12px; }
.prange { position: relative; height: 22px; margin: 0 2px 14px; }
.prange::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--border); }
.prange__fill { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--green); }
.prange__in { position: absolute; left: 0; top: 0; width: 100%; height: 22px; margin: 0; padding: 0; background: none; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.prange__in::-webkit-slider-runnable-track { height: 22px; background: none; border: 0; }
.prange__in::-moz-range-track { height: 22px; background: none; border: 0; }
.prange__in::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin-top: 1px; border: 1px solid #d3dbe4; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); cursor: pointer; pointer-events: auto; }
.prange__in::-moz-range-thumb { width: 18px; height: 18px; border: 1px solid #d3dbe4; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); cursor: pointer; pointer-events: auto; }
.prange__in:focus-visible::-webkit-slider-thumb { border-color: var(--green); box-shadow: 0 0 0 3px rgba(43, 176, 57, 0.2); }
.filters__price-row { display: flex; align-items: center; gap: 8px; }
.filters__dash { flex: none; font-size: 14px; color: var(--muted); }
.pinput { display: flex; flex: 1 1 0; min-width: 0; height: 36px; border: 1px solid var(--border-strong); border-radius: 4px; background: #fff; overflow: hidden; }
.pinput:focus-within { border-color: var(--green); }
.pinput__cur { display: flex; align-items: center; padding: 0 8px; border-right: 1px solid var(--border-strong); font-size: 12px; color: var(--text-soft); background: #fff; }
.pinput input { flex: 1; width: 100%; min-width: 0; padding: 0 8px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--text); -moz-appearance: textfield; appearance: textfield; }
.pinput input:focus { outline: 0; }
.pinput input::-webkit-outer-spin-button, .pinput input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.filters__apply { display: inline-block; margin-top: 10px; padding: 0; border: 0; background: none; font: 400 14px/22px var(--font); color: #0d6efd; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.filters__apply:hover { text-decoration: none; }
.filters__clear { display: inline-block; margin-top: 14px; font-size: 14px; color: #0d6efd; }

/* ---------- Pasek narzędzi ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding-bottom: 12px; }
.toolbar__filter { gap: 8px; padding: 10px 16px; }
@media (min-width: 992px) { .toolbar__filter { display: none; } }
.toolbar__amount { order: 3; width: 100%; font-size: 14px; line-height: 21px; color: var(--text); text-align: center; }
@media (min-width: 768px) { .toolbar__amount { order: 0; width: auto; margin-right: auto; text-align: left; } }
.toolbar__sorter { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.toolbar__label { font-size: 14px; line-height: 21px; color: var(--text); }
.toolbar__sorter select {
	height: 48px; padding: 0 38px 0 14px; border: 1px solid #ced4da; border-radius: 3.5px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23373f50' d='M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
	font: inherit; font-size: 14px; color: var(--text); -webkit-appearance: none; appearance: none; cursor: pointer;
}
.toolbar__sorter select:focus { outline: 0; border-color: var(--green); }

/* ---------- Siatka produktów ---------- */
.catalog-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 576px) { .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; } }

.pcard { position: relative; margin-bottom: 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 100px 1fr; gap: 0 14px; align-items: center; padding: 14px 0; }
@media (min-width: 576px) { .pcard { display: block; margin-bottom: 32px; padding: 0; border: 0; } }
.pcard__link { display: block; }
.pcard__media { position: relative; display: block; aspect-ratio: 306 / 250; overflow: hidden; background: #fff; }
.pcard .pcard__img { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; object-fit: contain; transition: opacity 0.3s ease; }
.pcard .pcard__img--hover { opacity: 0; }
@media (hover: hover) { .pcard:hover .pcard__img--hover { opacity: 1; } }

.pcard__body { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
@media (min-width: 576px) { .pcard__body { display: block; margin-top: 8px; padding: 0 16px; } }
.pcard__name { margin: 0; grid-column: 1 / -1; font-family: "Baloo 2", var(--font); font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--text); }
@media (min-width: 576px) { .pcard__name { margin-bottom: 14px; font-size: 21px; line-height: 1.5; } }
@media (min-width: 1200px) { .pcard__name { font-size: 28px; line-height: 42px; } }
.pcard__name a { color: inherit; text-decoration: none; }
.pcard__name a:hover { color: var(--green); }
.pcard__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard__price { font-size: 14px; font-weight: 500; line-height: 24px; color: var(--green); }
@media (min-width: 576px) { .pcard__price { font-size: 16px; } }
.pcard__price del { margin-right: 6px; color: var(--muted); font-weight: 400; }
.pcard__price ins { text-decoration: none; }

.pcard .pcard__buy.button { width: 100%; min-height: 50px; margin-top: 23px; gap: 10px; padding: 16px; }
.pcard__buy .icon { width: 18px; height: 18px; }
@media (max-width: 575px) {
	.pcard .pcard__buy.button { grid-column: 2; grid-row: 2; width: 36px; min-height: 36px; margin: 0; padding: 0; justify-self: end; }
	.pcard__buy-text { display: none; }
	.pcard__body { grid-template-columns: 1fr 36px; }
	.pcard__row { grid-column: 1; grid-row: 2; }
}

.catalog__empty { padding: 32px 0; color: var(--muted); }
.navigation.pagination { margin-top: 8px; }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.navigation.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; color: var(--text); text-decoration: none; }
.navigation.pagination .page-numbers.current { border-color: var(--green); background: var(--green); color: #fff; }

/* ---------- Opis na dole ---------- */
.catalog__desc { margin-top: 48px; }
.catalog-notices { padding-top: 24px; }
.catalog-notices .woocommerce-message,
.catalog-notices .woocommerce-info,
.catalog-notices .woocommerce-error { margin-bottom: 0; }
.catalog-notices + .catalog { padding-top: 16px; }
.catalog__desc h2 { margin: 0 0 14px; font-size: 24px; font-weight: 700; line-height: 1.3; color: #1a1b1d; }
@media (min-width: 768px) { .catalog__desc h2 { font-size: 28px; line-height: 44.8px; } }
.catalog__desc-text { font-size: 14px; line-height: 22.4px; color: var(--text); }
.catalog__desc-text p { margin: 0 0 16px; }
@media (min-width: 768px) {
	.catalog__desc-text { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; align-items: start; }
	.catalog__desc-text > p { margin-bottom: 0; }
	.catalog__desc-text > p:only-child { grid-column: 1 / -1; column-count: 2; column-gap: 28px; }
}

/* Przyciski (specyficzność > styl .button z WooCommerce) */
.pcard .pcard__buy.button,
.toolbar .toolbar__filter.button { background: var(--green); color: #fff; border: 0; font: 700 14px/14px var(--font); text-decoration: none; }
.pcard .pcard__buy.button:hover,
.toolbar .toolbar__filter.button:hover { background: #249a31; color: #fff; }
.toolbar .toolbar__filter.button { display: inline-flex; align-items: center; justify-content: center; }
@media (min-width: 992px) { .toolbar .toolbar__filter.button { display: none; } }
.pcard .pcard__buy.button { display: inline-flex; align-items: center; justify-content: center; }

@media (min-width: 576px) { .catalog-grid { padding-top: 16px; } }
.toolbar__sorter select { height: 51px; }

/* ---------- Przycisk w absolutnym panelu pod kartą (pokazywany po najechaniu, jak w oryginale) ---------- */
@media (min-width: 576px) {
	.pcard { position: relative; transition: box-shadow 0.2s ease-in-out; }
	.pcard:hover, .pcard:focus-within { z-index: 10; box-shadow: 0 4.8px 24.4px -6px rgba(0, 0, 0, 0.1); }
	.pcard__body { position: relative; z-index: 2; padding-bottom: 0; }
	.pcard__panel {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: -1;
		width: 100%;
		padding: 16px;
		border-radius: 0 0 7px 7px;
		background: #fff;
		opacity: 0;
		visibility: hidden;
		transition: all 0.15s ease-in-out;
	}
	.pcard:hover .pcard__panel, .pcard:focus-within .pcard__panel { opacity: 1; visibility: visible; box-shadow: 0 4.8px 24.4px -6px rgba(0, 0, 0, 0.1); }
	.pcard .pcard__buy.button { margin-top: 8px; }
}
/* Ekrany dotykowe (bez najechania): przycisk widoczny pod ceną */
@media (min-width: 576px) and (hover: none) {
	.pcard__panel { position: static; z-index: auto; padding: 16px 16px 0; opacity: 1; visibility: visible; background: none; }
	.pcard:hover, .pcard:focus-within { box-shadow: none; }
}
/* Telefon: wiersz z miniaturą, przycisk-ikona w prawym dolnym rogu wiersza */
@media (max-width: 575px) {
	.pcard { grid-template-areas: "img body" "img buy"; grid-template-columns: 100px 1fr; }
	.pcard__link { grid-area: img; }
	.pcard__body { grid-area: body; display: block; }
	.pcard__body .pcard__row { margin-top: 2px; }
	.pcard__panel { display: contents; }
	.pcard .pcard__buy.button { grid-area: buy; justify-self: end; width: 36px; min-height: 36px; margin: 4px 0 0; padding: 0; }
}

.toolbar { border-bottom: 1px solid var(--border); }

/* Baner tylko ze zdjęciem (np. Mix & Match): naturalne proporcje, bez tytułu */
.chero.chero--image { display: block; min-height: 0; background: none; }
.chero--image::after { display: none; }
.chero.chero--image .chero__img { display: block; width: 100%; max-width: none; height: auto; }

/* ---------- Wyniki wyszukiwania / sklep ---------- */
.catalog--page { padding-top: 24px; }
@media (min-width: 992px) { .catalog--page { padding-top: 40px; } }
.catalog__title { margin: 0 0 15px; font-size: 22px; font-weight: 700; line-height: 1.3; color: #1a1b1d; overflow-wrap: anywhere; }
@media (min-width: 768px) { .catalog__title { margin-top: 16px; font-size: 28px; line-height: 44.8px; } }
.catalog__noresults { padding-block: 14px 24px; }
.catalog__hint { margin: 0; font-size: 14px; line-height: 22.4px; color: var(--muted); }
