.woostify-ajax-search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.woostify-ajax-search-form {
    display: flex;
    width: 100%;
    position: relative;
}

.search-category-dropdown {
    position: relative;
    min-width: 150px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.search-category-dropdown select {
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    outline: none;
}

.search-input-container {
    flex: 1;
    position: relative;
    display: flex;
    border: 1px solid #ddd;
    border-radius: 0 4px 4px 0;
}

.woostify-ajax-search-input {
    width: 100%;
    padding: 10px 15px;
    border: none;
    outline: none;
}

.woostify-ajax-search-submit {
    padding: 0 15px;
    background: #0073BB
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woostify-ajax-search-submit:hover {
    background: #000;
}

.woostify-ajax-search-results {
    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 5px 15px rgba(0,0,0,0.1);
    z-index: 999;
    display: none;
}

.woostify-ajax-search-results.has-results {
    display: block;
}

.woostify-ajax-search-products {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
}

.woostify-ajax-search-products li {
    border-bottom: 1px solid #eee;
}

.woostify-ajax-search-products li:last-child {
    border-bottom: none;
}

.woostify-ajax-search-products li a {
    display: flex;
    padding: 10px;
    color: #333;
    text-decoration: none;
}

.woostify-ajax-search-products li a:hover {
    background: #f9f9f9;
}

.search-product-image {
    width: 50px;
    margin-right: 15px;
}

.search-product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.search-product-info h3 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 500;
}

.search-product-info .price {
    font-size: 13px;
    color: #3a3a3a;
}

.woostify-view-all-results {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #eee;
}

.woostify-view-all-results a {
    color: #3a3a3a;
    font-weight: 500;
    text-decoration: none;
}

.woostify-view-all-results a:hover {
    color: #000;
}

.woostify-no-results, .woostify-search-loading, .woostify-search-error {
    padding: 15px;
    text-align: center;
}

/* Mobile styles */
@media (max-width: 767px) {
    .woostify-ajax-search-form {
        flex-direction: column;
    }
    
    .search-category-dropdown {
        border-right: 1px solid #ddd;
        border-bottom: none;
        border-radius: 4px 4px 0 0;
    }
    
    .search-input-container {
        border-radius: 0 0 4px 4px;
    }
    
    .search-category-dropdown select {
        display: none;
    }
    
    .search-category-dropdown.active {
        border-radius: 4px 4px 0 0;
    }
    
    .search-category-dropdown.active:after {
        content: '\25BC';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .search-category-dropdown.active .product-cat-select {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1px solid #ddd;
        border-top: none;
        z-index: 1000;
        max-height: 200px;
        overflow-y: auto;
    }
}

/* Fix alignment between category dropdown and search input */
.search-category-dropdown {
    display: flex;
    align-items: stretch; /* Make sure the select fills the container height */
}

.search-category-dropdown select {
    height: auto; /* Allow natural height */
    align-self: stretch; /* Stretch to match sibling height */
}

.search-input-container {
    display: flex;
    align-items: stretch; /* Make sure input and button match height */
}

.woostify-ajax-search-input {
    align-self: stretch; /* Stretch input to match button height */
}

/* For mobile */
@media (max-width: 767px) {
    .search-category-dropdown {
        border-bottom: none;
    }
    
    .search-input-container {
        border-top: none;
    }
}