@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand-navy: #000046;
    --brand-navy-700: #0a0a5c;
    --brand-navy-600: #14146e;
    --brand-navy-100: rgba(255, 255, 255, 0.08);
    --brand-navy-050: rgba(255, 255, 255, 0.04);
    --brand-accent: #3d5afe;
    --brand-accent-hover: #2f46d6;
    --accent-gold: #c9a35d;
    --accent-gold-600: #b3873a;
    --accent-teal: #1f8a8c;
    --accent-teal-600: #166b6d;
    --ink-900: #14152b;
    --ink-700: #3b3d5c;
    --ink-500: #6b6d8a;
    --ink-300: #a6a8c2;
    --surface-0: #ffffff;
    --surface-100: #f5f6fb;
    --surface-200: #ececf6;
    --border-subtle: #e3e4f0;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-card: 0 1px 2px rgba(20, 21, 43, 0.04), 0 8px 24px rgba(20, 21, 43, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--surface-100);
    color: var(--ink-900);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink-900);
}

h1 { font-size: 1.5rem; }
h5 { font-size: 1rem; font-weight: 600; }

a { color: var(--brand-accent); text-decoration: none; }
a:hover { color: var(--brand-accent-hover); }

code {
    font-size: 0.85em;
    background: var(--surface-200);
    color: var(--ink-700);
    padding: 0.15em 0.45em;
    border-radius: 6px;
}

/* ---------- Admin top bar ---------- */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: 60px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0 1.25rem;
    background: var(--surface-0);
    border-bottom: 1px solid var(--border-subtle);
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    justify-self: start;
    min-width: 0;
}

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--ink-700);
    flex-shrink: 0;
}

.sidebar-toggle svg { width: 20px; height: 20px; }
.sidebar-toggle:hover { background: var(--surface-100); }

.topbar-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-brand { justify-self: center; }

.brand-mark-navy {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: var(--brand-navy);
}

.topbar-end { justify-self: end; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    background: transparent;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border-radius: 999px;
    color: var(--ink-700);
}

.topbar-user:hover { background: var(--surface-100); }

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.topbar-username {
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------- Admin shell / sidebar ---------- */

.app-shell { min-height: calc(100vh - 60px); align-items: stretch; }

.app-sidebar {
    width: 64px;
    background: var(--brand-navy);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-x: hidden;
    transition: width 0.15s ease;
}

.app-sidebar.expanded { width: 230px; }

.app-sidebar nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-sidebar .nav-section-label {
    display: none;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.35);
    padding: 1rem 0.75rem 0.35rem;
    white-space: nowrap;
}

.app-sidebar.expanded .nav-section-label { display: block; }

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.885rem;
    font-weight: 500;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.app-sidebar.expanded .nav-link { justify-content: flex-start; padding: 0.65rem 0.75rem; }

.app-sidebar .nav-link svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    opacity: 0.85;
}

.app-sidebar .nav-label {
    display: none;
    white-space: nowrap;
}

.app-sidebar.expanded .nav-label { display: inline; }

.app-sidebar .nav-link:hover {
    background: var(--brand-navy-100);
    color: #fff;
}

.app-sidebar .nav-link.active {
    background: var(--brand-navy-600);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--brand-accent);
}

.app-sidebar .sidebar-footer {
    padding: 0.6rem 0.5rem 1rem;
    border-top: 1px solid var(--brand-navy-100);
}

.app-sidebar .sidebar-footer .nav-link {
    color: rgba(255, 255, 255, 0.55);
}

.app-main {
    flex: 1;
    min-width: 0;
    padding: 2.25rem 2.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.page-header h1 { margin-bottom: 0.15rem; }

.page-header .subtitle {
    color: var(--ink-500);
    font-size: 0.9rem;
}

/* ---------- Filter bar ---------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.1rem;
}

.filter-bar-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    flex: 1;
}

.filter-field { flex: 1 1 180px; min-width: 160px; }
.filter-field .form-label { margin-bottom: 0.25rem; }
.filter-actions { flex: 0 0 auto; display: flex; gap: 0.5rem; }

/* ---------- Cards, tables, badges ---------- */

.card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.card .text-muted {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card h2 { font-size: 1.75rem; margin-top: 0.25rem; }

.table {
    background: var(--surface-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
}

.table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-500);
    background: var(--surface-100);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
}

.table td {
    padding: 0.8rem 1rem;
    vertical-align: middle;
    border-color: var(--border-subtle);
    color: var(--ink-700);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: var(--surface-100);
}

.badge {
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 0.35em 0.65em;
    border-radius: 999px;
}

/* ---------- Buttons & forms ---------- */

.btn {
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
}

.btn-primary {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-navy-700);
    border-color: var(--brand-navy-700);
}

