.hfm-menu {
	--hfm-border: #e8e1da;
	--hfm-text: #211f1d;
	--hfm-muted: #716860;
	--hfm-accent: #6d4a8d;
	--hfm-accent-dark: #563678;
	--hfm-bg-soft: #fbf7f2;
	color: var(--hfm-text);
}

.hfm-tabs {
	background: #fff;
	border-bottom: 8px solid #eee9e3;
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 10px 0 12px;
	position: sticky;
	top: 0;
	z-index: 5;
	scrollbar-color: var(--hfm-accent) #eee9e3;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.hfm-tabs::-webkit-scrollbar {
	height: 14px;
}

.hfm-tabs::-webkit-scrollbar-track {
	background: #eee9e3;
}

.hfm-tabs::-webkit-scrollbar-thumb {
	background: var(--hfm-accent);
	border: 3px solid #eee9e3;
	border-radius: 999px;
}

.hfm-tab {
	border: 1px solid var(--hfm-border);
	border-radius: 999px;
	color: var(--hfm-text);
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	padding: 11px 16px;
	text-decoration: none;
	white-space: nowrap;
}

.hfm-tab:hover,
.hfm-tab:focus,
.hfm-tab.is-active {
	background: var(--hfm-accent);
	border-color: var(--hfm-accent);
	color: #fff;
	outline: none;
}

.hfm-section {
	padding: 28px 0;
	scroll-margin-top: 86px;
}

.hfm-section-header {
	align-items: baseline;
	display: flex;
	gap: 12px;
	justify-content: flex-start;
	margin-bottom: 14px;
}

.hfm-section-header h2 {
	font-size: 24px;
	line-height: 1.15;
	margin: 0;
}

.hfm-section-header span {
	color: var(--hfm-muted);
	font-size: 13px;
	margin-left: auto;
	white-space: nowrap;
}

.hfm-edit-section {
	color: var(--hfm-accent);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.hfm-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(var(--hfm-columns, 4), minmax(0, 1fr));
}

.hfm-menu[data-columns="1"] .hfm-grid { --hfm-columns: 1; }
.hfm-menu[data-columns="2"] .hfm-grid { --hfm-columns: 2; }
.hfm-menu[data-columns="3"] .hfm-grid { --hfm-columns: 3; }
.hfm-menu[data-columns="4"] .hfm-grid { --hfm-columns: 4; }
.hfm-menu[data-columns="5"] .hfm-grid { --hfm-columns: 5; }
.hfm-menu[data-columns="6"] .hfm-grid { --hfm-columns: 6; }

.hfm-product {
	background: #fff;
	border: 1px solid var(--hfm-border);
	border-radius: 8px;
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
}

.hfm-product-media {
	aspect-ratio: 1 / 1;
	background: var(--hfm-bg-soft);
	display: block;
	overflow: hidden;
}

.hfm-product-image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.hfm-product-body {
	display: grid;
	gap: 8px;
	padding: 12px;
}

.hfm-product h3 {
	font-size: 15px;
	line-height: 1.25;
	margin: 0;
	min-height: 38px;
}

.hfm-product h3 a {
	color: inherit;
	text-decoration: none;
}

.hfm-product-price {
	color: var(--hfm-muted);
	font-size: 14px;
	line-height: 1.3;
}

.hfm-product-button,
.hfm-more {
	align-items: center;
	background: var(--hfm-accent);
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-size: 14px;
	font-weight: 600;
	justify-content: center;
	line-height: 1;
	min-height: 38px;
	padding: 10px 14px;
	text-decoration: none;
}

.hfm-more {
	grid-column: 1 / -1;
	justify-self: center;
	margin-top: 8px;
}

.hfm-product-button:hover,
.hfm-product-button:focus,
.hfm-more:hover,
.hfm-more:focus {
	background: var(--hfm-accent-dark);
	color: #fff;
}

.hfm-loader {
	background: var(--hfm-bg-soft);
	border: 1px solid var(--hfm-border);
	border-radius: 8px;
	color: var(--hfm-muted);
	padding: 18px;
	text-align: center;
}

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

	.hfm-tabs {
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding-left: 14px;
		padding-right: 14px;
	}
}

@media (max-width: 520px) {
	.hfm-tabs {
		gap: 8px;
		padding-top: 8px;
	}

	.hfm-tab {
		font-size: 12px;
		padding: 10px 12px;
	}

	.hfm-section {
		padding: 22px 0;
	}

	.hfm-section-header {
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.hfm-section-header h2 {
		font-size: 21px;
	}

	.hfm-section-header span {
		margin-left: 0;
	}

	.hfm-grid {
		gap: 10px;
	}

	.hfm-product h3 {
		font-size: 14px;
		min-height: 35px;
	}

	.hfm-product-body {
		padding: 10px;
	}
}
