/* ========================================
   ZZECA - Premium European Real Estate Design Tokens
   Quiet luxury, photography-first, trustworthy
   ======================================== */

:root {
    /* === Core Surfaces (calmer, more sophisticated) === */
    --bg: #f6f7f9;
    --bg-soft: #eef0f4;
    --surface: #ffffff;
    --surface-2: #f8f9fb;
    --surface-3: #f1f2f6;

    /* === Text (deeper, more confident) === */
    --text: #0f1c2e;
    --text-strong: #0a1524;
    --muted: #5c6b7a;
    --muted-strong: #475566;
    --line: #d4d9e1;

    /* === Brand (refined, premium European) === */
    --primary: #0e5a75;           /* Deep confident teal */
    --primary-dark: #0a475c;
    --primary-light: #1a7a9e;
    --accent: #8a6f47;            /* Warm restrained bronze/gold */
    --accent-light: #b89a6f;

    /* Logo sky harmony */
    --sky-light: #dff3fc;
    --sky-mid: #8ecae6;
    --sky-deep: #3d96be;

    /* Legacy aliases for compatibility (map to refined palette) */
    --gold: #8a6f47;
    --secondary: #0e5a75;
    --secondary-dark: #0a475c;

    /* === Semantic === */
    --success: #0f6f5e;
    --danger: #9f3d3a;
    --warning: #8d6b2e;

    /* === Radius (more elegant) === */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --radius-xl: 36px;

    /* === Elevation (more refined, less "demo") === */
    --shadow-xs: 0 1px 3px rgba(15, 28, 46, 0.06);
    --shadow-sm: 0 4px 12px rgba(15, 28, 46, 0.08);
    --shadow: 0 10px 30px rgba(15, 28, 46, 0.10);
    --shadow-md: 0 18px 48px rgba(15, 28, 46, 0.12);
    --shadow-lg: 0 28px 70px rgba(15, 28, 46, 0.14);

    /* === Spacing scale (more generous) === */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* === Typography scale (Inter — clean UI stack like modern platforms) === */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: var(--font-sans);

    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-lg: 17px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --text-4xl: 42px;
    --text-5xl: 56px;
}

* {
    box-sizing: border-box;
}

a, button, .btn, input, select, .listing-card, .stat-card, .compact-item {
    transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), 
                box-shadow 0.15s cubic-bezier(0.2, 0, 0, 1), 
                background-color 0.15s ease,
                border-color 0.15s ease,
                color 0.15s ease;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    font-size: var(--text-base);
    line-height: 1.5;
    letter-spacing: -0.011em;
    font-feature-settings: "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: clip;
}

/* Calm, premium background — no busy mesh for European luxury feel */
/* Clean, premium background - removed busy decorative elements for European luxury feel */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, transparent 140px);
    pointer-events: none;
    z-index: -1;
}

.page-shell {
    position: relative;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.main-content {
    min-height: calc(100vh - 240px);
}

.section {
    padding: 84px 0;
}

.section-compact {
    padding: 54px 0;
}

.section-soft {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(236, 231, 216, 0.55));
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: var(--text-4xl);
    line-height: 1.1;
    letter-spacing: -0.028em;
    color: var(--text-strong);
}

.section-head p,
.section-head a {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.listings-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0;
}

.results-count {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.01em;
    margin: 0;
    padding: 4px 0 4px 2px;
}

.toolbar-sort-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 4px 3px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.toolbar-sort-form label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.toolbar-sort-form select {
    min-width: 168px;
    height: 36px;
    padding: 0 32px 0 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}

.view-toggle {
    display: inline-flex;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 32px;
    border-radius: 999px;
    padding: 0 13px;
    color: var(--muted-strong);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    letter-spacing: 0.01em;
}

.view-toggle-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.view-toggle-btn.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(14,90,117,0.2);
}

.tabs-head {
    align-items: center;
}

.home-tabs {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.home-tab-btn {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.home-tab-btn:hover {
    transform: translateY(-1px);
}

.home-tab-btn.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.section-inline-link {
    margin-bottom: 14px;
}

.section-inline-link a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.section-inline-link a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    letter-spacing: -0.01em;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--sky-deep);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 12px rgba(15, 28, 46, 0.05);
}

.nav-wrap {
    min-height: 86px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 6px 14px rgba(14, 90, 117, 0.14);
    border: none;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-copy {
    min-width: 0;
}

.brand strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.02;
    letter-spacing: -0.02em;
}

.brand small {
    display: block;
    color: var(--muted-strong);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 2px;
    white-space: nowrap;
}

.main-nav {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    font-weight: 600;
    font-size: 14.5px;
}

.main-nav a {
    position: relative;
    padding-bottom: 6px;
    color: var(--muted-strong);
    text-decoration: none;
    transition: color .15s ease;
}

.main-nav a:hover {
    color: var(--text-strong);
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .2s ease;
    transform-origin: left;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
    background: var(--accent);
}

.main-nav a.active {
    color: var(--text-strong);
    font-weight: 700;
}

.header-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.header-actions .btn {
    white-space: nowrap;
    flex: 0 0 auto;
    font-size: 13.5px;
    padding: 8px 16px;
    height: 38px;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 180px;
}

.user-menu-avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(145deg, var(--sky-mid), var(--primary));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 26px;
}

.user-menu-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
    z-index: 120;
    display: grid;
    gap: 2px;
}

.user-menu-panel[hidden] {
    display: none !important;
}

.user-menu-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-strong);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.user-menu-panel a:hover {
    background: var(--surface-2);
    color: var(--primary);
}

.user-menu-panel a.is-muted {
    color: var(--muted-strong);
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 12px;
}

.category-strip {
    border-top: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(223, 243, 252, 0.45), rgba(255, 255, 255, 0.9) 42%, rgba(223, 243, 252, 0.35));
}

.category-strip-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    padding: 8px 0;
}

.category-strip-inner a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted-strong);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s ease;
}

.category-strip-inner a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.category-strip-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-strong);
    opacity: 0.85;
}

.category-strip-icon .icon-svg {
    width: 18px;
    height: 18px;
}

.category-strip-inner a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 8px;
}

.menu-toggle:hover {
    background: var(--surface-2);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--text-strong);
    transition: all .2s ease;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 48px 0 36px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 88% 8%, rgba(255, 244, 207, 0.28), transparent 58%),
        linear-gradient(135deg, rgba(223, 243, 252, 0.55) 0%, rgba(255, 255, 255, 0.15) 48%, transparent 72%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 40px;
    align-items: start;
}

.hero-content h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--text-strong);
}

.hero-text {
    margin-top: 16px;
    color: var(--muted-strong);
    max-width: 620px;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 400;
}

.hero-stats {
    margin-top: 26px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.hero-stats div {
    min-width: 140px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface);
    padding: 12px 18px;
    box-shadow: var(--shadow-sm);
}

.hero-stats strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--text-strong);
}

.hero-stats span {
    color: var(--muted-strong);
    font-size: 12.5px;
    font-weight: 500;
}
.hero-vip-carousel {
    position: relative;
    margin-top: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    background: #0a1524;
}

.hero-vip-track {
    display: flex;
    transition: transform .45s ease;
    will-change: transform;
}

.hero-vip-slide {
    min-width: 100%;
    position: relative;
    display: block;
    color: #fff;
    aspect-ratio: 16 / 9;
}

.hero-vip-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-vip-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 8, 8, 0.05) 22%, rgba(8, 8, 8, 0.78) 100%);
}

