/* ===== PD AI Search : 顶部智能搜索框 ===== */
.pd-ais-li { position: relative; }
.pd-ais-li > a { display: none !important; }   /* 占位，防主题给 li 加样式 */

.pd-ais {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0 18px 0 0;
	vertical-align: middle;
}

.pd-ais-form {
	display: flex;
	align-items: center;
	width: clamp(150px, 19vw, 240px);
	max-width: 100%;
	height: 38px;
	background: #f2f3f5;
	border: 1px solid #e2e4e8;
	border-radius: 20px;
	padding: 0 4px 0 12px;
	transition: border-color .18s, background .18s, box-shadow .18s;
	box-sizing: border-box;
}
.pd-ais-form:hover { background: #eceef1; }
.pd-ais-form.is-focus {
	background: #fff;
	border-color: #EE6F2D;
	box-shadow: 0 0 0 3px rgba(238,111,45,.13);
}
.pd-ais-ico { color: #8a9099; flex: 0 0 auto; margin-right: 7px; }
.pd-ais-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	height: 34px !important;
	line-height: 34px !important;
	padding: 0 !important;
	margin: 0 !important;
	font-size: 14px !important;
	color: #22262b;
	outline: none !important;
	-webkit-appearance: none;
}
.pd-ais-input::placeholder { color: #9aa0a8; }
.pd-ais-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.pd-ais-btn {
	flex: 0 0 auto;
	width: 30px; height: 30px;
	border: 0;
	border-radius: 50%;
	background: #EE6F2D;
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background .18s;
}
.pd-ais-btn:hover { background: #d75f21; }

/* ---- 下拉结果 ---- */
.pd-ais-panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 380px;
	max-width: 92vw;
	background: #fff;
	border: 1px solid #e4e6ea;
	border-radius: 12px;
	box-shadow: 0 14px 40px rgba(16,20,28,.16);
	padding: 6px;
	z-index: 99999;
	max-height: 70vh;
	overflow: auto;
	line-height: 1.45;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	font-weight: 400;
}
.pd-ais-panel * { line-height: inherit; text-transform: none; letter-spacing: normal; }
.pd-ais-panel[hidden] { display: none; }
.pd-ais-hit {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; border-radius: 8px;
	text-decoration: none !important; color: inherit;
}
.pd-ais-hit:hover { background: #f6f7f9; }
.pd-ais-hit-img {
	flex: 0 0 44px; width: 44px; height: 44px; border-radius: 7px;
	background: #f0f1f3; overflow: hidden; display: block;
}
.pd-ais-hit-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-ais-hit-txt { display: flex; flex-direction: column; min-width: 0; }
.pd-ais-hit-txt b { font-size: 14px; font-weight: 600; color: #22262b; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-ais-hit-txt i { font-style: normal; font-size: 12.5px; color: #EE6F2D; font-weight: 600; line-height: 1.4; }
.pd-ais-more {
	display: block; text-align: center; padding: 9px; margin-top: 4px;
	border-top: 1px solid #eef0f3; font-size: 13px; color: #EE6F2D;
	font-weight: 600; text-decoration: none !important;
}
.pd-ais-more:hover { background: #fdf4ef; border-radius: 0 0 8px 8px; }
.pd-ais-none { padding: 14px 12px; font-size: 13.5px; color: #6b7280; }
.pd-ais-none a { color: #EE6F2D; }

/* 移动端菜单里的搜索框 */
#ast-mobile-header .pd-ais,
.ast-mobile-popup .pd-ais { margin: 12px 16px; width: auto; display: block; }
#ast-mobile-header .pd-ais-form,
.ast-mobile-popup .pd-ais-form { width: 100%; max-width: 100%; }
#ast-mobile-header .pd-ais-panel,
.ast-mobile-popup .pd-ais-panel { width: calc(100vw - 32px); left: 0; }

/* ===== 桌面：给导航瘦身，腾出搜索框的位置 ===== */
@media (min-width: 1150px) {
	.main-header-menu > .menu-item > a,
	.ast-header-break-point .main-header-menu > .menu-item > a {
		padding-left: 11px !important;
		padding-right: 11px !important;
	}
	.main-header-menu { flex-wrap: nowrap !important; white-space: nowrap; }
}

/* ===== 窄屏：页头下方的通栏搜索 ===== */
.pd-ais-mobilebar { display: none; }
@media (max-width: 1149px) {
	.menu-item.pd-ais-li { display: none !important; }
	.pd-ais-mobilebar {
		display: block;
		background: #fff;
		border-bottom: 1px solid #eceef1;
		padding: 10px 0;
	}
	.pd-ais-mobilebar .pd-ais { display: block; margin: 0; }
	.pd-ais-mobilebar .pd-ais-form { width: 100%; max-width: 100%; height: 42px; border-radius: 22px; }
	.pd-ais-mobilebar .pd-ais-input { height: 38px !important; line-height: 38px !important; font-size: 15px !important; }
	.pd-ais-mobilebar .pd-ais-btn { width: 34px; height: 34px; }
	.pd-ais-mobilebar .pd-ais-panel { width: 100%; left: 0; }
}

/* ===== 搜索结果页 ===== */
.pd-search-page .entry-header,
.pd-search-page .ast-article-post .entry-header { display: none !important; }
.pd-search-page .site-content .ast-container,
.pd-search-page .ast-container { flex-wrap: wrap; }
.pd-sr-wrap {
	width: 100% !important;
	flex: 1 1 100% !important;
	max-width: 1200px;
	margin: 0 auto;
	padding: 34px 20px 70px;
	box-sizing: border-box;
}
.pd-sr-h1 { font-size: 30px; font-weight: 700; margin: 0 0 4px; color: #16181c; }
.pd-sr-q { font-size: 15px; color: #6b7280; margin: 0 0 18px; }
.pd-sr-q:empty { display: none; }
.pd-sr-ai {
	display: flex; align-items: flex-start; gap: 10px;
	background: #fff6f1; border: 1px solid #f7d9c6; border-radius: 10px;
	padding: 12px 14px; font-size: 14.5px; color: #7a3d17; margin-bottom: 14px;
}
.pd-sr-badge {
	background: #EE6F2D; color: #fff; font-size: 11px; font-weight: 700;
	padding: 2px 7px; border-radius: 5px; flex: 0 0 auto; margin-top: 1px;
}
.pd-sr-note {
	background: #f4f6f8; border-left: 3px solid #b9c0c9; border-radius: 6px;
	padding: 10px 14px; font-size: 14px; color: #4b5563; margin-bottom: 14px;
}
.pd-sr-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pd-sr-chips-lbl { font-size: 13px; color: #6b7280; margin-right: 2px; }
.pd-sr-chip {
	background: #fff; border: 1px solid #e2e4e8; border-radius: 14px;
	padding: 3px 11px; font-size: 13px; color: #374151;
}
.pd-sr-count { font-size: 14px; color: #6b7280; margin: 0 0 20px; }

.pd-sr-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
}
.pd-sr-card {
	background: #fff; border: 1px solid #e8eaee; border-radius: 12px;
	overflow: hidden; display: flex; flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}
.pd-sr-card:hover { box-shadow: 0 10px 26px rgba(16,20,28,.1); transform: translateY(-2px); }
.pd-sr-card > a:first-child { text-decoration: none !important; color: inherit; display: block; }
.pd-sr-img { display: block; aspect-ratio: 1/1; background: #f4f5f7; overflow: hidden; }
.pd-sr-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-sr-name {
	display: block; padding: 13px 14px 5px; font-size: 14.5px; font-weight: 600;
	color: #1d2126; line-height: 1.35; min-height: 44px;
}
.pd-sr-price { display: block; padding: 0 14px 13px; font-size: 15px; font-weight: 700; color: #EE6F2D; }
.pd-sr-btn {
	display: block; margin: auto 14px 14px; text-align: center;
	border: 1px solid #EE6F2D; color: #EE6F2D; border-radius: 8px;
	padding: 9px 0; font-size: 13.5px; font-weight: 600; text-decoration: none !important;
	transition: background .18s, color .18s;
}
.pd-sr-btn:hover { background: #EE6F2D; color: #fff !important; }
.pd-sr-empty {
	background: #fff; border: 1px solid #e8eaee; border-radius: 12px;
	padding: 34px 26px; text-align: center; color: #4b5563;
}
.pd-sr-empty a { color: #EE6F2D; font-weight: 600; }
.pd-sr-foot { margin-top: 34px; font-size: 14px; }
.pd-sr-foot a { color: #EE6F2D; font-weight: 600; text-decoration: none; }

@media (max-width: 1024px) {
	.pd-sr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 921px) {
	.pd-sr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
	.pd-sr-wrap { padding: 22px 15px 54px; }
	.pd-sr-h1 { font-size: 24px; }
}
@media (max-width: 560px) {
	.pd-sr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.pd-sr-name { font-size: 13.5px; }
}
