/* CG-310 — homepage grading category / company picker */

/* The host section already supplies the top gap (`pt-5`), so this only pads the tail. */
.home-grading-picker {
	padding: 4px 0 64px;
	background: #f5f5f7;
}

.home-grading-picker__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 20px;
}

.home-grading-picker__headline {
	margin: 0 0 28px;
	text-align: center;
	font-size: clamp(1.1rem, 1.9vw, 1.5rem);
	font-weight: 400;
	line-height: 1.6;
	color: #1a1a1a;
}

.home-grading-picker__region-dropdown {
	display: inline-block;
	vertical-align: baseline;
}

.home-grading-picker__region {
	display: inline-flex;
	align-items: center;
	vertical-align: baseline;
	gap: 5px;
	margin: 0 3px;
	padding: 0;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-weight: 700;
	font-size: inherit;
	line-height: inherit;
	color: #111;
	cursor: pointer;
}

/* Outline comes from the app-wide `.fi` standard in main.css; only the scale is local. */
.home-grading-picker__region .fi {
	font-size: 0.82em;
}

.home-grading-picker__region .fa-caret-down {
	font-size: 0.58em;
}

.home-grading-picker__region-dropdown .dropdown-menu {
	min-width: 180px;
	padding: 6px;
	font-size: 0.95rem;
}

.home-grading-picker__region-dropdown .dropdown-item {
	border-radius: 5px;
	font-weight: 600;
}

.home-grading-picker__categories {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 1fr;
	gap: 14px;
	margin-bottom: 12px;
	scroll-margin-top: 84px;
}

.home-grading-picker__category {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 76px;
	padding: 14px 12px;
	border: 1px solid #d7d7dd;
	border-radius: 14px;
	background: #fff;
	color: #222;
	font-weight: 600;
	font-size: 0.95rem;
	text-align: center;
	line-height: 1.25;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

/* Chips with artwork are taller; the rest stretch to match so rows stay level. */
.home-grading-picker__category-art {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	min-height: 104px;
}

.home-grading-picker__category-art img {
	max-width: 100%;
	max-height: 116px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.home-grading-picker__category-art.is-pair img {
	max-width: calc(50% - 4px);
}

.home-grading-picker__category-label {
	display: block;
}

.home-grading-picker__category:hover {
	border-color: #6737b0;
}

.home-grading-picker__category.is-active {
	border-color: #6737b0;
	box-shadow: inset 0 0 0 2px #6737b0;
	background: #f7f1ff;
	color: #4a1f8a;
}

.home-grading-picker__note {
	margin: 0 0 36px;
	text-align: center;
	font-size: 0.82rem;
	color: #666;
}

.home-grading-picker__note strong {
	color: #444;
}

.home-grading-picker__section-title {
	margin: 0 0 20px;
	text-align: center;
	font-size: 1.2rem;
	font-weight: 700;
	color: #1a1a1a;
}

.home-grading-picker__companies {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 20px;
}

.home-company-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #dedee4;
	border-radius: 18px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 8px 18px rgba(20, 20, 40, 0.05);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-company-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 24px rgba(20, 20, 40, 0.1);
	color: inherit;
	text-decoration: none;
}

.home-company-card__brand {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 148px;
	padding: 28px 22px;
}

.home-company-card__brand img {
	display: block;
	width: 85%;
	height: 56px;
	object-fit: contain;
	object-position: center;
}

.home-company-card__brand-fallback {
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
}

.home-company-card--psa .home-company-card__brand { background: #dd3527; }
.home-company-card--bgs .home-company-card__brand { background: #000; }
.home-company-card--mba .home-company-card__brand { background: #1e1e1e; }
.home-company-card--cgc .home-company-card__brand { background: #000; }
.home-company-card--tag .home-company-card__brand {
	background: #fff;
	border-bottom: 1px solid #ececf0;
}
.home-company-card--brg .home-company-card__brand { background: #4d5b9f; }

.home-company-card__meta {
	padding: 20px 18px 22px;
	text-align: center;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.25;
	color: #111;
	background: #fff;
}

.home-company-card__price {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 8px;
	white-space: nowrap;
}

.home-company-card__price-prefix {
	max-width: 48px;
	padding-bottom: 0.18em;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.05;
	text-align: left;
	white-space: normal;
	color: #666;
}

.home-company-card__price-amount {
	font-size: clamp(1.55rem, 2.8vw, 2rem);
	font-weight: 850;
	line-height: 1;
	letter-spacing: -0.025em;
	color: #111;
}

.home-company-card__price-unit {
	padding-bottom: 0.18em;
	font-size: 0.9rem;
	font-weight: 700;
	color: #555;
}

.home-company-card__meta.is-loading {
	color: #888;
	font-weight: 500;
}

.home-grading-picker__section-title {
	scroll-margin-top: 84px;
}

.home-grading-picker__return {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 1020;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 15px;
	border: 0;
	border-radius: 999px;
	background: #6737b0;
	box-shadow: 0 8px 24px rgba(44, 21, 78, 0.28);
	color: #fff;
	font-size: 0.86rem;
	font-weight: 700;
	line-height: 1;
}

.home-grading-picker__return:hover,
.home-grading-picker__return:focus-visible {
	background: #4a1f8a;
}

.home-grading-picker__empty,
.home-grading-picker__loading {
	margin: 0 0 20px;
	text-align: center;
	color: #666;
}

.home-grading-picker__footer-note {
	margin: 0;
	text-align: center;
	font-size: 0.82rem;
	color: #666;
}

@media (max-width: 991.98px) {
	.home-grading-picker__categories {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.home-grading-picker__companies {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.home-grading-picker {
		padding: 4px 0 48px;
	}

	.home-grading-picker__categories {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-grading-picker__category-art {
		min-height: 84px;
	}

	.home-grading-picker__category-art img {
		max-height: 92px;
	}

	.home-grading-picker__companies {
		grid-template-columns: 1fr;
	}

	.home-company-card__price-amount {
		font-size: 1.8rem;
	}

	.home-grading-picker__return {
		right: 14px;
		bottom: 14px;
	}
}
