/**
 * Style WooCommerce — katalog, kategoria, karty produktów.
 * Port z Astro: PageHeroSection, ProductCatalogSection, ProductsCtaSection,
 * ProductCategoryCard, ProductListCard, category-kombi.
 */

/* Wspólny nagłówek sekcji (SectionHeader.astro) */
.dehoust-section-header {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-section-header__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--dehoust-color-text);
}

.dehoust-section-header__rule {
	display: flex;
	height: 0.375rem;
	align-items: center;
}

.dehoust-section-header__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	border-radius: 0.125rem;
	background: var(--dehoust-color-primary);
}

.dehoust-section-header__line {
	height: 1px;
	flex: 1;
	background: var(--dehoust-color-line);
}

/* Uwaga: style .dehoust-page-hero* wydzielono do assets/css/page-hero.css
   (komponent współdzielony, ładowany globalnie w inc/assets.php). */

/* Katalog kategorii (FFupO) */
.dehoust-shop-catalog {
	background: #fff;
	padding-top: 2.5rem;
}

@media (min-width: 1280px) {
	.dehoust-shop-catalog {
		padding-top: 5.8125rem;
	}
}

.dehoust-shop-catalog__inner {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

@media (min-width: 1280px) {
	.dehoust-shop-catalog__inner {
		gap: 3.75rem;
	}
}

.dehoust-shop-catalog__rows {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

@media (min-width: 1024px) {
	.dehoust-shop-catalog__rows {
		gap: 0;
	}
}

.dehoust-shop-catalog__row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.dehoust-shop-catalog__row {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.dehoust-shop-catalog__row {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.875rem;
	}
}

.dehoust-shop-catalog__item {
	height: 100%;
	min-width: 0;
}

/* Kafel kategorii */
.dehoust-catalog-card {
	height: 100%;
	overflow: hidden;
	border-radius: 0.5rem;
	background: #fff;
	transition: background-color 0.3s ease;
}

.dehoust-catalog-card:hover,
.dehoust-catalog-card:focus-within {
	background: var(--dehoust-color-surface);
}

.dehoust-catalog-card__link {
	display: flex;
	height: 100%;
	min-height: 520px;
	flex-direction: column;
	align-items: center;
	padding-top: 2rem;
	color: inherit;
	text-decoration: none;
}

.dehoust-catalog-card__link--bordered {
	border-bottom: 1px solid rgb(78 194 241 / 0.8);
}

.dehoust-catalog-card__link:focus-visible {
	outline: 2px solid var(--dehoust-color-primary);
	outline-offset: 2px;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__link {
		min-height: 648px;
		gap: 2rem;
		padding-top: 1.875rem;
	}
}

.dehoust-catalog-card__media {
	display: flex;
	height: 200px;
	width: 100%;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__media {
		height: 323px;
	}
}

.dehoust-catalog-card__image {
	height: 100%;
	width: auto;
	max-width: 85%;
	object-fit: contain;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__image {
		max-width: 323px;
	}
}

.dehoust-catalog-card__image--flip {
	transform: scaleX(-1);
}

.dehoust-catalog-card__body {
	display: flex;
	width: 100%;
	flex: 1;
	flex-direction: column;
	justify-content: space-between;
	margin-top: 1.5rem;
	padding: 0 1.5rem 2rem;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__body {
		margin-top: 0;
		min-height: 223px;
		padding: 0 1.5rem 1.5rem;
	}
}

.dehoust-catalog-card__copy {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__copy {
		gap: 1.125rem;
	}
}

.dehoust-catalog-card__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--dehoust-color-text);
}

.dehoust-catalog-card__desc {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}

.dehoust-catalog-card__cta {
	display: inline-flex;
	height: 50px;
	width: 241px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	margin-top: 1.5rem;
	border: 1px solid var(--dehoust-color-primary);
	border-radius: 8px;
	background: #fff;
	padding-inline: 1.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--dehoust-color-primary);
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 1280px) {
	.dehoust-catalog-card__cta {
		margin-top: 0;
	}
}

.dehoust-catalog-card:hover .dehoust-catalog-card__cta,
.dehoust-catalog-card:focus-within .dehoust-catalog-card__cta {
	border-color: var(--dehoust-color-primary);
	background: var(--dehoust-color-primary);
	color: #fff;
}

