/* 两框关联搜索样式 */
.two-box-search-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
}

.two-box-search-form {
    display: flex;
    gap: 8px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: stretch;
}

/* 品牌下拉菜单 */
.search-box.brand-box {
    flex: 0 0 auto;
    width: 180px;
}

.search-box select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-box select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* 产品搜索框 */
.search-box.product-box {
    flex: 1;
    min-width: 200px;
}

.search-box input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.search-box input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.search-suggestions .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.search-suggestions .suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestions .suggestion-item:hover {
    background-color: #f5f5f5;
}

.search-submit {
    padding: 8px 18px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    flex: 0 0 auto;
}

.search-submit:hover {
    background-color: #005177;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .two-box-search-container {
        padding: 5px;
    }
    
    .two-box-search-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .search-box.brand-box {
        width: 100%;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .search-box input[type="text"],
    .search-box select {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .search-submit {
        width: 100%;
        padding: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .two-box-search-container {
        padding: 5px;
    }
    
    .search-box input[type="text"],
    .search-box select {
        font-size: 13px;
        padding: 6px 8px;
    }
    
    .search-submit {
        font-size: 13px;
        padding: 6px;
    }
    
    .search-suggestions .suggestion-item {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* 清除默认的WordPress搜索样式冲突 */
.two-box-search-form .screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.two-box-search-form .search-submit::-moz-focus-inner {
    border: 0;
    padding: 0;
}
