/* ANBuyer Home Builder — 前台短代码 */
.anbuyer-hb {
	--anbuyer-hb-gap: 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1e293b;
}

.anbuyer-hb-locale-custom {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 16px;
	font-size: 13px;
	color: #475569;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.anbuyer-hb-header {
	background: #fff;
	border-bottom: 1px solid #e2e8f0;
	padding: 12px 16px;
}

.anbuyer-hb-header.ae-topbar {
	background: var(--ae-top, #191919);
	border-bottom: none;
	padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px;
	color: #fff;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger,
.anbuyer-hb-header.ae-topbar .ae-currency-trigger.header-store-right-icon-button {
	color: #fff !important;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger .header-store-right-icon-span,
.anbuyer-hb-header.ae-topbar .ae-currency-trigger-label {
	color: #fff !important;
}

.anbuyer-hb-header.ae-topbar .ae-currency-trigger:hover {
	background: rgba(255, 255, 255, 0.1);
}

.anbuyer-hb-header-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: var(--anbuyer-hb-gap);
	flex-wrap: wrap;
}

.anbuyer-hb-logo-img {
	max-height: 40px;
	width: auto;
}

.anbuyer-hb-image-search-wrap {
	flex-shrink: 0;
}

.anbuyer-hb-image-search-btn {
	padding: 10px 12px;
	font-size: 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #f8fafc;
	color: #64748b;
	cursor: not-allowed;
}

.anbuyer-hb-image-search-link {
	display: inline-block;
	padding: 10px 12px;
	font-size: 13px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #0f172a;
	text-decoration: none;
	font-weight: 600;
}

.anbuyer-hb-image-search-link:hover {
	background: #f1f5f9;
}

.anbuyer-hb-search {
	display: flex;
	flex: 1;
	min-width: 200px;
	max-width: 560px;
	gap: 0;
	align-items: stretch;
}

.anbuyer-hb-search > .ae-search-field-wrap {
	flex: 1;
	min-width: 0;
	position: relative;
	display: flex;
	align-items: stretch;
}

.anbuyer-hb-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 999px 0 0 999px;
	font-size: 14px;
}

.anbuyer-hb-search > .anbuyer-hb-search-input {
	flex: 1;
	min-width: 0;
}

.anbuyer-hb-search .ae-search-field-wrap .anbuyer-hb-search-input {
	padding-right: 38px;
}

.anbuyer-hb-search-input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.anbuyer-hb-search .ae-search-clear {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 50%;
	background: rgba(15, 23, 42, 0.08);
	color: #0f172a;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.anbuyer-hb-search .ae-search-clear:hover {
	background: rgba(15, 23, 42, 0.14);
}

.anbuyer-hb-search .ae-search-clear[hidden] {
	display: none !important;
}

.anbuyer-hb-search-submit {
	flex-shrink: 0;
	padding: 10px 18px;
	background: #0f172a;
	color: #fff;
	border: none;
	border-radius: 0 999px 999px 0;
	cursor: pointer;
	font-size: 14px;
}

.anbuyer-hb-tools {
	display: flex;
	gap: 12px;
	margin-left: auto;
}

.anbuyer-hb-tools a {
	color: #334155;
	text-decoration: none;
	font-size: 14px;
}

.anbuyer-hb-tools a:hover {
	text-decoration: underline;
}

.anbuyer-hb-tools .anbuyer-cs-link:hover {
	text-decoration: none;
}

.anbuyer-hb-nav {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	padding: 8px 16px;
}

.anbuyer-hb-all-cats-wrap {
	position: relative;
	flex-shrink: 0;
}

.anbuyer-hb-all-cats-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 4px 10px;
	color: #0f172a;
}

.anbuyer-hb-all-cats-btn:hover {
	text-decoration: underline;
}

.anbuyer-hb-all-cats-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 4px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	max-height: min(70vh, 420px);
	overflow: auto;
	z-index: 40;
	min-width: 240px;
}

