/*
 * Cakes page (/cakes/), per the Claude Design "Website/Cakes.html".
 * Shared hub layout lives in assets/css/hub.css.
 */

/* Celebration grid: the "Build your own" feature card sits fourth, inside
 * the server-rendered product grid. The collection's wrappers step aside
 * (display: contents) so its cards and the feature share one grid. */
.mbh-featgrid.wp-block-group {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
}

.mbh-featgrid > * {
	margin-block: 0;
}

.mbh-featgrid .wb-shop-collection,
.mbh-featgrid .wb-shop-collection__grid {
	display: contents;
}

.mbh-featgrid .wb-product-card {
	order: 2;
}

.mbh-featgrid .wb-product-card:nth-child(-n + 3) {
	order: 0;
}

.mbh-featgrid .mbh-feat {
	order: 1;
}

.mbh-feat {
	display: flex;
	flex-direction: column;
	padding: 18px;
	border-radius: 26px;
	background: var(--mbh-jam);
	color: var(--mbh-cream);
	text-decoration: none;
	transition: transform 0.24s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.24s;
}

.mbh-feat:hover {
	color: var(--mbh-cream);
	transform: translateY(-6px);
	box-shadow: 0 22px 44px rgba(58, 15, 0, 0.12);
}

.mbh-feat__im {
	display: block;
	aspect-ratio: 1;
	border-radius: 16px;
	overflow: hidden;
	background: var(--mbh-jam-deep);
}

.mbh-feat__im img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mbh-feat:hover .mbh-feat__im img {
	transform: scale(1.06) rotate(-2.5deg);
}

.mbh-feat__b {
	display: flex;
	flex-direction: column;
	padding: 18px 6px 4px;
}

.mbh-feat__nm {
	font-family: var(--mbh-sub);
	font-size: 22px;
	line-height: 1.15;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.mbh-feat__mt {
	margin-top: 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--mbh-peach);
}

.mbh-feat__go {
	margin-top: 8px;
	font-family: var(--mbh-disp);
	font-size: 22px;
	line-height: 1;
	color: var(--mbh-cream);
}

@media (max-width: 1100px) {
	.mbh-featgrid.wp-block-group {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px;
	}

	.mbh-featgrid .wb-product-card:nth-child(-n + 3) {
		order: 2;
	}

	.mbh-featgrid .wb-product-card:nth-child(-n + 2) {
		order: 0;
	}

	.mbh-feat {
		padding: 14px;
		border-radius: 22px;
	}

	.mbh-feat__nm {
		font-size: 20px;
	}
}

@media (max-width: 640px) {
	.mbh-featgrid.wp-block-group {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.mbh-featgrid .mbh-feat {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
		gap: 12px;
		padding: 10px;
		border-radius: 20px;
	}

	.mbh-featgrid .wb-product-card:nth-child(-n + 2) {
		order: 2;
	}

	.mbh-feat__im {
		flex: none;
		width: 96px;
		border-radius: 13px;
	}

	.mbh-feat__b {
		padding: 0;
	}

	.mbh-feat__nm {
		font-size: 17px;
	}

	.mbh-feat__mt {
		font-size: 14px;
	}
}
