/* ============================================================
   Tom Sells Homes — Main Stylesheet
   Warm bronze accent, elegant real estate design
   Matches existing tomsellshomes.ca branding
   ============================================================ */

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary: #926929;
    --color-primary-dark: #7a5720;
    --color-primary-light: #b8873a;
    --color-accent: #926929;
    --color-bg: #ffffff;
    --color-bg-alt: #f5f5f5;
    --color-white: #ffffff;
    --color-dark: #1a1a1a;
    --color-text: #3c3c3c;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e0e0;
    --color-success: #2e7d32;
    --color-error: #c62828;
    --radius: 0px;
    --radius-lg: 0px;
    --radius-sm: 2px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --font: 'Plus Jakarta Sans', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --header-height: 64px;

    /* New design tokens */
    --ink: #1a1a1a;
    --ivory: #faf9f6;
    --stone: #e8e4de;
    --warm-gray: #9a9590;
    --accent: #926929;
    --accent-light: #b8873a;
    --accent-glow: #f0e6d0;
    --gold: #c8a96e;
    --gold-light: #f0e6d0;
    --charcoal: #18181B;
    --cream: #F5F0E8;
    --sign-gold: #926929;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    font-weight: 400;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-dark); }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 0;
    font-family: var(--font);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); color: white; }
.btn-outline { background: transparent; color: var(--color-primary); border: 1px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: white; }
.btn-white { background: white; color: var(--color-dark); }
.btn-white:hover { background: var(--color-primary); color: white; }
.btn-lg { padding: 1rem 2.5rem; font-size: 0.875rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.75rem; }
.btn-block { width: 100%; }

/* --- Header (Fixed Dark Nav with Blur) --- */
.site-header {
    background: rgba(24, 24, 27, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo { display: flex; flex-direction: column; text-decoration: none; gap: 0.125rem; }
.logo-name {
    font-size: 1.175rem;
    font-weight: 300;
    color: #f0f0f0;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.logo-name strong {
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #ffffff;
}
.logo-brokerage {
    font-size: 0.75rem;
    color: var(--warm-gray);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.main-nav { display: flex; gap: 2rem; align-items: center; }
.main-nav .nav-link {
    color: rgba(255,255,255,0.7);
    font-weight: 400;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.5rem 0;
    transition: color 0.2s;
    position: relative;
}
.main-nav .nav-link:hover { color: #ffffff; }
.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.main-nav .nav-link:hover::after { transform: scaleX(1); }

/* Gold CTA button for Register */
.nav-cta {
    background: var(--accent) !important;
    color: #ffffff !important;
    padding: 0.45rem 1.2rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover {
    background: var(--accent-light) !important;
    transform: translateY(-1px);
}
.nav-cta::after { display: none !important; }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.8); }

/* Body offset for fixed nav */
body { padding-top: var(--header-height); }

/* --- Hero --- */
.hero {
    position: relative;
    background: var(--color-dark);
    padding: 0;
    text-align: center;
    color: white;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(26,26,26,0.7) 0%, rgba(26,26,26,0.3) 50%, rgba(146,105,41,0.2) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%231a1a1a"/><rect x="0" y="200" width="1200" height="400" fill="%23222"/></svg>');
    background-size: cover;
    z-index: 0;
}
.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.hero-topline {
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 1rem;
}
.hero-divider {
    width: 120px;
    height: 2px;
    background: var(--color-accent);
    margin: 0 auto 1.25rem;
}
.hero-search {
    display: flex;
    gap: 0;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    overflow: hidden;
}
.search-input-wrapper {
    flex: 1;
    position: relative;
}
.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
}
.hero-input {
    width: 100%;
    padding: 1rem 1rem 1rem 2.75rem;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    font-family: var(--font);
    font-weight: 400;
    outline: none;
    color: var(--color-text);
}
.hero-input::placeholder { color: #bbb; }
.hero-search .btn {
    border-radius: 0;
    white-space: nowrap;
    padding: 1rem 2rem;
}

.hero-quick-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
}
.quick-link {
    padding: 0.375rem 1rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.3s;
}
.quick-link:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* --- Featured Section --- */
.featured-section {
    padding: 4rem 0;
    background: var(--ivory);
}
.featured-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-dark);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* --- About Section (Homepage) --- */
.about-section {
    padding: 5rem 0;
    background: var(--color-white);
    border-top: 1px solid var(--stone);
}
.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: center;
}
.about-photo-img {
    width: 220px;
    height: auto;
    display: block;
}
.about-photo-img-lg {
    width: 320px;
    height: auto;
    display: block;
}
.about-text h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
    letter-spacing: 0.01em;
}
.about-brokerage { color: var(--color-primary); margin-bottom: 1.25rem; font-weight: 400; font-size: 0.875rem; letter-spacing: 0.05em; }
.about-text p { font-weight: 400; line-height: 1.8; }
.about-cta { display: flex; gap: 1rem; margin-top: 2rem; }

