/**
 * 顶栏导航：Logo 与菜单横向协调，避免产品分类项过度贴右。
 */
:root {
	--ywx-nav-current-color: #c8161d;
	--ywx-nav-link-color: #333;
}

/* 桌面主导航：无点击黑框，当前项红色 + 底部细线 */
@media (min-width: 768px) {
	#header_main .menu > li > a {
		position: relative;
		color: var(--ywx-nav-link-color, #333);
		font-weight: 500;
		letter-spacing: normal;
		outline: none !important;
		border: 0 !important;
		box-shadow: none !important;
		background-color: transparent !important;
		-webkit-tap-highlight-color: transparent;
		transition: color 0.2s ease;
	}

	#header_main .menu > li > a:hover,
	#header_main .menu > li > a:focus,
	#header_main .menu > li > a:active,
	#header_main .menu > li > a:focus-visible {
		color: var(--ywx-nav-current-color) !important;
		background-color: transparent !important;
		outline: none !important;
		box-shadow: none !important;
		border: 0 !important;
	}

	#header_main .nav > li > a:hover,
	#header_main .nav > li > a:focus,
	#header_main .nav > li.nav-active,
	#header_main .nav > li.nav-active > a {
		background-color: transparent !important;
		outline: none !important;
		box-shadow: none !important;
	}

	#header_main .menu > li.is-current > a,
	#header_main .menu > li.is-current > a:hover,
	#header_main .menu > li.is-current > a:focus,
	#header_main .menu > li.is-current > a:active,
	#header_main .menu > li.is-current > a:focus-visible {
		color: var(--ywx-nav-current-color) !important;
		font-weight: 600;
		background-color: transparent !important;
		outline: none !important;
		box-shadow: none !important;
		border: 0 !important;
		text-decoration: underline;
		text-decoration-color: var(--ywx-nav-current-color);
		text-underline-offset: 0.5em;
		text-decoration-thickness: 2px;
	}

	#header_main .menu > li.is-current > a::after {
		content: none;
	}

	.nav_fixed_height #header_main .menu > li.is-current > a::after {
		content: none;
	}

	/* 导航下拉：统一面板与 hover，避免主题 props 红底+红字冲突 */
	#header_main .dropdown-menu.child-menu {
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 6px;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
		padding: 6px 0;
		overflow: hidden;
		background: #fff !important;
	}

	#header_main .dropdown-menu.child-menu > li,
	#header_main .dropdown-menu.child-menu.ywxcss-parent-theme-bg-color > li:hover {
		border: 0 !important;
		background: transparent !important;
		color: inherit !important;
	}

	#header_main .dropdown-menu.child-menu.ywxcss-parent-theme-bg-color > li:hover > a:not(:hover):not(:focus) {
		color: #374151 !important;
		background-color: #fff !important;
	}

	#header_main .dropdown-menu.child-menu > li > a {
		padding: 10px 16px !important;
		color: #374151 !important;
		background-color: #fff !important;
		font-weight: 400;
		transition: color 0.15s ease, background-color 0.15s ease;
	}

	#header_main .dropdown-menu.child-menu > li > a:hover,
	#header_main .dropdown-menu.child-menu > li > a:focus,
	#header_main .dropdown-menu.child-menu > li > a:active,
	#header_main .dropdown-menu.child-menu > li > a:focus-visible {
		color: #fff !important;
		background-color: var(--ywx-nav-current-color) !important;
		outline: none !important;
		box-shadow: none !important;
		border: 0 !important;
		text-decoration: none !important;
	}

	#header_main .dropdown-menu.child-menu > li.is-current > a,
	#header_main .dropdown-menu.child-menu > li.is-current > a:focus {
		color: var(--ywx-nav-current-color) !important;
		background-color: #fff !important;
		font-weight: 600;
		box-shadow: inset 3px 0 0 var(--ywx-nav-current-color);
		outline: none !important;
	}

	#header_main .dropdown-menu.child-menu > li.is-current > a:hover,
	#header_main .dropdown-menu.child-menu > li.is-current > a:active,
	#header_main .dropdown-menu.child-menu > li.is-current > a:focus-visible {
		color: #fff !important;
		background-color: var(--ywx-nav-current-color) !important;
		box-shadow: none;
		outline: none !important;
	}

	#header_main .dropdown-menu.child-menu .child-menu2 {
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 6px;
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
		padding: 6px 0;
		background: #fff !important;
	}

	#header_main .dropdown-menu.child-menu .child-menu2 > li:hover {
		background: transparent !important;
	}

	#header_main .dropdown-menu.child-menu .child-menu2 > li > a {
		color: #374151 !important;
		background-color: #fff !important;
		padding: 10px 16px !important;
		font-size: 13px !important;
		min-height: 0 !important;
		line-height: 1.45 !important;
	}

	#header_main .dropdown-menu.child-menu .child-menu2 > li > a:hover,
	#header_main .dropdown-menu.child-menu .child-menu2 > li > a:focus,
	#header_main .dropdown-menu.child-menu .child-menu2 > li > a:active {
		color: #fff !important;
		background-color: var(--ywx-nav-current-color) !important;
		text-decoration: none !important;
	}

	/* 下拉紧贴主菜单：取消 80px line-height 造成的“悬空”间距 */
	#header_main .menu > li {
		display: inline-flex;
		align-items: center;
		align-self: stretch;
	}

	#header_main .menu > li > a {
		line-height: 1.25 !important;
		height: auto !important;
		display: inline-flex;
		align-items: center;
	}

	#header_main .menu > li:hover,
	#header_main .menu > li.dropdown:hover {
		background-color: transparent !important;
	}

	#header_main .menu > li > .dropdown-menu.child-menu,
	#header_main .nav .dropdown-menu.child-menu {
		top: 100% !important;
		margin-top: 0 !important;
	}

	/* 滚动吸顶：紧凑高度 + 透明 header 壳，避免与自定义导航背景色冲突 */
	.av_minimal_header {
		background: transparent !important;
	}

	.av_minimal_header #header_main .container {
		height: auto !important;
		min-height: 80px;
		display: flex;
		align-items: center;
	}

	.av_minimal_header.nav_fixed_height #header_main .container,
	.av_minimal_header.nav_fixed_height #header_main .inner-container {
		min-height: 60px !important;
	}

	.av_minimal_header.nav_fixed_height #header_main .menu > li > a {
		line-height: 1.25 !important;
		height: auto !important;
	}

	.av_minimal_header.nav_fixed_height #header_main .ywx-header-brand .logo a img {
		max-height: 46px;
		width: auto;
		height: auto;
		object-fit: contain;
		flex-grow: 0;
	}

	.av_minimal_header.nav_fixed_height #header_main {
		box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
	}

	#header_main .nav > li > a:hover,
	#header_main .nav > li > a:focus,
	#header_main .nav > li.dropdown:hover,
	#header_main .nav > li.nav-active {
		background-color: transparent !important;
	}
}