.hero-vip-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px 5px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(14, 90, 117, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-vip-info {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: grid;
    gap: 6px;
}

.hero-vip-info strong {
    font-size: 18px;
    line-height: 1.25;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
    font-weight: 600;
}

.hero-vip-info small {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

.hero-vip-dots {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 7px;
}

.hero-vip-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: all .2s ease;
}

.hero-vip-dot.is-active {
    width: 26px;
    background: #fff;
    border-radius: 999px;
}

.hero-vip-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 999px;
    background: rgba(12, 10, 8, 0.44);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease, border-color .2s ease;
}

.hero-vip-nav:hover {
    background: rgba(12, 10, 8, 0.62);
    border-color: rgba(255, 255, 255, 0.9);
}

.hero-vip-nav:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.hero-vip-nav.is-prev {
    left: 10px;
}

.hero-vip-nav.is-next {
    right: 10px;
}

@media (hover: hover) and (pointer: fine) {
    .hero-vip-nav {
        opacity: 0;
        pointer-events: none;
    }

    .hero-vip-carousel:hover .hero-vip-nav,
    .hero-vip-carousel:focus-within .hero-vip-nav {
        opacity: 1;
        pointer-events: auto;
    }
}


.hero-search {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(142, 202, 230, 0.45);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow:
        0 18px 48px rgba(14, 90, 117, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    position: relative;
}

.hero-search h2 {
    margin: 0 0 20px;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

.hero-search-fab,
.hero-search-close,
.hero-search-backdrop {
    display: none;
}

.hero-search-fab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(1px);
    opacity: .34;
    animation: float 9s ease-in-out infinite;
}

.hero-orb-a {
    right: -90px;
    top: 30px;
    width: 270px;
    height: 270px;
    background: radial-gradient(circle, rgba(142, 202, 230, 0.55), rgba(142, 202, 230, 0));
}

.hero-orb-b {
    left: -70px;
    bottom: -90px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(15, 99, 86, .45), rgba(15, 99, 86, 0));
    animation-delay: -2s;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-search .form-grid .field > label {
    min-height: 2.6em;
    line-height: 1.25;
    display: flex;
    align-items: flex-end;
    font-weight: 700;
    font-size: 12px;
    color: var(--muted-strong);
    letter-spacing: 0.02em;
}

.hero-search input,
.hero-search select {
    height: 50px;
    font-size: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 18px;
    background: var(--surface);
    transition: border-color .2s ease, box-shadow .2s ease;
    font-weight: 500;
}

.hero-search input:focus,
.hero-search select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 90, 117, 0.12);
    outline: none;
}

.hero-auth-cta {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.hero-auth-cta .btn {
    flex: 1 1 0;
}

.search-actions-inline {
    display: flex;
    gap: 8px;
}

.field {
    margin-bottom: 18px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field-row .field.field-span-2 {
    grid-column: 1 / -1;
}

.field-row.field-row-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 11.5px;
    color: var(--muted-strong);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 90, 117, 0.1);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Premium form error states */
input:invalid:not(:placeholder-shown),
select:invalid,
textarea:invalid:not(:placeholder-shown),
.field-error input,
.field-error select,
.field-error textarea {
    border-color: var(--danger);
    background: rgba(159, 61, 58, 0.03);
}

.field-error {
    color: var(--danger);
}

.field-error .field-note {
    color: var(--danger);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.location-autocomplete {
    position: relative;
}

.location-autocomplete-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 24;
    display: grid;
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(31, 26, 20, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(24, 18, 12, 0.14);
    max-height: 280px;
    overflow-y: auto;
}

.location-autocomplete-results[hidden] {
    display: none !important;
}

.location-autocomplete-group + .location-autocomplete-group {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(31, 26, 20, 0.08);
}

.location-autocomplete-group-label {
    padding: 4px 12px 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.location-autocomplete-item {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 3px;
    transition: background-color .18s ease;
}

.location-autocomplete-item:hover,
.location-autocomplete-item:focus-visible {
    background: var(--surface-2);
    outline: none;
}

.location-autocomplete-item strong {
    font-size: 14px;
    color: var(--text);
}

.location-autocomplete-item span {
    font-size: 12px;
    color: var(--muted);
}

.field-note {
    display: block;
    margin-top: 6px;
    color: var(--muted-strong);
    font-size: 12.5px;
    line-height: 1.5;
    font-weight: 500;
}

textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.55;
}

.listing-form input,
.listing-form select,
.listing-form textarea {
    font-size: 15px;
    padding: 13px 16px;
    border-radius: 12px;
}

.listing-form input:focus,
.listing-form select:focus,
.listing-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 90, 117, 0.09);
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(14, 90, 117, 0.28);
    border: 1px solid var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 18px rgba(14, 90, 117, 0.32);
    transform: translateY(-1px);
}

/* Removed shine effect for calmer premium button */

.btn[disabled] {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--muted-strong);
    box-shadow: none;
}

.btn.is-on[disabled] {
    opacity: 1;
    box-shadow: 0 8px 20px rgba(180, 106, 47, 0.2);
}

.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    margin-left: 6px;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

.btn-outline {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface-2);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted-strong);
    font-weight: 600;
}

.btn-ghost:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: var(--primary-light);
}

.btn-edit {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 600;
}

.btn-edit:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--surface);
}

.btn-danger {
    background: rgba(159, 61, 58, 0.1);
    border: 1px solid rgba(159, 61, 58, 0.3);
    color: var(--danger);
    font-weight: 600;
}

.btn-danger:hover {
    background: rgba(159, 61, 58, 0.18);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #1ea851);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
    font-weight: 600;
    padding: 12px 20px;
    font-size: 15px;
}

.btn-whatsapp:hover {
    background: linear-gradient(135deg, #22bf5d, #1b9749);
    color: #fff;
    transform: translateY(-1px);
}

.btn-viber {
    background: linear-gradient(135deg, #7360f2, #5b45dd);
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(99, 76, 220, 0.25);
    font-weight: 600;
    padding: 12px 20px;
    font-size: 15px;
}

.btn-viber:hover {
    background: linear-gradient(135deg, #6654e6, #4d3bcc);
    color: #fff;
    transform: translateY(-1px);
}

.btn-sm {
    font-size: 12px;
    padding: 6px 10px;
}

.btn-block {
    width: 100%;
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.listing-grid--list {
    grid-template-columns: 1fr;
}

.listing-grid--list .listing-card {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    align-items: stretch;
}

.listing-grid--list .listing-image-wrap {
    height: 100%;
    min-height: 220px;
}

.listing-grid--list .listing-body {
    padding: 20px 24px;
}

.listing-grid--list .listing-card h3 {
    font-size: 22px;
}


/* ========================================
   PREMIUM LISTING CARDS — European Top-Tier Quality
   ======================================== */

.listing-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), 
                box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.favorite-quick-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
}

.favorite-quick-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.8);
    background: rgba(255, 255, 255, 0.92);
    color: var(--muted-strong);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.15s ease;
    backdrop-filter: blur(8px);
}

.favorite-quick-btn:hover {
    background: white;
    color: var(--danger);
    transform: scale(1.05);
}