/* --- Property Type Cards (Homepage) --- */
.type-cards-section {
    padding: 4rem 0;
    background: var(--color-white);
}
.type-cards-section h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 2rem;
}
.type-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.type-card {
    position: relative;
    height: 280px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-dark);
    background-size: cover;
    background-position: center;
    text-decoration: none;
    color: white;
    border-radius: 14px;
}
.type-card-detached { background-image: url('/static/images/type-detached.jpg?v=2'); }
.type-card-condo { background-image: url('/static/images/type-condo.jpg?v=2'); }
.type-card-townhouse { background-image: url('/static/images/type-townhouse.jpg?v=2'); }
.type-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    transition: background 0.3s;
    border-radius: 14px;
}
.type-card:hover::before { background: rgba(146,105,41,0.5); }
.type-card span {
    position: relative;
    z-index: 1;
    font-size: 1.125rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: white;
}

/* ============================================================
   SEARCH PAGE LAYOUT — Left panel + Right map
   ============================================================ */
.search-layout {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* Left panel: search + filters + results */
.search-left-panel {
    width: 480px;
    min-width: 380px;
    display: flex;
    flex-direction: column;
    background: var(--ivory);
    border-right: 1px solid var(--stone);
}

/* Right panel: map */
.search-right-panel {
    flex: 1;
    min-width: 0;
}
#map { width: 100%; height: 100%; }

/* --- Search Bar --- */
.search-bar-wrap {
    padding: 1rem 1.25rem 0.5rem;
    flex-shrink: 0;
}
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}
.search-bar-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--warm-gray);
    pointer-events: none;
}
.search-bar-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.75rem;
    border: 1px solid var(--stone);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 400;
    outline: none;
    background: var(--ivory);
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar-input::placeholder { color: var(--warm-gray); }
.search-bar-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --- Filter Chips --- */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem 1.25rem 0.75rem;
    flex-shrink: 0;
}
.filter-chip {
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--stone);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--ivory);
    color: var(--ink);
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.filter-chip:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
select.filter-chip {
    padding-right: 1.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9590' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 12px;
}
.filter-chip-price {
    max-width: 90px;
    padding-right: 0.5rem;
}
.filter-chip-price::placeholder { color: var(--warm-gray); }
.filter-chip-search {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    font-weight: 600;
}
.filter-chip-search:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

/* --- Results Header + Sort --- */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1.25rem 0.5rem;
    flex-shrink: 0;
}
.search-sort {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--warm-gray);
}
.search-sort label { font-weight: 500; }
.sort-select {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--stone);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 0.75rem;
    font-weight: 400;
    background: var(--ivory);
    color: var(--ink);
    outline: none;
    cursor: pointer;
}
.sort-select:focus { border-color: var(--accent); }

/* --- Scrollable Listings Area --- */
.search-listings {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.25rem 1.25rem;
}

