/*
 * 首页（第五版 V5Home、V5Mobile）。手机：主视觉 → 快速入口 → 传单 → 微信 → 关于 → 部门（横向滑动）→ 留言。
 * 电脑：主视觉（含微信）→ 传单 → 关于 → 部门 → 留言 → 来店逛逛。
 */

/* ---------- 主视觉 ---------- */

.fm-hero__text {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 28px var(--fm-gutter) 0;
}

.fm-hero__tagline {
	margin: 0;
	color: var(--fm-color-accent);
	font-family: var(--fm-font-display);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0.2em;
}

.fm-hero__title {
	margin: 0;
	color: var(--fm-color-primary);
	font-family: var(--fm-font-display);
	font-size: 40px;
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: 0.02em;
	overflow-wrap: break-word;
}

/* 英文标题比中文长得多，字号小一档，长单词放不下时断开 */
.fm-hero__title:lang(en) {
	font-size: 34px;
	letter-spacing: 0;
	hyphens: auto;
}

.fm-hero__subtitle {
	max-width: 30em;
	margin: 0;
	color: var(--fm-color-text-lead);
	font-size: 16px;
	line-height: 1.75;
}

.fm-hero__buttons .fm-button {
	flex: 1 1 auto;
	min-height: 54px;
}

.fm-hero__directions,
.fm-hero__wechat {
	display: none;
}

.fm-hero__media {
	position: relative;
	height: 250px;
	margin-top: 40px;
}

.fm-hero__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 30% 50%;
}

/* 活动吊牌：嫩绿卡片，左边一个穿绳孔，数字加大 */
.fm-tag {
	position: absolute;
	top: -26px;
	right: var(--fm-gutter);
	display: flex;
	flex-direction: column;
	padding: 12px 16px 10px 32px;
	border-radius: var(--fm-radius-button);
	background: var(--fm-color-cta);
	box-shadow: var(--fm-shadow-tag);
	color: var(--fm-color-on-cta);
	text-decoration: none;
	transform: rotate(4deg);

	&:hover {
		color: var(--fm-color-on-cta);
	}
}

.fm-tag__hole {
	position: absolute;
	top: 50%;
	left: 12px;
	width: 10px;
	height: 10px;
	margin-top: -5px;
	border-radius: 50%;
	background: var(--fm-color-tint-1);
	box-shadow: inset 0 0 0 2px var(--fm-color-cta-edge);
}

.fm-tag__kicker {
	font-size: 13px;
	font-weight: 700;
}

.fm-tag__main {
	display: flex;
	gap: 2px;
	align-items: baseline;
	line-height: 1;
}

.fm-tag__word {
	font-family: var(--fm-font-display);
	font-size: 20px;
	font-weight: 700;
}

.fm-tag__num {
	font-size: 52px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.fm-tag__num--long {
	font-size: 38px;
}

.fm-tag__date {
	padding-top: 4px;
	font-size: 12px;
	font-weight: 700;
}

.fm-tag__desc {
	display: none;
	font-size: 12px;
}

/* ---------- 快速入口（手机） ---------- */

.fm-quick {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-bottom: 1px solid var(--fm-color-line);
}

.fm-quick__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px;
	border-bottom: 1px solid var(--fm-color-line);
	color: var(--fm-color-text);
	text-decoration: none;

	&:nth-child(odd) {
		border-right: 1px solid var(--fm-color-line);
	}

	&:nth-last-child(-n + 2) {
		border-bottom: 0;
	}
}

.fm-quick__title {
	color: var(--fm-color-primary);
	font-family: var(--fm-font-display);
	font-size: 19px;
	font-weight: 700;
}

.fm-quick__text {
	color: var(--fm-color-text-muted);
	font-size: 13px;
}

/* ---------- 本周传单 ---------- */

.fm-home-flyer .fm-heading__aside {
	flex-basis: 100%;
	order: 3;
	margin-left: 0;
}

.fm-home-flyer__pages {
	display: grid;
	gap: 28px;
	padding: 12px 8px 0;
}

.fm-home-flyer__second,
.fm-home-flyer__side .fm-home-flyer__subtitle,
.fm-home-flyer__side .fm-diamonds {
	display: none;
}

.fm-home-flyer__side {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 28px;
}

.fm-home-flyer__subtitle {
	margin: 0;
	color: var(--fm-color-primary);
	font-family: var(--fm-font-display);
	font-size: 28px;
	font-weight: 700;
}