/* Baner CTA pod katalogiem */
.dehoust-shop-cta {
	background: #fff;
	padding-top: 2.5rem;
}

@media (min-width: 1280px) {
	.dehoust-shop-cta {
		padding-top: 3.125rem;
	}
}

.dehoust-shop-cta__panel {
	height: 220px;
	width: 100%;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

@media (min-width: 640px) {
	.dehoust-shop-cta__panel {
		height: 240px;
	}
}

@media (min-width: 1280px) {
	.dehoust-shop-cta__panel {
		height: 260px;
	}
}

.dehoust-shop-cta__container {
	position: relative;
	z-index: 1;
	display: flex;
	height: 100%;
	align-items: center;
	gap: 1.5rem;
}

@media (min-width: 1280px) {
	.dehoust-shop-cta__container {
		gap: 4.75rem;
	}
}

.dehoust-shop-cta__content {
	display: flex;
	width: 100%;
	flex-direction: column;
	justify-content: center;
	gap: 1.125rem;
}

@media (min-width: 1280px) {
	.dehoust-shop-cta__content {
		width: 601px;
		flex-shrink: 0;
	}
}

.dehoust-shop-cta__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.5rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
}

.dehoust-shop-cta__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	border-radius: 0.125rem;
	background: var(--dehoust-color-accent);
}

.dehoust-shop-cta__phone {
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.5rem, 3vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
}

.dehoust-shop-cta__phone:hover,
.dehoust-shop-cta__phone:focus-visible {
	text-decoration: underline;
	opacity: 1;
}

.dehoust-shop-cta__phone-image {
	display: none;
	height: auto;
	max-height: 85%;
	width: auto;
	max-width: 440px;
	flex-shrink: 0;
	margin-left: auto;
	object-fit: contain;
	pointer-events: none;
}

@media (min-width: 1280px) {
	.dehoust-shop-cta__phone-image {
		display: block;
	}
}

/* Opis kategorii (Lo33s) */
.dehoust-category-desc {
	background: #fff;
	padding-block: 2.5rem;
}

.dehoust-category-desc__inner {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-category-desc__header {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-category-desc__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--dehoust-color-text);
}

.dehoust-category-desc__rule {
	display: flex;
	height: 0.375rem;
	align-items: center;
}

.dehoust-category-desc__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	background: var(--dehoust-color-primary);
}

.dehoust-category-desc__line {
	height: 1px;
	flex: 1;
	background: var(--dehoust-color-line);
}

.dehoust-category-desc__row {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding-top: 1.375rem;
}

.dehoust-category-desc__text {
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
}

.dehoust-category-desc__text p:first-child {
	margin-top: 0;
}

.dehoust-category-desc__text p:last-child {
	margin-bottom: 0;
}

.dehoust-category-desc__media {
	margin: 0;
	flex-shrink: 0;
	align-self: flex-start;
}

.dehoust-category-desc__image {
	display: block;
	width: 100%;
	max-width: 548px;
	height: auto;
	object-fit: contain;
}

@media (min-width: 1280px) {
	.dehoust-category-desc {
		padding-top: 6.5rem;
		padding-bottom: 5.75rem;
	}

	.dehoust-category-desc__row {
		flex-direction: row;
		align-items: flex-start;
		gap: 1.875rem;
	}

	.dehoust-category-desc__text {
		flex: 1 1 0;
		min-width: 0;
		max-width: 786px;
	}

	.dehoust-category-desc__media {
		flex: 0 1 548px;
		width: 100%;
		max-width: 548px;
	}

	.dehoust-category-desc__image {
		width: 100%;
		max-width: 548px;
		height: auto;
	}
}

@media (min-width: 1450px) {
	.dehoust-category-desc__text {
		width: 786px;
		flex: 0 0 786px;
		max-width: none;
	}

	.dehoust-category-desc__media {
		width: 548px;
		flex: 0 0 548px;
	}

	.dehoust-category-desc__image {
		width: 548px;
		height: 455px;
	}
}

/* Lista produktów w kategorii */
.dehoust-category-products {
	background: #fff;
	padding-bottom: 2.5rem;
}

.dehoust-category-products__inner {
	display: flex;
	flex-direction: column;
}

.dehoust-category-products__header {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-category-products__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.3214285714;
	color: var(--dehoust-color-text);
}

.dehoust-category-products__rule {
	display: flex;
	height: 0.375rem;
	align-items: center;
}