/* Results count inside search */
.search-listings .results-header { margin-bottom: 0.75rem; }
.search-listings .results-count {
    font-size: 0.8rem;
    color: var(--warm-gray);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* --- Listing Grid (in search: single column, in featured: multi-column) --- */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Search page: single-column list */
.search-listings .listing-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

/* --- Listing Card (default: vertical for featured/home) --- */
.listing-card {
    display: block;
    background: var(--color-white);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--stone);
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
    text-decoration: none;
    color: var(--color-text);
}
.listing-card:hover {
    box-shadow: 0 8px 24px rgba(146,105,41,0.12);
    transform: translateY(-3px);
    border-color: var(--accent-glow);
    color: var(--color-text);
}
.card-image { position: relative; aspect-ratio: 4/3; background: #eee; overflow: hidden; border-radius: 14px 14px 0 0; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.listing-card:hover .card-image img { transform: scale(1.05); }
.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--warm-gray);
    font-size: 0.8125rem;
    font-weight: 400;
    background: var(--stone);
}
.card-status {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.status-active { background: var(--accent); color: white; }
.status-sold { background: var(--charcoal); color: white; }
.status-pending { background: var(--stone); color: var(--ink); }
.card-body { padding: 1rem; }
.card-price {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ink);
}
.card-address {
    font-size: 0.8rem;
    color: var(--warm-gray);
    margin-top: 0.2rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.3rem;
    font-weight: 400;
}
.card-meta-item { }
.card-type-tag {
    display: inline-block;
    font-size: 0.6rem;
    color: var(--warm-gray);
    margin-top: 0.35rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--ivory);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--stone);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Keep old class working too */
.card-type {
    font-size: 0.6875rem;
    color: var(--warm-gray);
    margin-top: 0.125rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.card-brokerage {
    font-size: 0.6rem;
    color: var(--warm-gray);
    margin-top: 0.5rem;
    border-top: 1px solid var(--stone);
    padding-top: 0.5rem;
    font-weight: 400;
}

/* --- HORIZONTAL listing card inside search page --- */
.search-listings .listing-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    border-radius: 14px;
    overflow: hidden;
    min-height: 0;
}
.search-listings .card-image {
    aspect-ratio: unset;
    height: 100%;
    min-height: 140px;
    border-radius: 14px 0 0 14px;
}
.search-listings .card-image img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}
.search-listings .card-body {
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}
.search-listings .card-price {
    font-size: 1.5rem;
}

/* --- Listing Detail --- */
.listing-detail { padding-bottom: 3rem; }
.breadcrumb { padding: 1.25rem 0; font-size: 0.8125rem; color: var(--color-text-muted); font-weight: 400; letter-spacing: 0.03em; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

.gallery { margin-bottom: 2rem; }
.gallery-main { position: relative; aspect-ratio: 16/9; background: var(--color-dark); border-radius: 14px; overflow: hidden; }
.gallery-image { width: 100%; height: 100%; object-fit: contain; }
.gallery-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #666; font-size: 1rem; font-weight: 400; }
.gallery-controls { position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1rem; }
.gallery-prev, .gallery-next {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.gallery-prev:hover, .gallery-next:hover { background: var(--color-primary); border-color: var(--color-primary); }
.gallery-counter { color: white; font-size: 0.75rem; background: rgba(0,0,0,0.5); padding: 0.25rem 0.875rem; font-weight: 400; letter-spacing: 0.05em; border-radius: 6px; }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.5rem; overflow-x: auto; }
.thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; cursor: pointer; opacity: 0.5; transition: opacity 0.2s; border: 2px solid transparent; }
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--color-primary); }

