/* Mobile — dyskretny powrót do kategorii zamiast breadcrumbs + duplikatu */

@media (max-width: 768px) {
	body.postid-14.single-product .hoker-mobile-category-back--summary,
	body.postid-1134.single-product .hoker-mobile-category-back--summary,
	body.postid-5891.single-product .hoker-mobile-category-back--summary,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back--summary,
	body.hoker-seat-build-1134-active.single-product .hoker-mobile-category-back--summary,
	body.hoker-seat-fabric-standard.postid-14.single-product .hoker-mobile-category-back--summary {
		order: 0 !important;
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 6px !important;
		padding: 0 !important;
	}

	body.postid-14.single-product .hoker-mobile-category-back--lead,
	body.postid-1134.single-product .hoker-mobile-category-back--lead,
	body.postid-5891.single-product .hoker-mobile-category-back--lead,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back--lead {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
	}

	body.postid-14.single-product .hoker-mobile-category-back__link,
	body.postid-1134.single-product .hoker-mobile-category-back__link,
	body.postid-5891.single-product .hoker-mobile-category-back__link,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back__link {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		max-width: 100%;
		padding: 4px 0;
		font-size: 13px;
		font-weight: 600;
		line-height: 1.35;
		color: #8d1c2f !important;
		text-decoration: none !important;
		-webkit-tap-highlight-color: transparent;
	}

	body.postid-14.single-product .hoker-mobile-category-back__link:hover,
	body.postid-1134.single-product .hoker-mobile-category-back__link:hover,
	body.postid-5891.single-product .hoker-mobile-category-back__link:hover,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back__link:hover,
	body.postid-14.single-product .hoker-mobile-category-back__link:focus-visible,
	body.postid-1134.single-product .hoker-mobile-category-back__link:focus-visible,
	body.postid-5891.single-product .hoker-mobile-category-back__link:focus-visible,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back__link:focus-visible {
		color: #760022 !important;
		text-decoration: underline !important;
		text-underline-offset: 2px;
	}

	body.postid-14.single-product .hoker-mobile-category-back__chev,
	body.postid-1134.single-product .hoker-mobile-category-back__chev,
	body.postid-5891.single-product .hoker-mobile-category-back__chev,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back__chev {
		flex: 0 0 auto;
		font-size: 14px;
		line-height: 1;
		opacity: 0.9;
	}

	body.postid-14.single-product .hoker-mobile-category-back__text,
	body.postid-1134.single-product .hoker-mobile-category-back__text,
	body.postid-5891.single-product .hoker-mobile-category-back__text,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Pełna ścieżka + czerwona nazwa kategorii (motyw) — ukryte wizualnie, HTML zostaje dla SEO */
	body.postid-14.single-product .woocommerce-breadcrumb,
	body.postid-1134.single-product .woocommerce-breadcrumb,
	body.postid-5891.single-product .woocommerce-breadcrumb,
	body.hoker-chair-card-active.single-product .woocommerce-breadcrumb,
	body.postid-14.single-product .summary .woocommerce-breadcrumb,
	body.postid-1134.single-product .summary .woocommerce-breadcrumb,
	body.postid-5891.single-product .summary .woocommerce-breadcrumb,
	body.hoker-chair-card-active.single-product .summary .woocommerce-breadcrumb,
	body.postid-14.single-product .ast-breadcrumbs-wrapper,
	body.postid-1134.single-product .ast-breadcrumbs-wrapper,
	body.postid-5891.single-product .ast-breadcrumbs-wrapper,
	body.hoker-chair-card-active.single-product .ast-breadcrumbs-wrapper,
	body.postid-14.single-product #hoker-seat-product-hero .woocommerce-breadcrumb,
	body.postid-1134.single-product #hoker-seat-product-hero .woocommerce-breadcrumb,
	body.postid-14.single-product .single-product-category,
	body.postid-1134.single-product .single-product-category,
	body.postid-5891.single-product .single-product-category,
	body.hoker-chair-card-active.single-product .single-product-category,
	body.postid-14.single-product .summary .single-product-category,
	body.postid-1134.single-product .summary .single-product-category,
	body.postid-5891.single-product .summary .single-product-category,
	body.hoker-chair-card-active.single-product .summary .single-product-category,
	body.postid-14.single-product .ast-woo-product-category,
	body.postid-1134.single-product .ast-woo-product-category,
	body.postid-5891.single-product .ast-woo-product-category,
	body.hoker-chair-card-active.single-product .ast-woo-product-category {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
		font-size: 0 !important;
		line-height: 0 !important;
	}

	/* Duplikat kategorii (meta / linki w summary) */
	body.postid-14.single-product .summary .posted_in,
	body.postid-1134.single-product .summary .posted_in,
	body.postid-5891.single-product .summary .posted_in,
	body.hoker-chair-card-active.single-product .summary .posted_in,
	body.postid-14.single-product .summary .product_meta,
	body.postid-1134.single-product .summary .product_meta,
	body.postid-5891.single-product .summary .product_meta,
	body.hoker-chair-card-active.single-product .summary .product_meta,
	body.postid-14.single-product .summary > a,
	body.postid-1134.single-product .summary > a,
	body.postid-5891.single-product .summary > a,
	body.hoker-chair-card-active.single-product .summary > a,
	body.postid-14.single-product .summary > a[href*="/kategoria/"],
	body.postid-1134.single-product .summary > a[href*="/kategoria/"],
	body.postid-5891.single-product .summary > a[href*="/kategoria/"],
	body.hoker-chair-card-active.single-product .summary > a[href*="/kategoria/"],
	body.postid-14.single-product #hoker-seat-product-hero a[href*="/kategoria/"],
	body.postid-1134.single-product #hoker-seat-product-hero a[href*="/kategoria/"],
	body.postid-5891.single-product #hoker-seat-product-hero a[href*="/kategoria/"] {
		display: none !important;
	}
}