.dehoust-category-products__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	background: var(--dehoust-color-primary);
}

.dehoust-category-products__line {
	height: 1px;
	flex: 1;
	background: var(--dehoust-color-line);
}

.dehoust-category-products__list {
	display: flex;
	flex-direction: column;
	gap: 1.875rem;
	margin: 3.0625rem 0 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.dehoust-category-products__list > li {
	min-width: 0;
}

@media (min-width: 1280px) {
	.dehoust-category-products {
		padding-bottom: 6.5rem;
	}
}

/* Podkategorie pod listą produktów */
.dehoust-subcategories {
	background: #fff;
	padding-bottom: 2.5rem;
}

.dehoust-subcategories__inner {
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

.dehoust-subcategory {
	display: flex;
	flex-direction: column;
}

.dehoust-subcategory__header {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-subcategory__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.3214285714;
	color: var(--dehoust-color-text);
}

.dehoust-subcategory__rule {
	display: flex;
	height: 0.375rem;
	align-items: center;
}

.dehoust-subcategory__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	background: var(--dehoust-color-primary);
}

.dehoust-subcategory__line {
	height: 1px;
	flex: 1;
	background: var(--dehoust-color-line);
}

.dehoust-subcategory__content {
	margin-top: 1.375rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
}

.dehoust-subcategory__products {
	display: flex;
	flex-direction: column;
	gap: 1.875rem;
	margin: 3.0625rem 0 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.dehoust-subcategory__products > li {
	min-width: 0;
}

@media (min-width: 1280px) {
	.dehoust-subcategories {
		padding-bottom: 6.5rem;
	}
}

/* Karta produktu na liście */
.dehoust-product-list-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid rgb(78 194 241 / 0.8);
	border-radius: 0.5rem;
	background: #fff;
}

.dehoust-product-list-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.5rem;
}

.dehoust-product-list-card__image {
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

.dehoust-product-list-card__sep {
	display: none;
}

.dehoust-product-list-card__content {
	display: flex;
	flex-direction: column;
	padding: 0.5rem 1.5rem 1.5rem;
}

.dehoust-product-list-card__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--dehoust-color-text);
}

.dehoust-product-list-card__sku {
	margin: 4px 0 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.75;
	color: var(--dehoust-color-text-muted);
}

/* Każda linia „Krótkiego opisu” ma zostać osobnym wierszem, jak w projekcie
   i jak na karcie w karuzeli. */
.dehoust-product-list-card__excerpt {
	margin: 13px 0 0;
	white-space: pre-line;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
}

.dehoust-product-list-card__specs {
	display: flex;
	flex-direction: column;
	gap: 1px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}

.dehoust-product-list-card__specs li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
}

.dehoust-product-list-card__bullet {
	width: 8px;
	height: 8px;
	flex-shrink: 0;
	border: 0.5px solid var(--dehoust-color-sky);
	border-radius: 9999px;
}

.dehoust-product-list-card__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem;
	background: var(--dehoust-color-surface);
	padding: 2rem 1.5rem;
}