#header_main .inner-container {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
}

#header_main .ywx-header-brand {
	display: flex;
	align-items: center;
	flex: 0 1 auto;
	min-width: 0;
	gap: 10px 14px;
	max-width: min(520px, 46vw);
}

#header_main .ywx-header-brand .logo {
	flex: 0 0 auto;
	max-width: min(320px, 38vw);
	margin-top: 0;
	float: none;
}

#header_main .ywx-header-tagline {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.2;
	font-weight: 500;
	letter-spacing: normal;
	color: var(--ywx-nav-link-color, #333);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#header_main .logo {
	flex: 0 1 auto;
	max-width: min(320px, 38vw);
	margin-top: 0;
	float: none;
}

#header_main .navbar {
	flex: 1 1 420px;
	float: none;
	right: auto;
	position: relative;
	min-width: 0;
	margin-bottom: 0;
	display: flex;
	align-items: center;
}

#header_main .navbar-collapse {
	width: 100%;
	display: flex;
	align-items: center;
}

#header_main .menu {
	float: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	margin: 0;
}

#header_main .menu > li {
	display: inline-block;
	position: relative;
}

/* 桌面：LOGO、广告短语、导航同一水平中线（下拉样式沿用 style.css + 主题 props-setting） */
@media (min-width: 768px) {
	#header_main .inner-container {
		flex-wrap: nowrap;
		align-items: center;
		min-height: 80px;
	}

	#header_main .ywx-header-brand,
	#header_main .ywx-header-brand .logo,
	#header_main .ywx-header-brand #nav_logo {
		height: auto !important;
		line-height: normal !important;
		margin-top: 0 !important;
	}

	#header_main .ywx-header-brand .logo a {
		display: inline-flex;
		align-items: center;
		line-height: 1;
	}

	#header_main .ywx-header-brand .logo a img,
	#header_main .logo a img,
	#header_main #nav_logo a img {
		max-height: 70px;
		max-width: min(320px, 38vw);
		width: auto !important;
		height: auto !important;
		object-fit: contain;
		flex-grow: 0;
		vertical-align: middle;
	}

	#header_main .ywx-header-tagline {
		align-self: center;
		line-height: 1.2;
	}

	#header_main .navbar {
		align-self: center;
		line-height: normal;
	}

	#header_main .navbar-collapse {
		align-items: center;
	}
}