@media (min-width: 769px) {
	body.postid-14.single-product .hoker-mobile-category-back--summary,
	body.postid-1134.single-product .hoker-mobile-category-back--summary,
	body.postid-5891.single-product .hoker-mobile-category-back--summary,
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back--summary {
		display: none !important;
	}

	body.postid-14.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary),
	body.postid-1134.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary),
	body.postid-5891.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary),
	body.hoker-chair-card-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary) {
		display: block !important;
		width: 100% !important;
		margin: 0 0 10px !important;
	}
}

/* ===========================================================================
 * Generyczna wersja (v1.0.2) — działa na KAŻDEJ karcie konfiguratora
 * (klasa body.hoker-mobile-category-back-active), w tym klony i nowe ID.
 * Identyczny wygląd jak na #6446: sam tekst „← Wróć do…”, bez tła/pigułki.
 * Nie zmienia kolejności reszty widoku — link jest pierwszy w DOM (order:0).
 * =========================================================================== */
@media (max-width: 768px) {
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--summary {
		order: 0 !important;
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 6px !important;
		padding: 0 !important;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back__link {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		max-width: 100%;
		padding: 4px 0;
		font-size: 13px;
		font-weight: 600;
		line-height: 1.35;
		color: #8d1c2f !important;
		text-decoration: none !important;
		background: none !important;
		border: 0 !important;
		-webkit-tap-highlight-color: transparent;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back__link:hover,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back__link:focus-visible {
		color: #760022 !important;
		text-decoration: underline !important;
		text-underline-offset: 2px;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back__chev {
		flex: 0 0 auto;
		font-size: 14px;
		line-height: 1;
		opacity: 0.9;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Pełna ścieżka + czerwona nazwa kategorii (motyw) — ukryte wizualnie, HTML zostaje dla SEO */
	body.hoker-mobile-category-back-active.single-product .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .summary .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .ast-breadcrumbs-wrapper,
	body.hoker-mobile-category-back-active.single-product #hoker-seat-product-hero .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .single-product-category,
	body.hoker-mobile-category-back-active.single-product .summary .single-product-category,
	body.hoker-mobile-category-back-active.single-product .ast-woo-product-category {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
		font-size: 0 !important;
		line-height: 0 !important;
	}

	/* Duplikat kategorii (meta / linki kategorii w summary) — celowane, bez ukrywania innych linków */
	body.hoker-mobile-category-back-active.single-product .summary .posted_in,
	body.hoker-mobile-category-back-active.single-product .summary .product_meta,
	body.hoker-mobile-category-back-active.single-product .summary > a[href*="/kategoria/"],
	body.hoker-mobile-category-back-active.single-product #hoker-seat-product-hero a[href*="/kategoria/"] {
		display: none !important;
	}
}

@media (min-width: 769px) {
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--summary {
		display: none !important;
	}

	/* Stary markup (bez --lead) — pokaż ten sam link na laptopie zamiast breadcrumbs */
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 10px !important;
		padding: 0 !important;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 0 10px !important;
		padding: 0 !important;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead .hoker-mobile-category-back__link,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) .hoker-mobile-category-back__link {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		max-width: 100%;
		padding: 2px 0;
		font-size: 14px;
		font-weight: 600;
		line-height: 1.35;
		color: #8d1c2f !important;
		text-decoration: none !important;
		background: none !important;
		border: 0 !important;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead .hoker-mobile-category-back__link:hover,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead .hoker-mobile-category-back__link:focus-visible,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) .hoker-mobile-category-back__link:hover,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) .hoker-mobile-category-back__link:focus-visible {
		color: #760022 !important;
		text-decoration: underline !important;
		text-underline-offset: 2px;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead .hoker-mobile-category-back__chev,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) .hoker-mobile-category-back__chev {
		flex: 0 0 auto;
		font-size: 15px;
		line-height: 1;
		opacity: 0.9;
	}

	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back--lead .hoker-mobile-category-back__text,
	body.hoker-mobile-category-back-active.single-product .hoker-mobile-category-back:not(.hoker-mobile-category-back--summary):not(.hoker-mobile-category-back--lead) .hoker-mobile-category-back__text {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	/* Laptop: ta sama ścieżka co mobile — ukryta wizualnie (SEO zostaje w HTML) */
	body.hoker-mobile-category-back-active.single-product .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .summary .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .ast-breadcrumbs-wrapper,
	body.hoker-mobile-category-back-active.single-product #hoker-seat-product-hero .woocommerce-breadcrumb,
	body.hoker-mobile-category-back-active.single-product .single-product-category,
	body.hoker-mobile-category-back-active.single-product .summary .single-product-category,
	body.hoker-mobile-category-back-active.single-product .ast-woo-product-category,
	body.hoker-mobile-category-back-active.single-product .summary .posted_in,
	body.hoker-mobile-category-back-active.single-product .summary .product_meta,
	body.hoker-mobile-category-back-active.single-product .summary > a[href*="/kategoria/"],
	body.hoker-mobile-category-back-active.single-product #hoker-seat-product-hero a[href*="/kategoria/"] {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
		font-size: 0 !important;
		line-height: 0 !important;
	}
}

/* ===========================================================================
 * Sklep + archiwa kategorii/tagów — link powrotu zamiast breadcrumbs (wszystkie ekrany)
 * =========================================================================== */

/* Astra: .ast-container to flex-row — nav + #primary obok siebie psuły układ (50/50).
   Wymuszamy pełną szerokość: link u góry, treść kategorii pod spodem. */
body.hoker-mobile-category-back-active:not(.single-product) #content.site-content > .ast-container {
	flex-wrap: wrap !important;
}

