/*
 * Hero podstrony z okruszkami — komponent współdzielony
 * (template-parts/components/page-hero.php). Ładowany globalnie, bo używają go
 * różne widoki (katalog, kategorie, blog, archiwa). Zależny od dehoust-main.
 */

.dehoust-page-hero__banner {
	position: relative;
	height: 180px;
	background: var(--dehoust-color-primary);
}

@media (min-width: 640px) {
	.dehoust-page-hero__banner {
		height: 200px;
	}
}

@media (min-width: 1280px) {
	.dehoust-page-hero__banner {
		height: 220px;
	}
}

.dehoust-page-hero__background {
	position: absolute;
	inset: 0;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.dehoust-page-hero__container {
	position: relative;
	z-index: 1;
	display: flex;
	height: 100%;
	align-items: center;
}

.dehoust-page-hero__title-wrap {
	width: 100%;
}

.dehoust-page-hero__title {
	margin: 0;
	font-family: var(--dehoust-font-heading);
	font-size: clamp(2rem, 5vw, 3.1875rem);
	font-weight: 700;
	line-height: 1.18;
	color: #fff;
}

.dehoust-page-hero__crumbs {
	background: linear-gradient(to right, var(--dehoust-color-primary), #3287da, #468ee3);
	padding-block: 15px;
}

.dehoust-page-hero__crumbs-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 1.125rem;
	line-height: 1.5;
	color: #fff;
}

.dehoust-page-hero__crumbs-item {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.dehoust-page-hero__crumbs-sep {
	color: rgb(255 255 255 / 0.8);
}

.dehoust-page-hero__crumbs-link {
	color: #fff;
	text-decoration: none;
}

.dehoust-page-hero__crumbs-link:hover,
.dehoust-page-hero__crumbs-link:focus-visible {
	text-decoration: underline;
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Baner podstrony na wąskich ekranach: długie nazwy produktów nie mieściły się
   w sztywnej wysokości i wychodziły na pasek okruszków.
   -------------------------------------------------------------------------- */

.dehoust-page-hero__banner {
	height: auto;
	min-height: 180px;
	padding-block: 1.25rem;
}

@media (min-width: 640px) {
	.dehoust-page-hero__banner {
		height: auto;
		min-height: 200px;
	}
}

@media (min-width: 1280px) {
	.dehoust-page-hero__banner {
		height: auto;
		min-height: 220px;
	}
}

@media (max-width: 639px) {
	.dehoust-page-hero__title {
		font-size: 1.5rem;
		line-height: 1.25;
	}
}

/* Okruszki płyną jak zwykły tekst — przy zawijaniu ukośnik zostawał sam
   w osobnej linii, bo każdy element był osobnym pudełkiem flex. */
.dehoust-page-hero__crumbs-list {
	display: block;
}

.dehoust-page-hero__crumbs-item {
	display: inline;
}

@media (max-width: 639px) {
	.dehoust-page-hero__crumbs-list {
		font-size: 0.875rem;
		line-height: 1.6;
	}
}

/* Wyśrodkowanie tytułu robimy na banerze, nie procentową wysokością kontenera:
   procent nie ma się do czego odnieść, gdy baner ma min-height zamiast height,
   więc cały nadmiar miejsca lądował pod tytułem. */
.dehoust-page-hero__banner {
	display: flex;
	align-items: center;
}

.dehoust-page-hero__container {
	height: auto;
	width: 100%;
}
