/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
    --brand:        #1abc9d;
    --brand-dark:   #16a085;
    --text-primary: #222222;
    --text-secondary: #717171;
    --text-light:   #b0b0b0;
    --border:       #EBEBEB;
    --bg:           #FFFFFF;
    --bg-subtle:    #F7F7F7;
    --shadow-pill:  0 1px 2px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-hover: 0 2px 4px rgba(0,0,0,0.18);
    --radius-pill:  9999px;
    --radius-card:  12px;
    --radius-md:    8px;
    --font:         'Google Sans', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease:         all 0.2s ease;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.5;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── HEADER (two rows, Airbnb-style) ────────────────────── */
.app-header {
    background: rgba(26, 188, 157, 0.05);
    border-bottom: 1px solid rgba(26, 188, 157, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-header.scrolled {
    background: #fff;
    border-bottom-color: var(--border);
    box-shadow: 0 1px 0 rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

/* Row 1 — top nav */
.header-nav {
    max-width: 1440px;
    margin: 0 auto;
    height: 88px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
}

/* Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 19px;
    white-space: nowrap;
    transition: var(--ease);
    justify-self: start;
}

.brand-logo:hover { opacity: 0.85; }

.logo-icon {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.logo-dot { color: var(--brand); }

/* Center wrapper: cross-fades between tagline and mini search pill */
.header-center {
    justify-self: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.header-tagline {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    letter-spacing: 0.1px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.header-tagline i { color: var(--brand); font-size: 13px; }

.app-header.scrolled .header-tagline {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

/* Mini search pill (visible on scroll) */
.mini-search-pill {
    position: absolute;
    top: 50%;
    left: 50%;
    /* starts small — grows into place as the big bar finishes shrinking */
    transform: translate(-50%, -50%) scale(0.82);
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg);
    box-shadow: var(--shadow-pill);
    cursor: pointer;
    font-family: var(--font);
    white-space: nowrap;
    min-width: 280px;
    /* exit: shrink back down quickly as the big bar grows */
    transition: opacity 0.15s ease,
                transform 0.2s cubic-bezier(0.32, 0.72, 0, 1),
                box-shadow 0.2s ease;
}

.app-header.scrolled .mini-search-pill {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    /* entry: grows in, delayed so the big bar shrinks away first */
    transition: opacity 0.22s ease 0.12s,
                transform 0.3s cubic-bezier(0.32, 0.72, 0, 1) 0.12s,
                box-shadow 0.2s ease;
}

.mini-search-pill:hover { box-shadow: var(--shadow-hover); }

.mini-pill-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.mini-pill-btn {
    background: var(--brand);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mini-search-pill:hover .mini-pill-btn { background: var(--brand-dark); }

/* Right actions */
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    justify-self: end;
}

/* Host your homestay — subtle pill with icon */
.btn-host-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    transition: var(--ease);
    white-space: nowrap;
    font-family: var(--font);
}

.btn-host-nav i { font-size: 14px; color: var(--brand); transition: var(--ease); }
.btn-host-nav:hover { background: rgba(26,188,157,0.10); }
.btn-host-nav:hover i { transform: rotate(-8deg); }

/* Shared wrapper for the language + account dropdown menus */
.hr-menu { position: relative; }

/* Language switcher button */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    transition: var(--ease);
}

.lang-btn i { font-size: 16px; color: var(--brand); }
.lang-btn .lang-code { letter-spacing: 0.5px; }
.lang-btn:hover { background: rgba(26,188,157,0.10); }
.hr-menu.open .lang-btn { background: rgba(26,188,157,0.12); border-color: rgba(26,188,157,0.25); }

/* Account button — hamburger + clean avatar */
.account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 6px 4px 14px;
    cursor: pointer;
    transition: var(--ease);
    background: var(--bg);
}

.account-btn:hover { box-shadow: var(--shadow-hover); border-color: #d9d9d9; }
.hr-menu.open .account-btn { box-shadow: var(--shadow-hover); }

.account-bars { font-size: 15px; color: var(--text-primary); }

.account-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Dropdown panels (shared) */
.hr-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.14);
    padding: 8px;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.32,0.72,0,1), visibility 0.18s;
}

.hr-menu.open .hr-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    padding: 8px 12px 6px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 11px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-item--bold { font-weight: 700; }

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 4px;
}

