/**
 * Hub pages (template-hub.php, inc/hub.php): the banner with the animal, the tiles of the categories, the button
 * to all products, the picked products, the brands and the guide. Follows the "Hub v6, opcja A" mockup.
 *
 * Colours: assets/css/tokens.css. Sections: 1. banner, 2. section heads, 3. tiles, 4. all products, 5. picked
 * products, 6. brands, 7. guide and questions, 8. narrower screens.
 */

.sz-hub-page {
	--sz-hub-radius: 8px;
	--sz-hub-band: linear-gradient(100deg, #eef2f8 0%, #f6f8fb 100%);
	--sz-hub-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* The page takes the whole container (no shop sidebar). */
.sz-hub.content-area {
	float: none;
	width: 100%;
}

/* ------------------------------------------------------------------
   1. Banner: 300 px, the text on the left, the animal on the right, lying on a soft shadow
   ------------------------------------------------------------------ */
.sz-hub-banner {
	background: var(--sz-hub-band);
}
.sz-hub-banner__inner {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 300px;
}
.sz-hub-banner__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 640px;
	max-width: 100%;
	padding: 24px 0;
}
.sz-hub-banner .woocommerce-breadcrumb {
	margin: 0;
	padding: 0;
	font-size: 13px;
	line-height: 18px;
}
.sz-hub-banner .sz-hub-banner__title {
	margin: 0;
	font-size: 36px;
	font-weight: 700;
	line-height: 44px;
	color: var(--sz-ink);
}
.sz-hub-banner__lead p {
	margin: 0;
	font-size: 16px;
	line-height: 26px;
	color: var(--sz-ink2);
}
.sz-hub-banner__animal {
	position: absolute;
	right: 84px;
	bottom: 26px;
	line-height: 0;
}
.sz-hub-banner__animal img {
	position: relative;
	display: block;
	width: auto;
	height: 252px;
}
.sz-hub-banner__animal::before {
	content: "";
	position: absolute;
	right: -8%;
	bottom: -12px;
	left: -8%;
	height: 30px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(43, 58, 103, 0.2), rgba(43, 58, 103, 0));
}

/* ------------------------------------------------------------------
   2. Section heads: the heading on the left, a link on the right
   ------------------------------------------------------------------ */
.sz-hub-section {
	padding-top: 40px;
}
.sz-hub-section:first-of-type {
	padding-top: 36px;
}
.sz-hub-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin-bottom: 18px;
}
.sz-hub .sz-hub-head__title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	color: var(--sz-ink);
}
.sz-hub-head__link,
.sz-hub-guide-link {
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	white-space: nowrap;
	color: var(--sz-navy);
}
.sz-hub-head__link:hover,
.sz-hub-guide-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sz-hub-head__link::after {
	content: " \2192";
}
.sz-hub-guide-link::after {
	content: " \2193";
}

/* ------------------------------------------------------------------
   3. Tiles of the categories: 3 in a row; the link of the title covers the whole tile
   ------------------------------------------------------------------ */
.sz-hub .sz-hub-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sz-hub .sz-hub-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	margin: 0;
	background: #fff;
	border: 1px solid var(--sz-line);
	border-radius: var(--sz-hub-radius);
	transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.sz-hub .sz-hub-tile:hover {
	border-color: var(--sz-field);
	box-shadow: 0 6px 18px rgba(20, 20, 20, 0.07);
}
.sz-hub-tile__photo {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	height: 200px;
	background: var(--sz-photo);
}
.sz-hub .sz-hub-tile__image {
	width: auto;
	height: 176px;
	mix-blend-mode: multiply;
}
.sz-hub-tile__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 6px;
	padding: 16px 18px 18px;
}
.sz-hub .sz-hub-tile__title {
	margin: 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 24px;
}
.sz-hub .sz-hub-tile__title a {
	color: var(--sz-ink);
}
.sz-hub-tile__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--sz-hub-radius);
}
/* The focus ring goes around the whole tile, which the link covers. */
.sz-hub .sz-hub-tile__title a:focus-visible {
	outline: 0;
}
.sz-hub-tile__title a:focus-visible::after {
	outline: 2px solid var(--sz-navy);
	outline-offset: -2px;
}
.sz-hub .sz-hub-tile__text {
	margin: 0;
	font-size: 14px;
	line-height: 21px;
	color: var(--sz-ink2);
}
.sz-hub .sz-hub-tile__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: auto 0 0;
	padding-top: 8px;
	font-size: 13.5px;
	line-height: 20px;
	color: var(--sz-mute);
}
.sz-hub-tile__price strong {
	font-weight: 600;
	color: var(--sz-ink);
}
.sz-hub-tile__more {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
	font-weight: 600;
	color: var(--sz-navy);
}
.sz-hub-tile__more::after {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--sz-hub-arrow) center / contain no-repeat;
	mask: var(--sz-hub-arrow) center / contain no-repeat;
}

