/*
 * Alican Premium 1.4.3 — homepage category matrix.
 * Desktop: exactly 8 top-level categories in 2 rows x 4 columns.
 */

.home-main .category-showcase {
	margin-top: 26px;
	margin-bottom: 0;
}

.home-main .category-showcase__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-flow: row;
	gap: 12px;
}

.home-main .category-card,
.home-main .category-card:first-child,
.home-main .category-card:not(:first-child) {
	min-width: 0;
	min-height: 142px;
	border-radius: 16px;
}

.home-main .category-card__copy,
.home-main .category-card:first-child .category-card__copy,
.home-main .category-card:not(:first-child) .category-card__copy {
	width: 56%;
	padding: 17px 0 17px 17px;
}

.home-main .category-card__copy h2,
.home-main .category-card:first-child h2,
.home-main .category-card:not(:first-child) h2 {
	margin: 0 0 5px;
	font-size: clamp(0.93rem, 1.05vw, 1.08rem);
	line-height: 1.18;
	letter-spacing: -0.025em;
}

.home-main .category-card__copy p {
	max-width: 145px;
	font-size: 0.68rem;
	line-height: 1.42;
}

.home-main .category-card__image,
.home-main .category-card:first-child .category-card__image {
	top: 4px;
	right: 2px;
	width: 47%;
	height: calc(100% - 8px);
	padding: 12px 10px;
	object-fit: contain;
}

.home-main .category-card__image--fallback {
	padding: 7px;
	object-fit: contain;
}

.home-main .category-card__arrow,
.home-main .category-card:not(:first-child) .category-card__arrow {
	bottom: 12px;
	left: 15px;
	width: 29px;
	height: 29px;
}

/* A four-column matrix needs slightly tighter rhythm before the product section. */
.home-main .category-showcase + .product-showcase {
	padding-top: 44px;
}

@media (max-width: 1080px) {
	.home-main .category-showcase__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.home-main .category-card,
	.home-main .category-card:first-child,
	.home-main .category-card:not(:first-child) {
		min-height: 150px;
	}

	.home-main .category-card__copy h2,
	.home-main .category-card:first-child h2,
	.home-main .category-card:not(:first-child) h2 {
		font-size: 1.05rem;
	}
}

@media (max-width: 620px) {
	.home-main .category-showcase {
		margin-top: 18px;
	}

	.home-main .category-showcase__grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.home-main .category-card,
	.home-main .category-card:first-child,
	.home-main .category-card:not(:first-child) {
		min-height: 132px;
	}

	.home-main .category-card__copy,
	.home-main .category-card:first-child .category-card__copy,
	.home-main .category-card:not(:first-child) .category-card__copy {
		width: 58%;
		padding: 16px 0 16px 16px;
	}

	.home-main .category-card__image,
	.home-main .category-card:first-child .category-card__image {
		width: 43%;
		padding: 9px;
	}

	.home-main .category-showcase + .product-showcase {
		padding-top: 36px;
	}
}