.anbuyer-hb-all-cats-wrap.is-open .anbuyer-hb-all-cats-panel {
	display: block;
}

.anbuyer-hb-mega-v2 .anbuyer-hb-all-cats-panel {
	min-width: min(960px, 92vw);
	max-width: min(1080px, 92vw);
	max-height: min(72vh, 560px);
	padding: 0;
	overflow: hidden;
}

.anbuyer-hb-mega-v2-backdrop {
	display: none;
}

/* Mega V2 打开：全视口遮罩（与 Flask 类目行为一致），窄屏下面板位置仍由下方 @media 覆盖 */
.anbuyer-hb-all-cats-wrap.anbuyer-hb-mega-v2.is-open > .anbuyer-hb-mega-v2-backdrop {
	display: block;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.35);
	border: 0;
	margin: 0;
	padding: 0;
	cursor: pointer;
	z-index: 3998;
}

.anbuyer-hb-all-cats-wrap.anbuyer-hb-mega-v2.is-open .anbuyer-hb-all-cats-panel {
	z-index: 3999;
}

.anbuyer-hb-mega-v2-mobile-head {
	display: none;
}

.anbuyer-hb-mega-v2-inner {
	display: flex;
	min-height: 420px;
}

.anbuyer-hb-mega-v2-roots {
	list-style: none;
	margin: 0;
	padding: 8px;
	width: 240px;
	background: #f8fafc;
	border-right: 1px solid #e2e8f0;
	overflow: auto;
}

.anbuyer-hb-mega-v2-roots li {
	margin: 0 0 4px;
}

.anbuyer-hb-mega-v2-root {
	display: block;
	width: 100%;
	text-align: left;
	background: transparent;
	border: none;
	padding: 9px 10px;
	font-size: 14px;
	border-radius: 6px;
	cursor: pointer;
	color: #0f172a;
}

.anbuyer-hb-mega-v2-root:hover,
.anbuyer-hb-mega-v2-root.is-active {
	background: #e2e8f0;
	font-weight: 600;
}

.anbuyer-hb-mega-v2-panels {
	flex: 1;
	min-width: 0;
	padding: 14px;
	overflow: auto;
}

.anbuyer-hb-mega-v2-panel {
	display: none;
}

.anbuyer-hb-mega-v2-panel.is-active {
	display: block;
}

.anbuyer-hb-mega-v2-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}

.anbuyer-hb-mega-v2-card {
	display: block;
	text-decoration: none;
	color: #0f172a;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.anbuyer-hb-mega-v2-card:hover {
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.anbuyer-hb-mega-v2-card-img {
	width: 100%;
	aspect-ratio: 1/1;
	object-fit: cover;
	display: block;
}

.anbuyer-hb-mega-v2-card-title {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.35;
}

.anbuyer-hb-mega-v2-empty {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

body.aeh-mega-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.anbuyer-hb-mega-v2 .anbuyer-hb-all-cats-panel {
		position: fixed;
		left: 8px;
		right: 8px;
		top: 64px;
		bottom: 8px;
		max-width: none;
		min-width: 0;
		max-height: none;
		z-index: 2999;
		border-radius: 10px;
	}

	.anbuyer-hb-mega-v2-inner {
		display: flex;
		height: calc(100% - 44px);
		min-height: 0;
	}

	.anbuyer-hb-mega-v2-roots {
		width: 102px;
		min-width: 102px;
		border-right: 1px solid #e2e8f0;
		border-bottom: 0;
		height: 100%;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.anbuyer-hb-mega-v2-roots li {
		margin: 0 0 2px;
	}

	.anbuyer-hb-mega-v2-root {
		padding: 9px 6px;
		border-radius: 6px;
		border-bottom: 0;
		font-size: 12px;
		line-height: 1.25;
	}

	.anbuyer-hb-mega-v2-panels {
		padding: 8px 8px 10px;
		height: 100%;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	.anbuyer-hb-mega-v2-panel {
		display: none;
	}

	.anbuyer-hb-mega-v2-panel.is-active {
		display: block;
	}

	.anbuyer-hb-mega-v2-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 7px;
	}

	.anbuyer-hb-mega-v2-card {
		border-radius: 6px;
	}

	.anbuyer-hb-mega-v2-card-title {
		padding: 5px 5px 6px;
		font-size: 11px;
		line-height: 1.2;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}

	.anbuyer-hb-mega-v2-mobile-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 8px 10px;
		border-bottom: 1px solid #e2e8f0;
		height: 44px;
		box-sizing: border-box;
	}

	.anbuyer-hb-mega-v2-mobile-title {
		font-size: 14px;
		font-weight: 600;
		color: #0f172a;
	}

	.anbuyer-hb-mega-v2-close {
		border: 0;
		background: transparent;
		font-size: 22px;
		line-height: 1;
		padding: 0 4px;
		color: #334155;
		cursor: pointer;
	}
}

.anbuyer-hb-wp-menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
}

