/**
 * Brand list (template-brands.php, inc/brands.php): lead, tiles of the brands, facts under them. Follows the
 * "Strona marek" mockup. Colours: assets/css/tokens.css.
 */

/* Tiles of the brands are rounder than the rest of the shop. */
.sz-brands {
	--sz-radius: 8px;
}

/* The page takes the whole container, like the full width template of the theme (no page sidebar). */
.sz-brands.content-area {
	float: none;
	width: 100%;
}

/* ------------------------------------------------------------------
   Lead under the title
   ------------------------------------------------------------------ */
.sz-brands .entry-content > p {
	max-width: 800px;
	margin: 0;
	font-size: 16px;
	line-height: 26px;
	color: var(--sz-ink2);
}

/* ------------------------------------------------------------------
   Tiles: 4 in a row, 3 on tablets, 2 on phones
   ------------------------------------------------------------------ */
.sz-brands .sz-brands__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}
.sz-brands .sz-brands__grid li {
	margin: 0;
}
.sz-brands .sz-brand {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 248px;
	padding: 20px 22px 18px;
	color: var(--sz-ink);
	background: #fff;
	border: 1px solid var(--sz-line);
	border-radius: var(--sz-radius);
	transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.sz-brands .sz-brand:hover {
	border-color: var(--sz-field);
	box-shadow: 0 6px 18px rgba(20, 20, 20, 0.07);
}
.sz-brands .sz-brand:focus-visible {
	outline: 2px solid var(--sz-navy);
	outline-offset: 2px;
}
.sz-brand__logo {
	display: flex;
	align-items: center;
	height: 72px;
}
.sz-brands .sz-brand__logo-image {
	width: auto;
	/* Never wider than the tile, which is narrow with 3 columns on tablets. */
	max-width: min(152px, 100%);
	height: auto;
	max-height: 64px;
	object-fit: contain;
}
.sz-brand__wordmark {
	font-family: Poppins, sans-serif;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--sz-navy);
}
.sz-brands .sz-brand__name {
	margin: 14px 0 0;
	font-family: Poppins, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 24px;
	color: var(--sz-ink);
}
.sz-brands .sz-brand__tagline {
	margin: 4px 0 12px;
	font-size: 13.5px;
	line-height: 20px;
	color: var(--sz-ink2);
}
.sz-brand__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	font-size: 13px;
	color: var(--sz-mute);
}
.sz-brand__foot span {
	white-space: nowrap;
}
.sz-brand__more {
	font-weight: 600;
	color: var(--sz-navy);
}
.sz-brand__more::after {
	content: " \2192";
}

/* ------------------------------------------------------------------
   Facts under the tiles
   ------------------------------------------------------------------ */
.sz-brands .sz-brands__facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 40px;
	margin: 32px 0 64px;
	padding: 22px 28px;
	list-style: none;
	background: var(--sz-bg2);
	border-radius: var(--sz-radius);
}
.sz-brands .sz-brands__facts li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
}
.sz-brands .sz-brands__facts .sz-icon {
	flex: none;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: var(--sz-navy);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.sz-brands .sz-brands__facts strong {
	display: block;
	font-family: Poppins, sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: var(--sz-ink);
}
.sz-brands .sz-brands__facts span {
	display: block;
	margin-top: 2px;
	font-size: 13.5px;
	line-height: 20px;
	color: var(--sz-ink2);
}

@media (max-width: 992px) {
	.sz-brands .sz-brands__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}
	.sz-brands .sz-brand {
		padding: 18px 16px 16px;
	}
	/* The whole tile is the link; the narrow tile has no room for "Zobacz" next to the count. */
	.sz-brand__more {
		display: none;
	}
	.sz-brands .sz-brands__facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 600px) {
	.sz-brands .entry-content > p {
		font-size: 14.5px;
		line-height: 22px;
	}
	.sz-brands .sz-brands__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
		margin-top: 18px;
	}
	.sz-brands .sz-brand {
		min-height: 178px;
		padding: 14px 14px 12px;
	}
	.sz-brand__logo {
		height: 52px;
	}
	.sz-brands .sz-brand__logo-image {
		max-width: min(110px, 100%);
		max-height: 46px;
	}
	.sz-brand__wordmark {
		font-size: 19px;
	}
	.sz-brands .sz-brand__name {
		margin-top: 8px;
		font-size: 15px;
		line-height: 22px;
	}
	.sz-brands .sz-brand__tagline {
		display: -webkit-box;
		overflow: hidden;
		margin: 2px 0 8px;
		font-size: 12.5px;
		line-height: 18px;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.sz-brand__foot {
		font-size: 12.5px;
	}
	.sz-brands .sz-brands__facts {
		margin: 24px 0 40px;
		padding: 20px;
	}
}
