/* ══ Villa search (Pages/Hotels/Search) ══════════════════════════════════════
   Builds on villa-rates.css (search bar, buttons, empty states, colour tokens). */

.vs-page { background: var(--vr-cream); }

/* The search bar on other pages (Pages/Shared/_Booking.cshtml) */
.vs-hero.vs-booking { padding: 110px 0 80px; }

/* Hero + search bar */
.vs-hero {
    position: relative; padding: 170px 0 70px; background-size: cover; background-position: center;
}
.vs-hero > .container { position: relative; z-index: 2; }
.vs-hero-head { max-width: 760px; margin: 0 auto 30px; text-align: center; color: #fff; }
.vs-hero-head .section-subtitle { color: var(--vr-gold); }
.vs-hero-title {
    margin: 0 0 12px; font-family: "Gilda Display", serif; font-size: 52px; line-height: 1.15; color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}
.vs-hero p.vs-hero-lead { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.6; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.vs-search { grid-template-columns: 1.25fr 1fr 1fr .8fr 1.1fr auto; }
.vs-hero .vr-meta { color: rgba(255, 255, 255, .8); }
.vs-hero .vr-meta i { color: var(--vr-gold); }
.vs-hero .vr-nights-pill { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }

/* Results area */
.vs-body { padding: 50px 0 90px; scroll-margin-top: 80px; }
#vsResults[aria-busy="true"] .vs-list { opacity: .5; }
.vs-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; align-items: start; }

/* Filters */
/* Sticks below the theme's fixed header (about 140px once the page scrolls). */
.vs-filters {
    position: sticky; top: 160px; max-height: calc(100vh - 180px); overflow: auto;
    background: #fff; border: 1px solid var(--vr-line); border-radius: 18px; padding: 22px 22px 8px;
    scrollbar-width: thin;
}
.vs-filters-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.vs-filters-head h3 { margin: 0; font-family: "Gilda Display", serif; font-size: 22px; color: var(--vr-ink); }
.vs-link {
    padding: 0; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 700;
    color: var(--vr-gold-dark); text-decoration: underline; text-underline-offset: 3px;
}
.vs-link[hidden] { display: none; }
.vs-close { display: none; }
.vs-fgroup { padding: 16px 0; border-top: 1px solid var(--vr-line); }
.vs-fgroup:first-of-type { border-top: none; }
.vs-fgroup h4 {
    margin: 0 0 12px; font-family: "Urbanist", sans-serif; font-size: 12px; font-weight: 800;
    letter-spacing: .12em; text-transform: uppercase; color: var(--vr-muted);
}
.vs-check {
    display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 0; cursor: pointer;
    font-size: 15px; line-height: 1.4; color: var(--vr-ink-soft);
}
/* The theme tints native checkboxes, which hides the checked state — draw our own. */
.vs-check input {
    width: 20px; height: 20px; margin: 0; flex-shrink: 0; cursor: pointer;
    border: 1.5px solid var(--vr-gold-border); border-radius: 6px; background: #fff;
    -webkit-appearance: none; appearance: none; transition: background-color .15s, border-color .15s;
}
.vs-check input::before, .vs-check input::after { content: none; display: none; }   /* theme's checkbox drawing */
.vs-check input:hover { border-color: var(--vr-gold); }
.vs-check input:checked {
    border-color: var(--vr-gold);
    background: var(--vr-gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.5 3.5L11 1' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}
.vs-check input:focus-visible { outline: 3px solid var(--vr-gold-border); outline-offset: 1px; }
.vs-check span:first-of-type { flex: 1; }
.vs-check .vs-n { font-size: 13px; color: var(--vr-muted); }
.vs-check.is-empty { opacity: .45; }
.vs-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.vs-pill {
    min-width: 46px; padding: 7px 14px; border-radius: 30px; cursor: pointer;
    background: #fff; border: 1px solid var(--vr-gold-border); color: var(--vr-ink);
    font-size: 14px; font-weight: 700; line-height: 1.3; transition: background .2s, color .2s, border-color .2s;
}
.vs-pill:hover { border-color: var(--vr-gold); }
.vs-pill.is-active { background: var(--vr-gold); border-color: var(--vr-gold); color: #fff; }

/* Price range: two range inputs over one track */
.vs-range { position: relative; height: 28px; margin: 4px 4px 8px; }
.vs-range-track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: var(--vr-line); }
.vs-range-fill { position: absolute; top: 12px; height: 4px; border-radius: 4px; background: var(--vr-gold); }
.vs-range input {
    position: absolute; left: 0; top: 0; width: 100%; height: 28px; margin: 0; padding: 0;
    background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.vs-range input::-webkit-slider-thumb {
    width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--vr-gold);
    box-shadow: 0 2px 8px rgba(20, 16, 10, .2); cursor: pointer; pointer-events: auto; -webkit-appearance: none;
}
.vs-range input::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--vr-gold);
    box-shadow: 0 2px 8px rgba(20, 16, 10, .2); cursor: pointer; pointer-events: auto;
}
.vs-range input::-moz-range-track { background: none; }
.vs-range input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--vr-gold-border); }
.vs-range-values { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--vr-ink); }

