:root {
    --ivory: #fbf8f2;
    --cream: #f4eee4;
    --earth: #38322a;
    --muted: rgba(56, 50, 42, .62);
    --line: rgba(56, 50, 42, .16);
    --gold: #ad9162;
    --white: #fffdf8;
    --body-pad: 36px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--ivory);
    color: var(--earth);
    font-family: "DM Sans", sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

button,
input,
select,
textarea,
a,
p,
span,
strong {
    font-family: "DM Sans", sans-serif;
}

button {
    color: inherit;
    font: inherit;
}

a {
    color: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    background: rgba(251, 248, 242, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-main {
    position: relative;
    min-height: 57px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px var(--body-pad);
    border-bottom: 1px solid var(--line);
}

.brand-wordmark {
    grid-column: 2;
    color: var(--earth);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.1rem, 1.8vw, 1.55rem);
    font-weight: 400;
    letter-spacing: .22em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(56, 50, 42, .55);
    font-size: .68rem;
    font-weight: 300;
    letter-spacing: .14em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.lang-switch::before {
    content: "◎";
    color: var(--earth);
    font-size: .58rem;
}

.lang-option {
    opacity: .55;
    text-decoration: none;
}

.lang-option.active {
    opacity: 1;
}

.lang-option + .lang-option::before {
    content: "/";
    margin: 0 8px 0 0;
    color: rgba(56, 50, 42, .42);
}

.lang-switch {
    position: relative;
    z-index: 1200;
    line-height: 1;
}

.lang-switch::before,
.lang-option + .lang-option::before {
    display: none;
}

.lang-switch .lang-option,
.lang-separator {
    color: rgba(56, 50, 42, .48);
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: .16em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.lang-switch .lang-option.active,
.lang-switch .lang-option:hover {
    color: var(--earth);
}

.nav-phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 9px 22px;
    background: var(--earth);
    color: var(--ivory);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .16em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.header-nav {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 42px;
}

.nav-link {
    color: rgba(56, 50, 42, .62);
    font-size: .62rem;
    font-weight: 400;
    letter-spacing: .22em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
}

.search-page {
    min-height: 56vh;
    padding-top: 96px;
    background: var(--ivory);
}

.search-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: visible;
    padding: 58px clamp(28px, 7vw, 120px) 0;
    background:
        linear-gradient(90deg, rgba(251, 248, 242, .92) 0%, rgba(251, 248, 242, .73) 45%, rgba(251, 248, 242, .08) 100%),
        linear-gradient(180deg, rgba(251, 248, 242, .08), rgba(251, 248, 242, .42)),
        url("../img/LCDC-MOULIN-66.jpg") center 46% / cover no-repeat;
}

.search-hero-inner {
    position: relative;
    width: 100%;
    max-width: 1240px;
    min-height: 430px;
    margin: 0 auto;
}

.search-heading {
    max-width: 640px;
}

.search-heading span,
.results-title span {
    display: block;
    color: var(--gold);
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .38em;
    line-height: 1.4;
    text-transform: uppercase;
}

.search-heading h1,
.results-title h2,
.villa-info h3,
.search-loading-box strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 300;
    letter-spacing: 0;
}

.search-heading h1 {
    max-width: 620px;
    margin: 18px 0 0;
    color: var(--earth);
    font-size: clamp(3.45rem, 5.2vw, 5.9rem);
    line-height: .9;
}

.search-panel {
    position: absolute;
    left: 50%;
    bottom: 64px;
    width: min(860px, calc(100% - 56px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    background: rgba(251, 248, 242, .92);
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(56, 50, 42, .12);
    transform: translateX(-50%);
}

.search-field {
    position: relative;
    width: 100%;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 17px 74px 17px 24px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--earth);
    text-align: left;
    cursor: pointer;
}

.search-field span {
    color: var(--earth);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .24em;
    line-height: 1;
    text-transform: uppercase;
}

.search-field strong,
#rangeLabel {
    color: var(--earth);
    font-family: "DM Sans", sans-serif !important;
    font-size: .95rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.25;
}

.search-field i {
    position: absolute;
    right: 24px;
    top: 50%;
    width: 18px;
    height: 18px;
    border: 1px solid var(--earth);
    transform: translateY(-50%);
}

.search-field i::before,
.search-field i::after {
    content: "";
    position: absolute;
    top: -4px;
    width: 1px;
    height: 7px;
    background: var(--earth);
}

.search-field i::before {
    left: 4px;
}

.search-field i::after {
    right: 4px;
}

.search-submit,
.villa-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--earth);
    background: var(--earth);
    color: var(--ivory);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .24em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.search-submit {
    min-width: 210px;
    min-height: 58px;
    margin: 12px;
    padding: 0 32px;
    cursor: pointer;
}