.dehoust-product-list-card__prices {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.dehoust-product-list-card__price-gross {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 0.8571428571;
	color: var(--dehoust-color-accent);
	text-align: right;
}

.dehoust-product-list-card__price-gross .woocommerce-Price-amount {
	color: inherit;
}

.dehoust-product-list-card__price-net {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #5f5f5f;
	text-align: right;
}

.dehoust-product-list-card__actions {
	display: flex;
	width: 100%;
	flex-direction: column;
	gap: 16px;
}

.dehoust-product-list-card__btn {
	display: inline-flex;
	height: 50px;
	width: 100%;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: 8px;
	padding: 0 1.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.dehoust-product-list-card__btn--outline {
	border: 0.8px solid var(--dehoust-color-primary);
	background: #fff;
	color: var(--dehoust-color-primary);
}

.dehoust-product-list-card__btn--outline:hover {
	background: var(--dehoust-color-surface);
	opacity: 1;
}

.dehoust-product-list-card__btn--primary {
	border: 0;
	background: var(--dehoust-color-primary);
	color: #fff;
}

.dehoust-product-list-card__btn--primary:hover {
	background: var(--dehoust-color-primary-hover);
	opacity: 1;
}

.dehoust-product-list-card__btn:focus-visible {
	outline: 2px solid var(--dehoust-color-primary);
	outline-offset: 2px;
}

@media (min-width: 1280px) {
	/* min-height, nie height — produkt bez krótkiego opisu i z jednym atrybutem
	   zostawiał pustą kolumnę środkową na całe 331 px. */
	.dehoust-product-list-card {
		display: grid;
		grid-template-columns: 320px 1px minmax(0, 1fr) 319px;
		min-height: 331px;
	}

	.dehoust-product-list-card__media {
		padding: 0 63px 0 59px;
	}

	/* Kreska rozciąga się z kartą — przy dłuższej liście parametrów sztywne 286 px
	   kończyło się w połowie treści. */
	.dehoust-product-list-card__sep {
		display: flex;
		align-self: stretch;
		width: 1px;
		margin-block: 22px;
		background: var(--dehoust-color-sky);
	}

	/* Dolny padding, bo przy dłuższej specyfikacji ostatni punkt dotykał ramki. */
	.dehoust-product-list-card__content {
		padding: 34px 24px 34px 29px;
	}

	.dehoust-product-list-card__aside {
		border-radius: 0 7px 7px 0;
		padding: 37px 39px 44px;
	}

	.dehoust-product-list-card__prices,
	.dehoust-product-list-card__actions {
		width: 241px;
	}
}

/* Paginacja Woo na liście kategorii */
.dehoust-shop--category .woocommerce-pagination {
	margin-top: 2rem;
}

.woocommerce .dehoust-container {
	/* Kontener motywu na widokach sklepu */
}

/* Komunikaty WooCommerce (koszyk, checkout, katalog) */
.dehoust-wc-notices {
	padding-top: 24px;
	padding-bottom: 0;
}

.dehoust-wc-notices .woocommerce-notices-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.dehoust-wc-notices .woocommerce-error,
.dehoust-wc-notices .woocommerce-message,
.dehoust-wc-notices .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
	margin: 0;
	padding: 16px 20px;
	border: 1px solid;
	border-radius: 8px;
	list-style: none;
	font-size: 15px;
	line-height: 1.5;
}

.dehoust-wc-notices .woocommerce-error li,
.dehoust-wc-notices .woocommerce-message li,
.dehoust-wc-notices .woocommerce-info li,
.woocommerce-notices-wrapper .woocommerce-error li,
.woocommerce-notices-wrapper .woocommerce-message li,
.woocommerce-notices-wrapper .woocommerce-info li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dehoust-wc-notices .woocommerce-error li + li,
.dehoust-wc-notices .woocommerce-message li + li,
.dehoust-wc-notices .woocommerce-info li + li,
.woocommerce-notices-wrapper .woocommerce-error li + li,
.woocommerce-notices-wrapper .woocommerce-message li + li,
.woocommerce-notices-wrapper .woocommerce-info li + li {
	margin-top: 8px;
}

.dehoust-wc-notices .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-error {
	border-color: #f5c2c7;
	background: #fdf0f1;
	color: #9b1c1c;
}

.dehoust-wc-notices .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-message {
	border-color: #b8e0c0;
	background: #edf8ef;
	color: #1f6b31;
}

.dehoust-wc-notices .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-info {
	border-color: rgb(78 194 241 / 0.55);
	background: var(--dehoust-color-surface);
	color: var(--dehoust-color-text);
}

.dehoust-wc-notices .woocommerce-error a,
.dehoust-wc-notices .woocommerce-message a,
.dehoust-wc-notices .woocommerce-info a,
.woocommerce-notices-wrapper .woocommerce-error a,
.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-info a {
	color: inherit;
	font-weight: 600;
}

/* Przejście z podstrony ofertowej do listy produktów w kategorii. */
.dehoust-offer-cta {
	background: #fff;
	padding-block: 0 3.5rem;
}

.dehoust-offer-cta__link {
	display: inline-flex;
	height: 50px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: var(--dehoust-radius-btn);
	background: var(--dehoust-color-primary);
	padding: 0 1.75rem;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	transition: background-color var(--dehoust-transition);
}

.dehoust-offer-cta__link:hover {
	background: var(--dehoust-color-primary-hover);
	opacity: 1;
}

/* Opis kategorii i sekcje ACF stoją teraz jedno pod drugim — bez podwójnego odstępu. */
.dehoust-category-desc + .dehoust-cat-sections {
	padding-top: 0;
}

/* Sekcje strony kategorii (ACF: nagłówek + opis + zdjęcie + dokumentacja + produkty).
   Desktop: zdjęcie w prawej kolumnie na całą wysokość sekcji, reszta w lewej jedno pod
   drugim. Odstępy trzymamy na marginesach elementów, a nie na row-gap siatki — sekcja
   bez opisu czy bez plików zostawiłaby wtedy puste przerwy. */
.dehoust-cat-sections {
	background: #fff;
	padding-block: 2.5rem;
}

.dehoust-cat-section + .dehoust-cat-section {
	margin-top: 4rem;
}

.dehoust-cat-section__inner {
	display: flex;
	flex-direction: column;
}

.dehoust-cat-section__header {
	display: flex;
	flex-direction: column;
	gap: 0.9375rem;
}

.dehoust-cat-section__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--dehoust-color-text);
}