/* Select fields (Select2 multi, villa-select.css) */
.vs-ffield + .vs-ffield { margin-top: 14px; }
.vs-flabel {
    display: flex; align-items: center; gap: 8px; margin: 0 0 7px;
    font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--vr-ink-soft);
}
.vs-flabel i { width: 16px; color: var(--vr-gold); }

/* Collapsible groups of our villa fields */
.vs-fsection { border-top: 1px solid var(--vr-line); }
.vs-fsection > summary {
    display: flex; align-items: center; gap: 8px; padding: 16px 0; cursor: pointer; list-style: none;
    font-family: "Urbanist", sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--vr-muted); user-select: none;
}
.vs-fsection > summary::-webkit-details-marker { display: none; }
.vs-fsection > summary:hover { color: var(--vr-ink); }
.vs-fsection > summary i { margin-left: auto; font-size: 12px; color: var(--vr-gold); transition: transform .2s; }
.vs-fsection[open] > summary i { transform: rotate(180deg); }
.vs-fsection[open] { padding-bottom: 18px; }
.vs-fsection-n:empty { display: none; }
.vs-fsection-n {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--vr-gold); color: #fff; font-size: 11px; letter-spacing: 0;
}

.vs-filters-foot { display: none; }

/* Toolbar */
.vs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 14px; }
.vs-count { flex: 1; min-width: 220px; font-size: 15px; line-height: 1.5; color: var(--vr-ink-soft); }
.vs-count strong { font-family: "Gilda Display", serif; font-size: 26px; font-weight: 400; color: var(--vr-ink); margin-right: 4px; }
.vs-count .vs-dot { margin: 0 8px; color: var(--vr-gold); }
.vs-sort { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 600; color: var(--vr-muted); }
.vs-sort select {
    padding: 9px 34px 9px 14px; border: 1px solid var(--vr-gold-border); border-radius: 12px; cursor: pointer;
    font-family: "Urbanist", sans-serif; font-size: 15px; font-weight: 700; color: var(--vr-ink);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23BD945A' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center;
    -webkit-appearance: none; appearance: none;
}
.vs-filter-btn {
    display: none; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 12px; cursor: pointer;
    background: #fff; border: 1px solid var(--vr-gold-border); color: var(--vr-ink);
    font-size: 15px; font-weight: 700; line-height: 1.4;
}
.vs-filter-btn i { color: var(--vr-gold); }
.vs-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: 10px; background: var(--vr-gold); color: #fff; font-size: 12px; font-weight: 800;
}
.vs-badge:empty { display: none; }