.search-submit:hover,
.villa-cta:hover {
    background: transparent;
    color: var(--earth);
}

.search-datepicker {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 50;
    width: min(390px, calc(100vw - 32px));
    display: none;
    padding: 22px;
    background: var(--ivory);
    border: 1px solid var(--line);
    box-shadow: 0 26px 70px rgba(56, 50, 42, .18);
    transform: none;
}

.search-datepicker.is-open {
    display: block;
}

.dp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.dp-head strong {
    color: var(--earth);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 400;
    text-transform: capitalize;
}

.dp-head button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--earth);
    cursor: pointer;
}

.dp-week,
.dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}

.dp-week {
    margin-bottom: 8px;
}

.dp-week span {
    color: var(--gold);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-align: center;
    text-transform: uppercase;
}

.dp-grid button,
.dp-grid span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--earth);
    font-size: .78rem;
    font-weight: 300;
    justify-self: center;
}

.dp-grid button {
    cursor: pointer;
}

.dp-grid button:hover,
.dp-grid button.selected,
.dp-grid button.is-selected {
    background: var(--earth);
    color: var(--ivory);
}

.dp-grid button.in-range,
.dp-grid button.is-in-range {
    background: rgba(173, 145, 98, .18);
}

.dp-grid button:disabled,
.dp-grid button.is-disabled {
    color: rgba(56, 50, 42, .24);
    cursor: not-allowed;
    text-decoration: line-through;
}

.search-loading {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(251, 248, 242, .72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-loading.is-visible {
    display: flex;
}

.search-loading-box {
    width: min(390px, 100%);
    padding: 34px 32px;
    background: var(--ivory);
    border: 1px solid var(--line);
    text-align: center;
    box-shadow: 0 24px 70px rgba(56, 50, 42, .18);
}

.loading-line {
    position: relative;
    height: 2px;
    overflow: hidden;
    background: var(--line);
}

.loading-line span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 45%;
    background: var(--earth);
    animation: loadingSlide 1.1s ease-in-out infinite;
}

.search-loading-box strong {
    display: block;
    margin-top: 24px;
    color: var(--earth);
    font-size: 2rem;
    line-height: 1;
}

.search-loading-box p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.6;
}

@keyframes loadingSlide {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(240%);
    }
}

.results-section {
    scroll-margin-top: 118px;
    padding: 68px clamp(28px, 7vw, 120px) 86px;
    background: var(--ivory);
}

.results-ready,
.results-title,
.villa-grid,
.search-message {
    width: min(1080px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.results-title {
    margin-bottom: 26px;
}

.results-title h2 {
    max-width: 620px;
    margin: 14px 0 0;
    color: var(--earth);
    font-size: clamp(2.45rem, 4.2vw, 4.4rem);
    line-height: .96;
}

.villa-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 48px 34px;
}

.villa-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border: 0;
    background: transparent;
}

.villa-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / .98;
    overflow: hidden;
    background: var(--cream);
}

.villa-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.villa-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 0 0;
}

.villa-location,
.villa-meta span,
.villa-price span {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 400;
    letter-spacing: .2em;
    line-height: 1.45;
    text-transform: uppercase;
}

.villa-info h3 {
    margin: 8px 0 0;
    color: var(--earth);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.08;
}

.villa-bottom {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    border-top: 1px solid var(--line);
    margin-top: 10px;
    padding-top: 18px;
}

