/*
 * Styro-Point — nowy wygląd nagłówka, menu i filtrów sklepu.
 * Ładowany z inc/sp-redesign.php. Reguły nagłówka są pod body.sp-redesign,
 * reguły sklepu pod body.sp-catalog (sklep i kategorie).
 * Selektory z #ast-desktop-header / #secondary celowo mają wyższą specyficzność
 * niż „Dodatkowy CSS”, który WordPress drukuje po arkuszach motywu.
 */

body.sp-redesign {
	--sp-orange: #e95d0c;
	--sp-orange-dark: #b9450a;
	--sp-orange-soft: #fff4ec;
	--sp-cta: #c24d0a;
	--sp-cta-hover: #9e3f08;
	--sp-navy: #0f1629;
	--sp-text: #54596a;
	--sp-muted: #646b78;
	--sp-line: #dce3e5;
	--sp-card-line: #d5dce0;
	--sp-field-line: #8a909c;
	--sp-bg: #f7fbfc;
	--sp-head-font: Poppins, Inter, sans-serif;
	--sp-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e95d0c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E");
	--sp-icon-phone-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E");
	--sp-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1629' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.sp-redesign .sp-icon {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	flex: 0 0 auto;
}

.sp-redesign .sp-contact-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--sp-orange-soft) var(--sp-icon-phone) center / 18px no-repeat;
}

/* ================================================================== */
/* Nagłówek — desktop                                                  */
/* ================================================================== */

