/* ---------------------------------------------------------------------------
 * RMS Commerce Core — brands.
 *
 * The A–Z directory, the homepage wall and the brand archive hero, in the
 * presentation the EM storefront runs (em-brands / em-brandhero), against
 * the shared tokens. Depends on rms-base. The tiny filter script lives in
 * rms-brands.js.
 * ------------------------------------------------------------------------- */

/* ---- Directory ------------------------------------------------------------ */

.rms-brands {
	max-width: var(--rms-maxw, 1280px);
	margin: 0 auto;
	padding: 8px var(--rms-gutter, 16px) 48px;
	color: var(--rms-text, #12181d);
}

.rms-brands__bar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 12px 0;
	background: var(--rms-surface, #fff);
	border-bottom: 1px solid var(--rms-border, #dfe6ec);
	margin-bottom: 24px;
}

.rms-brands__filter {
	flex: 1 1 240px;
	min-width: 0;
	min-height: 42px;
	padding: 0 14px;
	font: inherit;
	font-size: 14.5px;
	color: var(--rms-text, #12181d);
	background: var(--rms-surface, #fff);
	border: 1px solid var(--rms-border, #dfe6ec);
	border-radius: var(--rms-radius, 10px);
}

.rms-brands__filter:focus {
	border-color: var(--rms-primary, #0098db);
	outline: none;
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--rms-primary, #0098db) 22%, transparent);
}

.rms-brands__az {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
}

.rms-brands__az a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--rms-text-mut, #5b6b78);
	text-decoration: none;
}

.rms-brands__az a:hover,
.rms-brands__az a:focus {
	background: var(--rms-primary, #0098db);
	color: #fff;
}

.rms-brands__group {
	margin-bottom: 34px;
	scroll-margin-top: 150px;
}

.rms-brands__letter {
	margin: 0 0 12px;
	padding-bottom: 8px;
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--rms-text-mut, #5b6b78);
	border-bottom: 1px solid var(--rms-border, #dfe6ec);
}

.rms-brands__grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 1000px) {
	.rms-brands__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.rms-brands__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rms-brands__bar {
		position: static;
	}
}

.rms-brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 18px 12px;
	text-align: center;
	text-decoration: none;
	background: var(--rms-surface, #fff);
	border: 1px solid var(--rms-border, #dfe6ec);
	border-radius: var(--rms-radius, 10px);
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.rms-brand-card:hover,
.rms-brand-card:focus {
	border-color: var(--rms-primary, #0098db);
	box-shadow: 0 10px 26px rgba(2, 6, 23, 0.07);
	transform: translateY(-2px);
}

.rms-brand-card__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	width: 100%;
}

.rms-brand-card__logo img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
}

.rms-brand-card__logo--text {
	font-weight: 800;
	font-size: 17px;
	letter-spacing: -0.02em;
	color: var(--rms-primary, #0098db);
}

.rms-brand-card__name {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rms-text, #12181d);
}

.rms-brand-card__count {
	font-size: 11.5px;
	color: var(--rms-text-mut, #5b6b78);
}

.rms-brands__empty {
	text-align: center;
	color: var(--rms-text-mut, #5b6b78);
	padding: 30px 0;
}

/* ---- Homepage wall -------------------------------------------------------- */

.rms-brandwall__grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
}

@media (max-width: 1000px) {
	.rms-brandwall__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 560px) {
	.rms-brandwall__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.rms-brandwall__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 12px 16px;
	background: var(--rms-surface, #fff);
	border: 1px solid var(--rms-border, #dfe6ec);
	border-radius: var(--rms-radius, 10px);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--rms-text, #12181d);
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.rms-brandwall__item:hover,
.rms-brandwall__item:focus {
	border-color: var(--rms-primary, #0098db);
	box-shadow: 0 8px 20px rgba(2, 6, 23, 0.06);
	color: var(--rms-primary-d, #0078ad);
}

.rms-brandwall__item img {
	max-height: 40px;
	max-width: 100%;
	object-fit: contain;
}

/* ---- Brand archive hero --------------------------------------------------- */

.rms-brandhero {
	background: var(--rms-muted, #f6f8fa);
	border-bottom: 1px solid var(--rms-border, #dfe6ec);
	margin-bottom: 26px;
}

.rms-brandhero__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	padding-top: 32px;
	padding-bottom: 32px;
}

@media (max-width: 700px) {
	.rms-brandhero__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
}

.rms-brandhero__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 130px;
	height: 74px;
	padding: 10px;
	background: var(--rms-surface, #fff);
	border: 1px solid var(--rms-border, #dfe6ec);
	border-radius: 10px;
}

.rms-brandhero__logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.rms-brandhero__kicker {
	margin: 0 0 6px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--rms-primary-d, #0078ad);
}

.rms-brandhero__title {
	margin: 0 0 8px;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--rms-text, #12181d);
}

.rms-brandhero__desc {
	margin: 0 0 8px;
	max-width: 70ch;
	font-size: 15px;
	line-height: 1.6;
	color: var(--rms-text-mut, #5b6b78);
}

.rms-brandhero__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	margin: 14px 0 0;
}

.rms-brandhero__hint {
	font-size: 12.5px;
	color: var(--rms-text-mut, #5b6b78);
}
