/* ============================================================
   Estate DNC — Homes For Sale Styles
   ============================================================ */

:root {
    --estate-gold:    #b8975a;
    --estate-dark:    #1a1a1a;
    --estate-charcoal:#2d2d2d;
    --estate-gray:    #f5f5f3;
    --estate-text:    #444;
    --estate-white:   #ffffff;
    --estate-radius:  8px;
    --estate-shadow:  0 4px 24px rgba(0,0,0,0.10);
    --estate-shadow-hover: 0 8px 40px rgba(0,0,0,0.18);
    --estate-transition: 0.3s ease;
    --estate-font:    'Optima', 'Raleway', 'Georgia', serif;
}

/* ---- ARCHIVE HERO ---- */
.estate-archive-wrap { max-width: 1400px; margin: 0 auto; padding: 0 24px 60px; }

.estate-archive-hero {
    background: linear-gradient(135deg, var(--estate-dark) 0%, var(--estate-charcoal) 100%);
    padding: 80px 40px;
    text-align: center;
    margin: 0 -24px 48px;
}
.estate-archive-title {
    font-family: var(--estate-font);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--estate-white);
    margin: 0 0 12px;
    letter-spacing: 0.03em;
}
.estate-archive-subtitle {
    color: var(--estate-gold);
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ---- FILTER BAR ---- */
.estate-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--estate-white);
    border: 1px solid #e0e0e0;
    border-radius: var(--estate-radius);
    padding: 20px 24px;
    margin-bottom: 40px;
    box-shadow: var(--estate-shadow);
}
.estate-filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; flex: 1; }
.estate-filter-group { display: flex; flex-direction: column; gap: 4px; }
.estate-filter-group label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #888; }
.estate-filter-group select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: var(--estate-white);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
.estate-filter-btn {
    padding: 9px 28px;
    background: var(--estate-dark);
    color: var(--estate-white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--estate-transition);
    letter-spacing: 0.04em;
}
.estate-filter-btn:hover { background: var(--estate-gold); }
.estate-filter-clear {
    color: #888;
    font-size: 13px;
    text-decoration: none;
    padding: 9px 12px;
}
.estate-filter-clear:hover { color: var(--estate-dark); }
.estate-filter-count { color: #888; font-size: 13px; margin-left: auto; }

/* ---- HOMES GRID ---- */
.estate-homes-grid {
    display: grid;
    gap: 32px;
}
.estate-cols-3 { grid-template-columns: repeat(3, 1fr); }
.estate-cols-2 { grid-template-columns: repeat(2, 1fr); }
.estate-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- HOME CARD ---- */
.estate-home-card {
    background: var(--estate-white);
    border-radius: var(--estate-radius);
    overflow: hidden;
    box-shadow: var(--estate-shadow);
    transition: transform var(--estate-transition), box-shadow var(--estate-transition);
    display: flex;
    flex-direction: column;
}
.estate-home-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--estate-shadow-hover);
}

.estate-card-thumb-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--estate-gray);
}
.estate-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.estate-home-card:hover .estate-card-thumb { transform: scale(1.05); }
.estate-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 14px;
}

/* Status badge */
.estate-status-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 2;
}
.estate-status-available   { background: #1a7a3c; color: #fff; }
.estate-status-pending     { background: #c87600; color: #fff; }
.estate-status-sold        { background: #c0392b; color: #fff; }
.estate-status-coming-soon { background: var(--estate-dark); color: var(--estate-gold); }

/* 3D tour badge */
.estate-tour-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(184, 151, 90, 0.92);
    color: var(--estate-white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
}

/* Card body */
.estate-card-body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.estate-card-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--estate-dark);
    font-family: var(--estate-font);
    letter-spacing: -0.01em;
}
.estate-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}
.estate-card-title a { color: var(--estate-dark); text-decoration: none; }
.estate-card-title a:hover { color: var(--estate-gold); }

.estate-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 13px;
    margin-top: 2px;
}
.estate-card-location svg { width: 14px; height: 14px; flex-shrink: 0; }