@media (min-width: 1101px) {
	body.sp-redesign #ast-desktop-header .ast-primary-header-bar {
		background: #fff;
		border-bottom: 0;
	}

	body.sp-redesign #ast-desktop-header .ast-primary-header-bar .site-primary-header-wrap {
		min-height: 84px;
	}

	body.sp-redesign #ast-desktop-header .site-header-primary-section-right {
		gap: 22px;
	}

	body.sp-redesign #ast-desktop-header .ast-header-html-1 {
		flex: 0 0 auto;
	}

	body.sp-redesign #ast-desktop-header .sp-contact,
	body.sp-redesign #ast-desktop-header .sp-contact a {
		white-space: nowrap;
	}

	/* Wyszukiwarka na środku */
	body.sp-redesign #ast-desktop-header .site-header-primary-section-center .widget {
		margin: 0;
	}

	body.sp-redesign #ast-desktop-header .woocommerce-product-search {
		display: flex;
		width: min(520px, 36vw);
	}

	body.sp-redesign #ast-desktop-header .woocommerce-product-search .search-field {
		flex: 1 1 auto;
		height: 46px;
		padding: 0 16px;
		border: 1px solid var(--sp-field-line);
		border-right: 0;
		border-radius: 0;
		background: #fff;
		color: var(--sp-navy);
		font-size: 15px;
	}

	body.sp-redesign #ast-desktop-header .woocommerce-product-search .search-field:focus {
		border-color: var(--sp-orange);
		outline: none;
		box-shadow: inset 0 0 0 1px var(--sp-orange);
	}

	body.sp-redesign #ast-desktop-header .woocommerce-product-search button {
		height: 46px;
		padding: 0 22px;
		border: 0;
		border-radius: 0;
		background: var(--sp-cta);
		color: #fff;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 15px;
	}

	body.sp-redesign #ast-desktop-header .woocommerce-product-search button:hover,
	body.sp-redesign #ast-desktop-header .woocommerce-product-search button:focus-visible {
		background: var(--sp-cta-hover);
	}

	/* Kontakt w wierszu z logo */
	body.sp-redesign #ast-desktop-header .ast-header-html-1 .ast-builder-html-element p {
		margin: 0;
	}

	body.sp-redesign #ast-desktop-header .sp-contact {
		display: flex;
		flex-direction: column;
		gap: 2px;
		line-height: 1.25;
	}

	body.sp-redesign #ast-desktop-header .sp-contact-phone {
		display: flex;
		align-items: center;
		gap: 10px;
		color: var(--sp-navy);
		text-decoration: none;
	}

	body.sp-redesign #ast-desktop-header .sp-contact-text {
		display: flex;
		flex-direction: column;
	}

	body.sp-redesign #ast-desktop-header .sp-contact-label {
		font-size: 12px;
		color: var(--sp-text);
	}

	body.sp-redesign #ast-desktop-header .sp-contact-number {
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 17px;
		color: var(--sp-navy);
	}

	body.sp-redesign #ast-desktop-header .sp-contact-mail {
		display: block;
		padding-left: 46px;
		font-size: 12px;
		color: var(--sp-text);
		text-decoration: none;
	}

	body.sp-redesign #ast-desktop-header .sp-contact a:hover,
	body.sp-redesign #ast-desktop-header .sp-contact a:hover .sp-contact-number {
		color: var(--sp-orange-dark);
	}

	/* Pasek menu */
	body.sp-redesign #ast-desktop-header .ast-below-header-bar {
		background: var(--sp-navy);
		border: 0;
	}

	body.sp-redesign #ast-desktop-header .ast-below-header-bar .site-below-header-wrap {
		min-height: 50px;
	}

	/* inline-flex Astry dodaje 20 px linii bazowej pod menu */
	body.sp-redesign #ast-desktop-header .ast-builder-menu-1 .main-navigation {
		display: flex;
		align-items: center;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu {
		margin: 0;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item {
		margin: 0;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item > .menu-link {
		display: flex;
		align-items: center;
		gap: 6px;
		height: 50px;
		padding: 0 18px;
		line-height: 1;
		text-align: left;
		color: #fff;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 15px;
		white-space: nowrap;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item:first-child > .menu-link {
		padding-left: 0;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item:hover > .menu-link,
	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item.focus > .menu-link,
	body.sp-redesign #ast-desktop-header .main-header-menu > .current-menu-item > .menu-link,
	body.sp-redesign #ast-desktop-header .main-header-menu > .current-menu-parent > .menu-link,
	body.sp-redesign #ast-desktop-header .main-header-menu > .current-menu-ancestor > .menu-link {
		color: #fff;
		box-shadow: inset 0 -3px 0 var(--sp-orange);
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item > .menu-link:focus-visible {
		outline: 2px solid #fff;
		outline-offset: -4px;
	}

	/* Strzałka przy pozycji z podmenu: w jednej linii z napisem */
	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item > .menu-link span.dropdown-menu-toggle,
	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item > .menu-link span.ast-icon {
		display: inline-flex;
		align-items: center;
		margin: 0;
		padding: 0;
	}

	/* Strzałki Astry przed pozycjami podmenu są zbędne */
	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .menu-link > .ast-icon {
		display: none;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu > .menu-item > .menu-link .ast-icon svg {
		width: 10px;
		height: 10px;
		fill: currentColor;
		margin: 0;
	}

	/* Podmenu */
	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu {
		width: 300px;
		padding: 8px 0;
		border: 0;
		border-top: 3px solid var(--sp-orange);
		background: #fff;
		box-shadow: 0 14px 32px rgba(15, 22, 41, 0.16);
	}

	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .menu-item {
		padding: 0;
		margin: 0;
		border: 0;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .menu-link {
		display: block;
		padding: 10px 20px;
		line-height: 1.4;
		text-align: left;
		color: var(--sp-navy);
		font-family: inherit;
		font-weight: 500;
		font-size: 14px;
		white-space: normal;
		box-shadow: none;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .menu-link:hover,
	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .menu-link:focus-visible,
	body.sp-redesign #ast-desktop-header .main-header-menu .sub-menu .current-menu-item > .menu-link {
		background: var(--sp-orange-soft);
		color: var(--sp-orange-dark);
	}

	body.sp-redesign #ast-desktop-header .main-header-menu .sp-menu-akcesoria > .sub-menu,
	body.sp-redesign #ast-desktop-header .main-header-menu .sp-menu-producenci > .sub-menu {
		width: 480px;
		column-count: 2;
		column-gap: 0;
	}

	body.sp-redesign #ast-desktop-header .main-header-menu .sp-menu-akcesoria > .sub-menu > .menu-item,
	body.sp-redesign #ast-desktop-header .main-header-menu .sp-menu-producenci > .sub-menu > .menu-item {
		break-inside: avoid;
	}

	/* „Producenci" to tylko nagłówek podmenu, nie link */
	body.sp-redesign #ast-desktop-header .main-header-menu .sp-menu-producenci > .menu-link {
		cursor: default;
	}
}

/* ================================================================== */
/* Nagłówek — telefon i tablet                                         */
/* ================================================================== */

.sp-redesign .sp-mobile-search {
	display: none;
}

@media (max-width: 1100px) {
	body.sp-redesign #ast-mobile-header .ast-primary-header-bar {
		background: #fff;
		border-bottom: 0;
	}

	.sp-redesign .sp-mobile-search {
		display: block;
		padding: 0 16px 12px;
		background: #fff;
		border-bottom: 1px solid var(--sp-line);
	}

	.sp-redesign .sp-search-form {
		display: flex;
		margin: 0;
	}

	.sp-redesign .sp-search-field {
		flex: 1 1 auto;
		min-width: 0;
		height: 44px;
		padding: 0 14px;
		border: 1px solid var(--sp-field-line);
		border-right: 0;
		border-radius: 0;
		background: #fff;
		color: var(--sp-navy);
		font-size: 16px;
	}

	.sp-redesign .sp-search-field:focus {
		border-color: var(--sp-orange);
		outline: none;
		box-shadow: inset 0 0 0 1px var(--sp-orange);
	}

	.sp-redesign .sp-search-submit {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: var(--sp-cta);
		color: #fff;
	}

	/* Menu: panel wysuwany z prawej na cały ekran */
	body.sp-redesign .ast-mobile-popup-drawer .ast-mobile-popup-inner {
		width: 100%;
		max-width: 100%;
		background: #fff;
	}

	body.sp-redesign .ast-mobile-popup-drawer .ast-mobile-popup-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 60px;
		padding: 0 8px 0 20px;
		border-bottom: 1px solid var(--sp-line);
	}

	body.sp-redesign .ast-mobile-popup-drawer .ast-mobile-popup-header::before {
		content: "Menu";
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 18px;
		color: var(--sp-navy);
	}

	body.sp-redesign .ast-mobile-popup-drawer #menu-toggle-close {
		width: 48px;
		height: 48px;
		color: var(--sp-navy);
	}

	body.sp-redesign .ast-mobile-popup-content {
		padding: 0;
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-header-bar-navigation,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-header-menu {
		width: 100%;
		background: #fff;
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item {
		margin: 0;
		padding: 0;
		border: 0;
		border-bottom: 1px solid var(--sp-line);
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item .menu-link {
		display: block;
		padding: 15px 64px 15px 20px;
		border: 0;
		line-height: 1.35;
		text-align: left;
		color: var(--sp-navy);
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 17px;
	}

	/* Astra pokazuje strzałkę na przycisku z prawej; ta w napisie jest zbędna */
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-link .dropdown-menu-toggle {
		display: none !important;
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item-has-children > .ast-menu-toggle {
		top: 0;
		right: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 56px;
		height: 53px;
		padding: 0;
		line-height: 1;
		color: var(--sp-navy);
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu {
		background: var(--sp-bg);
		border-top: 1px solid var(--sp-line);
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-item:last-child {
		border-bottom: 0;
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .sub-menu .menu-link {
		padding: 13px 20px 13px 36px;
		font-family: inherit;
		font-weight: 500;
		font-size: 15px;
	}

	/* Astra zalewa aktywną pozycję kolorem; tu tylko kolor tekstu i pasek z lewej */
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-item > .menu-link,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-parent > .menu-link,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .menu-link {
		background: transparent;
		color: var(--sp-orange-dark);
		box-shadow: inset 3px 0 0 var(--sp-orange);
	}

	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-parent > .ast-menu-toggle,
	body.sp-redesign.ast-hfb-header .ast-mobile-popup-content .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .ast-menu-toggle {
		background: transparent;
		color: var(--sp-orange-dark);
	}

	/* Kontakt na dole panelu menu */
	body.sp-redesign .ast-mobile-popup-content .ast-header-html-1 {
		width: 100%;
	}

	body.sp-redesign .ast-mobile-popup-content .ast-builder-html-element p {
		margin: 0;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact {
		display: grid;
		gap: 12px;
		padding: 20px;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact-phone {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 52px;
		padding: 8px 12px;
		background: var(--sp-cta);
		color: #fff;
		text-decoration: none;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact-icon {
		width: 22px;
		height: 22px;
		background: var(--sp-icon-phone-white) center / 20px no-repeat;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact-text {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		column-gap: 6px;
		text-align: center;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 16px;
		color: #fff;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact-mail {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-height: 44px;
		color: var(--sp-navy);
		font-size: 15px;
		text-decoration: none;
	}

	body.sp-redesign .ast-mobile-popup-content .sp-contact-mail::before {
		content: "";
		width: 20px;
		height: 20px;
		background: var(--sp-icon-mail) center / 20px no-repeat;
	}
}

/* ================================================================== */
/* Karty produktów (sklep, kategorie, strona główna)                   */
/* ================================================================== */

/* Całe zdjęcie, bez ucinania (PHP podaje rozmiar bez przycinania). Ramka 4:3, bo w sklepie
   są zdjęcia kwadratowe (600×600) i poziome (np. 600×410); obie wyglądają w niej dobrze. */
body.sp-redesign ul.products li.product .astra-shop-thumbnail-wrap .woocommerce-LoopProduct-link {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #fff;
}

body.sp-redesign ul.products li.product .astra-shop-thumbnail-wrap .woocommerce-LoopProduct-link img {
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

/* Jedna cena: „od" + najniższa cena wariantu */
body.sp-redesign ul.products li.product .price {
	color: var(--sp-navy);
	font-family: var(--sp-head-font);
	font-weight: 600;
	font-size: 18px;
	line-height: 1.3;
}

body.sp-redesign ul.products li.product .price .sp-price-from,
body.sp-redesign ul.products li.product .price .woocommerce-price-suffix {
	color: var(--sp-text);
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: 13px;
}

/* Ramka karty */
body.sp-redesign ul.products li.product {
	padding: 12px;
	border: 1px solid var(--sp-card-line);
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.sp-redesign ul.products li.product:hover {
	border-color: var(--sp-field-line);
	box-shadow: 0 8px 22px rgba(15, 22, 41, 0.08);
}

/* Cena i przycisk razem na dole karty (wyrównane w rzędzie), przycisk tuż pod ceną.
   „Dodatkowy CSS" spychał sam przycisk na dół (margin-top: auto) i dawał mu 5em pod spodem. */
body.sp-redesign ul.products li.product.ast-grid-common-col .astra-shop-summary-wrap .price {
	margin: auto 0 0;
	padding-top: 8px;
}

body.sp-redesign ul.products li.product.ast-grid-common-col .astra-shop-summary-wrap .button {
	margin: 12px 0 0;
}

/* Karty mają height: 100% (Dodatkowy CSS), więc odstęp rzędów daje siatka, nie margines */
body.sp-redesign ul.products {
	row-gap: 24px;
}

@media (max-width: 1100px) {
	body.sp-redesign ul.products li.product {
		padding: 8px;
	}
}

/* ================================================================== */
/* Sklep — pasek nad produktami                                        */
/* ================================================================== */

body.sp-catalog .sp-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 20px;
}

body.sp-catalog .sp-toolbar .woocommerce-result-count,
body.sp-catalog .sp-toolbar .woocommerce-ordering {
	float: none;
	margin: 0;
}

body.sp-catalog .sp-toolbar .woocommerce-result-count {
	color: var(--sp-text);
	font-size: 14px;
}

body.sp-catalog .sp-toolbar .woocommerce-ordering select {
	height: 42px;
	padding: 0 36px 0 12px;
	border: 1px solid var(--sp-field-line);
	border-radius: 0;
	background-color: #fff;
	color: var(--sp-navy);
	font-size: 14px;
}

body.sp-catalog .sp-filter-toggle,
body.sp-catalog .sp-chips,
body.sp-catalog .sp-drawer-head,
body.sp-catalog .sp-drawer-foot {
	display: none;
}

body.sp-catalog .sp-filter-toggle[hidden] {
	display: none !important;
}

/* Przycisk „Rozwiń" przy opisie kategorii — tylko na telefonie i tablecie */
body.sp-catalog .sp-archive-desc-toggle,
body.sp-catalog .sp-archive-desc-toggle[hidden] {
	display: none;
}

/* ================================================================== */
/* Sklep — sidebar z kategoriami i filtrami (desktop i panel)          */
/* ================================================================== */

body.sp-catalog #secondary .ast-filter-wrap {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

body.sp-catalog #secondary .ast-filter-wrap .widget {
	margin: 0;
	padding: 0;
	border: 1px solid var(--sp-line);
	background: #fff;
}

body.sp-catalog #secondary .ast-filter-wrap .widget-title {
	margin: 0;
	padding: 14px 16px;
	font-family: var(--sp-head-font);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	color: var(--sp-navy);
}

body.sp-catalog #secondary .ast-filter-wrap .widget-title.sp-has-toggle {
	padding: 0;
}

/* Tytuł grupy oddzielony linią od jej zawartości */
body.sp-catalog #secondary .ast-filter-wrap .widget:not(.sp-collapsed) > .widget-title {
	margin-bottom: 10px;
	border-bottom: 1px solid var(--sp-line);
}

body.sp-catalog #secondary #woocommerce_product_categories-2:not(.sp-collapsed) > .widget-title {
	border-bottom-color: rgba(255, 255, 255, 0.2);
}

body.sp-catalog #secondary .sp-group-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 16px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--sp-navy);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

body.sp-catalog #secondary .sp-group-toggle::after {
	content: "";
	width: 8px;
	height: 8px;
	margin: 0 4px 4px 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}

body.sp-catalog #secondary .widget.sp-collapsed .sp-group-toggle::after {
	transform: rotate(-45deg);
	margin-bottom: 0;
}

body.sp-catalog #secondary .widget.sp-collapsed > :not(.widget-title) {
	display: none;
}

body.sp-catalog #secondary .sp-group-toggle:focus-visible {
	outline: 2px solid var(--sp-orange-dark);
	outline-offset: -3px;
}

body.sp-catalog #secondary .ast-filter-wrap a:focus-visible,
body.sp-catalog .sp-chip:focus-visible,
body.sp-catalog .sp-filter-toggle:focus-visible,
body.sp-catalog .sp-drawer-close:focus-visible,
body.sp-catalog .sp-more-toggle:focus-visible {
	outline: 2px solid var(--sp-orange-dark);
	outline-offset: 2px;
}

body.sp-catalog .sp-drawer-apply:focus-visible {
	outline: 2px solid var(--sp-navy);
	outline-offset: -5px;
	box-shadow: inset 0 0 0 3px #fff;
}

body.sp-catalog #secondary .ast-filter-wrap .widget ul {
	margin: 0;
	padding: 0 16px 14px;
	list-style: none;
}

/* Nadpisuje „line-height: 1.6 !important” z Dodatkowego CSS */
body.sp-catalog #secondary .ast-filter-wrap li {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.35 !important;
}