.favorite-quick-btn.is-active {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.listing-image-wrap {
    display: block;
    height: 230px;
    position: relative;
    background: #f1f2f6;
    overflow: hidden;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

.listing-card:hover .listing-image {
    transform: scale(1.08);
}

/* Elegant gradient overlay for text legibility on hover */
.listing-image-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(15,28,46,0.0) 55%,
        rgba(15,28,46,0.18) 82%,
        rgba(15,28,46,0.38) 100%
    );
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.listing-card:hover .listing-image-wrap::after {
    opacity: 1;
}

.listing-card.is-gallery-active .listing-image {
    transform: none;
}

.listing-image-wrap .card-gallery-indicator {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 28, 46, 0.72);
    color: white;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.listing-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    background: rgba(14, 90, 117, 0.9);
    color: #fff;
    border-radius: 999px;
    padding: 5px 11px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.listing-badge.is-premium {
    background: var(--accent);
    border-color: rgba(255, 255, 255, 0.24);
}

.listing-body {
    padding: 20px 20px 18px;
}

.listing-meta {
    display: flex;
    gap: 10px;
    color: var(--muted-strong);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.listing-card h3 {
    margin: 12px 0 8px;
    font-size: 17.5px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--text-strong);
}

.listing-location {
    margin: 0;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.listing-features {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.listing-features span {
    background: var(--surface-3);
    color: var(--muted-strong);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.listing-footer {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.listing-footer strong {
    font-family: var(--font-sans);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
    line-height: 1.05;
}

.listing-price-block {
    display: grid;
    gap: 1px;
}

.listing-price-block small {
    font-size: 12px;
    color: var(--muted-strong);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.listing-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.listing-views {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    background: var(--surface-2);
    border: 1px solid rgba(31, 26, 20, 0.08);
    border-radius: 999px;
    padding: 3px 8px;
}

.listing-date {
    font-size: 12px;
    color: var(--muted);
}

.link-arrow {
    font-weight: 700;
    color: var(--secondary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    min-height: 118px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    padding: 18px 20px;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}
    display: grid;
    place-items: center;
    text-align: center;
    gap: 6px;
    box-shadow: var(--shadow-soft);
    transition: box-shadow .26s ease;
    transform-style: preserve-3d;
}

.category-card:hover {
    box-shadow: 0 16px 36px rgba(24, 18, 12, 0.14);
}

.category-card-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-dark);
}

.category-card-icon .icon-svg {
    width: 32px;
    height: 32px;
}

.category-card strong {
    font-size: 14px;
}

.layout-listings {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}


.filters-panel {
    position: sticky;
    top: 126px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 26px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.filters-panel input,
.filters-panel select {
    height: 46px;
    font-size: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 14px;
    background: var(--surface);
    font-weight: 500;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.filters-panel input:focus,
.filters-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 90, 117, 0.1);
    outline: none;
}

.filters-panel .filter-group {
    margin-bottom: 30px;
}

.filters-panel .filter-group:last-child {
    margin-bottom: 0;
}

.filters-panel label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted-strong);
    margin-bottom: 7px;
    display: block;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.filters-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.filters-panel-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-strong);
}

.filters-panel-close {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.filters-backdrop {
    display: none;
}

.mobile-filters-trigger {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: 999px;
    padding: 8px 15px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all .15s ease;
}

.mobile-filters-trigger:hover {
    background: var(--surface-2);
    border-color: var(--primary);
    color: var(--primary);
}

.search-tabs-container {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
}

.search-tabs-header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.search-tab-btn {
    border: 0;
    background: transparent;
    color: var(--muted-strong);
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
    border-bottom: 3px solid transparent;
}

.search-tab-btn:hover {
    color: var(--text-strong);
    background: rgba(14, 90, 117, 0.04);
}

.search-tab-btn.is-active {
    color: var(--primary);
    background: var(--surface);
    font-weight: 700;
    border-bottom-color: var(--primary);
}

.search-tab-content {
    padding: 18px 16px 8px;
}

.advanced-search-form .search-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.advanced-search-form .field {
    margin-bottom: 0;
}

.input-row {
    display: grid;
    gap: 8px;
}

.input-row.input-row-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.input-row.input-row-price {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 82px;
}

.input-row.input-row-price input[type="number"],
.input-row.input-row-two input[type="number"] {
    min-width: 0;
    padding-right: 8px;
    font-variant-numeric: tabular-nums;
}

.filters-panel .input-row.input-row-price {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.filters-panel .input-row.input-row-price .currency-select {
    grid-column: 1 / -1;
}

.input-row input[type="number"]::-webkit-outer-spin-button,
.input-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.dual-range {
    position: relative;
    margin-top: 10px;
    height: 22px;
}

.dual-range-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 9px;
    height: 4px;
    border-radius: 999px;
    background: rgba(31, 26, 20, 0.12);
    overflow: hidden;
}

.dual-range-track span {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
}

.dual-range input[type="range"] {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.dual-range input[type="range"]::-moz-range-track {
    height: 4px;
    background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--secondary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
    cursor: pointer;
    margin-top: -6px;
}

.dual-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--secondary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    pointer-events: auto;
    cursor: pointer;
}

.currency-select {
    min-width: 0;
    padding-left: 8px;
    padding-right: 24px;
    font-size: 13px;
}

.advanced-toggle-container {
    margin-top: 14px;
}

.toggle-advanced-btn {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--muted-strong);
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.01em;
    transition: all .15s ease;
}

.toggle-advanced-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--surface-2);
}

.advanced-grid {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.advanced-grid.is-open {
    display: grid;
}

.advanced-grid[hidden] {
    display: none !important;
}

.field-full {
    grid-column: 1 / -1;
}

.filter-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.filter-checks .checkbox {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 14px 6px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted-strong);
    transition: all .15s ease;
    cursor: pointer;
}

.filter-checks .checkbox:hover {
    border-color: var(--primary-light);
    color: var(--text);
    background: var(--surface);
}

.filter-checks .checkbox input {
    accent-color: var(--primary);
}

.search-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
}

.search-actions .btn {
    flex: 1 1 0;
    height: 50px;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 12px;
    letter-spacing: 0.01em;
}

.checkbox {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.checkbox input {
    width: 16px;
    height: 16px;
}

.checkbox-group {
    display: flex;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.checkbox-group .checkbox {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 16px 7px 12px;
    font-size: 13.5px;
    font-weight: 600;
    transition: all .12s ease;
}

.checkbox-group .checkbox:hover {
    border-color: var(--primary-light);
    background: var(--surface);
}

.pagination {
    margin-top: 24px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination a {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: all .12s ease;
}

.pagination a:hover {
    border-color: var(--primary-light);
    color: var(--primary);
    background: var(--surface-2);
}

.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 700;
}

.pagination-ellipsis {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
}

.detail-header {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-header h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--text-strong);
}

.detail-breadcrumbs {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.detail-description p {
    font-size: 15.5px;
    line-height: 1.8;
    color: var(--text);
    max-width: 70ch;
    margin-top: 6px;
    font-weight: 400;
}

.detail-breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s ease;
}

.detail-breadcrumbs a:hover {
    color: var(--secondary);
}

.detail-location-links {
    margin: 10px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.location-separator {
    color: var(--muted);
    line-height: 1;
}

.location-quick-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.location-quick-link-button {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font: inherit;
}

.location-quick-link:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: #fff;
    transform: translateY(-1px);
}

.detail-price-box {
    text-align: right;
    padding: 4px 0;
}

.detail-price-box strong {
    display: block;
    font-size: 48px;
    line-height: 1.0;
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text-strong);
}