.estate-card-specs {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 4px;
}
.estate-card-specs span { font-size: 13px; color: var(--estate-text); }
.estate-card-specs strong { color: var(--estate-dark); font-size: 14px; }

.estate-card-btn {
    display: block;
    margin-top: auto;
    padding: 11px 0;
    background: var(--estate-dark);
    color: var(--estate-white);
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: background var(--estate-transition);
}
.estate-card-btn:hover { background: var(--estate-gold); color: var(--estate-white); }

/* ---- PAGINATION ---- */
.estate-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    flex-wrap: wrap;
}
.estate-pagination .page-numbers {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: var(--estate-dark);
    text-decoration: none;
    font-size: 14px;
    transition: all var(--estate-transition);
}
.estate-pagination .current,
.estate-pagination .page-numbers:hover { background: var(--estate-dark); color: #fff; border-color: var(--estate-dark); }

/* ---- NO HOMES ---- */
.estate-no-homes {
    text-align: center;
    padding: 80px 20px;
    color: #888;
    font-size: 1.1rem;
}
.estate-no-homes a { color: var(--estate-gold); }

/* ============================================================
   SINGLE HOME PAGE
   ============================================================ */

.estate-single-wrap { max-width: 100%; overflow-x: hidden; }

/* Hero */
.estate-single-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    max-height: 700px;
    overflow: hidden;
}
.estate-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.estate-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
}
.estate-hero-content {
    padding: 40px 48px;
    color: var(--estate-white);
}
.estate-single-title {
    font-family: var(--estate-font);
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin: 8px 0 6px;
    color: var(--estate-white);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.estate-single-address { color: rgba(255,255,255,0.8); font-size: 1rem; margin: 0 0 12px; }
.estate-single-price {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    color: var(--estate-gold);
    font-family: var(--estate-font);
}

/* Specs bar */
.estate-specs-bar {
    background: var(--estate-dark);
    padding: 20px 48px;
}
.estate-specs-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
}
.estate-spec-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 32px;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.estate-spec-item:last-child { border-right: none; }
.estate-spec-val { font-size: 1.5rem; font-weight: 700; color: var(--estate-gold); font-family: var(--estate-font); }
.estate-spec-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); margin-top: 2px; }

/* Main layout */
.estate-single-content {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    max-width: 1200px;
    margin: 48px auto;
    padding: 0 24px;
}

/* TABS */
.estate-tabs { margin-bottom: 40px; }
.estate-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
}
.estate-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all var(--estate-transition);
    text-transform: uppercase;
}
.estate-tab-btn.active,
.estate-tab-btn:hover { color: var(--estate-dark); border-bottom-color: var(--estate-gold); }

.estate-tab-panel { display: none; padding-top: 24px; }
.estate-tab-panel.active { display: block; }

/* Gallery */
.estate-gallery-main {}
.estate-gallery-featured {
    border-radius: var(--estate-radius);
    overflow: hidden;
    margin-bottom: 12px;
}
.estate-gallery-main-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}
.estate-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.estate-gallery-thumb {
    width: calc(20% - 7px);
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--estate-transition);
    border: 2px solid transparent;
}
.estate-gallery-thumb:hover,
.estate-gallery-thumb.active { opacity: 1; border-color: var(--estate-gold); }

/* 3D Tour embed */
.estate-tour-embed-wrap {
    width: 100%;
    border-radius: var(--estate-radius);
    overflow: hidden;
    background: var(--estate-dark);
}
.estate-tour-embed-wrap iframe {
    width: 100%;
    height: 520px;
    display: block;
    border: none;
}
.estate-tour-note { color: #888; font-size: 13px; margin-top: 8px; }

/* Video embed */
.estate-video-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--estate-radius);
    overflow: hidden;
}
.estate-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Floor plan */
.estate-floorplan-img {
    width: 100%;
    border-radius: var(--estate-radius);
    box-shadow: var(--estate-shadow);
}