body.sp-catalog #secondary .ast-filter-wrap li .count {
	margin-left: auto;
	padding-left: 8px;
	color: var(--sp-muted);
	font-size: 13px;
}

/* Kategorie: ciemny blok, aktywna kategoria jako pomarańczowy kafelek */
body.sp-catalog #secondary #woocommerce_product_categories-2 {
	border-color: var(--sp-navy);
	background: var(--sp-navy);
}

body.sp-catalog #secondary #woocommerce_product_categories-2 .widget-title,
body.sp-catalog #secondary #woocommerce_product_categories-2 .sp-group-toggle {
	color: #fff;
}

body.sp-catalog #secondary #woocommerce_product_categories-2 .sp-group-toggle:focus-visible,
body.sp-catalog #secondary #woocommerce_product_categories-2 a:focus-visible {
	outline-color: #fff;
}

body.sp-catalog #secondary .ast-filter-wrap #woocommerce_product_categories-2 ul.product-categories {
	padding: 0 8px 10px;
}

body.sp-catalog #secondary .product-categories li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0 0 2px;
}

body.sp-catalog #secondary .product-categories li > a {
	flex: 1 1 0;
	min-width: 0;
	padding: 8px 8px 8px 10px;
	color: #fff;
	text-decoration: none;
}

body.sp-catalog #secondary .ast-filter-wrap .product-categories li .count {
	padding: 0 10px 0 6px;
	color: #aab2c0;
}

