/*
 * "Marche" index page (page-marche.php).
 *
 * Brand cards show vendor logos, not photography. Unlike the category cards
 * on page-categorie.php — where a photo is cropped to a square on purpose —
 * a logo must never be cropped, so the artwork is contained inside a neutral
 * tile and the label sits underneath it instead of on a dark gradient laid
 * over the image (which would wash out black-on-transparent marks).
 */

.brand-card {
	display: flex;
	flex-direction: column;
}

.brand-card__media {
	display: grid;
	place-items: center;
	/* 4:3 rather than a square: brand marks are wide, so a square tile
	   left a band of dead space above and below every logo. */
	aspect-ratio: 4 / 3;
	padding: 1.5rem;
	background: #fff;
	border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
}

.brand-card__logo {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-card:hover .brand-card__logo {
	transform: scale(1.06);
}

.brand-card__fallback {
	font-family: var(--font-display), serif;
	font-size: 1.05rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-align: center;
	color: color-mix(in oklch, var(--foreground) 70%, transparent);
}

.brand-card__meta {
	padding: 0.85rem 1rem 1rem;
	text-align: center;
}

.brand-card__name {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--foreground);
}

.brand-card__count {
	margin-top: 0.2rem;
	font-size: 0.65rem;
	color: var(--muted-foreground);
}

@media (prefers-reduced-motion: reduce) {
	.brand-card__logo {
		transition: none;
	}
	.brand-card:hover .brand-card__logo {
		transform: none;
	}
}