.detail-price-area {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    color: var(--muted-strong);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.detail-price-per-m2 {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

.detail-header small {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted-strong);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.detail-price-per-m2 {
    display: block;
    margin-top: 4px;
    color: var(--secondary-dark);
    font-size: 14px;
    font-weight: 700;
}

.detail-price-box small {
    color: var(--muted);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

.detail-gallery {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.detail-gallery-main {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.detail-gallery-fullscreen-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    cursor: pointer;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.15s ease;
    backdrop-filter: blur(6px);
}

.detail-gallery-fullscreen-btn:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-xs);
}

.detail-gallery-main img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.detail-gallery-main:hover img {
    transform: scale(1.015);
}

.detail-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 1px solid rgba(31, 26, 20, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary-dark);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease, background-color .2s ease, opacity .2s ease;
    opacity: 0;
    pointer-events: none;
}

.detail-gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.04);
}

.detail-gallery-main:hover .detail-gallery-nav,
.detail-gallery-main:focus-within .detail-gallery-nav {
    opacity: 1;
    pointer-events: auto;
}

.detail-gallery-main:hover .detail-gallery-fullscreen-btn,
.detail-gallery-main:focus-within .detail-gallery-fullscreen-btn {
    opacity: 1;
    pointer-events: auto;
}

.detail-gallery-nav.is-prev {
    left: 10px;
}

.detail-gallery-nav.is-next {
    right: 10px;
}

.detail-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background: rgba(10, 15, 24, 0.96);
    display: grid;
    place-items: center;
    padding: 40px 24px;
    backdrop-filter: blur(4px);
}

.detail-gallery-lightbox[hidden] {
    display: none !important;
}

.detail-gallery-lightbox-image {
    max-width: min(1280px, 92vw);
    max-height: 84vh;
    object-fit: contain;
    border-radius: 10px;
}

.detail-gallery-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.48);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.detail-gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.45);
    color: #fff;
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .15s ease, background-color .2s ease;
}

.detail-gallery-lightbox:hover .detail-gallery-lightbox-nav,
.detail-gallery-lightbox:focus-within .detail-gallery-lightbox-nav {
    opacity: 1;
    pointer-events: auto;
}

.detail-gallery-lightbox-nav.is-prev {
    left: 16px;
}

.detail-gallery-lightbox-nav.is-next {
    right: 16px;
}

.detail-gallery-lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(20, 20, 20, 0.46);
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    font-weight: 700;
}

body.gallery-lightbox-open {
    overflow: hidden;
}

@media (hover: none), (pointer: coarse) {
    .detail-gallery-nav,
    .detail-gallery-fullscreen-btn,
    .detail-gallery-lightbox-nav {
        opacity: 1;
        pointer-events: auto;
    }
}

.detail-gallery-meta {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.detail-gallery-counter {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.thumb-grid {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.thumb-btn {
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 118px;
    flex: 0 0 118px;
    overflow: hidden;
}

.thumb-btn.is-active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 90, 117, 0.12);
}

.thumb-btn img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumb-btn:hover img {
    transform: scale(1.05);
}
    border-radius: 7px;
}

.detail-card {
    margin-top: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-card h3 {
    margin: 0 0 16px;
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 21px;
    line-height: 1.2;
    color: var(--text-strong);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-map {
    display: block;
    width: 100%;
    height: 320px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.detail-map-frame {
    width: 100%;
    height: 320px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
    position: relative;
}

.detail-map-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 40%);
    pointer-events: none;
    border-radius: var(--radius-sm);
}

.detail-map-embed {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.detail-map .leaflet-tile,
.detail-map .leaflet-marker-icon,
.detail-map .leaflet-marker-shadow,
.detail-map .leaflet-pane > img {
    max-width: none !important;
}

.map-fallback-note {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 600;
    background: #f3f1eb;
}

.map-open-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--primary);
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.map-open-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.map-empty {
    margin: 0;
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.feature-grid div {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 0.15s ease;
}

.feature-grid div:hover {
    border-color: var(--primary-light);
}

.feature-grid span {
    display: block;
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
}

.feature-grid strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong);
}

/* Premium Contact Sidebar on Detail Page */
/* === Premium Contact Sidebar (Top European standard) === */
.detail-sidebar .detail-card:first-child {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    padding: 24px;
}

.detail-sidebar .detail-card:first-child h3 {
    color: var(--primary);
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 18px;
    font-size: 18px;
}

.detail-sidebar .contact-avatar {
    border-color: var(--primary-light);
    box-shadow: 0 4px 14px rgba(14, 90, 117, 0.18);
    margin-bottom: 16px;
}

.detail-sidebar .detail-card:first-child p {
    margin: 5px 0;
    font-size: 14.5px;
    line-height: 1.4;
}

.detail-sidebar .detail-card:first-child p strong {
    font-size: 17px;
    color: var(--text-strong);
    letter-spacing: -0.01em;
}

.detail-sidebar .detail-card:first-child .location-quick-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    margin-top: 4px;
}

/* New premium Contact card layout */
.contact-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.contact-info strong {
    display: block;
    font-size: 17px;
    color: var(--text-strong);
    line-height: 1.2;
}

.contact-info small {
    color: var(--muted);
    font-size: 13px;
}

.contact-meta {
    font-size: 13.5px;
    color: var(--muted-strong);
    margin-bottom: 10px;
}

.contact-phone {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    margin: 8px 0 16px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Modern grouped contact layout */
.contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 16px 0 22px;
}

.contact-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.contact-meta-row .meta-label {
    color: var(--muted-strong);
    font-weight: 500;
}

.contact-meta-row .meta-value {
    color: var(--text-strong);
    font-weight: 600;
}

.owner-bio {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text);
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.owner-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.owner-other-link {
    display: inline-flex;
    align-items: center;
    margin-top: 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 6px 0;
}

.owner-other-link:hover {
    text-decoration: underline;
}

/* Similar listings section on Detail Page - premium treatment */
.detail-layout .section-head {
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.detail-layout .section-head h2 {
    font-size: 20px;
    color: var(--text-strong);
    margin: 0;
}

/* Related / Similar listings on Detail - more premium and curated feel */
.related-section {
    margin-top: 12px;
}

.listing-grid--compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.listing-grid--compact .listing-card {
    box-shadow: var(--shadow-xs);
    border-radius: 14px;
    border: 1px solid var(--line);
}

.listing-grid--compact .listing-image-wrap {
    height: 164px;
}

.listing-grid--compact .listing-body {
    padding: 14px 16px 14px;
}

.mortgage-card {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 20px 22px;
}

.mortgage-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.mortgage-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.mortgage-field {
    display: grid;
    gap: 6px;
}

.mortgage-field span {
    font-size: 13px;
    color: var(--muted);
}

.mortgage-field input {
    border: 1px solid var(--line);
    border-radius: 10px;
    height: 42px;
    padding: 0 12px;
    font: 600 14px/1 var(--font-sans);
    background: rgba(255, 255, 255, 0.85);
}

.mortgage-results {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.mortgage-results div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.78);
}

.mortgage-results span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.mortgage-results strong {
    display: block;
    margin-top: 2px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-dark);
}

.mortgage-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.mortgage-drawer-fab,
.mortgage-drawer-close,
.mortgage-drawer-backdrop {
    display: none;
}

.mortgage-drawer-fab svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-section {
    padding: 60px 0 80px;
}

.auth-wrap {
    display: grid;
    justify-content: center;
}

