/* ==========================================================
   FIND YOUR VILLA — filter page styles (theme-aware)
   ========================================================== */

.vf-head {
    text-align: center;
    padding: 130px 24px 30px;
    max-width: 760px;
    margin: 0 auto;
}
.vf-head h1 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 400;
    color: var(--text);
    margin: 0 0 14px;
}
.vf-head h1 em { font-style: italic; }
.vf-head p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

.vf-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 90px;
}

/* --- Filter bar --- */
.vf-filters {
    position: sticky;
    top: 64px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px 20px;
    padding: 20px 22px;
    background: var(--section-alt);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 26px;
}
.vf-field { display: flex; flex-direction: column; gap: 6px; }
.vf-field label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
}
.vf-field select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--page-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239B9B9B' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 10px 34px 10px 13px;
    min-width: 160px;
    cursor: pointer;
}
.vf-field select:focus { outline: none; border-color: var(--text-muted); }

/* --- Amenities multi-select dropdown --- */
.vf-amen { position: relative; }
.vf-amen-btn {
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    background: var(--page-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239B9B9B' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    padding: 10px 34px 10px 13px;
    min-width: 175px;
    cursor: pointer;
}
.vf-amen-btn.is-open { border-color: var(--text-muted); }
.vf-amen-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 220px;
    background: var(--page-bg);
    border: 1px solid var(--border);
    border-radius: 11px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    padding: 8px;
}
.vf-amen-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.92rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}
.vf-amen-opt:hover { background: var(--section-alt); }
/* selected row: grey text -> bold near-black */
.vf-amen-opt.is-checked,
.vf-amen-opt:has(input:checked) { color: var(--text); font-weight: 600; }

/* custom checkbox: empty box -> dark box with a white tick when checked */
.vf-amen-opt input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 1.5px solid var(--text-faint);
    border-radius: 5px;
    background: var(--page-bg);
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.vf-amen-opt input:checked {
    background: var(--text);
    border-color: var(--text);
}
.vf-amen-opt input:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid var(--page-bg);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.vf-search {
    margin-left: auto;
    background: var(--text);
    color: var(--page-bg);
    border: none;
    border-radius: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 11px 26px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.vf-search:hover { opacity: 0.85; }

.vf-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding-bottom: 12px;
}
.vf-reset:hover { color: var(--text); }

.vf-count-row {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 18px;
    padding-left: 2px;
}

/* Cards were styled for the dark .cat-section; on this lighter page make
   their text follow the theme so nothing goes white-on-white in day mode. */
#villaGrid .property-name,
#villaGrid .property-location,
#villaGrid .property-price { color: var(--text); }

/* --- card meta line (guests / beds / pool) --- */
.vf-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0 8px;
}

.vf-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.6;
    padding: 40px 20px;
}
.vf-empty a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
    .vf-head { padding-top: 110px; }
    .vf-filters { position: static; gap: 14px; padding: 18px; }
    .vf-field { flex: 1 1 45%; }
    .vf-field select { min-width: 0; width: 100%; }
    .vf-amen { flex: 1 1 100%; }
    .vf-amen-btn { width: 100%; min-width: 0; }
    .vf-amen-panel { width: 100%; min-width: 0; }
    .vf-search { margin-left: 0; flex: 1 1 100%; order: 9; }
    .vf-reset { margin-left: 0; order: 10; }
}
