/* PC 前台公共头部（与 index_modern 首页内容样式配合） */
:root {
	--edi-bg: #f6f7fb;
	--edi-surface: #ffffff;
	--edi-text: #0f172a;
	--edi-muted: #64748b;
	--edi-accent: #2563eb;
	--edi-accent-hover: #1d4ed8;
	--edi-radius: 14px;
	--edi-radius-sm: 10px;
	--edi-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
	--edi-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.1);
	--edi-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
	font-family: var(--edi-font);
	color: var(--edi-text);
}

.edi-container {
	width: min(1200px, 100% - 32px);
	margin-left: auto;
	margin-right: auto;
}

/* —— Top bar —— */
.edi-topbar {
	background: #0f172a;
	color: #e2e8f0;
	font-size: 13px;
}

.edi-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 36px;
	gap: 16px;
	flex-wrap: wrap;
}

.edi-topbar a {
	color: #cbd5e1;
	text-decoration: none;
	transition: color 0.15s;
}

.edi-topbar a:hover {
	color: #fff;
}

.edi-topbar-left,
.edi-topbar-right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.edi-topbar .sep {
	opacity: 0.35;
	user-select: none;
}

/* —— Masthead —— */
.edi-masthead {
	background: var(--edi-surface);
	box-shadow: var(--edi-shadow);
	position: sticky;
	top: 0;
	z-index: 100;
}

.edi-masthead-inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 24px 32px;
	padding: 16px 0;
}

@media (max-width: 900px) {
	.edi-masthead-inner {
		grid-template-columns: 1fr;
		justify-items: stretch;
	}
}

.edi-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

.edi-logo img {
	max-height: 48px;
	width: auto;
	object-fit: contain;
}

.edi-search-wrap {
	max-width: 560px;
	width: 100%;
	margin: 0 auto;
}

.edi-search {
	display: flex;
	align-items: stretch;
	border: 2px solid #e2e8f0;
	border-radius: 999px;
	overflow: visible;
	background: #f8fafc;
	transition: border-color 0.2s, box-shadow 0.2s;
	position: relative;
}

.edi-search .j-type-list {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 120px;
	background: var(--edi-surface);
	border-radius: var(--edi-radius-sm);
	box-shadow: var(--edi-shadow-hover);
	z-index: 120;
	padding: 6px 0;
}

.edi-search .j-type-list div {
	padding: 10px 16px;
	cursor: pointer;
	font-size: 14px;
}

.edi-search .j-type-list div:hover {
	background: #f1f5f9;
}

.edi-search:focus-within {
	border-color: var(--edi-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
	background: #fff;
}

.edi-search .j-search-box {
	display: flex;
	align-items: center;
	padding: 0 12px 0 16px;
	border-right: 1px solid #e2e8f0;
	font-size: 13px;
	color: var(--edi-muted);
	cursor: pointer;
	white-space: nowrap;
}

.edi-search .search-ipt {
	flex: 1;
	border: 0;
	background: transparent;
	padding: 12px 14px;
	font-size: 15px;
	outline: none;
	min-width: 0;
}

.edi-search .search-btn {
	border: 0;
	background: var(--edi-accent);
	color: #fff;
	font-weight: 600;
	padding: 0 24px;
	cursor: pointer;
	transition: background 0.15s;
	font-size: 15px;
}

.edi-search .search-btn:hover {
	background: var(--edi-accent-hover);
}

.edi-mast-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.edi-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--edi-accent);
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
	transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.edi-cart-link:hover {
	background: var(--edi-accent-hover);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(37, 99, 235, 0.3);
}

.edi-cart-link .fa {
	font-size: 15px;
	opacity: 0.95;
}

.edi-cart-link .num {
	background: rgba(15, 23, 42, 0.92);
	color: #fff;
	font-size: 11px;
	min-width: 20px;
	height: 20px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
}

/* 兼容旧版迷你购物车 DOM（隐藏，仅给脚本占位） */
.edi-header-cart-legacy {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.edi-subnav {
	border-top: 1px solid #f1f5f9;
	padding: 12px 0;
	background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.edi-subnav-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

.edi-subnav-primary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	font-size: 14px;
	font-weight: 600;
}

.edi-subnav-primary a {
	color: var(--edi-text);
	text-decoration: none;
	transition: color 0.15s;
}

.edi-subnav-primary a:hover,
.edi-subnav-primary a.is-active {
	color: var(--edi-accent);
}

.edi-subnav-sep {
	width: 1px;
	height: 18px;
	background: #e2e8f0;
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.edi-subnav-sep {
		display: none;
		width: 100%;
		height: 0;
	}
}

.edi-subnav-mall {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	font-size: 13px;
}

.edi-subnav-mall a {
	color: var(--edi-muted);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s;
}

.edi-subnav-mall a:hover {
	color: var(--edi-accent);
}