.fm-notice {
	margin: 0;
	padding: 12px 16px;
	border-left: 4px solid var(--fm-color-cta-edge);
	border-radius: var(--fm-radius-button);
	background: var(--fm-color-surface);
	font-weight: 700;
}

.fm-home__wechat-panel {
	margin: 32px var(--fm-gutter);
}

/* ---------- 关于和承诺 ---------- */

.fm-home-about {
	display: grid;
	gap: 24px;
	align-items: center;
}

.fm-home-about__img {
	display: none;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--fm-radius-card);
}

.fm-home-about__text {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fm-home-about__link {
	align-self: flex-start;
	padding-block: 10px;
	font-weight: 700;
}

.fm-promises__list {
	box-sizing: border-box;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: calc(var(--fm-width-page) - 2 * var(--fm-gutter));
	margin: 0 var(--fm-gutter);
	padding: 0;
	border-top: 1px solid var(--fm-color-line);
	border-bottom: 1px solid var(--fm-color-line);
	list-style: none;
}

.fm-promises__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 8px;

	&:first-child {
		padding-left: 0;
	}

	& + & {
		border-left: 1px solid var(--fm-color-line);
	}
}

.fm-promises__title {
	color: var(--fm-color-primary);
	font-family: var(--fm-font-display);
	font-size: 17px;
	font-weight: 700;
}

.fm-promises__text {
	color: var(--fm-color-text-muted);
	font-size: 12px;
}

/* ---------- 部门卡片：手机上横向滑动 ---------- */

.fm-home-depts {
	padding-right: 0;

	.fm-heading {
		padding-right: var(--fm-gutter);
	}
}

.fm-dept-cards {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0 var(--fm-gutter) 8px 0;
	overflow-x: auto;
	list-style: none;
}

.fm-dept-cards > li {
	flex-shrink: 0;
	width: 150px;
}

.fm-dept-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: var(--fm-color-on-primary);
	text-decoration: none;

	&:hover {
		color: var(--fm-color-on-primary);
	}

	&:hover .fm-dept-card__label {
		background: var(--fm-color-accent);
	}
}

.fm-dept-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--fm-radius-tile) var(--fm-radius-tile) 0 0;
}

.fm-dept-card__img--empty {
	background: var(--fm-color-tint-2);
}

.fm-dept-card__label {
	display: flex;
	flex-grow: 1;
	gap: 8px;
	align-items: baseline;
	justify-content: space-between;
	padding: 8px 12px;
	border-radius: 0 0 var(--fm-radius-tile) var(--fm-radius-tile);
	background: var(--fm-color-primary);
}

.fm-dept-card__name {
	font-family: var(--fm-font-display);
	font-size: 18px;
	font-weight: 700;
}

.fm-dept-card__en {
	display: none;
	color: var(--fm-color-highlight);
	font-size: 13px;
}

.fm-dept-cards__more {
	display: none;
}

.fm-dept-card--more {
	justify-content: center;
	align-items: center;
	gap: 10px;
	min-height: 100%;
	border: 1px solid var(--fm-color-line);
	border-radius: var(--fm-radius-card);
	background: var(--fm-color-tint-1);
	color: var(--fm-color-primary);
	text-align: center;

	&:hover {
		color: var(--fm-color-primary);
		background: var(--fm-color-tint-2);
	}
}

.fm-dept-card__more-title {
	font-family: var(--fm-font-display);
	font-size: 24px;
	font-weight: 700;
}

.fm-dept-card__more-text {
	color: var(--fm-color-text-muted);
	font-size: 15px;
}

/* ---------- 留言 ---------- */

.fm-home-feedback__inner {
	display: grid;
	gap: 16px;
}

.fm-home-feedback .fm-heading {
	margin-bottom: 12px;
}

.fm-home-feedback__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: stretch;
}

.fm-home-feedback__review {
	align-self: flex-start;
	padding-block: 10px;
	font-weight: 700;
}

/* ---------- 来店逛逛（电脑） ---------- */

.fm-home-visit {
	display: none;
}

/* ---------- 电脑 ---------- */

