.search-banner {
    position: relative;  /* 建立定位上下文 */
    width: 100%;
    margin-top: 1rem;
}

/* 可选：添加背景遮罩提升可读性 */
.search-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* 半透明黑色遮罩 */
    z-index: 1;
}

.search-img img {
    width: 100%;
    display: block;
}

.search-text {
    position: absolute;  /* 绝对定位 */
    top: 30%;           /* 垂直居中 */
    left: 15%;          /* 水平居中 */
    transform: translate(-30%, -15%); /* 精确居中 */
    text-align: center;
    color: white;       /* 文字颜色 */
    z-index: 2;         /* 确保在图片之上 */
}

.search-text .title {
    font-size: 3rem;
    font-weight: 800;
}
.search-text .line span {
    width: 10rem;
    color: var(--wf-main-color);
}
.search-text .line {
    border: 1px solid var(--wf-main-color);
    margin: 1rem 0;
    width: 5rem;
}
.search-text .desc {
    text-align: left;
    font-weight: 100;
    margin-top: 2rem;
    font-size: 1.2rem;
}
.search-text .btn {
    text-align: left;
    margin-top: 2rem;
}
.search-text .btn a {
    display: inline-block;
    padding: 0.5rem 3rem;
    background: var(--wf-main-color);
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    margin-top: 1rem;
}
.search-form {
    margin: 2rem 0 4rem;
    text-align: center;
}
.search-form h4 {
    margin-bottom: 1rem;
}
.search-form p {
    color: black;
}
.search-form p span.mobile {
    color: var(--wf-text-color);
}
.search-result {
    margin-bottom: 2rem;
}
.search-result .result-title { 
    color: #000;
    font-size: 2rem;
    font-weight: 600;
}
.search-by-category ul {
    padding: 0;
    margin: 0;
    display: grid;                    /* 启用网格布局 */
    grid-template-columns: repeat(3, 1fr);  /* 3列，每列等宽 */
    gap: 20px;                        /* 行列间距 */
    list-style: none;
}

.search-by-category li {
    text-align: center;
    margin-bottom: 4rem;
}

.search-by-category li a img {
    width: 100%;                      /* 图片自适应容器 */
    max-width: 16rem;
    height: auto;
    display: block;
    margin: 0 auto;
}

.search-by-category a {
    text-decoration: none;
    color: inherit;
}

.search-by-category .title {
    margin-top: 10px;
    font-size: 14px;
}

/* 搜索表单样式 */
.parts-custom-search { 
    display: flex; 
    gap: 10px; 
    max-width: 600px; 
    margin: 20px auto; 
}

.parts-custom-search input[type="text"] { 
    flex: 1; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    
    /* 核心修改：用户输入的文字颜色设为黑色 */
    color: #000;
    
    /* 核心修改：光标颜色设为黑色 */
    caret-color: #000;
    
    /* 彻底移除选中时的蓝色外边框和阴影 */
    outline: none !important;
    box-shadow: none !important;
    
    font-size: 16px;
}

/* 确保在选中（Focus）状态下，依然没有任何视觉抖动或边框变化 */
.parts-custom-search input[type="text"]:focus {
    border: 1px solid #ccc; /* 保持原样边框 */
    outline: none !important;
    box-shadow: none !important;
}

/* 按钮样式：黑底白字 */
.parts-custom-search button { 
    padding: 12px 25px; 
    background: #000; 
    color: #fff; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.parts-custom-search button:hover {
    opacity: 0.8; /* 悬停时稍微透明作为反馈 */
}


/* 1. 强制网格为 5 列布局 */
#parts-results-area .parts-grid {
    display: grid !important;
    /* 这里的 1fr 代表平均分配五个等宽列 */
    grid-template-columns: repeat(5, 1fr) !important; 
    gap: 15px !important;
}

/* 2. 单个产品卡片样式精修 */
#parts-results-area .part-hit-card {
    border: 1px solid #eee !important;
    padding: 15px !important;
    background: #fff !important;
    transition: all 0.2s ease-in-out !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: left !important; /* 工业站通常左对齐更专业 */
}

#parts-results-area .part-hit-card:hover {
    border-color: #000 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06) !important;
}

/* 3. 图片容器：固定高度确保下方文字对齐 */
#parts-results-area .part-hit-card img {
    width: 100% !important;
    height: 130px !important; /* 增加高度让展示更大气 */
    object-fit: contain !important;
    margin-bottom: 15px !important;
}

/* 4. 标题优化：解决“对不齐”和“显示不全”的问题 */
#parts-results-area .part-hit-card .p-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important; /* 最多显示2行，超出变省略号 */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #000 !important;
    height: 42px !important; /* 强制固定2行的高度 (14px * 1.5行高 * 2) */
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

/* 5. SKU 样式 */
#parts-results-area .part-hit-card .p-sku {
    display: block !important;
    font-size: 12px !important;
    color: #888 !important;
    margin-bottom: 10px !important;
}

/* 6. 价格样式：纯黑加粗 */
#parts-results-area .part-hit-card .p-price {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #000 !important;
    margin-top: auto; /* 确保价格始终在卡片底部对齐 */
}

/* 响应式：在平板下变2列，手机下变1列 */
@media (max-width: 1024px) {
    #parts-results-area .parts-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
    #parts-results-area .parts-grid { grid-template-columns: 1fr !important; }
}