.btn-outline-secondary {
    color: var(--ink-700);
    border-color: var(--border-subtle);
}

.btn-outline-secondary:hover {
    background: var(--surface-200);
    border-color: var(--border-subtle);
    color: var(--ink-900);
}

/* Bootstrap's .btn-sm has the same specificity as our .btn override above,
   and since it loads first, our .btn rule was clobbering its smaller
   padding/font-size — every "small" button rendered at full size. */
.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
}

.btn-icon svg {
    width: 15px;
    height: 15px;
}

.form-control, .form-select {
    border-radius: var(--radius-md);
    border-color: var(--border-subtle);
    padding: 0.55rem 0.8rem;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(61, 90, 254, 0.15);
}

.form-label {
    font-weight: 600;
    font-size: 0.83rem;
    color: var(--ink-700);
    margin-bottom: 0.35rem;
}

.alert {
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.88rem;
}

/* ---------- Pagination ---------- */

.pager-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.pager-summary {
    font-size: 0.85rem;
    color: var(--ink-500);
}

.pager-list {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pager-btn, .pager-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.6rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-700);
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.pager-btn:hover, .pager-page:hover {
    background: var(--surface-200);
    color: var(--ink-900);
}

.pager-page.active {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
}

.pager-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ---------- Lightbox ---------- */

.js-lightbox { cursor: zoom-in; }

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(10, 10, 30, 0.88);
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.lightbox-overlay.show { display: flex; }

.lightbox-overlay img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- Property detail ---------- */

.property-hero {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.property-hero img {
    width: 340px;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
}

.property-hero-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.property-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-navy);
}

.property-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.property-fact {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--surface-100);
    border: 1px solid var(--border-subtle);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-700);
}

.nav-tabs {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--ink-500);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 0.2rem;
    margin-right: 1.5rem;
    border-radius: 0;
}

.nav-tabs .nav-link:hover { color: var(--ink-900); }

.nav-tabs .nav-link.active {
    color: var(--brand-navy);
    border-bottom-color: var(--brand-navy);
    background: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 2rem;
}

.detail-grid dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-500);
    font-weight: 700;
}

.detail-grid dd {
    margin: 0.15rem 0 0;
    color: var(--ink-900);
    font-weight: 500;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.photo-grid img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

/* ---------- Page builder (admin) ---------- */

.pb-add-section-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    background: var(--surface-0);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.pb-add-section-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-500);
    margin-right: 0.25rem;
}

.pb-section {
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 0.9rem 1.1rem 1.1rem;
    margin-bottom: 1.1rem;
}

.pb-section-toolbar, .pb-block-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.pb-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-500);
}

.pb-block-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-accent);
}

.pb-toolbar-actions { display: flex; gap: 0.25rem; }

.pb-icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--ink-500);
    font-size: 0.8rem;
    line-height: 1;
    cursor: pointer;
}

.pb-icon-btn:hover { background: var(--surface-200); color: var(--ink-900); }
.pb-icon-btn-danger:hover { background: #fdecea; color: #c0392b; border-color: #f3c9c4; }

.pb-columns { margin: 0 -0.5rem; }
.pb-columns > div { padding: 0 0.5rem; }

.pb-column {
    background: var(--surface-100);
    border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pb-block {
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.75rem 0.75rem;
}

.pb-add-block { margin-top: auto; }

.pb-image-preview {
    max-width: 100%;
    max-height: 140px;
    border-radius: 6px;
    display: block;
}

/* ---------- Property edit repeaters (admin) ---------- */

.pr-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pr-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pr-row input { flex: 1; }

.pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.pr-tile {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-200);
    aspect-ratio: 4 / 3;
}

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

.pr-tile-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pr-tile:hover .pr-tile-actions { opacity: 1; }

.pr-tile-actions button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
}