body.sp-catalog #secondary .product-categories li:not(.current-cat):hover {
	background: rgba(255, 255, 255, 0.08);
}

body.sp-catalog #secondary .product-categories li.current-cat {
	background: var(--sp-cta);
}

body.sp-catalog #secondary .product-categories li.current-cat > a,
body.sp-catalog #secondary .ast-filter-wrap .product-categories li.current-cat > .count {
	color: #fff;
	font-weight: 600;
}

body.sp-catalog #secondary .ast-filter-wrap .product-categories ul.children {
	display: none;
	flex: 1 0 100%;
	padding: 2px 0 4px 12px;
	background: var(--sp-navy);
}

body.sp-catalog #secondary .ast-filter-wrap .product-categories .current-cat > ul.children,
body.sp-catalog #secondary .ast-filter-wrap .product-categories .current-cat-parent > ul.children {
	display: block;
}

body.sp-catalog #secondary .product-categories .children a {
	font-size: 13px;
	color: #d5dae3;
}

/* Producent, λD i CS: lista z polami wyboru */
body.sp-catalog #secondary #woocommerce_brand_nav-2 li,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li {
	display: flex;
	align-items: center;
}

body.sp-catalog #secondary #woocommerce_brand_nav-2 li > a,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > a,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > span:not(.count) {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 10px;
	padding: 7px 0;
	color: var(--sp-navy);
	text-decoration: none;
}