.vs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.vs-chips:empty { display: none; }
.vs-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 14px; border-radius: 30px; cursor: pointer;
    background: var(--vr-gold-soft); border: 1px solid var(--vr-gold-border); color: #8a5e1a;
    font-size: 13px; font-weight: 700; line-height: 1.5;
}
.vs-chip i {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
    background: rgba(189, 148, 90, .25); font-size: 10px;
}
.vs-chip:hover i { background: var(--vr-gold); color: #fff; }

/* Cards */
.vs-list { display: grid; gap: 22px; transition: opacity .2s; }
@keyframes vs-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.vs-card {
    display: grid; grid-template-columns: minmax(260px, 40%) minmax(0, 1fr); overflow: hidden;
    background: #fff; border: 1px solid var(--vr-line); border-radius: 18px;
    transition: box-shadow .25s, border-color .25s; animation: vs-in .35s ease both;
}
.vs-card:hover { border-color: var(--vr-gold-border); box-shadow: 0 16px 44px rgba(20, 16, 10, .10); }
.vs-card[hidden] { display: none; }

.vs-media { position: relative; min-height: 260px; background: #e9e3d9; }
.vs-media-link { position: absolute; inset: 0; display: block; }
.vs-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.vs-card:hover .vs-media img { transform: scale(1.03); }
.vs-media-empty {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 46px; color: rgba(189, 148, 90, .55);
}
.vs-nav {
    position: absolute; top: 50%; z-index: 2; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    background: rgba(255, 255, 255, .92); border: none; color: var(--vr-ink); font-size: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .2s, transform .2s;
}
.vs-nav-prev { left: 12px; }
.vs-nav-next { right: 12px; }
.vs-card:hover .vs-nav, .vs-nav:focus-visible { opacity: 1; }
.vs-nav:hover { transform: scale(1.06); }
.vs-photo-count {
    position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 2px 10px; border-radius: 20px;
    background: rgba(20, 20, 20, .6); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.7;
}
/* card-photos.js: the next photo is still on its way */
.vs-media.is-photo-loading::after {
    content: ""; position: absolute; top: 50%; left: 50%; z-index: 2; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff;
    box-shadow: 0 0 12px rgba(0, 0, 0, .2); animation: vr-spin .8s linear infinite; pointer-events: none;
}
.vs-ribbon {
    position: absolute; left: 14px; top: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 12px; border-radius: 30px; background: var(--vr-gold); color: #fff;
    font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; line-height: 1.7;
    box-shadow: 0 4px 12px rgba(189, 148, 90, .4);
}

.vs-card-body { display: flex; flex-direction: column; min-width: 0; padding: 24px 26px 22px; }
.vs-loc {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 6px;
    font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--vr-gold-dark);
}
.vs-loc .vs-dot { color: var(--vr-line); }
.vs-title { margin: 0 0 12px; font-family: "Gilda Display", serif; font-size: 26px; line-height: 1.2; }
.vs-title a { color: var(--vr-ink); text-decoration: none; }
.vs-title a:hover { color: var(--vr-gold-dark); }
.vs-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; padding: 0; list-style: none; }
.vs-facts li { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--vr-ink-soft); }
.vs-facts i { color: var(--vr-gold); }
.vs-feats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.vs-snippet {
    margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--vr-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vs-card-foot {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 14px 20px;
    margin-top: auto; padding-top: 16px; border-top: 1px solid var(--vr-line);
}
.vs-price { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.vs-price-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--vr-muted); }
.vs-price-total { font-family: "Gilda Display", serif; font-size: 30px; line-height: 1.2; color: var(--vr-ink); white-space: nowrap; }
.vs-price-night { font-size: 14px; font-weight: 600; color: var(--vr-ink-soft); }
.vs-card-foot .vr-perks { align-self: center; }
.vs-cta { grid-column: 1 / -1; justify-self: end; text-decoration: none; }
.vs-cta:hover { color: #fff; }

/* No match after filtering */
.vs-nomatch[hidden] { display: none; }

/* Skeleton */
.vs-skel-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 32px; }
.vs-skel-side { height: 520px; border-radius: 18px; background: #fff; border: 1px solid var(--vr-line); padding: 22px; }
.vs-skel-card {
    display: grid; grid-template-columns: 40% 1fr; height: 270px; overflow: hidden;
    border-radius: 18px; background: #fff; border: 1px solid var(--vr-line);
}
.vs-skel-card + .vs-skel-card { margin-top: 22px; }
.vs-skel-img { background: linear-gradient(90deg, #f1ece4 25%, #f9f6f1 50%, #f1ece4 75%); background-size: 200% 100%; animation: vr-shimmer 1.2s ease-in-out infinite; }
.vs-skel-body { display: flex; flex-direction: column; gap: 12px; padding: 26px; }

/* Tablet & phone */
@media (max-width: 1199.98px) {
    .vs-search { grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 10px; }
    .vs-search .vr-field { border: 1px solid var(--vr-line); }
    .vs-search .vr-field + .vr-field:not(.vr-field-submit)::before { display: none; }
    .vs-search .vr-field-submit { grid-column: 1 / -1; border: none; }
}
@media (max-width: 991.98px) {
    .vs-hero { padding: 140px 0 50px; }
    .vs-hero-title { font-size: 38px; }
    .vs-search { grid-template-columns: 1fr 1fr; }
    .vs-search .vs-field-dest { grid-column: 1 / -1; }
    .vs-layout, .vs-skel-layout { grid-template-columns: minmax(0, 1fr); }
    .vs-skel-side { display: none; }
    .vs-filter-btn { display: inline-flex; }

    /* Filters become a full-screen sheet */
    .vs-filters {
        position: fixed; inset: 0; top: 0; z-index: 1001; max-height: none; border-radius: 0; border: none;
        padding: 20px 20px 0; transform: translateY(100%); visibility: hidden;
        transition: transform .3s ease, visibility 0s linear .3s; display: flex; flex-direction: column;
    }
    .vs-filters { overflow: hidden; }
    .vs-filters-body { flex: 1; overflow: auto; padding-right: 14px; margin-right: -6px; }
    .vs-filters.is-open { transform: none; visibility: visible; transition: transform .3s ease; }
    .vs-close {
        display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
        border: 1px solid var(--vr-line); background: #fff; cursor: pointer; font-size: 16px; color: var(--vr-ink);
    }
    .vs-filters-foot {
        display: block; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--vr-line); background: #fff;
    }
    .vs-filters-foot .vr-btn-reserve { width: 100%; }
    body.vs-filters-open { overflow: hidden; }
}
@media (max-width: 767.98px) {
    .vs-card, .vs-skel-card { grid-template-columns: minmax(0, 1fr); }
    .vs-skel-card { height: 420px; grid-template-rows: 220px 1fr; }
    .vs-media { min-height: 0; aspect-ratio: 16 / 10; }
    .vs-nav { opacity: 1; width: 34px; height: 34px; margin-top: -17px; }
    .vs-card-body { padding: 20px 18px 18px; }
    .vs-title { font-size: 23px; }
    .vs-sort { width: 100%; justify-content: space-between; }
    .vs-sort select { flex: 1; }
}
@media (max-width: 575.98px) {
    .vs-hero-title { font-size: 32px; }
    .vs-hero p.vs-hero-lead { font-size: 15px; }
    .vs-card-foot { grid-template-columns: minmax(0, 1fr); }
    .vs-price { text-align: left; }
    .vs-cta { justify-self: stretch; }
}