.anbuyer-hb-wp-menu li {
	margin: 0;
}

.anbuyer-hb-wp-menu a {
	display: block;
	padding: 8px 16px;
	color: #0f172a;
	text-decoration: none;
	font-size: 14px;
}

.anbuyer-hb-wp-menu a:hover {
	background: #f1f5f9;
}

.anbuyer-hb-wp-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 12px;
}

.anbuyer-hb-all-cats {
	font-weight: 600;
	padding: 4px 10px;
	color: #64748b;
}

.anbuyer-hb-nav-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.anbuyer-hb-all-cats {
	font-weight: 600;
	padding: 6px 12px;
	background: #e2e8f0;
	border-radius: 999px;
	font-size: 13px;
}

.anbuyer-hb-nav-link {
	color: #0f172a;
	text-decoration: none;
	font-size: 14px;
	white-space: nowrap;
}

.anbuyer-hb-nav-link.is-emphasis {
	color: #dc2626;
	font-weight: 600;
}

.anbuyer-hb-nav-more {
	position: relative;
}

.anbuyer-hb-nav-more-btn {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 14px;
	padding: 4px 8px;
}

.anbuyer-hb-nav-more-list {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	list-style: none;
	margin: 4px 0 0;
	padding: 8px 0;
	min-width: 180px;
	z-index: 30;
}

.anbuyer-hb-nav-more:focus-within .anbuyer-hb-nav-more-list,
.anbuyer-hb-nav-more:hover .anbuyer-hb-nav-more-list,
.anbuyer-hb-nav-more.is-open .anbuyer-hb-nav-more-list {
	display: block;
}

.anbuyer-hb-nav-more-list a {
	display: block;
	padding: 8px 14px;
	color: #0f172a;
	text-decoration: none;
}

.anbuyer-hb-nav-more-list a:hover {
	background: #f1f5f9;
}

.anbuyer-hb-carousel {
	overflow: hidden;
	background: #f1f5f9;
}

.anbuyer-hb-carousel-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	gap: 0;
	-webkit-overflow-scrolling: touch;
}

.anbuyer-hb-carousel-slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	display: block;
}

.anbuyer-hb-carousel-img {
	width: 100%;
	height: auto;
	max-height: 360px;
	object-fit: cover;
	display: block;
	vertical-align: middle;
}

/* Homepage hero: full viewport width (AliExpress-style; break out of Elementor boxed inner) */
body.elementor-page .e-con:has(.elementor-widget-aeh-carousel) {
	overflow: visible;
}