.dehoust-cat-section__rule {
	display: flex;
	height: 0.375rem;
	align-items: center;
}

.dehoust-cat-section__accent {
	width: 2.5rem;
	height: 0.375rem;
	flex-shrink: 0;
	background: var(--dehoust-color-primary);
}

.dehoust-cat-section__line {
	height: 1px;
	flex: 1;
	background: var(--dehoust-color-line);
}

.dehoust-cat-section__text {
	margin-top: 1.375rem;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--dehoust-color-text-muted);
}

/* Nagłówki w treści muszą zostać większe od podniesionego do 18 px akapitu. */
.dehoust-category-desc__text h2,
.dehoust-category-desc__text h3,
.dehoust-category-desc__text h4,
.dehoust-cat-section__text h2,
.dehoust-cat-section__text h3,
.dehoust-cat-section__text h4 {
	font-size: 1.375rem;
}

/* Obrazek wstawiony w treści przez edytor nie może rozpychać kolumny. */
.dehoust-cat-section__text img {
	max-width: 100%;
	height: auto;
}

.dehoust-cat-section__media {
	margin: 2rem 0 0;
	align-self: flex-start;
}

.dehoust-cat-section__media-zoom {
	display: block;
	cursor: zoom-in;
}

/* Ten sam gabaryt co zdjęcie główne kategorii (548 × 455). Bez limitu wysokości plik
   pionowy skalowany do szerokości urastał do ~660 px i górował nad miniaturą. */
.dehoust-cat-section__image {
	display: block;
	width: 100%;
	max-width: 548px;
	height: auto;
	max-height: 455px;
	object-fit: contain;
}

/* Siatka zdjęć pod opisem — na całą szerokość sekcji (2 kolumny mobile, 4 desktop). */
.dehoust-cat-section__gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
}

.dehoust-cat-section__gallery-figure {
	display: flex;
	height: 100%;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
}

/* Kadr kwadratowy: zdjęcia produktowe są 1:1, więc wypełniają go bez przycięcia.
   `contain` zamiast `cover` — przy 4/3 kwadratom ucinało górę zbiornika. Panoramiczne
   schematy mieszczą się w całości (białe pasy na tle sekcji są niewidoczne). */
.dehoust-cat-section__gallery-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
}

.dehoust-cat-section__gallery-zoom {
	display: block;
	cursor: zoom-in;
}

.dehoust-cat-section__gallery-caption {
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--dehoust-color-muted);
	text-align: center;
}

.dehoust-cat-section__downloads {
	margin-top: 2.8125rem;
}

/* Po siatce zdjęć nagłówek dokumentów potrzebuje wyraźniejszego oddechu. */
.dehoust-cat-section__inner:has(.dehoust-cat-section__gallery) .dehoust-cat-section__downloads {
	margin-top: 5.625rem;
}

