/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --brand:        var(--color-destaque, #FE7C0B);
    --brand-light:  rgba(254,124,11,.08);
    --brand-border: rgba(254,124,11,.25);
    --brand-glow:   rgba(254,124,11,.14);
    --radius-card:  14px;
    --radius-inp:   9px;
    --text-main:    #1a1a2e;
    --text-muted:   #6b7280;
    --border-col:   #e8eaed;
    --surface:      #ffffff;
    --inp-h:        44px;
}

/* ==============================
   FILTER CARD
   ============================== */
.filter-card {
    background: var(--surface);
    border: 1px solid var(--border-col);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    width: 100%;
    max-width: 100%;
}

.filter-card__header {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--brand-light);
    border-bottom: 1px solid var(--brand-border);
    padding: .7rem 1rem;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--brand);
}

.filter-card__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

/* ---- Field ---- */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    width: 100%;
    min-width: 0;
}

.filter-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
}

/* ---- Input ---- */
.filter-input-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
}
.filter-input-icon {
    position: absolute;
    left: .7rem;
    color: #c0c0c0;
    font-size: .76rem;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}
.filter-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: var(--inp-h);
    border: 1.5px solid var(--border-col);
    border-radius: var(--radius-inp);
    padding: 0 .75rem 0 2rem;
    font-size: .875rem;
    color: var(--text-main);
    background: #fafafa;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.filter-input:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.filter-input::placeholder { color: #c0c4cc; font-size: .82rem; }

/* ---- Select ---- */
.filter-select-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}
.filter-select-icon {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c0c0;
    font-size: .76rem;
    pointer-events: none;
    z-index: 2;
}
.filter-select {
    display: block;
    width: 100%;
    min-width: 0;
    height: var(--inp-h);
    border: 1.5px solid var(--border-col);
    border-radius: var(--radius-inp);
    padding: 0 .75rem 0 2rem;
    font-size: .875rem;
    color: var(--text-main);
    background: #fafafa;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.filter-select:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-glow);
}

/* ---- Price range ---- */
.price-range-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    min-width: 0;
}
.price-range-row .filter-input-wrap { flex: 1 1 0; min-width: 0; }
.price-range-sep {
    color: #ccc;
    flex-shrink: 0;
    font-size: .95rem;
}

/* ---- Submit ---- */
.filter-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    width: 100%;
    height: var(--inp-h);
    padding: 0 1rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-inp);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: .1rem;
    -webkit-tap-highlight-color: transparent;
    transition: filter .2s, transform .2s, box-shadow .2s;
}
.filter-submit:hover  { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(254,124,11,.3); }
.filter-submit:active { transform: translateY(0); box-shadow: none; }

/* ---- Clear ---- */
.filter-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    font-size: .78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.filter-clear:hover { color: #e74c3c; }

/* ==============================
   GLOBAL SEARCH BAR
   ============================== */
.search-bar-global {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--border-col);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: border-color .2s, box-shadow .2s;
}
.search-bar-global:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.sbg-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid var(--border-col);
}
.sbg-field--select { flex: 0 1 180px; }

.sbg-icon {
    position: absolute;
    left: .85rem;
    color: #bbb;
    font-size: .8rem;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}
.sbg-input,
.sbg-select {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: none;
    outline: none;
    padding: 0 .75rem 0 2.2rem;
    font-size: .88rem;
    color: var(--text-main);
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}
.sbg-input::placeholder { color: #c0c4cc; }
.sbg-select { cursor: pointer; }

.sbg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 0 1.3rem;
    background: var(--brand);
    color: #fff;
    border: none;
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: filter .2s;
}
.sbg-btn:hover  { filter: brightness(1.1); }
.sbg-btn:active { filter: brightness(.95); }

/* ==============================
   MOBILE  ≤ 767px
   ============================== */
@media (max-width: 767px) {

    /* Card */
    .filter-card { border-radius: 12px; }
    .filter-card__body { padding: .85rem; gap: .75rem; }

    /* Preços: empilha */
    .price-range-row { flex-direction: column; gap: .55rem; }
    .price-range-row .filter-input-wrap { width: 100%; }
    .price-range-sep { display: none; }

    /* Search bar: empilha verticalmente */
    .search-bar-global { flex-direction: column; border-radius: 12px; }
    .sbg-field,
    .sbg-field--select {
        flex: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-col);
    }
    .sbg-field:last-of-type { border-bottom: none; }
    .sbg-input,
    .sbg-select { height: 48px; width: 100%; }
    .sbg-btn {
        width: 100%;
        height: 48px;
        border-radius: 0 0 10px 10px;
        padding: 0;
    }
}

/* ==============================
   MOBILE PEQUENO  ≤ 360px
   ============================== */
@media (max-width: 360px) {
    .filter-card__body { padding: .7rem; }
    .filter-input,
    .filter-select { font-size: .82rem; }
    .filter-label { font-size: .65rem; }
    .filter-submit,
    .sbg-btn { font-size: .82rem; }
}