body.sp-catalog #secondary #woocommerce_brand_nav-2 li > a {
	text-transform: capitalize;
}

body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > span:not(.count) {
	color: var(--sp-muted);
}

/* Pole wyboru (WooCommerce wstawia tu własną ikonę „usuń" przy wybranej wartości) */
body.sp-catalog #secondary #woocommerce_brand_nav-2 li > a::before,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > a::before,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > span:not(.count)::before {
	content: "";
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--sp-field-line);
	background: #fff center / 12px no-repeat;
	font-family: inherit;
}

body.sp-catalog #secondary #woocommerce_brand_nav-2 li.chosen:not(.sp-toggled) > a::before,
body.sp-catalog #secondary #woocommerce_brand_nav-2 li.sp-toggled:not(.chosen) > a::before,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li.chosen:not(.sp-toggled) > a::before,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li.sp-toggled:not(.chosen) > a::before {
	border-color: var(--sp-cta);
	background-color: var(--sp-cta);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}

body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li.chosen:not(.sp-toggled) > a,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li.sp-toggled:not(.chosen) > a {
	font-weight: 600;
}

body.sp-catalog #secondary #woocommerce_brand_nav-2 li > a:hover,
body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > a:hover {
	color: var(--sp-orange-dark);
}

body.sp-catalog #secondary #woocommerce_brand_nav-2 li.sp-more-hidden {
	display: none;
}

