.search-banner-wrapper {
    border: 1px solid #CFCFCF;
    padding-left: 200px;
    padding-right: 200px;
}

.search-banner-form {
    position: relative;
}

.search-banner-form .search-box {
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap; /* prevent wrapping */
    height: 65px;       /* desired height */
}

.search-banner-form .search-keyword {
    flex: 1 1 auto; /* text box grows/shrinks */
    min-width: 0;   /* prevent overflow */
    position: relative;
}

.search-banner-form .filter-button {
    flex: 0 0 50px; /* fixed */
    display: flex;
}

.search-banner-form .search-button {
    flex: 0 0 150px; /* smaller width on mobile */
    display: flex;
}

/* Responsive: make button smaller on very small screens */
@media (max-width: 480px) {
    .search-banner-form .search-button {
        flex: 0 0 120px; /* shrink more if needed */
    }
}

/* Input */
.search-banner-form input.form-control {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 0 35px 0 12px;
    font-size: 16px;
    margin: 0;
    box-sizing: border-box;
}

/* Filter button */
.search-banner-form .filter-button button {
    flex: 1;
    height: 100%;
    border: none;
    border-left: 1px solid #CFCFCF;
    border-radius: 0;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
    color: var(--rt-primary-color);
    box-sizing: border-box;
}

/* Search button */
.search-banner-form .search-button .submit-btn {
    flex: 1;
    height: 100%;
    border-left: 1px solid #CFCFCF;
    border-radius: 0 !important;   /* force no rounding */
    -webkit-border-radius: 0;      /* Safari/iOS */
    -moz-border-radius: 0;         /* Firefox */
    background: var(--rt-primary-color);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;              /* remove browser styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    font-weight: 800;
    font-size: 14px;
}

/* Tablet */
@media (max-width: 992px) {
    .search-banner-wrapper {
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .search-banner-wrapper {
        padding-left: 0px;
        padding-right: 0px;
    }
}

.filter-panel {
    display: none;
    position: absolute !important;
    z-index: 20 !important;
    top: 100%;      /* just below search bar */
    left: 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.filter-panel h4 {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: bold;
}

.filter-panel-close {
    display: none; /* shown only on the mobile bottom-sheet layout */
}

/* Force From + To side by side */
.price-row {
    display: flex;
    gap: 15px;
    align-items: flex-end; /* aligns dropdown bottoms */
}

.price-item {
    flex: 1; /* make them equal width */
}

.price-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.price-item select.form-control {
    width: 100%;
    height: 45px;
    border: 1px solid #CFCFCF;
    padding: 0 12px;
    font-size: 16px;
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none !important;
    cursor: pointer;
    display: none;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    outline: none !important;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.clear-btn:focus,
.clear-btn:active,
.clear-btn:hover {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    color: inherit; /* don't change color on hover */
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.filter-item {
    flex: 1;
}

.filter-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.filter-item select.form-control,
.filter-item input.form-control {
    width: 100%;
    height: 45px;
    border: 1px solid #CFCFCF;
    padding: 0 12px;
    font-size: 16px;
    border-radius: 4px;
}

/* Header row pairing Listing Type with HOA at the same prominence level */
.filter-row--header {
    align-items: flex-start;
}

.filter-col {
    flex: 1;
    min-width: 0;
}

.filter-col .pill-group {
    margin-bottom: 0;
}

.filter-col select.form-control {
    width: 100%;
    height: 45px;
    border: 1px solid #CFCFCF;
    padding: 0 12px;
    font-size: 16px;
    border-radius: 4px;
}

.filter-actions {
    display: flex;
    gap: 10px;       /* space between buttons */
    margin-top: 10px;
    justify-content: flex-start; /* keep buttons to the left */
    align-items: center;
}

.reset-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    padding: 4px 10px;        /* smaller padding */
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;          /* smaller text */
    font-weight: 600;
    color: #333;
    transition: background 0.2s ease;
}

.reset-btn:hover {
    background: #e1e1e1;
}

/* ---- Filter sections / grouping ---- */

.filter-section {
    margin-bottom: 6px;
}

.filter-section--prominent h4:first-child {
    margin-top: 0;
}

/* ---- Property type pills ---- */

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.pill {
    border: 1px solid #CFCFCF;
    background: #fff;
    color: #333;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pill:hover {
    border-color: var(--rt-primary-color);
}

.pill.active {
    background: var(--rt-primary-color);
    border-color: var(--rt-primary-color);
    color: #fff;
}

/* ---- Property Subtype — secondary, optional refinement ---- */

.subtle-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    color: #777 !important;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 2px;
    margin: -4px 0 10px;
    border-radius: 4px;
    transition: color 0.15s ease;
}

.subtle-toggle:hover,
.subtle-toggle:focus,
.subtle-toggle:active {
    background: none !important;
    background-color: transparent !important;
    color: var(--rt-primary-color) !important;
}

.subtle-toggle-chevron {
    font-size: 9px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.subtle-toggle.is-open .subtle-toggle-chevron {
    transform: rotate(180deg);
}

.pill-group--subtle {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid #ececec;
}

.pill--subtle {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.pill--subtle.active {
    background: var(--rt-primary-color);
    border-color: var(--rt-primary-color);
    color: #fff;
}

/* ---- Accordion groups (Size & Lot, Features) ---- */

.accordion-item {
    border-top: 1px solid #e5e5e5;
    padding: 4px 0;
}

.accordion-header {
    display: flex;
    align-items: center;
    width: 100%;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 10px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #222 !important;
    text-align: left;
}

.accordion-header:hover,
.accordion-header:focus,
.accordion-header:active {
    background: none !important;
    background-color: transparent !important;
    color: #222 !important;
}

.accordion-title {
    flex: 1;
}

.accordion-badge {
    background: var(--rt-primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 8px;
    margin-right: 10px;
}

.accordion-chevron {
    font-size: 13px;
    color: #777;
    transition: transform 0.2s ease;
}

.accordion-item.is-open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    padding: 6px 2px 14px;
}

/* ---- Toggle switches (Features section) ---- */

.toggle-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sbf-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.sbf-toggle-row-label {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.sbf-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.sbf-toggle-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.sbf-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    transition: background 0.15s ease;
}

.sbf-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.sbf-toggle-input:checked + .sbf-toggle-slider {
    background: var(--rt-primary-color);
}

.sbf-toggle-input:checked + .sbf-toggle-slider::before {
    transform: translateX(18px);
}

.sbf-toggle-input:focus-visible + .sbf-toggle-slider {
    outline: 2px solid var(--rt-primary-color);
    outline-offset: 2px;
}

/* ---- Mobile: filter panel becomes a full-height bottom sheet ---- */

@media (max-width: 600px) {
    body.sbf-panel-open {
        overflow: hidden;
    }

    .filter-panel {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        z-index: 100000 !important;
        padding: 20px 16px 16px;
    }

    .filter-panel-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        margin-left: auto;
        width: 34px;
        height: 34px;
        border: none;
        border-radius: 50%;
        background: #eee;
        color: #333;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        z-index: 1;
    }

    .filter-panel-scroll {
        overflow-y: auto;
        height: calc(100% - 40px);
        padding-bottom: 20px;
    }
}