@media (min-width: 768px) {

	.fm-hero {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		align-items: stretch;
	}

	.fm-hero__text {
		justify-content: center;
		gap: 22px;
		padding: 64px 48px 72px max(var(--fm-gutter), calc((100vw - var(--fm-width-page)) / 2 + var(--fm-gutter)));
	}

	.fm-hero__tagline {
		font-size: 22px;
	}

	.fm-hero__title {
		font-size: 52px;
		line-height: 1.12;
	}

	.fm-hero__title:lang(en) {
		font-size: 40px;
	}

	.fm-hero__subtitle {
		font-size: 18px;
		line-height: 1.8;
	}

	.fm-hero__buttons .fm-button {
		flex: 0 0 auto;
		padding-inline: 30px;
	}

	.fm-hero__directions {
		display: inline-flex;
	}

	.fm-hero__wechat {
		display: flex;
		padding-top: 10px;
		margin-top: 4px;
		border-top: 1px solid var(--fm-color-line);
	}

	.fm-hero__media {
		height: auto;
		min-height: 520px;
		margin-top: 0;
	}

	.fm-hero__media picture,
	.fm-hero__img {
		position: absolute;
		inset: 0;
	}

	.fm-tag {
		top: 40px;
		right: auto;
		left: 36px;
		gap: 2px;
		box-sizing: border-box;
		min-width: 248px;
		max-width: 320px;
		padding: 20px 22px 18px 40px;
		transform: rotate(-4deg);
	}

	.fm-tag__hole {
		left: 14px;
		width: 12px;
		height: 12px;
		margin-top: -6px;
	}

	.fm-tag__kicker {
		font-size: 16px;
	}

	.fm-tag__word {
		font-size: 32px;

		&:last-child {
			font-size: 40px;
		}
	}

	.fm-tag__num {
		font-size: 92px;
	}

	.fm-tag__num--long {
		font-size: 64px;
	}

	.fm-tag__date {
		padding-top: 6px;
		font-size: 14px;
	}

	.fm-tag__desc {
		display: block;
	}

	.fm-quick,
	.fm-home__wechat-panel {
		display: none;
	}

	.fm-home-flyer .fm-section {
		padding-block: 80px 88px;
	}

	.fm-home-flyer .fm-heading__aside {
		flex-basis: auto;
		order: 0;
		margin-left: auto;
	}

	.fm-home-flyer .fm-heading__link {
		display: none;
	}

	.fm-home-flyer__grid {
		display: grid;
		grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
		gap: 56px;
		align-items: start;
	}

	.fm-home-flyer__pages {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 12px 0 0;
	}

	.fm-home-flyer__second {
		display: block;
		margin-top: 24px;
	}

	.fm-home-flyer__side {
		margin-top: 0;
	}

	.fm-home-flyer__side .fm-home-flyer__subtitle,
	.fm-home-flyer__side .fm-diamonds {
		display: flex;
	}

	.fm-home-flyer__side .fm-diamonds li {
		font-size: 17px;
	}

	.fm-home-about {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 48px;
		padding-block: 88px 40px;
	}

	.fm-home-about__img {
		display: block;
	}

	.fm-home-about .fm-heading__title {
		font-size: 36px;
	}

	.fm-promises__list {
		margin-inline: auto;
		padding-block: 24px;
	}

	.fm-promises__item {
		gap: 4px;
		padding: 4px 24px;
	}

	.fm-promises__title {
		font-size: 22px;
	}

	.fm-promises__text {
		font-size: 15px;
	}

	.fm-home-depts {
		padding: 56px var(--fm-gutter) 88px;
	}

	.fm-home-depts .fm-heading {
		padding-right: 0;
	}

	.fm-dept-cards {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 28px 20px;
		padding: 0;
		overflow: visible;
	}

	.fm-dept-cards > li {
		width: auto;
	}

	.fm-dept-card__img {
		border-radius: var(--fm-radius-card) var(--fm-radius-card) 0 0;
	}

	.fm-dept-card__label {
		padding: 12px 16px;
		border-radius: 0 0 var(--fm-radius-card) var(--fm-radius-card);
	}

	.fm-dept-card__name {
		font-size: 22px;
	}

	.fm-dept-card__en {
		display: inline;
	}

	.fm-dept-cards__more {
		display: block;
	}

	.fm-home-feedback .fm-section {
		padding-block: 72px;
	}

	.fm-home-feedback__inner {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 48px;
		align-items: center;
	}

	.fm-home-feedback__actions {
		align-items: flex-start;
	}

	.fm-home-visit {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		gap: 48px;
		align-items: stretch;
		padding-block: 88px;
	}

	.fm-home-visit__info {
		display: flex;
		flex-direction: column;
		gap: 24px;

		.fm-heading {
			margin-bottom: 0;
		}

		.fm-facts {
			font-size: 17px;
		}
	}
}

@media (min-width: 1100px) {

	.fm-hero__title {
		font-size: 72px;
	}

	.fm-hero__title:lang(en) {
		font-size: 52px;
	}
}