body.sp-catalog #secondary .sp-more-toggle {
	margin: 0 16px 14px;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--sp-orange-dark);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

/* Wybrane filtry (nad .ast-filter-wrap, poza widżetami) */
body.sp-catalog #secondary .sp-active-filters {
	margin: 0 0 14px;
	padding: 0;
	border: 1px solid #f4c7ac;
	background: var(--sp-orange-soft);
}

body.sp-catalog #secondary .sp-active-filters .widget-title {
	margin: 0 0 10px;
	padding: 14px 16px 10px;
	border-bottom: 1px solid #f4c7ac;
	font-family: var(--sp-head-font);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	color: var(--sp-navy);
}

body.sp-catalog #secondary .sp-active-filters ul.sp-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0 16px 10px;
	list-style: none;
}

body.sp-catalog #secondary .sp-clear-all {
	display: inline-block;
	margin: 0 16px 14px;
	color: var(--sp-orange-dark);
	font-size: 13px;
	font-weight: 600;
}

/* Chipy (wspólne) */
body.sp-catalog .sp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 6px 12px;
	border: 1px solid var(--sp-field-line);
	background: #fff;
	color: var(--sp-navy);
	font-size: 13px;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
}

body.sp-catalog .sp-chip .sp-icon {
	width: 14px;
	height: 14px;
}

body.sp-catalog .sp-chip--active {
	border-color: var(--sp-orange);
	color: var(--sp-orange-dark);
	background: #fff;
}

body.sp-catalog .sp-chip--clear {
	border-color: transparent;
	background: transparent;
	color: var(--sp-orange-dark);
	font-weight: 600;
}


/* ================================================================== */
/* Sklep — telefon i tablet: pasek „Filtry” i panel z lewej            */
/* Klasa html.sp-js jest ustawiana skryptem w <head> przed malowaniem; */
/* bez JS sidebar zostaje pod produktami jak dziś.                     */
/* ================================================================== */