/* Language option check mark — only on the active language */
.lang-option i { font-size: 12px; color: var(--brand); opacity: 0; transition: opacity 0.15s ease; }
.lang-option.is-active i { opacity: 1; }
.lang-option.is-active { color: var(--brand); font-weight: 700; }

/* Row 2 — large centered search */
/* Wrapper handles the height collapse via grid-rows trick.
   minmax(0,1fr) lets the row collapse fully to 0 (plain 0fr floors at min-content). */
.header-search-wrapper {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    transition: grid-template-rows 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
}

.app-header.scrolled .header-search-wrapper {
    grid-template-rows: minmax(0, 0fr);
}

/* Inner row visibly SHRINKS toward the nav (scale down) as it collapses,
   so the big search bar appears to morph into the compact pill. */
.header-search-row {
    min-height: 0;
    display: flex;
    justify-content: center;
    padding: 4px 24px 18px;
    opacity: 1;
    transform: scale(1);
    transform-origin: top center;
    /* re-entry (scrolling back up): grow back, slightly delayed so the row regains height first */
    transition: opacity 0.26s ease 0.06s,
                transform 0.36s cubic-bezier(0.32, 0.72, 0, 1) 0.06s;
}

.app-header.scrolled .header-search-row {
    opacity: 0;
    transform: scale(0.55);
    /* exit (scrolling down): shrink immediately */
    transition: opacity 0.22s ease,
                transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
}

.search-pill-lg {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 850px;
    height: 66px;
    padding-left: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-pill);
    background: var(--bg);
    transition: box-shadow 0.2s ease;
}

.search-pill-lg:hover { box-shadow: var(--shadow-hover); }
.search-pill-lg:focus-within {
    box-shadow: 0 0 0 2px rgba(26,188,157,0.35), var(--shadow-hover);
    border-color: transparent;
}

.spill-field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    height: 52px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--ease);
}

.spill-field:hover { background: var(--bg-subtle); }

.spill-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
}

.spill-field select,
.spill-field input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    font-family: var(--font);
    cursor: pointer;
    padding: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spill-field--budget { flex: 0 0 auto; }

.budget-wrap { display: flex; align-items: center; gap: 4px; }
.budget-prefix { font-size: 14px; color: var(--text-secondary); font-weight: 600; flex-shrink: 0; }
.budget-wrap input { width: 92px; }

.spill-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    flex-shrink: 0;
}

.spill-search-btn {
    background: var(--brand);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 8px;
    flex-shrink: 0;
    font-size: 17px;
    transition: var(--ease);
}

.spill-search-btn:hover { background: var(--brand-dark); transform: scale(1.05); }

/* ── CATEGORY BAR ───────────────────────────────────────── */
/* Lives inside the sticky .app-header, so it stays pinned under the
   nav and collapses together with the search row — no JS sync needed. */
.category-bar {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 0 24px;
}

.category-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.category-scroll {
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    gap: 8px;
    padding: 4px 0;
}

.category-scroll::-webkit-scrollbar { display: none; }

.cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--ease);
    font-family: var(--font);
    position: relative;
    top: 1px;
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

.cat-btn i { font-size: 22px; opacity: 0.65; transition: var(--ease); }

.cat-btn:hover {
    color: var(--text-primary);
    border-bottom-color: #d4d4d4;
}

.cat-btn:hover i { opacity: 1; }
.cat-btn.active i { opacity: 1; }

.cat-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--text-primary);
}

.filter-action-wrap {
    flex-shrink: 0;
    padding: 10px 0 10px 24px;
    border-left: 1px solid var(--border);
}

.filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--ease);
    font-family: var(--font);
    white-space: nowrap;
}

.filters-btn:hover { background: var(--bg-subtle); }
.filters-btn.has-filters { background: var(--text-primary); color: white; }

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px 24px 80px;
}

.listing-count-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

/* ── LISTINGS GRID ──────────────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px 16px;
}

/* ── PROPERTY CARD ──────────────────────────────────────── */
.homestay-card {
    cursor: pointer;
    position: relative;
}

.card-photo-wrap {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: var(--bg-subtle);
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
}

.card-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.homestay-card:hover .card-photo-wrap img { transform: scale(1.04); }

.card-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    font-size: 21px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
    transition: var(--ease);
    z-index: 2;
    padding: 4px;
    line-height: 1;
}