.listing-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--stone);
}
.listing-price {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--ink);
}
.listing-address { font-size: 1.125rem; color: var(--color-text); margin-top: 0.375rem; font-weight: 400; }
.listing-meta { font-size: 0.875rem; color: var(--color-text-light); margin-top: 0.25rem; font-weight: 400; }
.listing-type { font-size: 0.8125rem; color: var(--warm-gray); font-weight: 400; text-transform: uppercase; letter-spacing: 0.05em; }
.listing-header-right { text-align: right; flex-shrink: 0; }
.listing-status {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.listing-mls { font-size: 0.8125rem; color: var(--warm-gray); margin: 0.75rem 0; font-weight: 400; }

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; }
.detail-card {
    background: var(--color-white);
    border: 1px solid var(--stone);
    border-radius: 14px;
    padding: 2rem;
}
.detail-card h3 {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    color: var(--color-primary);
}
.detail-table { width: 100%; }
.detail-table td { padding: 0.5rem 0; font-size: 0.875rem; border-bottom: 1px solid var(--stone); font-weight: 400; }
.detail-table td:first-child { color: var(--warm-gray); width: 40%; }
.listing-description { font-size: 0.875rem; line-height: 1.8; color: var(--color-text); font-weight: 400; }
.detail-map { height: 300px; border-radius: 14px; }

.vow-gate { background: var(--cream); border-color: var(--stone); text-align: center; }
.vow-gate h3 { color: var(--color-primary); }
.vow-gate p { color: var(--color-text-light); margin-bottom: 1.25rem; font-weight: 400; }

.listing-compliance { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--stone); }
.compliance-brokerage { font-size: 0.875rem; margin-bottom: 0.75rem; font-weight: 400; }

/* --- Compliance Footer --- */
.compliance-block { font-size: 0.6875rem; color: var(--color-text-muted); line-height: 1.6; font-weight: 400; }
.compliance-text { margin-bottom: 0.5rem; }
.compliance-brokerage-footer { font-size: 0.75rem; margin-top: 0.75rem; }

/* --- Contact --- */
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; margin-top: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--stone);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
textarea.form-input { resize: vertical; }
.contact-info {
    padding: 2rem;
    background: var(--charcoal);
    color: #ccc;
    height: fit-content;
    border-radius: 14px;
}
.contact-info h3 { color: white; margin-bottom: 0.25rem; font-weight: 400; font-size: 1.25rem; }
.contact-info p { font-size: 0.875rem; margin-bottom: 0.5rem; color: #aaa; font-weight: 400; }
.contact-info a { color: var(--color-primary-light); }

/* --- Pages --- */
.page-section { padding: 3rem 0 5rem; }
.page-section h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
    color: var(--ink);
}
.about-page-grid { display: grid; grid-template-columns: 340px 1fr; gap: 3rem; align-items: start; }
.about-subtitle { color: var(--color-primary); margin-bottom: 1.5rem; font-weight: 400; letter-spacing: 0.05em; }
.legal-page h2 { font-size: 1.125rem; font-weight: 500; margin: 2rem 0 0.75rem; color: var(--ink); }
.legal-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-page li { margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 400; }
.legal-page p { font-size: 0.875rem; margin-bottom: 0.75rem; font-weight: 400; }