/* ------------------------------------------------------------------
   4. Button to all products of the hub
   ------------------------------------------------------------------ */
.sz-hub-all {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding-top: 32px;
}
.sz-hub .sz-hub-all__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 48px;
	padding: 0 28px;
	font-size: 15px;
	font-weight: 600;
	color: var(--sz-navy);
	border: 1.5px solid var(--sz-navy);
	border-radius: var(--sz-radius);
}
.sz-hub .sz-hub-all__link:hover {
	color: #fff;
	background: var(--sz-navy);
}
.sz-hub .sz-hub-all__link:focus-visible {
	outline: 3px solid var(--sz-focus);
	outline-offset: 2px;
}
.sz-hub-all__link::after {
	content: "";
	flex: none;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--sz-hub-arrow) center / contain no-repeat;
	mask: var(--sz-hub-arrow) center / contain no-repeat;
}
.sz-hub-all__words {
	display: inline-block;
}
/* On wide screens the link to the guide stands next to the first heading. */
.sz-hub-all .sz-hub-guide-link {
	display: none;
}

/* ------------------------------------------------------------------
   5. Picked products: the product tile of the lists (category-view.css), 4 in a row
   ------------------------------------------------------------------ */
.sz-hub-products,
.sz-hub-brands {
	padding-top: 56px;
}
.sz-hub-products .sz-hub-head {
	margin-bottom: 20px;
}
.sz-hub-products ul.products {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------
   6. Brands: logos in one row
   ------------------------------------------------------------------ */
.sz-hub .sz-hub-brands__list {
	display: grid;
	grid-template-columns: repeat(8, minmax(0, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sz-hub .sz-hub-brands__list li {
	margin: 0;
}
.sz-hub-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	background: #fff;
	border: 1px solid var(--sz-line);
	border-radius: var(--sz-hub-radius);
	transition: border-color 0.15s ease-out;
}
.sz-hub-brand:hover {
	border-color: var(--sz-field);
}
.sz-hub-brand:focus-visible {
	outline: 2px solid var(--sz-navy);
	outline-offset: 2px;
}
.sz-hub .sz-hub-brand__logo {
	width: auto;
	max-width: 78%;
	height: auto;
	max-height: 34px;
	object-fit: contain;
}
.sz-hub-brand__wordmark {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--sz-navy);
}
.sz-hub .sz-hub-brands__note {
	margin: 14px 0 0;
	font-size: 14px;
	line-height: 21px;
	color: var(--sz-ink2);
}

/* ------------------------------------------------------------------
   7. Guide and questions, under a line across the container
   ------------------------------------------------------------------ */
.sz-hub-guide {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--sz-line);
	/* The sticky header of the theme would cover the heading after a jump from the link above. */
	scroll-margin-top: 96px;
}
.sz-hub-guide__text {
	max-width: 760px;
	font-size: 15px;
	line-height: 25px;
	color: var(--sz-ink2);
}
.sz-hub-guide__text h2 {
	margin: 0 0 10px;
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	color: var(--sz-ink);
}
.sz-hub-guide__text h3 {
	margin: 24px 0 6px;
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
	color: var(--sz-ink);
}
.sz-hub-guide__text p {
	margin: 0 0 12px;
}
/* Links in the text: navy and underlined (the accent of the theme has too little contrast for body text). */
.sz-hub-guide__text a,
.sz-hub-faq__answer a {
	color: var(--sz-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.sz-hub-guide__text > :last-child {
	margin-bottom: 0;
}
.sz-hub .sz-hub-guide__questions {
	margin: 28px 0 4px;
	font-size: 18px;
	font-weight: 600;
	line-height: 26px;
	color: var(--sz-ink);
}
.sz-hub h2.sz-hub-guide__questions {
	margin-top: 0;
	font-size: 24px;
	line-height: 32px;
}
.sz-hub-faq details {
	border-bottom: 1px solid var(--sz-line);
}
.sz-hub-faq summary {
	position: relative;
	padding: 15px 36px 15px 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 24px;
	list-style: none;
	color: var(--sz-ink);
	cursor: pointer;
}
.sz-hub-faq summary::-webkit-details-marker {
	display: none;
}
.sz-hub-faq summary::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 4px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	background: var(--sz-chevron) center / contain no-repeat;
	transition: transform 0.15s ease-out;
}
.sz-hub-faq details[open] summary::after {
	transform: rotate(180deg);
}
.sz-hub-faq summary:focus-visible {
	outline: 2px solid var(--sz-navy);
	outline-offset: 2px;
}
.sz-hub-faq__answer {
	max-width: 760px;
	padding: 0 0 16px;
	font-size: 15px;
	line-height: 24px;
	color: var(--sz-ink2);
}
.sz-hub-faq__answer p {
	margin: 0 0 8px;
}
.sz-hub-faq__answer p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------
   8. Narrower screens
   ------------------------------------------------------------------ */

/* Small laptops and tablets in landscape: the container is narrower than the text plus the animal. */
@media (max-width: 1199px) {
	.sz-hub-banner__text {
		width: 58%;
	}
	.sz-hub-banner__animal {
		right: 24px;
	}
	.sz-hub-banner__animal img {
		height: 224px;
	}
	.sz-hub .sz-hub-brands__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Tablets: a smaller banner and smaller tiles, still 3 in a row (the groups of the menu hold 3 categories, so
   2 in a row would leave one tile alone under the other two). */
@media (max-width: 992px) {
	.sz-hub-banner__inner {
		min-height: 260px;
	}
	.sz-hub-banner .sz-hub-banner__title {
		font-size: 28px;
		line-height: 36px;
	}
	.sz-hub-banner__lead p {
		font-size: 15px;
		line-height: 24px;
	}
	.sz-hub-banner__animal {
		right: 12px;
		bottom: 22px;
	}
	.sz-hub-banner__animal img {
		height: 180px;
	}
	.sz-hub .sz-hub-tiles {
		gap: 14px;
	}
	.sz-hub-tile__photo {
		height: 150px;
	}
	.sz-hub .sz-hub-tile__image {
		height: 132px;
	}
	.sz-hub-tile__body {
		padding: 12px 14px 14px;
	}
	.sz-hub .sz-hub-tile__title {
		font-size: 15.5px;
		line-height: 21px;
	}
	.sz-hub .sz-hub-tile__text {
		font-size: 13px;
		line-height: 19px;
	}
	.sz-hub .sz-hub-tile__foot {
		font-size: 13px;
	}
}

/* Phones: the animal under the text, the categories as a list of rows. */
@media (max-width: 700px) {
	.sz-hub-banner__inner {
		display: block;
		min-height: 0;
	}
	.sz-hub-banner__text {
		gap: 8px;
		width: auto;
		padding: 14px 0 0;
	}
	.sz-hub-banner .woocommerce-breadcrumb {
		font-size: 12.5px;
	}
	.sz-hub-banner .sz-hub-banner__title {
		font-size: 24px;
		line-height: 30px;
	}
	.sz-hub-banner__lead p {
		font-size: 14px;
		line-height: 21px;
	}
	.sz-hub-banner__animal {
		position: relative;
		right: auto;
		bottom: auto;
		display: block;
		width: fit-content;
		margin: 6px 7px 0 auto;
		padding-bottom: 14px;
	}
	.sz-hub-banner__animal img {
		height: 150px;
	}
	.sz-hub-banner__animal::before {
		bottom: 4px;
		height: 20px;
	}

	.sz-hub-section {
		padding-top: 24px;
	}
	.sz-hub-section:first-of-type {
		padding-top: 18px;
	}
	.sz-hub-head {
		margin-bottom: 4px;
	}
	.sz-hub .sz-hub-head__title {
		font-size: 19px;
		line-height: 26px;
	}
	/* The link to the guide moves under the button to all products. */
	.sz-hub-head .sz-hub-guide-link {
		display: none;
	}
	.sz-hub-all .sz-hub-guide-link {
		display: inline;
		font-size: 13.5px;
		white-space: normal;
		text-align: center;
	}

	.sz-hub .sz-hub-tiles {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}
	.sz-hub .sz-hub-tile {
		flex-direction: row;
		align-items: center;
		gap: 12px;
		overflow: visible;
		padding: 10px 28px 10px 0;
		border: 0;
		border-bottom: 1px solid var(--sz-line);
		border-radius: 0;
	}
	.sz-hub .sz-hub-tile:hover {
		box-shadow: none;
	}
	.sz-hub-tile::after {
		content: "";
		position: absolute;
		top: 50%;
		right: 2px;
		width: 16px;
		height: 16px;
		margin-top: -8px;
		background: var(--sz-navy);
		-webkit-mask: var(--sz-hub-arrow) center / contain no-repeat;
		mask: var(--sz-hub-arrow) center / contain no-repeat;
	}
	.sz-hub-tile__photo {
		width: 72px;
		height: 72px;
		border-radius: 6px;
	}
	.sz-hub .sz-hub-tile__image {
		width: 64px;
		height: 64px;
	}
	.sz-hub-tile__body {
		gap: 0;
		min-width: 0;
		padding: 0;
	}
	.sz-hub .sz-hub-tile__title {
		font-size: 15px;
		line-height: 20px;
	}
	.sz-hub .sz-hub-tile__text,
	.sz-hub-tile__more {
		display: none;
	}
	.sz-hub .sz-hub-tile__foot {
		margin: 0;
		padding-top: 2px;
		font-size: 12.5px;
		line-height: 18px;
	}
	.sz-hub-tile__price strong {
		font-weight: 400;
		color: inherit;
	}

	.sz-hub-all {
		padding-top: 22px;
	}
	.sz-hub .sz-hub-all__link {
		width: 100%;
		padding: 0 12px;
		font-size: 14.5px;
	}
	.sz-hub-all__link::after {
		display: none;
	}
	.sz-hub-all__long {
		display: none;
	}
	.sz-hub-all__words::first-letter {
		text-transform: uppercase;
	}

	.sz-hub-products,
	.sz-hub-brands {
		padding-top: 32px;
	}
	.sz-hub-products .sz-hub-head,
	.sz-hub-brands .sz-hub-head {
		margin-bottom: 12px;
	}
	.sz-hub .sz-hub-brands__list {
		gap: 8px;
	}
	.sz-hub-brand {
		height: 48px;
	}
	.sz-hub .sz-hub-brand__logo {
		max-height: 22px;
	}
	.sz-hub .sz-hub-brands__note {
		font-size: 13px;
		line-height: 20px;
	}

	.sz-hub-guide {
		margin-top: 32px;
		padding-top: 26px;
	}
	.sz-hub-guide__text {
		font-size: 14.5px;
		line-height: 23px;
	}
	.sz-hub-guide__text h2,
	.sz-hub h2.sz-hub-guide__questions {
		font-size: 19px;
		line-height: 26px;
	}
	.sz-hub .sz-hub-guide__questions {
		margin-top: 20px;
		font-size: 16px;
		line-height: 24px;
	}
	.sz-hub-faq summary {
		padding-top: 13px;
		padding-bottom: 13px;
		font-size: 14.5px;
	}
}