.auth-card {
    width: min(520px, 100%);
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 36px 32px 32px;
    position: relative;
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    border-radius: var(--radius) var(--radius) 0 0;
}

.auth-card-wide {
    width: min(620px, 100%);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.02em;
}

.auth-card p {
    color: var(--muted-strong);
    font-size: 15px;
    margin-bottom: 20px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 24px;
    padding: 5px;
    background: var(--surface-2);
    border-radius: 999px;
    border: 1px solid var(--line);
}

.auth-tab {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 11px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14.5px;
    color: var(--muted-strong);
    text-decoration: none;
    transition: all .15s ease;
}

.auth-tab:hover {
    color: var(--text);
    background: rgba(255,255,255,0.6);
}

.auth-tab.active {
    background: var(--surface);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(14, 90, 117, 0.1);
}

.auth-hint {
    margin-top: 22px;
    font-size: 14px;
    color: var(--muted-strong);
    text-align: center;
}

.auth-hint a {
    color: var(--primary);
    font-weight: 700;
}

.auth-social {
    display: flex;
    justify-content: center;
    margin: 4px 0 2px;
    min-height: 44px;
}

.auth-divider {
    position: relative;
    margin: 22px 0 14px;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 1px solid var(--line);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 14px;
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.auth-inline-alert {
    margin: 18px 0;
}

/* Auth form specific premium styling */
.auth-card .field {
    margin-bottom: 16px;
}

.auth-card .field-row {
    gap: 14px;
}

.auth-card label {
    font-size: 12px;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    color: var(--muted-strong);
}

.auth-card .btn-primary {
    margin-top: 8px;
    height: 50px;
    font-size: 15.5px;
    font-weight: 700;
}

.panel {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.profile-avatar-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.profile-avatar-preview {
    width: 110px;
    height: 110px;
    border-radius: 18px;
    border: 1px solid var(--line);
    object-fit: cover;
    background: var(--surface-2);
}

.contact-avatar {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 2px solid var(--surface);
    object-fit: cover;
    background: var(--surface-2);
    margin: 0 0 14px;
    box-shadow: var(--shadow-xs);
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
}

.checkbox-inline input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.panel-head h3 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
    transition: all .15s ease;
}

.stat-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 2px;
}

.stat-card span {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.stat-card small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted-strong);
    font-weight: 500;
}

.dashboard-menu-grid {
    margin-bottom: 20px;
}

.dashboard-menu-card.is-active {
    border-color: var(--primary);
    background: var(--surface-2);
    box-shadow: 0 0 0 3px rgba(14, 90, 117, 0.08);
}

.dashboard-menu-card {
    display: block;
}

.dashboard-menu-card span {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-menu-card small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.dashboard-menu-card:hover,
.dashboard-menu-card:focus-visible {
    border-color: rgba(188, 111, 49, 0.42);
}

.dashboard-menu-card:focus-visible {
    outline: 2px solid rgba(188, 111, 49, 0.24);
    outline-offset: 3px;
}

.dashboard-menu-card.is-active {
    border-color: rgba(188, 111, 49, 0.5);
    background: linear-gradient(145deg, #fffaf2, #f4e6d3);
    box-shadow: 0 16px 36px rgba(28, 20, 12, 0.12);
}

.dashboard-menu-card.is-active strong,
.dashboard-menu-card.is-active span {
    color: var(--primary-dark);
}

.dashboard-panel-anchor {
    scroll-margin-top: 120px;
}

.table-wrap.views-focus .data-table {
    box-shadow: var(--shadow-soft);
}

.compact-list {
    display: grid;
    gap: 8px;
}

.compact-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: var(--surface);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: all .15s ease;
    box-shadow: var(--shadow-xs);
}

.compact-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.compact-item-media {
    display: block;
    width: 72px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-3);
    border: 1px solid var(--line);
}

.compact-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compact-item-body {
    min-width: 0;
}

.compact-item-body strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
    line-height: 1.25;
}

.compact-item-body small {
    display: block;
    color: var(--muted-strong);
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.35;
}

.compact-item-price {
    white-space: nowrap;
    text-align: right;
    min-width: 90px;
}

.compact-item-price strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
}

.table-wrap {
    overflow-x: auto;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 108px;
}

.admin-sidebar-head h3 {
    margin: 4px 0 8px;
    font-family: var(--font-serif);
    font-size: 30px;
    font-weight: 700;
}

.admin-sidebar-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-sidebar-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(194, 136, 56, 0.12);
    color: var(--secondary-dark);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-nav {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.admin-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.admin-nav-link strong {
    font-size: 15px;
}

.admin-nav-link small {
    color: var(--muted);
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
    transform: translateY(-1px);
    border-color: rgba(194, 136, 56, 0.36);
    background: #fff;
}

.admin-sidebar-actions {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.admin-summary-card {
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: all .15s ease;
}

.admin-summary-card:hover {
    border-color: var(--primary-light);
}

.admin-summary-card strong {
    display: block;
    font-size: 26px;
    line-height: 1.05;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 4px;
}

.admin-summary-card span {
    color: var(--muted-strong);
    font-size: 13.5px;
    font-weight: 500;
}

.admin-summary-link {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.admin-summary-link:hover {
    text-decoration: underline;
}

.admin-summary-link:hover {
    text-decoration: underline;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.table-tools {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.table-tools-search {
    flex: 1 1 320px;
}

.table-tools-search label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.table-tools-search input {
    width: 100%;
}

.table-tools-search-form {
    margin: 0;
}

.table-tools-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-tools-search-row input {
    flex: 1 1 auto;
    min-width: 220px;
}

.table-tools-search-row .btn {
    white-space: nowrap;
}

.table-tools-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--surface-2);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.my-listings-bulk-toggle,
.admin-bulk-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.admin-bulk-toggle input {
    width: 16px;
    height: 16px;
}


.table-thumb-col {
    width: 86px;
    min-width: 86px;
}

.table-thumb-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(31, 26, 20, 0.12);
    background: var(--surface-2);
}

.table-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#adminListingsQuickSearchMeta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 14px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th.checkbox-col,
.data-table td.checkbox-col {
    width: 42px;
    text-align: center;
    vertical-align: middle;
    padding: 10px 8px;
}

.data-table td.checkbox-col input {
    width: 16px;
    height: 16px;
}

.data-table th {
    background: var(--surface-2);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
    background: var(--surface-2);
}

.data-table small {
    display: block;
    color: var(--muted-strong);
    font-size: 12.5px;
    margin-top: 2px;
}

.data-table td a {
    color: var(--text-strong);
    font-weight: 600;
}

.data-table .btn-sm {
    height: 32px;
    padding: 0 14px;
    font-size: 12.5px;
    border-radius: 8px;
}

.my-listings-note-col {
    width: 260px;
    min-width: 220px;
    max-width: 340px;
}

.my-listing-note {
    color: var(--text);
    font-size: 13px;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: var(--surface-2);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.my-listing-note-empty {
    color: var(--muted-strong);
    font-size: 13px;
    font-style: italic;
}

.admin-users-table {
    table-layout: fixed;
}

.admin-users-table col.col-user {
    width: 20%;
}

.admin-users-table col.col-role {
    width: 8%;
}

.admin-users-table col.col-agency {
    width: 12%;
}

.admin-users-table col.col-contact {
    width: 12%;
}

.admin-users-table col.col-listings,
.admin-users-table col.col-views {
    width: 7%;
}

.admin-users-table col.col-created {
    width: 10%;
}

.admin-users-table col.col-action {
    width: 24%;
}

.admin-users-table th,
.admin-users-table td {
    padding: 10px 8px;
    font-size: 12px;
}

.admin-users-table td strong,
.admin-users-table td small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-users-table .role-update-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.admin-users-table td .role-update-form + .role-update-form {
    margin-top: 8px;
}

.admin-users-table .role-update-form select {
    width: 100%;
    min-width: 0;
    padding: 5px 6px;
}

.admin-users-table .btn.btn-sm {
    width: 100%;
    padding: 5px 8px;
    font-size: 11px;
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

/* Admin listings: prefer horizontal scroll over squeezed/overlapping columns */
#adminListingsTableWrap {
    overflow: hidden;
}

#adminListingsTableWrap .table-scroll-main {
    overflow-x: auto;
}

#adminListingsTableWrap .table-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 8px 0 10px;
}

#adminListingsTableWrap .table-scroll-top[hidden] {
    display: none !important;
}

#adminListingsTableWrap .table-scroll-top-inner {
    height: 1px;
}

