/* 基础变量 */
:root {
	--brand: #ff2b8b;
	--brand-600: #ea1978;
	--text: #222;
	--muted: #666;
	--bg: #f7f7f8;
	--card: #ffffff;
	--border: #e7e7ea;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	color: var(--text);
	font: 14px/1.6 -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica,
		Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	background: var(--bg);
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

img {
	max-width: 100%;
	display: block;
}

.container {
	width: min(1120px, 100%);
	padding: 0 16px;
	margin: 0 auto;
}

/* 头部 */
.site-header {
	background: #2f3337;
	color: #fff;
	border-bottom: 3px solid var(--brand);
}

.header-bar {
	height: 56px;
	display: flex;
	align-items: center;
}

.brand {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	width: 100%;
}

.brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #40454a;
	color: #ff4d9a;
	font-weight: 800;
}

.brand-name {
	letter-spacing: 1px;
}

.brand-logo {
	height: 28px;
}

/* Hero */
.hero {
	position: relative;
	height: 280px;
}

.hero-bg {
	position: absolute;
	inset: 0;
	background: url("./assets/hero.png") center/cover no-repeat;
	filter: grayscale(10%);
}

.hero-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.hero-title {
	color: #fff;
	font-size: 30px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	margin: 0 0 16px;
	width: 60%;
}

.hero-form {
	display: flex;
	gap: 12px;
	width: 60%;
	position: relative;
}

.hero-form .input {
	width: 100%;
	background: rgb(232 234 238 / 57%);
	border: none;
	border-radius: 5px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	backdrop-filter: saturate(140%) blur(6px);
	color: #ffffff;
	/* 输入内容颜色，避免在移动端被系统变淡 */
	-webkit-text-fill-color: #ffffff;
	/* iOS/微信 下 readonly 输入文字过淡的问题 */
}

/* 顶部搜索框 placeholder 颜色：在手机端保持足够对比度 */
.hero-form .input::placeholder,
.hero-form .input::-webkit-input-placeholder {
	color: rgba(255, 255, 255, 0.9);
}

.hero-form .btn {
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(255, 43, 139, 0.35);
}

.hero-cascade {
	position: absolute;
	left: 0;
	top: 56px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	display: none;
	z-index: 20;
	overflow: hidden;
}

.hero-mask {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 19;
}

.hero-cascade.mobile {
	position: fixed;
	left: 0;
	right: 0;
	top: auto;
	bottom: 0;
	transform: none;
	width: 100vw;
	max-width: none;
	height: 58%;
	border-radius: 16px 16px 0 0;
}

.hero-cascade.mobile .hero-cascade-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.hero-sheet-header {
	padding: 12px 14px 0;
}

.hero-sheet-title {
	text-align: center;
	font-weight: 700;
	font-size: 16px;
}

.sheet-steps {
	display: flex;
	gap: 18px;
	padding: 10px 16px;
}

.sheet-step {
	background: none;
	border: none;
	font-weight: 700;
	font-size: 16px;
	color: #111;
	position: relative;
	padding: 6px 2px;
}

.sheet-step.active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -3px;
	height: 3px;
	background: var(--brand);
	border-radius: 2px;
}

.hero-sheet-content {
	flex: 1;
	overflow: auto;
	padding: 8px 10px;
}

/* Mobile: override column/list styles inside the sheet */
.hero-cascade.mobile .hero-cascade-col {
	min-width: auto;
	min-height: auto;
	border-right: none;
	padding: 0 12px;
}