.pr-tile-actions button:hover { background: rgba(0, 0, 0, 0.75); }

/* ---------- Home page builder (admin) ---------- */

.hb-palette {
    position: sticky;
    top: 76px;
}

.hb-drag-handle {
    cursor: grab;
    color: var(--ink-300);
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.hb-drag-handle:hover { color: var(--ink-500); }

.hb-card.sortable-ghost {
    opacity: 0.4;
}

.hb-card.sortable-chosen {
    box-shadow: 0 8px 24px rgba(20, 21, 43, 0.12);
}

.pb-star-btn {
    border: none;
    background: none;
    font-size: 1.3rem;
    line-height: 1;
    color: #d4a437;
    cursor: pointer;
    padding: 0;
}

.pb-star-btn:hover { opacity: 0.75; }

/* ---------- Header menu builder (admin) ---------- */

.mb-drag-handle-inline {
    display: inline-block;
    transform: rotate(90deg);
    font-weight: 700;
    color: var(--ink-300);
}

.mb-menu-list, .mb-submenu-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mb-submenu-list {
    margin: 0.5rem 0 0.75rem 2rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--border-subtle);
    min-height: 4px;
}

.mb-menu-item.sortable-ghost { opacity: 0.4; }
.mb-menu-item.sortable-chosen .mb-menu-row { box-shadow: 0 8px 20px rgba(20, 21, 43, 0.12); }

.mb-menu-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface-0);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.6rem;
}

.mb-drag-handle {
    cursor: grab;
    color: var(--ink-300);
    font-weight: 700;
    letter-spacing: -2px;
    transform: rotate(90deg);
    flex-shrink: 0;
    padding: 0 0.2rem;
}

.mb-drag-handle:hover { color: var(--ink-500); }

.mb-label { flex: 1 1 35%; }
.mb-url { flex: 1 1 45%; }

/* ---------- Public site ---------- */

.public-navbar {
    background: var(--brand-navy) !important;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.public-navbar .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 1.2rem;
}

.public-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.75) !important;
}

.public-navbar .nav-link:hover {
    color: #fff !important;
}

.public-lang-switcher {
    width: auto;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    margin-left: 0.75rem;
}

.public-lang-switcher option {
    color: var(--ink-900);
}

/* ---------- Home page ---------- */

.home-hero {
    background-color: var(--brand-navy);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    color: #fff;
}

.home-hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 70, 0.75), rgba(0, 0, 70, 0.55));
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    text-align: center;
}

.home-hero-overlay h1 {
    color: #fff;
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.home-hero-overlay p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.75rem;
}

.home-hero-search {
    max-width: 1140px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem;
    border-radius: var(--radius-md);
}

.home-section {
    margin-bottom: 3rem;
}

.home-section h2 {
    font-size: 1.6rem;
}

.home-location-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    overflow: hidden;
}

.home-location-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.location-hero-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.home-location-card:hover {
    box-shadow: 0 12px 30px rgba(20, 21, 43, 0.12);
    transform: translateY(-2px);
}

.home-agent-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Site-wide footer ---------- */

.site-footer {
    background: var(--brand-navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 2.5rem 0 1.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.site-footer a:hover {
    color: #fff;
}

.site-footer-brand {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.4rem;
}

.site-footer-social a {
    margin-right: 1rem;
    text-decoration: underline;
}

.site-footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.75;
}

/* ---------- Login ---------- */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy) 260px, var(--surface-100) 260px);
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface-0);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(0, 0, 70, 0.18);
    padding: 2.25rem 2.25rem 2rem;
}

.auth-card .brand-mark {
    color: var(--brand-navy);
    font-weight: 800;
    font-size: 1.3rem;
    text-align: center;
    display: block;
    margin-bottom: 0.35rem;
}

.auth-card .brand-sub {
    text-align: center;
    color: var(--ink-500);
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
    display: block;
}

/* ---------- Property detail page (public) ---------- */

.pdp-breadcrumb {
    font-size: 0.85rem;
    color: var(--ink-500);
    margin-bottom: 1rem;
}

.pdp-breadcrumb a { color: var(--ink-500); }
.pdp-breadcrumb a:hover { color: var(--brand-accent); }

.pdp-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--brand-navy);
}