@media (max-width: 1100px) {
	html:has(body.sp-catalog .sp-toolbar) {
		scroll-padding-top: 76px;
	}

	/* Opis kategorii w nagłówku: 3 linie i „Rozwiń" (klasa html.sp-js jest ustawiana
	   w <head>, więc skrót jest od razu, bez skakania strony po wczytaniu skryptu) */
	html.sp-js body.sp-catalog .ast-archive-entry-banner:not(.sp-desc-open) .ast-container > p:first-of-type {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		overflow: hidden;
	}

	html.sp-js body.sp-catalog .ast-archive-entry-banner:not(.sp-desc-open) .ast-container > p:not(:first-of-type) {
		display: none;
	}

	body.sp-catalog .ast-archive-entry-banner .sp-archive-desc-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		margin: 0 0 4px;
		padding: 0 6px;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: #fff;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 15px;
		text-decoration: underline;
		text-underline-offset: 3px;
		cursor: pointer;
	}

	body.sp-catalog .ast-archive-entry-banner .sp-archive-desc-toggle::after {
		content: "";
		width: 7px;
		height: 7px;
		margin-bottom: 3px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
	}

	body.sp-catalog .ast-archive-entry-banner.sp-desc-open .sp-archive-desc-toggle::after {
		margin: 3px 0 0;
		transform: rotate(-135deg);
	}

	body.sp-catalog .ast-archive-entry-banner .sp-archive-desc-toggle:focus-visible {
		outline: 2px solid #fff;
		outline-offset: 2px;
	}

	body.sp-catalog .ast-archive-entry-banner .sp-archive-desc-toggle[hidden] {
		display: none;
	}

	body.sp-catalog .sp-toolbar {
		position: sticky;
		top: 0;
		z-index: 50;
		margin: 0 -16px 8px;
		padding: 10px 16px;
		background: var(--sp-bg);
	}

	body.admin-bar.sp-catalog .sp-toolbar {
		top: 32px;
	}

	body.sp-catalog .sp-toolbar .woocommerce-result-count {
		display: none;
	}

	body.sp-catalog .sp-toolbar .woocommerce-ordering {
		flex: 1 1 50%;
	}

	body.sp-catalog .sp-toolbar .woocommerce-ordering select {
		width: 100%;
		height: 46px;
		font-size: 16px;
	}

	html.sp-js body.sp-catalog .sp-filter-toggle {
		display: inline-flex;
		flex: 1 1 50%;
		align-items: center;
		justify-content: center;
		gap: 8px;
		height: 46px;
		padding: 0 14px;
		border: 0;
		border-radius: 0;
		background: var(--sp-cta);
		color: #fff;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 16px;
	}

	body.sp-catalog .sp-filter-badge {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 22px;
		height: 22px;
		padding: 0 6px;
		border-radius: 11px;
		background: #fff;
		color: var(--sp-orange-dark);
		font-size: 13px;
	}

	body.sp-catalog .sp-chips {
		display: block;
		margin: 0 -16px 16px;
	}

	body.sp-catalog .sp-chips .sp-chip-list {
		display: flex;
		flex-wrap: wrap;
		gap: 6px;
		margin: 0;
		padding: 4px 16px 8px;
		list-style: none;
	}

	body.sp-catalog .sp-chips li {
		flex: 0 0 auto;
		margin: 0;
	}

	body.sp-catalog .sp-chip {
		min-height: 40px;
	}

	/* Tabela w długim opisie kategorii rozpychała stronę na telefonie (przewijanie w bok) */
	body.sp-catalog .hay-second-archive-description__inner table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
	}

	/* Panel filtrów (tylko gdy PHP wypisał jego stopkę) */
	html.sp-js body.sp-catalog #secondary:has(.sp-drawer-foot) {
		position: fixed;
		inset: 0;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		scroll-padding-top: 64px;
		scroll-padding-bottom: 96px;
		background: #fff;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0s linear 0.25s;
	}

	html.sp-js body.sp-catalog.sp-drawer-open #secondary:has(.sp-drawer-foot) {
		transform: none;
		visibility: visible;
		transition: transform 0.25s ease;
	}

	html.sp-js body.sp-catalog #secondary:has(.sp-drawer-foot) .sidebar-main {
		display: flex;
		flex: 1 0 auto;
		flex-direction: column;
		margin: 0;
		padding: 0;
	}

	html.sp-js body.sp-catalog #secondary:has(.sp-drawer-foot) .ast-filter-wrap {
		flex: 1 0 auto;
		gap: 0;
	}

	/* Cienki pomarańczowy separator między grupami w panelu */
	html.sp-js body.sp-catalog #secondary .ast-filter-wrap .widget,
	html.sp-js body.sp-catalog #secondary .sp-active-filters {
		margin: 0;
		border: 0;
		border-bottom: 2px solid var(--sp-orange);
	}

	/* Ciemny blok kategorii ma własny kolor ramki — separator pod nim też pomarańczowy */
	html.sp-js body.sp-catalog #secondary #woocommerce_product_categories-2 {
		border-bottom-color: var(--sp-orange);
	}

	/* Ostatnia grupa nie potrzebuje separatora: pod nią jest stopka panelu */
	html.sp-js body.sp-catalog #secondary .ast-filter-wrap > .widget:last-child {
		border-bottom: 0;
	}

	html.sp-js body.sp-catalog #secondary .sp-group-toggle {
		min-height: 56px;
		padding: 16px 20px;
		font-size: 16px;
	}

	html.sp-js body.sp-catalog #secondary .ast-filter-wrap .widget ul {
		padding: 0 20px 16px;
	}

	html.sp-js body.sp-catalog #secondary .ast-filter-wrap .product-categories ul.children {
		padding: 0 0 4px 14px;
	}

	html.sp-js body.sp-catalog #secondary .product-categories li > a,
	html.sp-js body.sp-catalog #secondary #woocommerce_brand_nav-2 li > a,
	html.sp-js body.sp-catalog #secondary .woocommerce-widget-layered-nav-list li > a {
		min-height: 44px;
		padding-top: 10px;
		padding-bottom: 10px;
		font-size: 15px;
	}

	html.sp-js body.sp-catalog #secondary .product-categories .children li > a {
		font-size: 14px;
	}

	html.sp-js body.sp-catalog #secondary .sp-drawer-head {
		position: sticky;
		top: 0;
		z-index: 3;
		display: flex;
		align-items: center;
		gap: 16px;
		min-height: 60px;
		padding: 0 8px 0 20px;
		border-bottom: 1px solid var(--sp-line);
		background: #fff;
	}

	body.sp-catalog .sp-drawer-title {
		flex: 1 1 auto;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 18px;
		color: var(--sp-navy);
	}

	body.sp-catalog .sp-drawer-clear {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		color: var(--sp-orange-dark);
		font-weight: 600;
		font-size: 15px;
	}

	body.sp-catalog .sp-drawer-close {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: var(--sp-navy);
	}

	body.sp-catalog .sp-drawer-close .sp-icon {
		width: 24px;
		height: 24px;
	}

	html.sp-js body.sp-catalog #secondary .sp-drawer-foot {
		position: sticky;
		bottom: 0;
		z-index: 3;
		display: block;
		margin-top: auto;
		padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--sp-line);
		background: #fff;
	}

	body.sp-catalog .sp-drawer-apply {
		width: 100%;
		min-height: 52px;
		border: 0;
		border-radius: 0;
		background: var(--sp-cta);
		color: #fff;
		font-family: var(--sp-head-font);
		font-weight: 600;
		font-size: 16px;
	}

	body.sp-catalog .sp-drawer-apply:hover {
		background: var(--sp-cta-hover);
	}

	/* Blok „Wybrane filtry” w panelu dubluje „Wyczyść” w nagłówku panelu */
	html.sp-js body.sp-catalog #secondary .sp-active-filters .sp-clear-all {
		display: none;
	}

	/* Gdy panel jest otwarty: bez przewijania tła i bez pływających przycisków */
	html.sp-drawer-lock,
	body.sp-drawer-open {
		overflow: hidden;
	}

	body.sp-drawer-open .cky-btn-revisit-wrapper,
	body.sp-drawer-open .cky-consent-container,
	body.sp-drawer-open #ast-scroll-top,
	body.sp-drawer-open #chat-application,
	body.sp-drawer-open #smartsupp-widget-container,
	body.sp-drawer-open [id^="smartsupp"],
	body.sp-drawer-open #wpvibe-preview-banner {
		display: none !important;
	}
}