body.elementor-page .e-con:has(.elementor-widget-aeh-carousel) > .e-con-inner {
	overflow: visible;
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

body.elementor-page .elementor-widget-aeh-carousel {
	position: relative;
	left: 50%;
	width: 100vw !important;
	max-width: 100vw !important;
	margin-left: -50vw !important;
	margin-right: -50vw !important;
	box-sizing: border-box;
}

body.elementor-page .elementor-widget-aeh-carousel .elementor-widget-container,
body.elementor-page .elementor-widget-aeh-carousel .anbuyer-hb-carousel {
	width: 100%;
	max-width: none;
}

body.elementor-page .elementor-widget-aeh-carousel .anbuyer-hb-carousel-img {
	max-height: 420px;
}

.anbuyer-hb-section {
	max-width: 1200px;
	margin: 24px auto;
	padding: 0 16px;
}

.anbuyer-hb-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.anbuyer-hb-section-head-main {
	min-width: 0;
	flex: 1 1 auto;
}

.anbuyer-hb-section-title {
	margin: 0;
	font-size: 1.25rem;
}

.anbuyer-hb-section-sub {
	margin: 4px 0 0;
	font-size: 14px;
	color: #64748b;
}

.anbuyer-hb-section-more {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	color: #2563eb;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.anbuyer-hb-section-more:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

.anbuyer-hb-section-more-chev {
	font-size: 17px;
	line-height: 1;
}

.anbuyer-hb-section-more-chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #2563eb;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
	flex-shrink: 0;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.anbuyer-hb-section-more-chevron:hover {
	border-color: #93c5fd;
	background: #eff6ff;
	color: #1d4ed8;
}

.anbuyer-hb-grid--has-more {
	position: relative;
	box-sizing: border-box;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 10px 12px;
	background: #fff;
	transition: border-color 0.15s ease;
}

.anbuyer-hb-grid--has-more:hover {
	border-color: #cbd5e1;
}

.anbuyer-hb-grid-more-edge {
	position: absolute;
	top: 8px;
	right: 0;
	bottom: 8px;
	width: 22px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-left: 1px solid #e5e7eb;
	border-radius: 0 7px 7px 0;
	color: #94a3b8;
	text-decoration: none;
	background: transparent;
	transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.anbuyer-hb-grid-more-edge:hover {
	color: #2563eb;
	background: #f8fafc;
	border-left-color: #cbd5e1;
}

.anbuyer-hb-grid-more-edge-icon {
	font-size: 16px;
	line-height: 1;
	font-weight: 700;
}

.anbuyer-hb-grid--load-more .anbuyer-hb-grid-more-edge {
	bottom: 52px;
}

body.elementor-editor-active .anbuyer-hb-grid-more-edge {
	pointer-events: none;
}

@media (max-width: 640px) {
	.anbuyer-hb-grid-more-edge {
		display: none;
	}
}

.anbuyer-hb-scroller-track {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x mandatory;
}

.anbuyer-hb-grid-inner {
	display: grid;
	grid-template-columns: repeat(var(--anbuyer-hb-cols, 4), 1fr);
	gap: 12px;
}

@media (max-width: 900px) {
	.anbuyer-hb-grid-inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

.anbuyer-hb-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px;
	text-decoration: none;
	color: inherit;
	min-width: 140px;
	scroll-snap-align: start;
	background: #fff;
}

.anbuyer-hb-card:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.anbuyer-hb-card-img {
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 4px;
}

.anbuyer-hb-card-title {
	font-size: 13px;
	margin-top: 8px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.anbuyer-hb-card-rating {
	font-size: 12px;
	margin-top: 4px;
	line-height: 1;
}

.anbuyer-hb-card-rating .star-rating {
	float: none;
	margin: 0;
}

.anbuyer-hb-card-sold {
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
}

.anbuyer-hb-card-price {
	font-size: 14px;
	font-weight: 700;
	margin-top: 4px;
}

.anbuyer-hb-card-was {
	font-weight: 400;
	color: #94a3b8;
	font-size: 12px;
	margin-left: 4px;
	text-decoration: line-through;
}

.anbuyer-hb-trust {
	max-width: 1200px;
	margin: 16px auto;
	padding: 12px 16px;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	font-size: 14px;
	color: #475569;
	border-top: 1px solid #e2e8f0;
	border-bottom: 1px solid #e2e8f0;
}

.anbuyer-hb-html {
	max-width: 1200px;
	margin: 16px auto;
	padding: 0 16px;
}

.anbuyer-hb-trust-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.anbuyer-hb-trust-link:hover {
	text-decoration: underline;
}

.anbuyer-hb-trust-icon {
	width: 28px;
	height: 28px;
	object-fit: contain;
	flex-shrink: 0;
}

.anbuyer-hb-grid-load-wrap {
	max-width: 1200px;
	margin: 16px auto 24px;
	padding: 0 16px;
	text-align: center;
}

.anbuyer-hb-load-more {
	padding: 10px 28px;
	font-size: 14px;
	font-weight: 600;
	color: #0f172a;
	background: #f1f5f9;
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	cursor: pointer;
}

.anbuyer-hb-load-more:hover:not(:disabled) {
	background: #e2e8f0;
}

.anbuyer-hb-load-more:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* 网格：触底预加载占位（IntersectionObserver） */
.anbuyer-hb-grid-sentinel {
	height: 1px;
	width: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
	visibility: hidden;
	pointer-events: none;
}

.anbuyer-hb-grid-error {
	max-width: 1200px;
	margin: 8px auto 0;
	padding: 10px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #991b1b;
	font-size: 14px;
}

.anbuyer-hb-mega-label {
	display: block;
	padding: 8px 16px;
	font-size: 14px;
	color: #64748b;
}

/* 悬浮促销条 */
.anbuyer-hb-floating {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 100020;
	padding: 12px 48px 12px 16px;
	background: #0f172a;
	color: #f8fafc;
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.anbuyer-hb-floating.is-bottom {
	bottom: 0;
	padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(48px, calc(48px + env(safe-area-inset-right, 0px)));
}

.anbuyer-hb-floating.is-top {
	top: 0;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
	padding-top: calc(12px + env(safe-area-inset-top, 0px));
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(48px, calc(48px + env(safe-area-inset-right, 0px)));
}

.anbuyer-hb-floating-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	justify-content: center;
}

.anbuyer-hb-floating-text {
	font-size: 14px;
	line-height: 1.4;
}

.anbuyer-hb-floating-link {
	display: inline-block;
	padding: 8px 14px;
	background: #f97316;
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 8px;
	font-weight: 600;
	font-size: 14px;
}

.anbuyer-hb-floating-link:hover {
	filter: brightness(1.05);
}

.anbuyer-hb-floating-dismiss {
	position: absolute;
	top: 50%;
	right: calc(10px + env(safe-area-inset-right, 0px));
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: #94a3b8;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 4px;
}

.anbuyer-hb-floating-dismiss:hover {
	color: #e2e8f0;
}

/*
 * 三栏装修 iframe 预览（body.anbuyer-hb-viz-preview）：短代码根 .anbuyer-hb 内全部超链接不导航（含顶栏/商品卡），
 * 配合 frontend.js 捕获层发 row-select；子元素 none 避免图片/标题吃掉事件。
 */
body.anbuyer-hb-viz-preview .anbuyer-hb a[href],
body.anbuyer-hb-viz-preview .anbuyer-hb a[href] * {
	pointer-events: none;
	cursor: default;
}

/* ---- 顶栏不离页搜索（Elementor 首页；脚本与 HB/Flask 同源） ---- */
body.ae-inline-search-active .elementor-location-main,
body.ae-inline-search-active .elementor-location-archive {
	display: none !important;
}

body.ae-inline-search-active .anbuyer-hb-floating {
	display: none !important;
}

.ae-inline-search-root {
	background: #f5f5f5;
	border-bottom: 1px solid #e8e8e8;
}

.ae-inline-search-root[hidden] {
	display: none !important;
}

.ae-inline-search-panel-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 16px 32px;
}

.ae-inline-search-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.ae-inline-search-head {
	flex: 1;
	min-width: 200px;
}

.ae-inline-search-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #222;
	margin: 0 0 6px;
}

.ae-inline-search-query {
	font-weight: 600;
	color: #e43225;
}

.ae-inline-search-meta {
	margin: 0;
	font-size: 14px;
	color: #666;
}

.ae-inline-search-status {
	font-size: 14px;
	color: #666;
	margin-bottom: 12px;
	min-height: 1.25em;
}

.ae-inline-search-grid.ae-main-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}

.ae-inline-search-grid.ae-main-grid .ae-card-lg {
	content-visibility: auto;
	contain-intrinsic-size: 260px 380px;
}

.ae-inline-search-pagination-wrap {
	position: relative;
	margin-top: 24px;
}

.ae-inline-search-pagination-wrap.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.ae-inline-search-pagination {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: center;
	gap: 14px;
	margin-top: 0;
}

.ae-inline-search-pagination-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 12px;
}

