/*
 * 取扱ブランド一覧 (/brands/) — page-scoped styles.
 *
 * Loaded only on this page (see inc/assets.php). Everything is nested under
 * .page-brands so nothing here reaches the rest of the site.
 *
 * Logo tiles are white (T026 ⑲): the section keeps the site's beige ground,
 * and each logo sits on a white card so marks supplied as white-on-dark and
 * marks supplied as dark-on-light both read the same way.
 */

.page-brands .brand-directory { background: var(--color-bg-alt, #faf8f4); }

/* ---------- filter bar ---------- */
.brand-filter {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 28px;
}
.brand-filter__categories {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.brand-chip {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 20px;
	border: 1px solid var(--color-gold, #c8a35e);
	border-radius: 999px;
	background: #fff;
	color: var(--color-black, #2b2b2b);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	transition: background var(--transition-base), color var(--transition-base);
}
.brand-chip:hover { background: #f6eeda; }
.brand-chip.is-active {
	background: var(--color-gold, #c8a35e);
	border-color: var(--color-gold, #c8a35e);
	color: #fff;
}
.brand-chip:focus-visible { outline: 3px solid var(--color-gold-dark, #a8823f); outline-offset: 2px; }

.brand-filter__label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--color-black, #2b2b2b);
}
.brand-filter__row {
	display: flex;
	gap: 10px;
	max-width: 520px;
}
.brand-filter__row input[type='search'] {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	padding: 10px 16px;
	border: 1px solid #d9cfb8;
	border-radius: 4px;
	background: #fff;
	font-size: 16px; /* 16px keeps iOS from zooming the field on focus. */
}
.brand-filter__row input[type='search']:focus-visible { outline: 3px solid var(--color-gold-dark, #a8823f); outline-offset: 1px; }
.brand-filter__submit {
	flex: none;
	min-height: 48px;
	padding: 10px 24px;
	border: 0;
	border-radius: 4px;
	background: var(--color-gold, #c8a35e);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.brand-filter__submit:hover { background: var(--color-gold-dark, #a8823f); }

/* ---------- grid ---------- */
.brand-directory__count {
	margin: 0 0 16px;
	font-size: 14px;
	color: #6b5a45;
}
.brand-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.brand-grid__item.is-filtered { display: none; }

.brand-tile {
	display: flex;
	flex-direction: column;
	gap: 10px;
	height: 100%;
	padding: 14px;
	border: 1px solid #e6dcc6;
	border-radius: 6px;
	background: #fff;
	text-align: center;
}
.brand-tile { justify-content: center; }
.brand-tile__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 5 / 2;
	padding: 6px;
	background: #fff;
}
.brand-tile__logo img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
/* No logo was supplied: the name stands in, never an invented mark. */
.brand-tile__wordmark {
	font-family: var(--font-serif, serif);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	color: #3a2e21;
	word-break: break-word;
}
.brand-tile__name {
	margin-top: auto;
	font-size: 13.5px;
	line-height: 1.5;
	color: #6b5a45;
	word-break: break-word;
}

.brand-directory__empty {
	margin: 32px 0 0;
	padding: 28px 16px;
	border: 1px dashed #d9cfb8;
	border-radius: 6px;
	background: #fff;
	text-align: center;
	font-size: 15px;
	color: #6b5a45;
}
.brand-directory__empty.is-filtered { display: none; }

.brand-directory__note {
	max-width: 900px;
	margin: 36px auto 0;
	font-size: 14px;
	line-height: 1.9;
	color: #6b5a45;
	text-align: center;
}
.brand-directory__cta { margin-top: 32px; text-align: center; }

@media (max-width: 1024px) {
	.brand-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
	.brand-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.brand-tile { padding: 10px; }
	.brand-tile__wordmark { font-size: 15px; }
	.brand-tile__name { font-size: 12.5px; }
	.brand-filter__row { max-width: none; }
	.brand-chip { min-height: 40px; padding: 7px 16px; font-size: 14px; }
}

/* ---------- 買取実績 filters (shared chips) ---------- */
.result-filter {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0 0 32px;
	padding: 22px;
	border: 1px solid #e6dcc6;
	border-radius: 6px;
	background: var(--color-bg-alt, #faf8f4);
}
.result-filter__group { display: flex; flex-direction: column; gap: 10px; }
.result-filter__label {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-black, #2b2b2b);
}
.result-filter__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.result-filter__row { display: flex; gap: 10px; flex-wrap: wrap; }
.result-filter__row select {
	flex: 1;
	min-width: 220px;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #d9cfb8;
	border-radius: 4px;
	background: #fff;
	font-size: 16px;
}
.result-filter__row select:focus-visible { outline: 3px solid var(--color-gold-dark, #a8823f); outline-offset: 1px; }
.result-filter__hint { margin: 0; font-size: 13px; line-height: 1.8; color: #6b5a45; }
.result-filter__empty {
	margin: 32px 0;
	padding: 28px 16px;
	border: 1px dashed #d9cfb8;
	border-radius: 6px;
	background: #fff;
	text-align: center;
	font-size: 15px;
	color: #6b5a45;
}

@media (max-width: 767px) {
	.result-filter { padding: 16px; }
	.result-filter__row select { min-width: 0; width: 100%; }
	.result-filter__row .brand-filter__submit { width: 100%; }
}