/* Description */
.estate-single-description,
.estate-single-features {
    margin-top: 40px;
}
.estate-single-description h2,
.estate-single-features h2 {
    font-family: var(--estate-font);
    font-size: 1.5rem;
    color: var(--estate-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--estate-gold);
    display: inline-block;
}
.estate-single-description p { line-height: 1.8; color: var(--estate-text); }

/* Features list */
.estate-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.estate-features-list li {
    padding: 8px 0 8px 20px;
    position: relative;
    font-size: 14px;
    color: var(--estate-text);
    border-bottom: 1px solid #f0f0f0;
}
.estate-features-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--estate-gold);
    border-radius: 50%;
}

/* SIDEBAR */
.estate-single-sidebar { display: flex; flex-direction: column; gap: 24px; }
.estate-sidebar-box {
    background: var(--estate-white);
    border-radius: var(--estate-radius);
    padding: 28px;
    box-shadow: var(--estate-shadow);
    border-top: 3px solid var(--estate-gold);
}
.estate-price-box { background: var(--estate-dark); }
.estate-sidebar-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--estate-gold);
    font-family: var(--estate-font);
    margin-bottom: 8px;
}
.estate-sidebar-address { color: rgba(255,255,255,0.7); font-size: 13px; margin-top: 8px; }
.estate-price-box .estate-status-badge { position: static; display: inline-block; margin-bottom: 8px; }

.estate-sidebar-box h3 {
    font-family: var(--estate-font);
    font-size: 1.15rem;
    color: var(--estate-dark);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Inquiry form */
.estate-inquiry-form { display: flex; flex-direction: column; gap: 12px; }
.estate-form-group input,
.estate-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--estate-transition);
    box-sizing: border-box;
}
.estate-form-group input:focus,
.estate-form-group textarea:focus { outline: none; border-color: var(--estate-gold); }
.estate-form-group textarea { resize: vertical; }
.estate-inquiry-btn {
    padding: 13px;
    background: var(--estate-gold);
    color: var(--estate-white);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background var(--estate-transition);
    text-transform: uppercase;
}
.estate-inquiry-btn:hover { background: #9a7b43; }

/* Property details list */
.estate-details-list { list-style: none; padding: 0; margin: 0; }
.estate-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.estate-details-list li:last-child { border-bottom: none; }
.estate-details-list span { color: #888; }
.estate-details-list strong { color: var(--estate-dark); }

/* Back link */
.estate-back-link-wrap { max-width: 1200px; margin: 0 auto 60px; padding: 0 24px; }
.estate-back-link {
    color: var(--estate-gold);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: color var(--estate-transition);
}
.estate-back-link:hover { color: var(--estate-dark); }

/* ============================================================
   LIGHTBOX OVERLAY
   ============================================================ */
.estate-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.estate-lightbox-overlay.active { opacity: 1; pointer-events: all; }
.estate-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
.estate-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
}
.estate-lightbox-prev,
.estate-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 28px;
    padding: 16px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.estate-lightbox-prev:hover,
.estate-lightbox-next:hover { background: rgba(255,255,255,0.25); }
.estate-lightbox-prev { left: 20px; }
.estate-lightbox-next { right: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .estate-single-content { grid-template-columns: 1fr; }
    .estate-single-sidebar { order: -1; }
    .estate-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .estate-cols-3,
    .estate-cols-2,
    .estate-cols-4 { grid-template-columns: 1fr; }

    .estate-single-hero { height: 50vw; min-height: 280px; }
    .estate-hero-content { padding: 24px; }
    .estate-specs-bar { padding: 16px 24px; }
    .estate-spec-item { padding: 0 16px; }
    .estate-spec-val { font-size: 1.2rem; }
    .estate-features-list { grid-template-columns: 1fr; }
    .estate-gallery-thumb { width: calc(25% - 6px); }
    .estate-tour-embed-wrap iframe { height: 300px; }
    .estate-filter-form { flex-direction: column; }
    .estate-filter-bar { flex-direction: column; align-items: stretch; }
    .estate-filter-count { text-align: center; }
    .estate-tab-btn { padding: 10px 14px; font-size: 12px; }
}