.card-wishlist-btn:hover { transform: scale(1.15); }
.card-wishlist-btn.saved { color: var(--brand); filter: none; }

.card-new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
}

.card-body { display: flex; flex-direction: column; gap: 1px; }

.card-location {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 1px;
}

.card-amenities-preview {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

.card-price {
    font-size: 14px;
    color: var(--text-primary);
}

.card-price strong { font-weight: 700; }
.card-price span { font-weight: 400; color: var(--text-secondary); }

.card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-rating i { font-size: 11px; }

/* ── EMPTY STATE ────────────────────────────────────────── */
.no-results,
.coming-soon {
    text-align: center;
    padding: 100px 24px;
}

.coming-soon-emoji { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.coming-soon h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.coming-soon p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }

.no-results-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--text-secondary);
    margin: 0 auto 20px;
}

.no-results h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.no-results p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-outline-pill {
    border: 1px solid var(--text-primary);
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--ease);
    font-family: var(--font);
}

.btn-outline-pill:hover { background: var(--bg-subtle); }

/* ── FOOTER ─────────────────────────────────────────────── */
.app-footer {
    background: #222;
    color: #fff;
    padding: 56px 24px 28px;
}

.footer-inner { max-width: 1440px; margin: 0 auto; }

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.brand-logo--light { color: #fff; }
.brand-logo--light .logo-dot { color: var(--brand); }
.brand-logo--light { margin-bottom: 14px; }

.footer-brand-col p {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    line-height: 1.7;
    max-width: 340px;
}

.footer-col h4 {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 16px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: var(--ease);
}

.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-bottom i { color: var(--brand); }

/* ── MODAL SYSTEM ───────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    animation: fadeIn 0.2s ease;
}

.modal-panel {
    position: relative;
    background: var(--bg);
    border-radius: 16px;
    max-height: 92vh;
    overflow-y: auto;
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--ease);
    flex-shrink: 0;
}

.modal-close:hover { background: var(--bg-subtle); }

/* ── FULL-PAGE PROPERTY DETAIL ──────────────────────────── */
.detail-page-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

.detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 14px;
    transition: var(--ease);
}

.detail-back-btn:hover { color: var(--brand); }

/* Title row */
.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.detail-title-row h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-primary);
}

.detail-meta-rating { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.detail-meta-rating i { font-size: 12px; }
.detail-meta-sep { color: var(--text-light); }
.detail-meta-reviews { font-weight: 600; text-decoration: underline; }
.detail-meta-location { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--text-secondary); }
.detail-meta-location i { font-size: 12px; color: var(--brand); }

.detail-title-actions { display: flex; gap: 6px; flex-shrink: 0; }

.detail-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--ease);
    text-decoration: underline;
}

.detail-action-btn:hover { background: var(--bg-subtle); }
.detail-action-btn.saved { color: var(--brand); }
.detail-action-btn.saved i { font-weight: 900; }

/* Photo gallery */
.detail-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-bottom: 36px;
    height: 460px;
}

.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.detail-gallery img:hover { filter: brightness(0.9); }

/* First photo spans 2x2 (the big hero on the left) */
.detail-gallery img:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* Single-image fallback */
.detail-gallery--single {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
.detail-gallery--single img:first-child { grid-column: span 1; grid-row: span 1; }

/* Body layout */
.detail-body {
    display: grid;
    grid-template-columns: 1fr 372px;
    gap: 64px;
    align-items: start;
}

.detail-host-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.detail-host-row h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-host-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.detail-host-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.detail-divider {
    height: 1px;
    background: var(--border);
    margin: 28px 0;
}

.detail-section h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.detail-section p {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.7;
}

.detail-amenity-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-amenity-list li {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
}

.detail-amenity-list li i { color: var(--text-primary); font-size: 18px; width: 22px; text-align: center; }

/* Booking card */
.detail-booking { position: sticky; top: 104px; }

.detail-booking-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.booking-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.booking-price { font-size: 16px; color: var(--text-primary); }
.booking-price strong { font-size: 22px; font-weight: 800; }
.booking-price-unit { font-size: 15px; font-weight: 400; color: var(--text-secondary); }

.booking-rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
}
.booking-rating i { font-size: 11px; }