.pdp-hero .carousel-item img {
    width: 100%;
    height: 640px;
    object-fit: cover;
    cursor: pointer;
}

.pdp-hero-placeholder {
    width: 100%;
    height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    background: var(--brand-navy);
}

@media (max-width: 768px) {
    .pdp-hero .carousel-item img,
    .pdp-hero-placeholder {
        height: 360px;
    }
}

.pdp-hero-placeholder svg { width: 64px; height: 64px; }

.pdp-hero .carousel-control-prev,
.pdp-hero .carousel-control-next {
    width: 44px;
    height: 44px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    opacity: 0.85;
}

.pdp-hero .carousel-control-prev { left: 16px; }
.pdp-hero .carousel-control-next { right: 16px; }
.pdp-hero .carousel-control-prev-icon,
.pdp-hero .carousel-control-next-icon { width: 1.2rem; height: 1.2rem; }
.pdp-hero .carousel-indicators { margin-bottom: 0.6rem; }

.pdp-hero-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
}

.pdp-facts-card {
    position: relative;
    background: var(--surface-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    margin: -2.5rem 1rem 2rem;
    padding: 1.25rem 1.5rem;
    z-index: 2;
}

@media (min-width: 992px) {
    .pdp-facts-card { margin-left: 2rem; margin-right: 2rem; }
}

.pdp-title { font-size: 1.5rem; margin-bottom: 0.15rem; }

.pdp-location {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ink-500);
    font-size: 0.92rem;
}

.pdp-location svg { width: 16px; height: 16px; flex-shrink: 0; }

.pdp-price { font-size: 1.9rem; font-weight: 800; color: var(--brand-navy); }

.pdp-fact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.pdp-fact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-700);
    font-weight: 600;
    font-size: 0.9rem;
}

.pdp-fact svg { width: 20px; height: 20px; color: var(--brand-accent); flex-shrink: 0; }

.pdp-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.pdp-description { font-size: 0.96rem; line-height: 1.75; color: var(--ink-700); }

.pdp-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.7rem 1.5rem;
}

.pdp-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--ink-700);
}

.pdp-feature svg { width: 18px; height: 18px; color: #16a34a; flex-shrink: 0; }

.pdp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.pdp-gallery-grid button {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
}

.pdp-gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.pdp-gallery-grid button:hover img { transform: scale(1.06); }

.pdp-sidebar { position: sticky; top: 84px; }

.pdp-agent-card { text-align: center; }

.pdp-agent-photo {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.85rem;
    box-shadow: var(--shadow-card);
    border: 3px solid var(--surface-100);
}

.pdp-agent-name { font-size: 1.1rem; font-weight: 700; color: var(--ink-900); margin-bottom: 0.15rem; }
.pdp-agent-title { font-size: 0.82rem; color: var(--ink-500); margin-bottom: 1.1rem; }

.pdp-agent-contact {
    text-align: left;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.95rem;
    margin-top: 0.2rem;
}

.pdp-agent-contact-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--ink-700);
}

.pdp-agent-contact-row + .pdp-agent-contact-row { margin-top: 0.6rem; }

.pdp-agent-contact-row svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--brand-accent);
}

.pdp-agent-contact-row a { color: inherit; text-decoration: none; word-break: break-all; }
.pdp-agent-contact-row a:hover { color: var(--brand-accent); }

.pdp-agent-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.pdp-agent-actions .btn { flex: 1; }

.pdp-similar { margin-top: 3rem; }

/* ---------- Property card (public) ---------- */

.rp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface-0);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rp-card:hover {
    box-shadow: 0 16px 36px rgba(20, 21, 43, 0.14);
    transform: translateY(-3px);
}

.rp-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--brand-navy);
}

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

.rp-card:hover .rp-card-media img { transform: scale(1.06); }

.rp-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
}

.rp-card-placeholder svg { width: 48px; height: 48px; }

.rp-status-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(20, 21, 43, 0.55);
    backdrop-filter: blur(2px);
}

.rp-status-badge.rp-status-for-sale { background: rgba(31, 138, 140, 0.9); }
.rp-status-badge.rp-status-for-rent { background: rgba(61, 90, 254, 0.85); }

.rp-ribbon {
    position: absolute;
    top: 16px;
    right: -34px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-600));
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 2.6rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.rp-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.1rem 1.25rem 1.25rem;
}