#adminListingsTableWrap .data-table {
    table-layout: auto;
    min-width: 1380px;
}

#adminListingsTableWrap .data-table th,
#adminListingsTableWrap .data-table td {
    padding: 10px 8px;
    font-size: 12px;
}

#adminListingsTableWrap .data-table th {
    white-space: nowrap;
}

#adminListingsTableWrap .table-thumb-col {
    width: 78px;
    min-width: 78px;
}

#adminListingsTableWrap .data-table th:nth-last-child(5),
#adminListingsTableWrap .data-table td:nth-last-child(5) {
    width: 120px;
    min-width: 120px;
    white-space: nowrap;
}

#adminListingsTableWrap .data-table th.admin-facebook-col-listing,
#adminListingsTableWrap .data-table td.admin-facebook-col-listing {
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    white-space: normal;
}

#adminListingsTableWrap .data-table td.admin-facebook-col-listing strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#adminListingsTableWrap .data-table td.admin-facebook-col-listing small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#adminListingsTableWrap .data-table td strong,
#adminListingsTableWrap .data-table td small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

#adminListingsTableWrap .admin-listing-inline-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

#adminListingsTableWrap .admin-listing-inline-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.2;
}

#adminListingsTableWrap .data-table th:last-child,
#adminListingsTableWrap .data-table td:last-child {
    width: 32%;
    min-width: 360px;
}

#adminListingsTableWrap .table-actions {
    gap: 6px;
}

#adminListingsTableWrap .table-actions > * {
    flex: 1 1 132px;
    min-width: 112px;
}

#adminListingsTableWrap .table-actions .btn,
#adminListingsTableWrap .table-actions .status-pill {
    white-space: normal;
    text-align: center;
    justify-content: center;
}

/* My Listings specific refinements */
.my-listings-bulk-toggle {
    font-weight: 600;
}

#adminListingsTableWrap .pagination--admin-top {
    margin-top: 10px;
    margin-bottom: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted-strong);
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid var(--line);
}

.role-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(14, 111, 97, 0.1);
    color: var(--secondary-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.role-pill.role-admin {
    background: rgba(194, 136, 56, 0.14);
    color: #8a5a12;
}

.role-pill.role-superadmin {
    background: rgba(74, 43, 116, 0.14);
    color: #4a2b74;
}

.role-pill.role-agent {
    background: rgba(14, 111, 97, 0.12);
    color: var(--secondary-dark);
}

.role-pill.role-user,
.role-pill.role-source {
    background: rgba(31, 26, 20, 0.08);
    color: var(--text);
}

.role-update-form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-update-form select {
    min-width: 96px;
    padding: 6px 8px;
}

.agency-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.agency-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid rgba(142, 202, 230, 0.35);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.agency-card:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 90, 117, 0.28);
    box-shadow: var(--shadow-md);
}

.agency-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--sky-light) 0%, var(--sky-mid) 52%, var(--primary) 100%);
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border: 1px solid rgba(14, 90, 117, 0.2);
    box-shadow: 0 6px 14px rgba(14, 90, 117, 0.16);
    overflow: hidden;
}

.agency-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agency-logo span {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(8, 61, 79, 0.25);
}

.agency-card h3 {
    margin: 0 0 8px;
    color: var(--text-strong);
    font-size: 18px;
}

.agency-card p {
    color: var(--muted-strong);
    line-height: 1.5;
    margin: 0;
}

.agency-meta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-dark);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.project-card {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(31, 26, 20, 0.08);
    background: var(--surface);
    transition: box-shadow .28s ease;
    transform-style: preserve-3d;
}

.project-card:hover {
    box-shadow: 0 18px 40px rgba(31, 26, 20, 0.16);
}

.project-card img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform .38s ease;
}

.project-card:hover img {
    transform: scale(1.06);
}

.project-card > div {
    padding: 14px;
}

.project-card h3 {
    margin: 2px 0 8px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-card {
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 100% 0%, rgba(14, 111, 97, 0.12), transparent 44%),
        var(--surface);
    border: 1px solid rgba(31, 26, 20, 0.08);
    padding: 18px;
    transition: box-shadow .28s ease;
    transform-style: preserve-3d;
}

.service-card:hover {
    box-shadow: 0 16px 34px rgba(30, 22, 14, 0.14);
}

.service-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--secondary), #2da38d);
    color: #fff;
    display: inline-grid;
    place-items: center;
    margin-bottom: 8px;
}

.service-card h3 {
    margin: 0 0 8px;
}

.service-card p {
    color: var(--muted);
}

.current-images {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.current-images img {
    border-radius: 10px;
    height: 82px;
    width: 100%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.current-images--editable {
    gap: 10px;
}

.current-image-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    display: grid;
    grid-template-rows: auto auto;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.current-image-card:hover {
    border-color: var(--danger);
    box-shadow: 0 2px 8px rgba(159, 61, 58, 0.12);
}

.current-image-card img {
    height: 96px;
    border: 0;
    border-radius: 0;
}

.current-image-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    font-size: 12px;
    color: var(--muted-strong);
    font-weight: 600;
}

.current-image-meta input[type="checkbox"] {
    margin: 0;
}

.current-image-meta.is-disabled {
    opacity: .45;
}

.upload-input-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
}

.upload-dropzone {
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    padding: 28px 20px;
    text-align: center;
    transition: all .15s ease;
    cursor: pointer;
}

.upload-dropzone:hover {
    border-color: var(--primary-light);
    background: var(--surface);
}

.upload-dropzone p {
    margin: 0 0 14px;
    color: var(--muted-strong);
    font-size: 15px;
}

.upload-dropzone.is-dragover {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(14, 90, 117, 0.08);
}

.upload-preview-head {
    margin-top: 16px;
}

.upload-preview-grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.upload-preview-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.upload-preview-item img {
    width: 100%;
    height: 102px;
    object-fit: cover;
    display: block;
}

.upload-preview-meta {
    padding: 8px;
    display: grid;
    gap: 6px;
}