#header_meta .header-ul {
	width: auto !important;
	max-width: 100%;
	flex-shrink: 0;
}

#header_meta .col-md-7 {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
}

@media (max-width: 991px) {
	#header_main .navbar {
		flex: none;
		width: 100%;
	}

	#header_main .menu {
		justify-content: flex-start;
	}
}

/* ========== 移动端顶栏 + 下拉菜单（严格参考 default/products/detail.html） ========== */
@media (max-width: 767px) {
	#header_main .container {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/*
	 * style.css 将 .av_minimal_header #header_main .container 固定为 80px，
	 * 且 .inner-container 为 height:100%。菜单展开后 #navbar.in 进入 flex 布局，
	 * 顶栏行会被压进同一 80px 高度内，出现“变窄”现象。
	 */
	.av_minimal_header #header_main .container {
		height: auto !important;
		min-height: 0;
		line-height: normal !important;
		padding-top: 0.625rem;
		padding-bottom: 0.625rem;
		box-sizing: border-box;
	}

	.av_minimal_header.nav_fixed_height #header_main .container {
		height: auto !important;
		min-height: 0;
		line-height: normal !important;
	}

	#header_main .inner-container {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		align-content: flex-start;
		justify-content: space-between;
		gap: 0;
		height: auto !important;
		min-height: 0;
		width: 100%;
	}

	#header_main .inner-container:has(#navbar.in) .ywx-header-brand,
	#header_main .inner-container:has(#navbar.in) .navbar-header {
		min-height: 2.75rem;
	}

	#header_main .inner-container:has(#navbar.in) {
		padding-bottom: 0;
	}

	#header_main .logo,
	#header_main #nav_logo,
	#header_main #nav_logo.min_logo {
		height: auto !important;
		line-height: 1 !important;
		margin-top: 0 !important;
		margin-bottom: 0 !important;
		padding: 0;
	}

	#header_main #nav_logo.min_logo a img {
		max-height: 2.75rem !important;
		max-width: min(12.5rem, 58vw) !important;
		width: auto !important;
		height: auto !important;
		object-fit: contain !important;
		flex-grow: 0 !important;
	}

	#header_main .ywx-header-brand {
		order: 1;
		flex: 1 1 auto;
		max-width: calc(100% - 3rem);
		min-width: 0;
		min-height: 2.75rem;
		display: flex;
		align-items: center;
		align-self: center;
		gap: 0.625rem;
	}

	#header_main .ywx-header-brand .logo,
	#header_main .ywx-header-brand #nav_logo {
		flex: 0 0 auto;
		max-width: 42vw;
		height: auto !important;
		line-height: 1 !important;
		margin: 0 !important;
		padding: 0;
		display: flex !important;
		align-items: center;
	}

	#header_main .ywx-header-brand .logo a {
		display: inline-flex;
		align-items: center;
		line-height: 1;
	}

	#header_main .ywx-header-tagline {
		font-size: 1.125rem;
		line-height: 1.2;
		font-weight: 500;
		align-self: center;
		margin: 0;
		padding: 0;
		white-space: nowrap;
		display: block;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	#header_main .ywx-header-brand .logo img,
	#header_main .logo a img,
	#header_main #nav_logo a img {
		display: block;
		max-height: 2.75rem;
		max-width: min(12.5rem, 58vw);
		width: auto !important;
		height: auto !important;
		object-fit: contain;
		flex-grow: 0;
		margin: 0;
		vertical-align: middle;
	}

	#header_main .navbar-header {
		order: 2;
		flex: 0 0 auto;
		float: none;
		margin: 0;
		min-height: 2.75rem;
		display: flex;
		align-items: center;
		align-self: center;
		height: auto;
	}

	#header_main .navbar-toggle {
		float: none;
		margin: 0 !important;
		padding: 0.5rem 0.625rem;
		border: 0;
		background: transparent;
		display: inline-flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		min-height: 2.75rem;
		box-sizing: border-box;
	}

	#header_main .navbar-toggle .icon-bar {
		display: block;
		width: 22px;
		height: 2px;
		border-radius: 1px;
		background-color: #1f2937;
	}

	#header_main .navbar-toggle .icon-bar + .icon-bar {
		margin-top: 4px;
	}

	/* 让 toggle 与 #navbar 成为 inner-container 的直接 flex 子项 */
	#header_main .navbar {
		display: contents;
	}

	#header_main #navbar.navbar-collapse {
		order: 3;
		flex: 0 0 100%;
		position: static !important;
		top: auto !important;
		left: auto !important;
		right: auto !important;
		bottom: auto !important;
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0.75rem 26px 0.75rem !important;
		background: #fff !important;
		border-top: 1px solid #e5e7eb;
		box-shadow: none;
		overflow: visible;
		transform: none !important;
		visibility: visible;
		pointer-events: auto;
		z-index: auto;
		box-sizing: border-box;
	}

	#header_main #navbar.navbar-collapse.collapse:not(.in) {
		display: none !important;
	}

	#header_main #navbar.navbar-collapse.in {
		display: block !important;
	}

	#header_main #navbar .menu {
		display: block;
		float: none;
		margin: 0 !important;
		padding: 0;
	}

	#header_main #navbar .menu > li {
		display: block !important;
		float: none;
		text-align: left !important;
		margin: 0;
		border: 0 !important;
		border-bottom: 0;
		outline: none !important;
		box-shadow: none !important;
	}

	#header_main #navbar .menu > li > a {
		display: block;
		height: auto !important;
		line-height: 1.5 !important;
		padding: 0.5rem 0 !important;
		font-size: 1rem;
		font-weight: 500;
		letter-spacing: 0 !important;
		text-transform: none !important;
		color: var(--ywx-nav-link-color, #1f2937);
		background: transparent !important;
		text-align: left !important;
		white-space: normal;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		-webkit-tap-highlight-color: transparent;
	}

	#header_main #navbar .menu > li > a:hover,
	#header_main #navbar .menu > li > a:focus,
	#header_main #navbar .menu > li > a:active,
	#header_main #navbar .menu > li > a:focus-visible {
		color: var(--ywx-nav-current-color);
		background: transparent !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
	}

	#header_main #navbar .menu > li.is-current > a,
	#header_main #navbar .menu > li.is-current > a:hover,
	#header_main #navbar .menu > li.is-current > a:focus,
	#header_main #navbar .menu > li.is-current > a:active,
	#header_main #navbar .menu > li.is-current > a:focus-visible {
		color: var(--ywx-nav-current-color);
		font-weight: 600;
		background: transparent !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		text-decoration: underline;
		text-decoration-color: var(--ywx-nav-current-color);
		text-underline-offset: 0.5em;
		text-decoration-thickness: 2px;
	}

	#header_main #navbar .menu > li.is-submenu-open > a {
		color: var(--ywx-nav-current-color);
		font-weight: 600;
		background: transparent !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
	}

	#header_main #navbar .dropdown-menu.child-menu {
		position: static;
		display: none;
		float: none;
		width: 100%;
		min-width: 0;
		margin: 0 0 0.25rem;
		padding: 0 0 0.25rem 0.75rem;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}

	#header_main #navbar .menu > li.is-submenu-open > .dropdown-menu.child-menu {
		display: block;
	}

	#header_main #navbar .dropdown-menu.child-menu > li {
		display: block;
		float: none;
	}

	#header_main #navbar .dropdown-menu.child-menu > li,
	#header_main #navbar .dropdown-menu.child-menu.ywxcss-parent-theme-bg-color > li:hover {
		background: transparent !important;
		color: inherit !important;
	}

	#header_main #navbar .dropdown-menu.child-menu > li > a {
		display: block;
		height: auto !important;
		line-height: 1.45 !important;
		padding: 0.375rem 0.75rem !important;
		font-size: 0.9375rem;
		font-weight: 400;
		text-transform: none !important;
		color: #4b5563 !important;
		background: transparent !important;
		text-align: left !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		border-radius: 4px;
		-webkit-tap-highlight-color: transparent;
		transition: color 0.15s ease, background-color 0.15s ease;
	}

	#header_main #navbar .dropdown-menu.child-menu > li > a:hover,
	#header_main #navbar .dropdown-menu.child-menu > li > a:focus,
	#header_main #navbar .dropdown-menu.child-menu > li > a:active,
	#header_main #navbar .dropdown-menu.child-menu > li > a:focus-visible {
		color: var(--ywx-nav-current-color) !important;
		background: #f3f4f6 !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		text-decoration: none !important;
	}

	#header_main #navbar .dropdown-menu.child-menu > li.is-current > a,
	#header_main #navbar .dropdown-menu.child-menu > li.is-current > a:focus {
		color: var(--ywx-nav-current-color) !important;
		font-weight: 600;
		background: #fef2f2 !important;
		border: 0 !important;
		outline: none !important;
		box-shadow: none !important;
		text-decoration: none !important;
	}

	#header_main #navbar .dropdown-menu.child-menu > li.is-current > a:hover,
	#header_main #navbar .dropdown-menu.child-menu > li.is-current > a:active,
	#header_main #navbar .dropdown-menu.child-menu > li.is-current > a:focus-visible {
		color: var(--ywx-nav-current-color) !important;
		background: #f3f4f6 !important;
		text-decoration: none !important;
	}

	.ywx-mobile-nav-footer {
		padding: 0.5rem 0 0;
		margin-top: 0.75rem;
		border-top: 1px solid #e5e7eb;
		margin-left: 0;
		margin-right: 0;
	}

	.ywx-mobile-nav-footer a {
		display: inline-flex;
		align-items: center;
		gap: 0.75rem;
		padding-top: 0.5rem;
		color: #1f2937;
		font-size: 1rem;
		font-weight: 500;
		text-decoration: none;
	}

	.ywx-mobile-nav-footer .fa {
		color: #f97316;
		font-size: 1.125rem;
	}
}

/* 页脚字号微调（详见 ywx-footer-refine.css；此处保留以便已生成页仅引 header-refine 时仍生效） */
#footer p,
#footer .home-footer-cintro {
	font-size: 14px;
	line-height: 1.65;
}

#footer .footer-intro {
	font-size: 14px;
	line-height: 1.65;
}

#footer h6 {
	font-size: 15px;
}

.footer-menu li a {
	font-size: 13px;
}

#footer .copy,
#footer .home-footer-copyright {
	font-size: 14px;
}

#footer .footer-phone,
#footer .footer-phone ul li,
#footer .footer-phone ul li a {
	font-size: 15px;
}

#footer .social li a {
	font-size: 14px;
}