.villa-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.villa-price strong {
    color: var(--earth);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.65rem;
    font-weight: 400;
}

.villa-cta {
    min-height: 42px;
    padding: 0 22px;
    font-size: .62rem;
}

.search-message {
    border: 1px solid var(--line);
    padding: 24px;
    background: rgba(255, 255, 255, .32);
    color: var(--earth);
    font-size: .95rem;
    line-height: 1.6;
}

.search-message.error {
    color: #8f341e;
}

footer {
    background: var(--earth);
    color: rgba(251, 248, 242, .6);
}

.search-footer-content {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 52px var(--body-pad) 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 52px;
    margin-bottom: 44px;
}

.footer-col,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-col h4,
.footer-contact h4 {
    margin: 0 0 10px;
    color: var(--ivory);
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .28em;
    line-height: 1.35;
    text-transform: uppercase;
}

.footer-col a,
.footer-contact a,
.footer-bottom {
    color: rgba(251, 248, 242, .58);
    font-size: .86rem;
    font-weight: 300;
    line-height: 1.45;
    text-decoration: none;
}

.footer-col a:hover,
.footer-contact a:hover,
.footer-bottom a:hover {
    color: var(--ivory);
}

.social-links {
    display: flex;
    gap: 18px;
    margin-top: 4px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid rgba(251, 248, 242, .12);
    padding-top: 24px;
}

.footer-bottom a {
    color: rgba(251, 248, 242, .82);
    text-decoration: none;
}

@media (max-width: 1020px) {
    .villa-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    :root {
        --body-pad: 22px;
    }

    .header-main {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px var(--body-pad) 14px;
    }

    .brand-wordmark,
    .header-actions {
        grid-column: 1;
    }

    .brand-wordmark {
        font-size: 1rem;
        letter-spacing: .18em;
        white-space: normal;
    }

    .header-actions {
        justify-self: center;
        gap: 12px;
    }

    .nav-phone {
        min-height: 34px;
        padding: 8px 14px;
        font-size: .62rem;
        letter-spacing: .12em;
    }

    .header-nav {
        min-height: 36px;
        gap: 26px;
    }

    .search-page {
        padding-top: 123px;
    }

    .search-hero {
        min-height: 520px;
        align-items: flex-start;
        padding: 88px 22px 0;
        background-position: 58% 50%;
    }

    .search-hero-inner {
        min-height: 390px;
    }

    .search-heading h1 {
        max-width: 340px;
        font-size: clamp(2.8rem, 13vw, 4.15rem);
    }

    .search-panel {
        width: calc(100% - 26px);
        grid-template-columns: 1fr;
        bottom: 36px;
        transform: translateX(-50%);
    }

    .search-field {
        min-height: 76px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 17px 58px 17px 20px;
    }

    .search-submit {
        width: auto;
        min-height: 58px;
        margin: 12px;
    }

    .search-datepicker {
        top: 0;
        bottom: auto;
    }

    .results-section {
        padding: 76px 22px 64px;
    }

    .villa-card {
        min-height: 0;
    }

    .villa-photo {
        aspect-ratio: 1 / .76;
    }

    .villa-info {
        padding: 18px 0 0;
    }

    .villa-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .villa-cta {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    :root {
        --body-pad: 16px;
    }

    .brand-wordmark {
        font-size: .92rem;
        letter-spacing: .14em;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .search-page {
        padding-top: 120px;
    }

    .search-hero {
        min-height: 500px;
        padding: 72px 16px 0;
    }

    .search-heading span {
        font-size: .6rem;
        letter-spacing: .3em;
    }

    .search-heading h1 {
        font-size: clamp(2.5rem, 12vw, 3.45rem);
    }

    .search-panel {
        width: calc(100% - 22px);
    }

    .search-field strong,
    #rangeLabel {
        font-size: .9rem;
    }

    .search-submit {
        padding: 0 18px;
    }

    .dp-grid button,
    .dp-grid span {
        width: 30px;
        height: 30px;
    }

    .results-title h2 {
        font-size: 2.5rem;
    }

    .villa-photo {
        aspect-ratio: 1 / .72;
    }
}