.upload-preview-name {
    font-size: 12px;
    line-height: 1.3;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-actions {
    display: flex;
    gap: 6px;
}

.upload-preview-actions button {
    flex: 1 1 auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 6px;
    cursor: pointer;
}

.upload-preview-actions button:hover {
    background: #fff;
}

.upload-preview-empty {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    background: var(--surface-2);
}

.post-wizard-head {
    margin-bottom: 18px;
}

.post-wizard-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.post-wizard-step {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--muted-strong);
    min-height: 46px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-wizard-step.is-active {
    border-color: var(--primary);
    background: var(--surface);
    color: var(--primary);
    font-weight: 700;
}

.post-wizard-step.is-done {
    border-color: var(--primary-light);
    color: var(--primary-dark);
    background: var(--surface-2);
}

.post-wizard-controls {
    margin-top: 14px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.listing-form {
    background: var(--surface);
    padding: 32px 30px 36px;
}

.listing-form .form-section {
    margin-bottom: 32px;
}

.listing-form .form-section:last-of-type {
    margin-bottom: 0;
}

.listing-form .form-section {
    margin-bottom: 20px;
}

.listing-form .form-section-head {
    font-family: var(--font-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    letter-spacing: -0.01em;
}

/* Private note - subtle internal treatment */
.listing-form .form-section:first-child {
    background: var(--surface-2);
    margin: -32px -30px 28px;
    padding: 20px 30px 8px;
    border-bottom: 1px solid var(--line);
}

.form-submit {
    margin-top: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.form-submit-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted-strong);
    font-weight: 500;
}

.btn-block {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: 54px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
}

.empty-state,
.empty-note {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 52px 36px;
    text-align: center;
    color: var(--muted-strong);
    box-shadow: var(--shadow-xs);
}

.empty-state h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--text-strong);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.empty-state p {
    max-width: 340px;
    margin: 0 auto 20px;
    font-size: 14.5px;
    color: var(--muted);
}

.empty-state .btn {
    margin-top: 4px;
    min-width: 160px;
}

.alert {
    margin-top: 14px;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
}

.alert-success {
    background: rgba(14, 90, 117, 0.08);
    border: 1px solid rgba(14, 90, 117, 0.25);
    color: var(--primary-dark);
}

.alert-error {
    background: rgba(159, 61, 58, 0.08);
    border: 1px solid rgba(159, 61, 58, 0.28);
    color: #8c3f3c;
}

.alert-warning {
    background: rgba(138, 111, 71, 0.08);
    border: 1px solid rgba(138, 111, 71, 0.25);
    color: var(--accent);
}

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(138, 111, 71, 0.08);
    border: 1px solid rgba(138, 111, 71, 0.2);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-top: 12px;
}

.impersonation-banner-text small {
    color: var(--muted-strong);
    font-weight: 500;
}

.impersonation-stop-form {
    margin: 0;
}

.site-footer {
    margin-top: 54px;
    background: linear-gradient(180deg, var(--surface-2) 0%, #eef4f8 100%);
    color: var(--muted-strong);
    padding: 48px 0 20px;
    border-top: 1px solid var(--line);
}

.footer-brand-col .footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
}

.footer-brand img {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: 0 6px 14px rgba(14, 90, 117, 0.14);
}

.footer-brand strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--text-strong);
    line-height: 1.1;
}

.footer-brand small {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-strong);
}

.footer-trust {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.45;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 20px;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0 0 10px;
    color: var(--text-strong);
}

.footer-grid h3 {
    font-family: var(--font-serif);
    font-size: 18px;
}

.footer-grid a,
.footer-grid p {
    display: block;
    margin: 0 0 7px;
    color: var(--muted);
}