.booking-breakdown {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.booking-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.booking-breakdown-total {
    font-weight: 800;
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 14px;
    border-radius: 12px;
    transition: var(--ease);
    width: 100%;
}

.btn-whatsapp:hover {
    background: #20c55e;
    transform: translateY(-1px);
}

.wa-note {
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
    margin-top: 8px;
}

/* Host Modal */
.host-panel {
    width: 92%;
    max-width: 640px;
}

.host-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 5;
}

.host-modal-header h2 {
    font-size: 17px;
    font-weight: 800;
    flex: 1;
    text-align: center;
    margin-right: 36px;
}

.modal-close--rel { position: static; flex-shrink: 0; }

.host-modal-body { padding: 28px 32px 32px; }

.host-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

#host-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: var(--ease);
    color: var(--text-primary);
    background: var(--bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

.form-group textarea { resize: vertical; }
.form-group small { font-size: 11px; color: var(--text-secondary); }
.req { color: #e74c3c; }

.form-amenity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.form-check-chip {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.form-check-chip input[type="checkbox"] { display: none; }

.form-check-chip span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    transition: var(--ease);
    cursor: pointer;
    width: 100%;
    background: var(--bg);
}

.form-check-chip input:checked + span {
    border-color: var(--text-primary);
    border-width: 2px;
    font-weight: 700;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--ease);
}

.btn-ghost:hover { background: var(--bg-subtle); }

.btn-primary-solid {
    background: var(--brand);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--ease);
}

.btn-primary-solid:hover { background: var(--brand-dark); }

/* Filters Modal */
.filters-panel {
    width: 92%;
    max-width: 560px;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.filters-header h3 {
    font-size: 16px;
    font-weight: 800;
    flex: 1;
    text-align: center;
}

.btn-clear-all {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: underline;
    font-family: var(--font);
    padding: 0;
    white-space: nowrap;
}

.btn-clear-all:hover { color: var(--brand); }

.filters-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-section { padding: 24px 0; }

.filter-section--bordered {
    border-top: 1px solid var(--border);
}

.filter-section h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.filter-sub {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

.price-range-wrap input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: var(--text-primary);
    cursor: pointer;
}

.price-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 14px;
}

.amenity-chip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.amenity-chip {
    display: flex;
    cursor: pointer;
}

.amenity-chip input[type="checkbox"] { display: none; }

.amenity-chip span {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--ease);
    cursor: pointer;
}

.amenity-chip span i { font-size: 18px; color: var(--text-secondary); }

.amenity-chip input:checked + span {
    border-color: var(--text-primary);
    border-width: 2px;
    font-weight: 700;
}

.amenity-chip input:checked + span i { color: var(--text-primary); }

.filter-section select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    background: var(--bg);
    color: var(--text-primary);
    transition: var(--ease);
}

.filter-section select:focus { border-color: var(--text-primary); }

.filters-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.btn-show-results {
    width: 100%;
    background: var(--text-primary);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--ease);
}

.btn-show-results:hover { background: #333; }

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1200px) {
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand-col { grid-column: 1 / -1; }

    /* Stack booking card below content */
    .detail-body { grid-template-columns: 1fr; gap: 32px; }
    .detail-booking { position: static; }
    .detail-booking-card { max-width: 420px; }
}

/* Tablet — drop the center + host text, keep logo + search */
@media (max-width: 900px) {
    .header-center { display: none; }
    .btn-host-nav { display: none; }
    .header-nav { grid-template-columns: 1fr auto; height: 68px; padding: 0 20px; }
    .header-search-row { padding: 4px 16px 14px; }
    .search-pill-lg { height: 58px; }
    .spill-field { padding: 0 16px; }
}

@media (max-width: 768px) {
    /* Detail page on mobile */
    .detail-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        height: 300px;
    }
    .detail-gallery img:not(:first-child) { display: none; }
    .detail-gallery img:first-child { grid-column: span 1; grid-row: span 1; }
    .detail-title-row { flex-direction: column; }
    .detail-amenity-list { grid-template-columns: 1fr; }

    .form-row { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 540px) {
    .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
    .main-content { padding: 20px 12px 60px; }
    .header-nav { padding: 0 14px; }
    .header-search-row { padding: 4px 12px 12px; }
    .search-pill-lg { height: 54px; }
    .spill-field { padding: 0 14px; }
    .spill-field--budget, .spill-divider--budget { display: none; }
    .category-bar { padding: 0 12px; }
    .cat-btn { padding: 10px 14px; }
}

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