/* --- Footer --- */
.site-footer {
    background: var(--charcoal);
    color: #999;
    padding: 3rem 0;
    margin-top: auto;
    font-size: 0.8125rem;
    font-weight: 400;
    border-top: 3px solid var(--accent);
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.footer-brand { margin-bottom: 2rem; }
.footer-brand strong { color: var(--accent-light); font-weight: 500; }
.footer-brand a { color: #aaa; }
.footer-brand a:hover { color: var(--accent-light); }
.footer-compliance { margin-bottom: 2rem; }
.footer-links { display: flex; gap: 2rem; padding-top: 1.5rem; border-top: 1px solid #333; }
.footer-links a { color: #999; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.footer-links a:hover { color: var(--accent-light); }

/* --- Alerts --- */
.alert { padding: 1.25rem 1.5rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-success { background: #f0f7f0; border: 1px solid #c3dac3; color: #2e5e2e; }
.alert h3 { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.25rem; }
.alert p { font-size: 0.8125rem; font-weight: 400; }

/* --- Loading --- */
.loading-spinner { padding: 3rem; text-align: center; color: var(--warm-gray); font-weight: 400; }
.load-more { margin-top: 1rem; text-align: center; }
.no-results { grid-column: 1 / -1; text-align: center; padding: 4rem; }
.no-results h3 { margin-bottom: 0.5rem; font-weight: 400; font-size: 1.25rem; }
.no-results p { color: var(--warm-gray); font-weight: 400; }

/* --- Auth Pages --- */
.auth-wrapper {
    max-width: 520px;
    margin: 0 auto;
}
.auth-wrapper h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--ink);
    margin-bottom: 0.5rem;
}
.auth-subtitle {
    color: var(--color-text-light);
    font-weight: 400;
    font-size: 0.9375rem;
    margin-bottom: 2rem;
}
.auth-form { margin-bottom: 2rem; }
.auth-form .btn { margin-top: 0.5rem; }
.auth-errors {
    background: #fdf2f2;
    border: 1px solid #f5c6c6;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}
.auth-error {
    color: var(--color-error);
    font-size: 0.8125rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}
.auth-error:last-child { margin-bottom: 0; }
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
    font-weight: 400;
}
.form-checkbox {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}
.form-checkbox label {
    font-size: 0.75rem;
    line-height: 1.6;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    color: var(--color-text-light);
}
.form-hint {
    font-weight: 400;
    color: var(--warm-gray);
    text-transform: none;
    letter-spacing: 0;
}

/* Nav auth elements */
.nav-user {
    color: var(--gold);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}
.nav-link-accent {
    color: var(--accent) !important;
    font-weight: 500 !important;
}

/* --- AI Search Badge --- */
.search-ai-badge {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- Map Pin Pointer Triangle (CSS) --- */
.mapboxgl-marker {
    width: auto !important;
    max-width: none !important;
}
.map-price-pin {
    position: relative;
    display: inline-block;
    width: auto;
}
.map-price-pin::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #926929;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--charcoal);
        flex-direction: column;
        padding: 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open { display: flex; }

    .hero h1 { font-size: 2rem; }
    .hero-search { flex-direction: column; border-radius: 12px; }
    .hero { min-height: 400px; }

    .about-grid, .about-page-grid { grid-template-columns: 1fr; text-align: center; }
    .about-grid .about-photo-img { margin: 0 auto; }

    /* Search page mobile: stacked layout */
    .search-layout { flex-direction: column; height: auto; min-height: calc(100vh - var(--header-height)); }
    .search-left-panel {
        width: 100%;
        min-width: unset;
        max-height: 55vh;
        border-right: none;
        border-bottom: 1px solid var(--stone);
    }
    .search-right-panel {
        flex: 1;
        min-height: 300px;
        height: 45vh;
    }

    .search-listings .listing-card {
        grid-template-columns: 130px 1fr;
    }
    .search-listings .card-image {
        min-height: 130px;
    }
    .search-listings .card-price {
        font-size: 1.2rem;
    }

    .listing-header { flex-direction: column; gap: 1rem; }
    .listing-header-right { text-align: left; }
    .details-grid { grid-template-columns: 1fr; }

    .contact-grid { grid-template-columns: 1fr; }

    .listing-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .featured-grid { grid-template-columns: 1fr; }

    .type-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .search-listings .listing-card {
        grid-template-columns: 1fr;
    }
    .search-listings .card-image {
        min-height: 180px;
        border-radius: 14px 14px 0 0;
    }
    .filter-chips {
        gap: 0.3rem;
    }
    .filter-chip {
        font-size: 0.72rem;
        padding: 0.4rem 0.65rem;
    }
    .filter-chip-price {
        max-width: 75px;
    }
}