.rp-card-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--ink-500);
    margin-bottom: 0.25rem;
}

.rp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.rp-card-location {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.3;
}

.rp-card-region {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-500);
}

.rp-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-navy);
    white-space: nowrap;
    flex-shrink: 0;
}

.rp-card-ref {
    font-size: 0.78rem;
    color: var(--ink-500);
    margin-top: 0.2rem;
}

.rp-card-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0.9rem 0 1.1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-subtle);
}

.rp-card-fact {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-700);
}

.rp-card-fact svg { width: 16px; height: 16px; color: var(--ink-500); flex-shrink: 0; }

.rp-card-cta {
    margin-top: auto;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.7rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-600));
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(179, 135, 58, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rp-card-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(179, 135, 58, 0.45);
    color: #fff;
}

.pdp-lightbox {
    display: flex;
    height: 100vh;
    background: #000;
}

.pdp-lightbox-main {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
}

.pdp-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pdp-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.pdp-lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.pdp-lightbox-nav svg { width: 22px; height: 22px; }
.pdp-lightbox-prev { left: 20px; }
.pdp-lightbox-next { right: 20px; }

.pdp-lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    white-space: nowrap;
}

.pdp-lightbox-thumbs {
    width: 230px;
    flex-shrink: 0;
    background: #121212;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 12px;
    align-content: start;
}

.pdp-lightbox-thumb {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    line-height: 0;
}

.pdp-lightbox-thumb img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    display: block;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.pdp-lightbox-thumb:hover img { opacity: 0.85; }
.pdp-lightbox-thumb.active { border-color: var(--brand-accent); }
.pdp-lightbox-thumb.active img { opacity: 1; }

@media (max-width: 768px) {
    .pdp-lightbox { flex-direction: column; }

    .pdp-lightbox-thumbs {
        width: 100%;
        height: 100px;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 70px;
    }

    .pdp-lightbox-thumb img { height: 100%; }
}

/* ---------- Search filter dropdowns (public) ---------- */

.pd-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pd-field { flex: 1 1 108px; min-width: 100px; max-width: 170px; }

.pd-dropdown { position: relative; width: 100%; }

.pd-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-0);
    color: var(--ink-900);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pd-toggle span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-toggle:hover { border-color: var(--accent-teal); }

.pd-dropdown.pd-open .pd-toggle {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(31, 138, 140, 0.12);
}

.pd-chevron { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-500); transition: transform 0.15s ease; }
.pd-dropdown.pd-open .pd-chevron { transform: rotate(180deg); }

.pd-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 45;
    width: 280px;
    max-width: 90vw;
    background: var(--surface-0);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(20, 21, 43, 0.18);
    border: 1px solid var(--border-subtle);
    padding: 0.9rem;
    text-align: left;
}

.pd-panel.show { display: block; }

.pd-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
    color: var(--ink-900);
}

.pd-search:focus { outline: none; border-color: var(--accent-teal); }

.pd-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.pd-actions button {
    border: none;
    background: none;
    color: var(--accent-teal-600);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.pd-actions button:hover { text-decoration: underline; }

.pd-options {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pd-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    font-size: 0.86rem;
    color: var(--ink-700);
    cursor: pointer;
    margin: 0;
    text-align: left;
}

.pd-option:hover { background: var(--surface-100); }
.pd-option input[type="checkbox"] { accent-color: var(--accent-teal); width: 16px; height: 16px; flex-shrink: 0; }

.pd-option-single {
    width: 100%;
    border: none;
    background: none;
    justify-content: flex-start;
}

.pd-option-single.pd-option-selected {
    background: rgba(31, 138, 140, 0.1);
    color: var(--accent-teal-600);
    font-weight: 700;
}

.pd-search-btn {
    flex: 0 0 auto;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 1.9rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-600));
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(179, 135, 58, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pd-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(179, 135, 58, 0.45);
    color: #fff;
}

/* Inside the dark hero search panel the pills still need to read clearly
   against the translucent overlay used there. */
.home-hero-search .pd-toggle { background-color: rgba(255, 255, 255, 0.95); }

@media (max-width: 767px) {
    .pd-filter-bar { justify-content: flex-start; }
}