body.hoker-mobile-category-back-active:not(.single-product) #content.site-content > .ast-container > .hoker-mobile-category-back--lead,
body.hoker-mobile-category-back-active:not(.single-product) #content.site-content > .ast-container > #primary {
	flex: 0 0 100% !important;
	max-width: 100% !important;
	width: 100% !important;
}

body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 0 10px !important;
	padding: 0 !important;
}

body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	padding: 2px 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: #8d1c2f !important;
	text-decoration: none !important;
	background: none !important;
	border: 0 !important;
	-webkit-tap-highlight-color: transparent;
}

body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__link:hover,
body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__link:focus-visible {
	color: #760022 !important;
	text-decoration: underline !important;
	text-underline-offset: 2px;
}

body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__chev {
	flex: 0 0 auto;
	font-size: 15px;
	line-height: 1;
	opacity: 0.9;
}

body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.hoker-mobile-category-back-active:not(.single-product) .woocommerce-breadcrumb,
body.hoker-mobile-category-back-active:not(.single-product) .ast-breadcrumbs-wrapper,
body.hoker-mobile-category-back-active:not(.single-product) nav.woocommerce-breadcrumb {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	max-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	border: 0 !important;
	font-size: 0 !important;
	line-height: 0 !important;
}

@media (max-width: 768px) {
	body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__link {
		font-size: 13px;
		padding: 4px 0;
		gap: 6px;
	}

	body.hoker-mobile-category-back-active:not(.single-product) .hoker-mobile-category-back--lead .hoker-mobile-category-back__chev {
		font-size: 14px;
	}
}

/* Ostateczna blokada duplikatu na mobile (produkt: tylko --summary) */
@media (max-width: 768px) {
	body.single-product .hoker-mobile-category-back--lead {
		display: none !important;
		visibility: hidden !important;
		height: 0 !important;
		max-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
		pointer-events: none !important;
	}
}
