/* Center wrapper */
.search-wrapper {
    display: flex;
    justify-content: center; 
    width: 100%;
    margin: 20px 0;
}


/* Fixed total search bar width (desktop + mobile) */
.custom-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-primary);
    border-radius: 10px;
    height: 35px;
    width: 50vw; /* total fixed width */
    max-width: 500px; /* optional max */
    overflow: hidden;
}

/* Category dropdown */
.select-option-header {
    border: none;
    height: 100%;
    background-color: var(--color-primary);
    color: #f5f5f5;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    flex: 0 0 auto; /* width controlled by JS */
    transition: width 0.2s ease;
}

.select-option-header option:hover {
    background-color: var(--color-secondary); /* may work in some browsers */
    color: #fff;
}

.select-option-header:focus {
    outline: none !important;
}

/* Search input fills remaining space */
.search-input-header {
    flex: 1; 
    height: 100%;
    border: none;
    padding: 0 10px;
    min-width: 50px; 
    outline: none !important;
}

/* Search button */
.search-btn-header {
    height: 100%;
    background-color: #f5f5f5;
    border: none;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    flex: 0 0 auto; 
    cursor: pointer;
}

.search-btn-header img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Mobile view: keep same width as desktop */
@media screen and (max-width: 992px) {
    .custom-input-group {
        flex-direction: row; /* keep single line */
        width: 70vw; /* same as desktop */
        max-width: 500px;
    }

    .select-option-header,
    .search-input-header,
    .search-btn-header {
        height: 35px; /* same as desktop */
    }
}