.ae-inline-search-page-nums {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px;
	max-width: 100%;
}

.ae-inline-search-page-num {
	box-sizing: border-box;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 12px;
	font-size: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
	color: #222;
	cursor: pointer;
	font: inherit;
	text-align: center;
}

button.ae-inline-search-page-num:hover {
	border-color: #e43225;
	color: #e43225;
}

.ae-inline-search-page-num.is-current {
	border-color: #e43225;
	background: rgba(228, 50, 37, 0.08);
	color: #e43225;
	font-weight: 700;
	cursor: default;
}

.ae-inline-search-page-gap {
	padding: 0 4px;
	color: #888;
	font-size: 15px;
	user-select: none;
}

.ae-inline-search-jump {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.ae-inline-search-jump-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #444;
	margin: 0;
}

.ae-inline-search-jump-input {
	width: 4.5rem;
	min-height: 40px;
	padding: 8px 10px;
	font-size: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-sizing: border-box;
}

.ae-inline-search-page-btn {
	min-height: 44px;
	padding: 10px 18px;
	font-size: 15px;
	border: 1px solid #ddd;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font: inherit;
}

.ae-inline-search-page-btn:hover:not(:disabled) {
	border-color: #e43225;
	color: #e43225;
}

.ae-inline-search-page-btn--disabled {
	opacity: 0.45;
	cursor: default;
}

