/* =============================================================
 * SIDEBAR V2 — Premium redesign per user mandate 2026-05-29.
 * Active selektor: .gk-shop-sidebar-v2.gk-archive-sidebar (2 classes)
 * Hardcoded hex (na wypadek var() scope issues).
 * ============================================================= */

.gk-shop-sidebar-v2.gk-archive-sidebar {
	background: #FFFFFF;
	border-radius: 16px;
	box-shadow: 0 4px 12px rgba(31, 61, 20, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
	padding: 22px 20px 24px;
	font-family: 'Inter', system-ui, sans-serif;
}
@media (min-width: 1024px) {
	.gk-shop-sidebar-v2.gk-archive-sidebar {
		position: sticky;
		/* FIX 2026-05-30 (v2): sidebar przykleja się PONIŻEJ sticky toolbara (top 80 + wys 77
		   = spód 157px; +16px gap → 173px). Wcześniej top:96px → toolbar (z-index 30, blur)
		   zasłaniał górne ~61px sidebara przy scrollu. max-height z 16px buforem na dole. */
		top: 173px;
		max-height: calc(100vh - 189px);
		overflow-y: auto;
		scrollbar-width: thin;
		scrollbar-color: #5DA935 rgba(15,30,15,0.06);
	}
	.gk-shop-sidebar-v2.gk-archive-sidebar::-webkit-scrollbar { width: 8px; }
	.gk-shop-sidebar-v2.gk-archive-sidebar::-webkit-scrollbar-track { background: rgba(15,30,15,0.05); border-radius: 4px; }
	.gk-shop-sidebar-v2.gk-archive-sidebar::-webkit-scrollbar-thumb {
		background: #5DA935;
		border-radius: 4px;
	}
	.gk-shop-sidebar-v2.gk-archive-sidebar:hover::-webkit-scrollbar-thumb {
		background: #4F9028;
	}
}

/* Header */
.gk-shop-sidebar-v2 .gk-archive-sidebar__header {
	display: block;
	margin: 0 0 14px;
	padding: 0;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__eyebrow {
	display: block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #4F9028;
	margin: 0 0 4px;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__title {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 22px;
	font-weight: 700;
	color: #1F3D14;
	margin: 0;
	letter-spacing: -0.01em;
	line-height: 1.1;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__active-count {
	background: #5DA935;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 800;
	margin-left: 8px;
}

/* Product count */
.gk-shop-sidebar-v2__count {
	font-size: 12.5px;
	color: #5A6354;
	margin: 0 0 18px;
	padding: 0 0 14px;
	border-bottom: 1px solid rgba(15, 30, 15, 0.06);
}
.gk-shop-sidebar-v2__count strong {
	color: #1F3D14;
	font-weight: 800;
}

/* Chips bar — refresh */
.gk-shop-sidebar-v2 .gk-archive-sidebar__applied {
	padding: 0 0 18px;
	margin: 0 0 16px;
	border-bottom: 1px solid rgba(15, 30, 15, 0.06);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__chip {
	background: #1F3D14;
	border: 0;
	color: #FFFFFF;
	font-size: 12px;
	font-weight: 700;
	padding: 7px 10px 7px 12px;
	border-radius: 9999px;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__chip:hover {
	background: #5DA935;
	color: #FFFFFF;
	border-color: transparent;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__chip svg { opacity: 0.85; }
.gk-shop-sidebar-v2 .gk-archive-sidebar__clear-all {
	font-size: 11px;
	font-weight: 700;
	color: #DC2626;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin: 0;
	padding: 0;
	text-decoration: none;
	border-bottom: 1px solid #DC2626;
	align-self: flex-start;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__clear-all:hover {
	color: #B91C1C;
	border-color: #B91C1C;
}

/* Section dividers */
.gk-shop-sidebar-v2 .gk-archive-sidebar__group {
	border: 0;
	padding: 18px 0 0;
	margin: 18px 0 0;
	border-top: 1px solid rgba(15, 30, 15, 0.06);
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__group:first-of-type {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__group-title {
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #4F9028;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__group-badge {
	background: #5DA935;
	color: #FFFFFF;
	font-size: 10px;
	font-weight: 800;
	padding: 2px 7px;
	border-radius: 9999px;
	margin-left: auto;
}

/* Kategorie — left border active state */
.gk-shop-sidebar-v2 .gk-archive-sidebar__list { gap: 0; }
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li {
	border-left: 3px solid transparent;
	border-radius: 0 8px 8px 0;
	transition: background .15s ease, border-color .15s ease;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li:hover {
	background: #FAF8F4;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li.current-cat {
	border-left-color: #5DA935;
	background: rgba(93, 169, 53, 0.06);
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li a {
	display: flex !important;
	align-items: center;
	justify-content: space-between !important;
	gap: 10px;
	padding: 9px 12px !important;
	color: #1F3D14 !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	background: transparent !important;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li.current-cat a {
	color: #4F9028 !important;
	font-weight: 700 !important;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li .count,
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li a .count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 22px;
	padding: 0 7px;
	background: #F0EDE5;
	color: #5A6354;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li.current-cat .count {
	background: #5DA935;
	color: #FFFFFF;
}

/* Pills (Szybkie filtry) */
.gk-shop-sidebar-v2__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.gk-shop-sidebar-v2__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	background: #FAF8F4;
	border: 1.5px solid #ECE6DC;
	border-radius: 9999px;
	color: #1F3D14;
	font-family: 'Inter', sans-serif;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease, transform .15s ease;
	min-height: 36px;
	box-sizing: border-box;
}
.gk-shop-sidebar-v2__pill:hover {
	background: #FFFFFF;
	border-color: #5DA935;
	color: #4F9028;
	transform: translateY(-1px);
}
.gk-shop-sidebar-v2__pill.is-active {
	background: #5DA935;
	border-color: #5DA935;
	color: #FFFFFF;
}
.gk-shop-sidebar-v2__pill.is-active:hover {
	background: #4F9028;
	border-color: #4F9028;
	color: #FFFFFF;
}
.gk-shop-sidebar-v2__pill svg {
	flex-shrink: 0;
	opacity: 0.9;
}

/* Hide stale toggle markup if present somewhere */
.gk-shop-sidebar-v2 .gk-archive-sidebar__toggle { display: none !important; }

/* Cena — usuń WC default "FILTRUJ" button + premium track */
.gk-shop-sidebar-v2 .price_slider_amount .button,
.gk-shop-sidebar-v2 .price_slider_amount button {
	display: none !important;
}
.gk-shop-sidebar-v2 .price_slider_wrapper { margin-top: 8px; }
.gk-shop-sidebar-v2 .price_slider_amount {
	font-family: 'Inter', sans-serif;
	font-size: 12.5px;
	color: #5A6354;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
}
.gk-shop-sidebar-v2 .price_slider_amount .price_label {
	color: #1F3D14;
	font-weight: 700;
}
.gk-shop-sidebar-v2 .price_slider_wrapper {
	padding: 0 12px;
}
.gk-shop-sidebar-v2 .ui-slider {
	background: #ECE6DC !important;
	height: 4px !important;
	border-radius: 9999px !important;
	border: 0 !important;
	margin: 16px 0 14px !important;
	position: relative;
}
.gk-shop-sidebar-v2 .ui-slider-range {
	background: #5DA935 !important;
	height: 4px !important;
	border-radius: 9999px !important;
}
.gk-shop-sidebar-v2 .ui-slider-handle {
	width: 18px !important;
	height: 18px !important;
	background: #FFFFFF !important;
	border: 2px solid #5DA935 !important;
	border-radius: 50% !important;
	top: -8px !important;
	margin-left: -9px !important;
	box-shadow: 0 2px 8px rgba(31, 61, 20, 0.20) !important;
	cursor: grab;
	transition: transform .15s ease, box-shadow .15s ease;
}
.gk-shop-sidebar-v2 .ui-slider-handle:hover,
.gk-shop-sidebar-v2 .ui-slider-handle:active {
	transform: scale(1.15);
	box-shadow: 0 4px 14px rgba(93, 169, 53, 0.40);
}

/* Layered nav (atrybuty) — WAŻNE: WC renderuje `<a>Nie</a> <span class="count">(8)</span>`
   gdzie count to SIBLING `<a>`, NIE child. Flex na <li>, NIE na <a>, by uniknąć overlap. */
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item {
	display: flex !important;
	align-items: center;
	justify-content: space-between !important;
	gap: 10px;
	padding: 9px 12px !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	transition: background .15s ease;
	min-width: 0;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li:hover,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item:hover {
	background: #FAF8F4 !important;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li.chosen,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item.chosen {
	background: rgba(93, 169, 53, 0.10) !important;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li > a,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item > a {
	display: inline-block !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	color: #1F3D14 !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 13.5px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color .15s ease;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li:hover > a,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item:hover > a {
	color: #4F9028 !important;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li.chosen > a,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item.chosen > a {
	color: #4F9028 !important;
	font-weight: 700 !important;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li > .count,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item > .count {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 26px;
	height: 22px;
	padding: 0 7px;
	background: #F0EDE5;
	color: #5A6354;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	letter-spacing: 0;
}
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list li.chosen > .count,
.gk-shop-sidebar-v2 .woocommerce-widget-layered-nav-list__item.chosen > .count {
	background: #5DA935;
	color: #FFFFFF;
}

/* Reset CTA — emerald outline na dole */
.gk-shop-sidebar-v2 .gk-archive-sidebar__reset {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 24px;
	padding: 12px 18px;
	background: transparent;
	color: #1F3D14;
	border: 1.5px solid #1F3D14;
	border-radius: 9999px;
	font-family: 'Inter', sans-serif;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__reset:hover {
	background: #1F3D14;
	color: #FFFFFF;
	transform: translateY(-1px);
}

/* Mobile — drawer pattern fully kept (existing). V2 override w drawer mode */
@media (max-width: 1023px) {
	.gk-shop-sidebar-v2.gk-archive-sidebar {
		border-radius: 24px 24px 0 0;
		padding-top: 32px;
	}
}

/* =============================================================
 * SIDEBAR V2.1 — Trim per user mandate 2026-05-29.
 * Tylko Kategorie + Cena + CTAs (Filtruj + Wyczyść).
 * ============================================================= */

/* Hide removed sections */
.gk-shop-sidebar-v2 .gk-archive-sidebar__header,
.gk-shop-sidebar-v2__count,
.gk-shop-sidebar-v2__quick,
.gk-shop-sidebar-v2 [data-sidebar-group^="attribute-"],
.gk-shop-sidebar-v2 .gk-archive-sidebar__reset {
	display: none !important;
}

/* Kategorie — naprawa count overlap: label nowrap + ellipsis, count flex-shrink:0 */
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li {
	min-width: 0;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li a {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 10px 12px !important;
	min-width: 0;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li a .gk-archive-sidebar__list-label {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}
.gk-shop-sidebar-v2 .gk-archive-sidebar__list li a .count {
	flex-shrink: 0;
	margin-left: auto;
}

/* CTAs: Filtruj + Wyczyść — sticky bottom of sidebar */
.gk-shop-sidebar-v2__ctas {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid rgba(15, 30, 15, 0.06);
}
.gk-shop-sidebar-v2__filter-btn {
	all: unset;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 13px 18px;
	background: #1F3D14;
	color: #FFFFFF;
	border-radius: 9999px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
	box-shadow: 0 4px 12px rgba(31, 61, 20, 0.18);
	box-sizing: border-box;
	text-align: center;
}
.gk-shop-sidebar-v2__filter-btn:hover,
.gk-shop-sidebar-v2__filter-btn:focus-visible {
	background: #5DA935;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(31, 61, 20, 0.28);
	outline: none;
}
.gk-shop-sidebar-v2__filter-btn svg {
	flex-shrink: 0;
}
.gk-shop-sidebar-v2__clear-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	background: transparent;
	color: #5A6354;
	border-radius: 9999px;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .2s ease, background .2s ease;
}
.gk-shop-sidebar-v2__clear-btn:hover,
.gk-shop-sidebar-v2__clear-btn:focus-visible {
	color: #DC2626;
	background: rgba(220, 38, 38, 0.06);
	outline: none;
}

/* =============================================================
 * SIDEBAR V2.2 — Checkbox filters per user mandate 2026-05-29.
 * Custom checkbox UI (native input hidden, fake box rendered),
 * multi-select kategorii + Promocje + Bestsellery + price range.
 * ============================================================= */

/* Form wrapper */
.gk-shop-sidebar-v2__form {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
}

/* Hide stara lista kategorii (renderowana w gk-archive-sidebar__list) — używamy gk-shop-sidebar-v2__check-list */
.gk-shop-sidebar-v2 .gk-archive-sidebar__list,
.gk-shop-sidebar-v2 .gk-archive-sidebar__more,
.gk-shop-sidebar-v2 .price_slider_wrapper {
	display: none !important;
}

/* Check list */
.gk-shop-sidebar-v2__check-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.gk-shop-sidebar-v2__check-row {
	margin: 0;
	padding: 0;
}
.gk-shop-sidebar-v2__check-label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 8px;
	cursor: pointer;
	transition: background .15s ease;
	min-width: 0;
}
.gk-shop-sidebar-v2__check-label:hover {
	background: #FAF8F4;
}

/* Native input hidden, focus state delegated to fake box */
.gk-shop-sidebar-v2__check-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

/* Fake checkbox box */
.gk-shop-sidebar-v2__check-box {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	background: #FFFFFF;
	border: 1.5px solid #C8CFC2;
	border-radius: 6px;
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
	color: #FFFFFF;
}
.gk-shop-sidebar-v2__check-box svg {
	opacity: 0;
	transform: scale(.6);
	transition: opacity .15s ease, transform .15s ease;
}

/* Checked state */
.gk-shop-sidebar-v2__check-input:checked + .gk-shop-sidebar-v2__check-box {
	background: #5DA935;
	border-color: #5DA935;
}
.gk-shop-sidebar-v2__check-input:checked + .gk-shop-sidebar-v2__check-box svg {
	opacity: 1;
	transform: scale(1);
}

/* Focus a11y */
.gk-shop-sidebar-v2__check-input:focus-visible + .gk-shop-sidebar-v2__check-box {
	box-shadow: 0 0 0 3px rgba(93, 169, 53, 0.30);
	border-color: #5DA935;
}

/* Label text — flex grow + ellipsis (no overlap) */
.gk-shop-sidebar-v2__check-text {
	flex: 1 1 auto;
	min-width: 0;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	color: #1F3D14;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: -0.005em;
}
.gk-shop-sidebar-v2__check-input:checked ~ .gk-shop-sidebar-v2__check-text {
	color: #4F9028;
	font-weight: 700;
}

/* Count badge — far right, flex-shrink:0 */
.gk-shop-sidebar-v2__check-count {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 22px;
	padding: 0 7px;
	background: #F0EDE5;
	color: #5A6354;
	border-radius: 9999px;
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 700;
	margin-left: 4px;
}
.gk-shop-sidebar-v2__check-input:checked ~ .gk-shop-sidebar-v2__check-count {
	background: #5DA935;
	color: #FFFFFF;
}

/* Price inputs */
.gk-shop-sidebar-v2__price-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}
.gk-shop-sidebar-v2__price-input {
	flex: 1 1 0;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 0 10px;
	background: #FAF8F4;
	border: 1.5px solid #ECE6DC;
	border-radius: 10px;
	transition: border-color .2s ease, background .2s ease;
	height: 40px;
	box-sizing: border-box;
}
.gk-shop-sidebar-v2__price-input:focus-within {
	border-color: #5DA935;
	background: #FFFFFF;
}
.gk-shop-sidebar-v2__price-input input {
	flex: 1 1 0;
	min-width: 0;
	border: 0;
	background: transparent;
	outline: none;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #1F3D14;
	padding: 0;
	-moz-appearance: textfield;
}
.gk-shop-sidebar-v2__price-input input::-webkit-outer-spin-button,
.gk-shop-sidebar-v2__price-input input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.gk-shop-sidebar-v2__price-input span {
	flex-shrink: 0;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #8A9282;
}
.gk-shop-sidebar-v2__price-sep {
	flex-shrink: 0;
	color: #8A9282;
	font-weight: 700;
	font-size: 14px;
}