.dehoust-cat-section__products {
	display: flex;
	flex-direction: column;
	gap: 1.875rem;
	margin: 3.0625rem 0 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.dehoust-cat-section__products > li {
	min-width: 0;
}

@media (min-width: 1280px) {
	.dehoust-cat-sections {
		padding-top: 6.5rem;
		padding-bottom: 6.5rem;
	}

	.dehoust-cat-section + .dehoust-cat-section {
		margin-top: 6.5rem;
	}

	.dehoust-cat-section__inner {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 548px);
		grid-template-rows: repeat(5, auto);
		column-gap: 1.875rem;
		align-items: start;
	}

	.dehoust-cat-section__header {
		grid-column: 1;
		grid-row: 1;
	}

	.dehoust-cat-section__text {
		grid-column: 1;
		grid-row: 2;
	}

	.dehoust-cat-section__gallery {
		grid-column: 1 / -1;
		grid-row: 3;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.dehoust-cat-section__downloads {
		grid-column: 1;
		grid-row: 4;
	}

	/* Karta produktu ma sztywną siatkę 320px|1px|1fr|319px — w kolumnie obok zdjęcia
	   nie mieści się czytelnie, więc lista idzie pod spodem na pełną szerokość. */
	.dehoust-cat-section__products {
		grid-column: 1 / -1;
		grid-row: 5;
	}

	.dehoust-cat-section__media {
		grid-column: 2;
		grid-row: 1 / 5;
		margin-top: 1.375rem;
	}

	/* Z galerią zdjęcie kończy się nad nią — galeria idzie na pełną szerokość sekcji. */
	.dehoust-cat-section__inner:has(.dehoust-cat-section__gallery) .dehoust-cat-section__media {
		grid-row: 1 / 3;
	}
}

.dehoust-cat-section__downloads-title {
	margin: 0 0 1.75rem;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	color: var(--dehoust-color-primary);
}

/* Archiwum sklepu i kategorii: sidebar z filtrami + lista wyników.
   Sidebar chowa się na mobile pod przyciskiem „Filtry” — przy 4 grupach filtrów
   stała kolumna zabierałaby cały ekran. */
.dehoust-archive {
	background: #fff;
	padding-block: 2.5rem;
}

.dehoust-archive__inner {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Kategorie w lewej kolumnie, nad filtrami — nawigacja, nie filtr. Ta sama ramka
   co blok filtrów pod spodem, żeby kolumna czytała się jako całość. */
.dehoust-archive__cats {
	margin-bottom: 1.5rem;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 0.5rem;
	padding: 1.25rem;
}

.dehoust-archive__cats-title {
	margin: 0 0 0.75rem;
	font-family: var(--dehoust-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--dehoust-color-text);
}

.dehoust-archive__cats-list {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dehoust-archive__cat {
	display: block;
	border-left: 2px solid transparent;
	padding: 0.375rem 0 0.375rem 0.625rem;
	font-size: 0.9375rem;
	line-height: 1.35;
	color: var(--dehoust-color-text);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.dehoust-archive__cat:hover,
.dehoust-archive__cat:focus-visible {
	border-left-color: var(--dehoust-color-primary);
	color: var(--dehoust-color-primary);
}

.dehoust-archive__cat.is-active {
	border-left-color: var(--dehoust-color-primary);
	font-weight: 700;
	color: var(--dehoust-color-primary);
}

.dehoust-archive__groups {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Zestaw filtrów potrafi zniknąć w całości (wyłączone w panelu albo kategoria bez
   atrybutów do wyboru) — pusty kontener nie ma dokładać odstępu w formularzu. */
.dehoust-archive__groups:empty {
	display: none;
}

/* Na wąskim ekranie chowamy sam formularz filtrów — lista kategorii nad nim jest
   nawigacją i ma być pod ręką bez rozwijania. */
.dehoust-archive__filters {
	display: none;
	flex-direction: column;
	gap: 1.5rem;
	border: 1px solid var(--dehoust-color-line);
	border-radius: 0.5rem;
	padding: 1.25rem;
}

.dehoust-archive.is-filters-open .dehoust-archive__filters {
	display: flex;
}

.dehoust-archive__filters-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.dehoust-archive__filters-title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--dehoust-color-text);
}

.dehoust-archive__reset {
	border: 0;
	background: none;
	padding: 0;
	font-size: 0.9375rem;
	color: var(--dehoust-color-primary);
	text-decoration: underline;
	cursor: pointer;
}

.dehoust-archive__group {
	margin: 0;
	border: 0;
	padding: 0;
}

.dehoust-archive__group-title {
	margin-bottom: 0.75rem;
	padding: 0;
	font-family: var(--dehoust-font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--dehoust-color-text);
}

.dehoust-archive__options {
	display: flex;
	max-height: 15rem;
	flex-direction: column;
	gap: 0.5rem;
	overflow-y: auto;
}

.dehoust-archive__option {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--dehoust-color-text-muted);
	cursor: pointer;
}

.dehoust-archive__option input {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: var(--dehoust-color-primary);
}

.dehoust-archive__option--stock {
	font-weight: 700;
}

.dehoust-archive__price {
	display: flex;
	gap: 0.75rem;
}

.dehoust-archive__price-field {
	display: flex;
	flex: 1;
	min-width: 0;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	color: var(--dehoust-color-muted);
}

.dehoust-archive__price-field input {
	width: 100%;
	min-width: 0;
	height: 42px;
	border: 0.5px solid var(--dehoust-color-primary);
	border-radius: var(--dehoust-radius-btn);
	background: #fff;
	padding: 0 0.625rem;
	font-family: var(--dehoust-font-body);
	font-size: 1rem;
	color: var(--dehoust-color-text-muted);
}

.dehoust-archive__submit {
	height: 46px;
	border: 0;
	border-radius: var(--dehoust-radius-btn);
	background: var(--dehoust-color-primary);
	font-weight: 700;
	color: #fff;
	cursor: pointer;
	transition: background-color var(--dehoust-transition);
}

.dehoust-archive__submit:hover,
.dehoust-archive__submit:focus-visible {
	background: var(--dehoust-color-primary-hover);
}

.dehoust-archive__main {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 1.5rem;
}

.dehoust-archive__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.dehoust-archive__search {
	flex: 1 1 12rem;
	min-width: 0;
}

.dehoust-archive__search input,
.dehoust-archive__sort select {
	width: 100%;
	height: 51px;
	border: 0.5px solid var(--dehoust-color-primary);
	border-radius: var(--dehoust-radius-btn);
	background: #fff;
	padding: 0 1rem;
	font-family: var(--dehoust-font-body);
	font-size: 1rem;
	color: var(--dehoust-color-text-muted);
}

.dehoust-archive__sort select {
	padding-right: 2.5rem;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231d1d1d' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
}

.dehoust-archive__toggle {
	height: 51px;
	flex-shrink: 0;
	border: 0.8px solid var(--dehoust-color-primary);
	border-radius: var(--dehoust-radius-btn);
	background: #fff;
	padding: 0 1.25rem;
	font-family: var(--dehoust-font-body);
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--dehoust-color-primary);
	cursor: pointer;
}

/* Wyniki przygasają na czas dociągania — bez skoku wysokości i bez spinnera. */
.dehoust-archive.is-loading .dehoust-archive__results {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.dehoust-archive__list {
	display: flex;
	flex-direction: column;
	gap: 1.875rem;
	margin: 0;
	padding: 0;
	list-style: none;
	min-width: 0;
}

.dehoust-archive__list > li {
	min-width: 0;
}

.dehoust-archive__empty {
	margin: 0;
	border: 1px dashed var(--dehoust-color-line);
	border-radius: 0.5rem;
	padding: 2rem 1.25rem;
	font-size: 1.125rem;
	color: var(--dehoust-color-text-muted);
	text-align: center;
}

.dehoust-archive__pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 2rem;
}

.dehoust-archive__page {
	min-width: 44px;
	height: 44px;
	border: 0.8px solid var(--dehoust-color-primary);
	border-radius: var(--dehoust-radius-btn);
	background: #fff;
	font-family: var(--dehoust-font-heading);
	font-size: 1rem;
	font-weight: 700;
	color: var(--dehoust-color-primary);
	cursor: pointer;
	transition: background-color var(--dehoust-transition), color var(--dehoust-transition);
}

.dehoust-archive__page:hover {
	background: var(--dehoust-color-surface);
}

.dehoust-archive__page.is-current {
	background: var(--dehoust-color-primary);
	color: #fff;
	cursor: default;
}

.dehoust-offer-cta--top {
	padding-block: 2.5rem 0;
}

@media (min-width: 1024px) {
	.dehoust-archive {
		padding-block: 4rem;
	}

	.dehoust-archive__inner {
		display: grid;
		grid-template-columns: minmax(0, 17.5rem) minmax(0, 1fr);
		align-items: start;
		gap: 2.5rem;
	}

	/* Na desktopie filtry są zawsze widoczne, więc przycisk „Filtry” znika. */
	.dehoust-archive__filters {
		display: flex;
	}

	.dehoust-archive__toggle {
		display: none;
	}
}