.ae-inline-search-page-status {
	margin: 0;
	font-size: 15px;
	color: #444;
	text-align: center;
}

.ae-search-field-wrap {
	position: relative;
	flex: 1;
	min-width: 0;
}

.ae-search-suggest {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 1200;
	margin-top: 4px;
	max-height: 360px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ae-search-suggest-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f0f0f0;
}

.ae-search-hot-chip,
.ae-inline-search-back-btn {
	font: inherit;
}

.ae-search-hot-chip {
	display: inline-block;
	margin: 0 8px 8px 0;
	padding: 8px 14px;
	font-size: 14px;
	border: 1px solid #e0e0e0;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
}

/* Flask 卡片 HTML 最小样式 */
.ae-inline-search-root {
	--ae-radius: 8px;
	--ae-radius-lg: 12px;
	--ae-tile-title-size-lg: 14px;
	--ae-tile-title-lh: 1.4;
	--ae-price-size-sm: 15px;
}

.ae-inline-search-root .ae-card-lg {
	background: #fff;
	border-radius: var(--ae-radius-lg);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid #e8e8e8;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.ae-inline-search-root .ae-card-lg:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ae-inline-search-root .ae-tile {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
}

.ae-inline-search-root .ae-tile-img {
	aspect-ratio: 1;
	border-radius: var(--ae-radius);
	overflow: hidden;
	background: #f3f4f6;
}

.ae-inline-search-root .ae-card-lg .ae-tile-img {
	margin: 12px 12px 0;
}

.ae-inline-search-root .ae-tile-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.ae-inline-search-root .ae-tile-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ae-inline-search-root .ae-tile-title {
	font-size: var(--ae-tile-title-size-lg);
	line-height: var(--ae-tile-title-lh);
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(var(--ae-tile-title-lh) * 2 * 1em);
	padding: 0;
}