@media (max-width: 782px) {
	body.admin-bar.sp-catalog .sp-toolbar {
		top: 46px;
	}
}

@media (max-width: 600px) {
	body.admin-bar.sp-catalog .sp-toolbar {
		top: 0;
	}
}

/* Pasek „WPVibe Draft Preview" chowamy zawsze (razem z miejscem, które rezerwuje na dole).
   Admin dostaje zamiast niego własny, mniejszy pasek z wyjściem z podglądu (.sp-preview-bar). */
body.sp-redesign #wpvibe-preview-banner {
	display: none !important;
}

body.sp-redesign {
	padding-bottom: 0 !important;
}

body.sp-redesign.sp-has-preview-bar {
	padding-bottom: 44px !important;
}

.sp-redesign .sp-preview-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99998;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 2px 8px;
	min-height: 44px;
	padding: 8px 16px;
	background: var(--sp-navy);
	color: #fff;
	font-size: 13px;
	line-height: 1.35;
	text-align: center;
}

.sp-redesign .sp-preview-bar a {
	color: #ffb88c;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.sp-redesign .sp-preview-bar a:hover,
.sp-redesign .sp-preview-bar a:focus-visible {
	color: #fff;
}

body.sp-drawer-open .sp-preview-bar {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	html.sp-js body.sp-catalog #secondary:has(.sp-drawer-foot),
	html.sp-js body.sp-catalog.sp-drawer-open #secondary:has(.sp-drawer-foot) {
		transition: none;
	}
}
