/**
 * Shop by Brand — homepage (reuses .brand-card from brand-grid.css at 180×180).
 */

.shop-by-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding-block-end: 48px;
}

.shop-by-brand .home-page-section__inner {
	width: 100%;
	max-width: min(100%, 1200px);
	margin-inline: auto;
}

.shop-by-brand__brands {
	--brand-card-size: 180px;
	--brand-card-grid-gap: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin-inline: auto;
	padding: 0 var(--onoff-gutter) 2.5rem;
	box-sizing: border-box;
}

.shop-by-brand__brands .brand-grid-embed {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.shop-by-brand__brands .brand-grid-embed--home {
	width: 100%;
}

.shop-by-brand__brands .brand-grid-rows {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--brand-card-grid-gap);
	width: 100%;
	margin-inline: auto;
}

.shop-by-brand__brands .brand-grid__row {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: flex-start;
	gap: var(--brand-card-grid-gap);
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* 180×180 cards — same .brand-card__link shell as /brands/ */
.shop-by-brand__brands .brand-card {
	flex: 0 0 var(--brand-card-size);
	width: var(--brand-card-size);
	height: var(--brand-card-size);
	max-width: var(--brand-card-size);
	max-height: var(--brand-card-size);
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.shop-by-brand__brands .brand-card__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 14px;
}

.shop-by-brand__brands .brand-card__figure {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 0;
	margin: 0;
	overflow: hidden;
}

.shop-by-brand__brands .brand-card__logo {
	display: block;
	flex: 1 1 auto;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(var(--brand-card-size) - 56px);
	margin-inline: auto;
	aspect-ratio: auto;
	object-fit: contain;
	object-position: center center;
}

.shop-by-brand__brands .brand-card__name {
	flex: 0 0 auto;
	margin: 0;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* Show All Brands — pill button */
.shop-by-brand__brands .brand-grid-embed__actions {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-block-start: 24px;
}

.shop-by-brand__brands .shop-by-brand__show-all {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 224.51px;
	width: min(100%, 224.51px);
	height: 59.2px;
	padding: 0 28px;
	border: 1.6px solid #262415;
	border-radius: 999999px;
	background: #fff;
	color: #262415;
	font-family: var(--onoff-font-family, 'Cairo', sans-serif);
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.shop-by-brand__brands .shop-by-brand__show-all:hover,
.shop-by-brand__brands .shop-by-brand__show-all:focus-visible {
	background: #262415;
	color: #fff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(242, 251, 4, 0.45);
}

@media (max-width: 899px) {
	.shop-by-brand__brands {
		--brand-card-size: 155px;
		--brand-card-grid-gap: 14.4px;
	}

	.shop-by-brand__brands .brand-grid__row {
		flex-wrap: wrap;
		justify-content: center;
		align-items: stretch;
		max-width: calc(2 * var(--brand-card-size) + var(--brand-card-grid-gap));
	}

	.shop-by-brand__brands .brand-card {
		flex: 0 0 155px;
		width: 155px;
		height: 155px;
		min-width: 155px;
		min-height: 155px;
		max-width: 155px;
		max-height: 155px;
	}

	.shop-by-brand__brands .brand-card__link {
		padding: 0;
	}

	.shop-by-brand__brands .brand-card__figure {
		gap: 0;
		justify-content: center;
		align-items: center;
	}

	.shop-by-brand__brands .brand-card__logo {
		display: block;
		flex: 0 0 auto;
		width: auto;
		height: 125px;
		max-width: 100%;
		max-height: 125px;
		margin-inline: auto;
		object-fit: contain;
		object-position: center center;
	}

	.shop-by-brand__brands .brand-card__name {
		font-size: 0.84375rem;
	}
}

@media (max-width: 479px) {
	.shop-by-brand__brands .shop-by-brand__show-all {
		min-width: 0;
		width: min(100%, 224.51px);
		height: auto;
		min-height: 52px;
		padding: 12px 24px;
	}
}