.ae-inline-search-root .ae-card-lg .ae-tile-body {
	padding: 10px 12px 14px;
}

.ae-inline-search-root .ae-tile-price-row {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
}

.ae-inline-search-root .ae-tile-price {
	font-size: var(--ae-price-size-sm);
	font-weight: 700;
	color: #e43225;
}

.ae-inline-search-root .ae-tile-was {
	font-size: 12px;
	color: #9ca3af;
	text-decoration: line-through;
}

.ae-inline-search-root .ae-tile-badges {
	margin-top: 8px;
	min-height: 22px;
}

.ae-inline-search-root .ae-pill {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 4px;
	line-height: 1.3;
}

.ae-inline-search-root .ae-pill--soft {
	background: #f3f4f6;
	color: #374151;
	border: 1px solid #e5e7eb;
}

.ae-inline-search-root .ae-pill--deal {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.ae-inline-search-root .ae-tile-meta {
	margin-top: 6px;
	font-size: 11px;
	color: #666;
	line-height: 1.3;
}

.ae-inline-search-root .ae-tile-meta-sep {
	margin: 0 4px;
	opacity: 0.7;
}

.ae-inline-search-root .ae-tile-rating {
	color: #b45309;
	font-weight: 600;
}

/* 窄屏：内联搜索（max-width: 900px；search_phone_fixed_20260510_4.md M1–M3） */
@media (max-width: 900px) {
	.ae-inline-search-panel-inner {
		padding: 12px 12px calc(24px + env(safe-area-inset-bottom, 0px));
	}

	.ae-inline-search-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.ae-inline-search-head {
		min-width: 0;
	}

	.ae-inline-search-grid.ae-main-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.ae-inline-search-root {
		--ae-tile-title-size-lg: 13px;
	}

	.ae-inline-search-pagination-row {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 6px;
		max-width: 100%;
		gap: 8px;
	}

	.ae-inline-search-page-nums {
		flex-wrap: nowrap;
		flex-shrink: 0;
		gap: 6px;
		max-width: none;
	}

	.ae-inline-search-page-num,
	button.ae-inline-search-page-num {
		min-width: 44px;
		min-height: 44px;
	}

	.ae-inline-search-pagination {
		align-items: stretch;
	}

	.ae-inline-search-jump {
		flex-wrap: wrap;
	}
}

/* ---- Sticky site header (homepage: header + nav 统一固定，对齐 PDP .ae-header-sticky) ---- */
:root {
	--anbuyer-hb-z-header-sticky: 10050;
	--anbuyer-hb-sticky-header-bottom: 0px;
}

.anbuyer-hb-site-header-sticky {
	position: sticky;
	top: 0;
	z-index: var(--anbuyer-hb-z-header-sticky, 10050);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	background: #fff;
	overflow: visible;
}

body.admin-bar .anbuyer-hb-site-header-sticky {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .anbuyer-hb-site-header-sticky {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

.anbuyer-hb-site-header-sticky .anbuyer-hb-header {
	border-bottom: 1px solid #e2e8f0;
}

.anbuyer-hb-site-header-sticky .anbuyer-hb-nav {
	border-bottom: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
	.anbuyer-hb-mega-v2 .anbuyer-hb-all-cats-panel {
		top: var(--anbuyer-hb-sticky-header-bottom, 64px);
	}
}

/* Elementor / 主题容器 overflow 会阻止 position:sticky 生效 */
body.anbuyer-hb-sticky-header-on,
body.anbuyer-hb-sticky-header-on .elementor,
body.anbuyer-hb-sticky-header-on .e-con,
body.anbuyer-hb-sticky-header-on .e-con-inner,
body.anbuyer-hb-sticky-header-on #page,
body.anbuyer-hb-sticky-header-on .site-content,
body.aeh-home-topbar-on #page,
body.aeh-home-topbar-on .site-content {
	overflow: visible !important;
}
