/* ==========================================
   Hierarchical Property Filter – Style
   ========================================== */

.hierarchical-filter-container {
    background: #f4f7f9;
    border-radius: 12px;
    padding: 18px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
    font-family: 'Montserrat', 'Inter', sans-serif;
}

/* ── Form: Grid com 6 colunas definidas ────── */
#hierarchical-filter-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1.8fr auto;
    align-items: end;   /* alinha todos pelo fundo – base dos selects */
    gap: 16px;
}

/* ── Colunas genéricas ─────────────────────── */
.filter-field-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Labels ────────────────────────────────── */
.filter-field-col label {
    font-size: 11px;
    font-weight: 700;
    color: #cca353;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

/* ── Selects ───────────────────────────────── */
.filter-field-col select {
    width: 100%;
    padding: 9px 32px 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: #1e293b;
    background-color: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23cca353'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    box-sizing: border-box;
    height: 38px;   /* altura fixa para todos os controles alinharem */
}

.filter-field-col select:hover  { border-color: #cca353; }
.filter-field-col select:focus  {
    border-color: #cca353;
    box-shadow: 0 0 0 3px rgba(204, 163, 83, 0.18);
}
.filter-field-col select:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Coluna de Preço ───────────────────────── */
.filter-price-col {
    /* herda .filter-field-col */
}

/*
 * O slider + valores de preço têm que ocupar a mesma altura que um <select> (38px).
 * Usamos um wrapper interno para controlar isso.
 */
.price-slider-wrapper {
    position: relative;
    height: 38px;          /* mesma altura do select */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#price-slider {
    height: 5px;
    border: none !important;
    background: #e2e8f0 !important;
    border-radius: 3px;
    box-shadow: none !important;
    margin: 0 10px;
}

#price-slider .noUi-connect {
    background: #cca353 !important;
}

#price-slider .noUi-handle {
    width: 18px !important;
    height: 18px !important;
    border: 2.5px solid #cca353 !important;
    background: #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(204, 163, 83, 0.3) !important;
    cursor: grab;
    top: -7px !important;
    right: -9px !important;
    transition: transform 0.2s ease;
}

#price-slider .noUi-handle:active { cursor: grabbing; transform: scale(1.15); }

#price-slider .noUi-handle::before,
#price-slider .noUi-handle::after { display: none !important; }

.price-values {
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
    margin-top: 4px;
    line-height: 1;
}

/* ── Botão Limpar ──────────────────────────── */
.filter-action-col {
    display: flex;
    align-items: flex-end;   /* alinha o botão ao fundo, junto com os selects */
}

.clear-filters-btn {
    height: 38px;            /* mesma altura dos selects */
    padding: 0 18px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    color: #cca353;
    background: transparent;
    border: 1.5px solid #cca353;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    box-sizing: border-box;
}

.clear-filters-btn:hover {
    background: #cca353;
    color: #fff;
    box-shadow: 0 4px 14px rgba(204, 163, 83, 0.25);
}

/* ── Responsivo ────────────────────────────── */
@media (max-width: 960px) {
    #hierarchical-filter-form {
        grid-template-columns: 1fr 1fr;
    }
    .filter-price-col,
    .filter-action-col {
        grid-column: 1 / -1;
    }
    .clear-filters-btn { width: 100%; }
}