.hero-cascade.mobile .hero-cascade-option {
	padding: 14px 12px;
	cursor: pointer;
	font-size: 15px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.hero-cascade.mobile .hero-cascade-option+.hero-cascade-option {
	margin-top: 8px;
}

.hero-cascade.mobile .hero-cascade-option.active {
	background: #f3f5f9;
	border: 1px solid #e6e9f0;
}

.hero-cascade.mobile .hero-cascade-arrow {
	color: #bbb;
}

.hero-cascade.mobile .hero-cascade-check {
	color: var(--brand);
	font-weight: 700;
}

.hero-cascade-inner {
	display: flex;
}

.hero-cascade-col {
	min-height: 180px;
	min-width: 180px;
	border-right: 1px solid var(--border);
}

.hero-cascade-col:last-child {
	border-right: none;
}

.hero-cascade-option {
	padding: 10px 14px;
	cursor: pointer;
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.hero-cascade-option:hover,
.hero-cascade-option.active {
	background: #fdf1f7;
	color: var(--brand);
}

.hero-cascade-check {
	margin-right: 6px;
	width: 14px;
	color: var(--brand);
}

.hero-cascade-label {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hero-cascade-arrow {
	margin-left: 8px;
	color: #bbb;
}

.hero-cascade-empty {
	padding: 12px 14px;
	font-size: 13px;
	color: var(--muted);
}

.global-alert {
	display: none;
	position: fixed;
	top: 72px;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	z-index: 100;
	pointer-events: none;
}

.global-alert-pill {
	display: inline-flex;
	align-items: center;
	padding: 4px 16px;
	border-radius: 999px;
	background: #ffe7b8;
	border: 1px solid #ffd5a0;
	color: #c6761b;
	font-size: 13px;
}

.global-alert-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #f8c183;
	color: #fff;
	font-size: 12px;
	margin-right: 6px;
}

.global-alert-text {
	white-space: nowrap;
}

/* 表单控件 */
.input,
.select {
	width: 40%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	outline: none;
}

.input:focus,
.select:focus {
	border-color: var(--brand);
}

.btn {
	height: 35px;
	line-height: 15px;
	border: none;
	border-radius: 999px;
	padding: 0 20px;
	cursor: pointer;
	font-weight: 600;
	white-space: nowrap;
}

.btn-primary {
	background: var(--brand);
	color: #fff;
	padding: 0 30px;
	position: absolute;
	right: 2%;
	bottom: 45%;
}

.hero-content .btn-primary {
	position: absolute;
	right: 2%;
	bottom: 1%;
	height: 70%;
	margin-bottom: 1%;
}

.btn-primary:hover {
	background: var(--brand-600);
}

.btn-ghost {
	background: #fff;
	color: var(--brand);
	border: 1px solid #ffd0e5;
	border-radius: 999px;
	padding: 8px 14px;
}

/* 区块/标题 */
.section {
	padding: 32px 0;
}

.section-title {
	text-align: center;
	font-size: 22px;
	margin: 8px 0 16px;
	padding: 0 10px;
}

/* 手风琴 */
.accordion {
	display: grid;
	gap: 12px;
	padding: 0 10px;
}

.acc-item {
	background: #f5f6f8;
	border: 1px solid var(--border);
	border-radius: 12px;
	overflow: hidden;
	transition: background-color 0.2s ease;
}

.acc-header {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: #f2f2f499;
	border: none;
	font-size: 15px;
	cursor: pointer;
	color: var(--text);
}

/* 默认让标题文字继承按钮颜色，防止在部分手机浏览器被渲染成系统蓝色 */
.acc-header span {
	color: inherit;
}

/* 展开时整块背景变成白色 */
.acc-item.acc-open {
	background: #ffffff;
}

.acc-item.acc-open .acc-header {
	background: #ffffff;
}

/* 当折叠项被展开时，标题变为粉色 */
.acc-header[aria-expanded="true"] span {
	color: var(--brand);
}

.acc-header .chev {
	color: #bbb;
	font-size: 20px;
	transition: transform 0.2s;
}

.acc-item.acc-open .acc-header .chev {
	transform: rotate(90deg);
}

.acc-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.panel-inner {
	padding: 0 12px 16px;
}

.num {
	margin: 0 0 16px -18px;
}

.num li {
	margin: 8px 0;
}

.table {
	border: 1px solid var(--border);
	border-radius: 8px;
	overflow: hidden;
}

.tr {
	display: grid;
	grid-template-columns: 1fr 1fr 2fr;
	border-top: 1px solid var(--border);
}

.tr:first-child {
	border-top: none;
	background: #efeff3;
	font-weight: 600;
}

.tr>div {
	padding: 10px 12px;
}

/* 列表页 */
.series-card {
	margin: 20px 0 8px;
	background: linear-gradient(180deg, #ffe7f0, #fff);
	border: 1px solid #ffd5e6;
	border-radius: 16px;
	padding: 18px;
	position: relative;
}

.series-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.series-title {
	font-size: 20px;
	font-weight: 700;
}

.series-selector {
	display: flex;
	gap: 12px;
	align-items: center;
}

.series-selector .select {
	max-width: 100%;
	height: 40px;
	border-radius: 4px;
	border: 1px solid #d6d9e2;
	background: #fff;
	padding: 0 36px 0 12px;
	font-size: 14px;
	color: #333;
	/* 文本颜色，避免在移动端被渲染成系统蓝色 */
	-webkit-text-fill-color: #333;
	/* iOS/微信下下拉框文字颜色固定 */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.series-selector::after {
	content: none;
}

.search-row {
	position: relative;
	margin: 12px 0;
}

.icon-search {
	position: absolute;
	left: 24%;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	background: url("./assets/search.png") center/contain no-repeat;
	border: none;
}

.input-search {
	padding-left: 38px;
	padding-right: 44px;
	width: 40%;
	margin-left: 23%;
}

.btn-clear {
	position: absolute;
	left: calc(23% + 40% - 38px);
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	border-radius: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	outline: none;
	color: #666;
	font-size: 18px;
	line-height: 26px;
	padding: 0;
	cursor: pointer;
	display: none;
}

.btn-clear:hover {
	color: #333;
}

.btn-clear:focus {
	outline: none;
}

.btn-clear.is-visible {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tabs {
	display: flex;
	gap: 16px;
	border-bottom: 1px solid var(--border);
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	/* IE, Edge */
	scrollbar-width: none;
	/* Firefox */
}

.tabs::-webkit-scrollbar {
	display: none;
	/* Chrome, Safari */
}

.tab {
	background: none;
	border: none;
	padding: 10px 0;
	margin-bottom: -1px;
	cursor: pointer;
	color: var(--muted);
	font-weight: 600;
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	flex-shrink: 0;
	text-align: left;
}

.tab.active {
	color: var(--brand);
	border-color: var(--brand);
}

/* PC 左侧竖向分类 + 右侧列表布局 */
.catalog {
	display: block;
}

@media (min-width: 1025px) {
	.catalog {
		display: grid;
		grid-template-columns: 220px 1fr;
		align-items: start;
		gap: 24px;
	}

	.catalog .tabs {
		flex-direction: column;
		border-bottom: none;
		border-right: 1px solid var(--border);
		padding-right: 12px;
		overflow: visible;
	}

	.catalog .tab {
		padding: 10px 8px;
		border-bottom: none;
		border-left: 3px solid transparent;
		white-space: normal;
	}

	.catalog .tab.active {
		border-left-color: var(--brand);
	}
}

.price-list {
	list-style: none;
	padding: 0;
	margin: 8px 0;
	display: grid;
	gap: 8px;
}

.price-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 14px 16px;
}

.price-name {
	color: #333;
	margin-right: 20px;
}

.price-money {
	color: #333;
	font-weight: 700;
}

.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin: 24px 0 12px;
}

.page {
	min-width: 32px;
	height: 32px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid #e0e0e5;
	background: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: #666;
}

.page.active {
	background: #222;
	border-color: #222;
	color: #fff;
}

.page.nav {
	min-width: 32px;
	border-color: transparent;
	color: #bbb;
}

/* 页脚 */
.site-footer {
	background: #2f3337;
	color: #c9cbd1;
	padding: 24px 0;
	margin-top: 32px;
	border-top: 3px solid var(--brand);
	/* 不再固定在视口底部，改为随内容自然向下 */
}

.site-footer p {
	margin: 4px 0;
	text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
	.hero {
		height: 240px;
	}

	.hero-title {
		font-size: 28px;
	}

	.hero-title {
		width: 90%;
	}

	.hero-form {
		flex-direction: column;
		gap: 10px;
		width: 90%;
	}

	.hero-form .btn {
		width: 100%;
	}

	.hero-content .btn-primary {
		position: static;
	}

	.hero-form .input {
		height: 54px;
	}

	.input-search {
		padding-left: 38px;
		padding-right: 44px;
		width: 100%;
		margin-left: 0;
		font-size: 15px;
		/* 列表页搜索框在手机端的文字略大一点 */
	}

	.btn-clear {
		left: auto;
		right: 10px;
	}

	.input-search::placeholder,
	.input-search::-webkit-input-placeholder {
		font-size: 15px;
	}

	.input,
	.select {
		width: 100%;
	}

	.btn-primary {
		background: var(--brand);
		color: #fff;
		padding: 0 30px;
		position: static;
	}

	/* 手机端：首页顶部“查询”按钮文字稍微放大 */
	.hero-form .btn-primary {
		font-size: 15px;
	}

	.icon-search {
		left: 12px;
	}

	.section-title {
		text-align: left;
		padding: 0 10px;
	}

	#btn-choose {
		position: absolute;
		right: 16px;
		top: 19px;
		height: 30px;
		padding: 0 14px;
	}

	.series-title {
		padding-right: 96px;
	}

	/* 手机端：备件价格分类标签字号稍微放大 */
	.tabs .tab {
		font-size: 15px;
	}

	.series-header .btn-ghost {
		display: none;
	}

	.price-list li {
		padding: 12px;
	}

	.pagination {
		display: none;
	}
}