.footer-grid a {
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.footer-grid a:hover {
    color: var(--primary);
    transform: translateX(2px);
}

.copyright {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.reveal {
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: opacity .66s ease, transform .66s cubic-bezier(.2, .62, .2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Keep admin content visible if JS reveal init does not run. */
.admin-main .reveal,
.admin-sidebar .reveal {
    opacity: 1;
    transform: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

@keyframes meshShift {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-12px, 8px, 0) scale(1.03);
    }
    100% {
        transform: translate3d(10px, -10px, 0) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 1120px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .listing-grid--list {
        grid-template-columns: 1fr;
    }

    .listing-grid--list .listing-card {
        grid-template-columns: 1fr;
    }

    .listing-grid--list .listing-image-wrap {
        min-height: 180px;
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .layout-listings {
        grid-template-columns: 280px 1fr;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        order: -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell,
    .admin-grid-two {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .service-grid,
    .project-grid,
    .agency-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .nav-wrap {
        grid-template-columns: 1fr auto auto;
        gap: 10px;
        min-height: 74px;
    }

    .menu-toggle {
        display: block;
        justify-self: center;
        min-width: 44px;
        min-height: 44px;
    }

    .main-nav {
        position: absolute;
        left: 4%;
        right: 4%;
        top: 78px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 8px 6px;
        display: none;
        z-index: 90;
    }

    .main-nav a {
        padding: 10px 14px;
        border-radius: 8px;
        width: 100%;
        text-align: left;
    }

    .main-nav a:hover {
        background: var(--surface-2);
    }

    .brand strong {
        font-size: 21px;
    }

    .brand small {
        display: none;
    }

    .main-nav.open {
        display: flex;
    }

    .header-actions {
        justify-self: end;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .header-actions .btn {
        min-height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .header-actions .btn {
        padding: 8px 10px;
        font-size: 12px;
        line-height: 1.15;
    }

    .layout-listings {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        z-index: 101;
        max-height: 82vh;
        border-radius: 18px 18px 0 0;
        transform: translateY(102%);
        transition: transform .28s ease;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    .filters-panel[data-open="1"] {
        transform: translateY(0);
    }

    .filters-panel.is-dragging {
        transition: none;
    }

    .filters-panel-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(255, 255, 255, 0.96);
        border-bottom: 1px solid rgba(31, 26, 20, 0.08);
        margin: -16px -16px 12px;
        padding: 12px 16px;
    }

    .filters-panel-head::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: var(--line);
        border-radius: 2px;
    }

    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .my-listings-note-col,
    .table-thumb-col {
        display: none;
    }

    .listing-card {
        padding-bottom: 12px;
    }

    .compact-item {
        grid-template-columns: 60px 1fr auto;
        padding: 8px 10px;
    }

    .compact-item-media {
        width: 60px;
        height: 48px;
    }

    .auth-card {
        padding: 24px 20px 20px;
    }

    .auth-card h1 {
        font-size: 26px;
    }

    .listing-form {
        padding: 24px 18px 28px;
    }

    .hero {
        padding: 32px 0 28px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-search {
        padding: 18px;
    }

    .field, .field-row {
        margin-bottom: 16px;
    }

    .btn, .btn-primary, .btn-outline {
        min-height: 46px;
        font-size: 15px;
    }

    .filters-panel-head h3 {
        font-size: 16px;
    }

    .admin-summary-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .profile-avatar-row {
        grid-template-columns: 80px 1fr;
        gap: 14px;
    }

    .profile-avatar-preview {
        width: 80px;
        height: 80px;
    }

    .compact-list {
        gap: 6px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        height: 320px;
    }

    .detail-sidebar {
        margin-top: 20px;
    }
        margin: 0;
        font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    }

    .filters-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 100;
        background: rgba(17, 14, 10, 0.46);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .filters-backdrop[hidden] {
        display: none !important;
    }

    .filters-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-filters-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    body.filters-open {
        overflow: hidden;
    }
}

@media (max-width: 700px) {
    .section {
        padding: 54px 0;
    }

    .section-compact {
        padding: 40px 0;
    }

    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .table-tools-bulk {
        width: 100%;
    }

    .table-tools-search-row {
        flex-direction: column;
        align-items: stretch;
    }

    .table-tools-search-row .btn {
        width: 100%;
    }

    .table-tools-bulk form {
        width: 100%;
    }

    .table-tools-bulk .btn {
        width: 100%;
    }

    .section-head h2 {
        font-size: 34px;
    }

    .hero-content h1 {
        font-size: clamp(24px, 7vw, 32px);
        line-height: 1.04;
    }

    .hero {
        padding: 24px 0 18px;
    }
    .hero-search {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(92vw, 420px);
        max-width: 100%;
        border-radius: 20px 0 0 20px;
        padding: 14px;
        z-index: 121;
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(105%);
        opacity: 1;
        visibility: hidden;
        transition: transform .28s ease, visibility .28s ease;
    }

    .hero-search.reveal,
    .hero-search.reveal.is-visible {
        opacity: 1;
        transform: translateX(105%);
    }

    .hero-search.is-open,
    .hero-search.reveal.is-open,
    .hero-search.reveal.is-visible.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .hero-search h2 {
        font-size: 24px;
        margin-bottom: 8px;
        padding-right: 34px;
    }

    .hero-search-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
        color: var(--text);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    .hero-search-fab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 14px;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        width: 52px;
        height: 52px;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 50%;
        background: var(--primary);
        color: #fff;
        box-shadow: 0 14px 34px rgba(31, 22, 14, 0.28);
        cursor: pointer;
        z-index: 120;
    }

    .hero-search-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 14, 10, 0.5);
        z-index: 119;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .hero-search-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .hero-search .form-grid .field > label {
        min-height: 0;
    }

    .hero-text,
    .hero-stats {
        display: none;
    }

    .hero-vip-carousel {
        display: none;
    }

    .hero-search .form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Keep homepage quick search short on mobile; advanced filters stay in listings page. */
    .hero-search .form-grid .field:nth-child(n+5) {
        display: none;
    }

    .hero-search .field {
        margin-bottom: 8px;
    }

    body.hero-search-open {
        overflow: hidden;
    }

    .mortgage-drawer-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 84px;
        margin: 6px 0 10px auto;
        width: 52px;
        height: 52px;
        border: 1px solid rgba(255, 255, 255, 0.45);
        border-radius: 50%;
        background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
        color: #fff;
        box-shadow: 0 14px 34px rgba(20, 18, 14, 0.28);
        cursor: pointer;
        z-index: 70;
    }

    .mortgage-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 8px;
        right: 8px;
        width: 30px;
        height: 30px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: var(--surface);
        color: var(--text);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    .mortgage-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 14, 10, 0.5);
        z-index: 130;
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .mortgage-drawer-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .detail-sidebar .mortgage-card {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 0;
        width: min(94vw, 520px);
        max-height: 86vh;
        overflow-y: auto;
        margin: 0;
        border-radius: 18px 18px 0 0;
        z-index: 131;
        padding-top: 16px;
        visibility: hidden;
        transform: translate(-50%, 110%);
        opacity: 1;
        transition: transform .28s ease, visibility .28s ease;
    }

    .detail-sidebar .mortgage-card.reveal,
    .detail-sidebar .mortgage-card.reveal.is-visible {
        opacity: 1;
        transform: translate(-50%, 110%);
    }

    .detail-sidebar .mortgage-card.is-open,
    .detail-sidebar .mortgage-card.reveal.is-open,
    .detail-sidebar .mortgage-card.reveal.is-visible.is-open {
        visibility: visible;
        transform: translate(-50%, 0);
    }

    body.mortgage-drawer-open {
        overflow: hidden;
    }

    .hero-orb {
        display: none;
    }

    .form-grid,
    .field-row,
    .field-row.field-row-3,
    .listing-grid,
    .category-grid,
    .service-grid,
    .project-grid,
    .agency-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .current-images {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    }

    .upload-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    }

    .thumb-btn {
        width: 92px;
        flex: 0 0 92px;
    }

    .detail-header {
        flex-direction: column;
    }

    .profile-avatar-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .profile-avatar-preview {
        width: 84px;
        height: 84px;
    }

    .detail-header h1 {
        font-size: 34px;
        line-height: 1.05;
    }

    .detail-price-box {
        text-align: left;
    }

    .detail-price-box strong {
        font-size: 30px;
    }

    .detail-card {
        padding: 14px;
    }

    .detail-map {
        height: 260px;
    }

    .detail-map-frame {
        height: 260px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .compact-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .compact-item-media {
        width: 100%;
        height: 140px;
    }

    .compact-item-price {
        text-align: left;
    }

    .auth-section {
        padding: 46px 0;
    }

    .auth-card {
        padding: 18px;
        border-radius: 20px;
    }

    .auth-card h1 {
        font-size: 34px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .hero-auth-cta {
        flex-direction: column;
    }

    .search-actions-inline {
        flex-direction: column;
        gap: 6px;
    }

    .home-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .home-tab-btn {
        width: 100%;
    }

    .search-tabs-header {
        grid-template-columns: 1fr;
    }

    .search-tab-btn {
        text-align: left;
    }

    .input-row.input-row-price {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .input-row.input-row-price .currency-select {
        grid-column: 1 / -1;
    }

    .filter-checks {
        flex-direction: column;
        gap: 8px;
    }

.search-actions {
    flex-direction: column;
}
}

.cookie-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 120;
}

.cookie-consent[hidden] {
    display: none !important;
}

.cookie-consent__inner {
    margin: 0 auto;
    width: min(860px, 100%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
}

.cookie-consent__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-strong);
}

.cookie-consent__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted-strong);
}

.cookie-consent__text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-consent__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.cookie-settings-link {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.cookie-settings-link:hover {
    color: var(--text);
}

@media (max-width: 700px) {
    .cookie-consent__actions {
        flex-direction: column;
    }

    .cookie-consent__actions .btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(1200px, 95%);
    }

    .nav-wrap {
        grid-template-columns: auto auto auto;
        gap: 8px;
        min-height: 68px;
    }

    .brand {
        gap: 8px;
    }

    .brand strong,
    .brand small {
        display: none;
    }

    .header-actions .btn {
        max-width: none;
        white-space: nowrap;
        text-align: center;
        font-size: 11px;
        padding: 7px 9px;
    }

    .user-menu-name {
        display: none;
    }

    .user-menu-toggle {
        padding-left: 8px;
        padding-right: 8px;
    }

    .main-nav {
        top: 68px;
    }

    .section-head h2 {
        font-size: 30px;
    }

    .listings-toolbar {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .toolbar-sort-form {
        width: 100%;
        border-radius: 14px;
        justify-content: space-between;
    }

    .toolbar-sort-form select {
        min-width: 0;
        flex: 1 1 auto;
    }

    .listing-image-wrap {
        height: 180px;
    }

    .detail-map {
        height: 220px;
    }

    .detail-map-frame {
        height: 220px;
    }

    .home-tabs {
        grid-template-columns: 1fr;
        border-radius: 14px;
    }

    .post-wizard-steps {
        grid-template-columns: 1fr;
    }

    .input-row.input-row-two,
    .input-row.input-row-price {
        grid-template-columns: 1fr;
    }

    .input-row.input-row-price .currency-select {
        grid-column: auto;
    }
}




.location-quick-link-static {
    cursor: text;
}

.location-cadastral-code {
    flex-basis: 100%;
}

.location-cadastral-copy.is-copied {
    border-color: var(--secondary);
    color: var(--secondary);
    background: #fff;
}
