/**
 * Dokan Real Estate – Frontend Styles
 */

/* ── Property card grid ────────────────────────────────────────────────────── */
.dre-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.dre-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: box-shadow .2s, transform .2s;
}
.dre-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.dre-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}
.dre-card-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.dre-card:hover .dre-card-img-wrap img {
    transform: scale(1.04);
}

/* Taxonomy badges */
.dre-badge {
    position: absolute;
    top: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
    color: #fff;
}
.dre-badge-status { left: 12px;  background: #0073aa; }
.dre-badge-type   { right: 12px; background: rgba(0,0,0,.55); }

/* Card body */
.dre-card-body { padding: 16px; }

.dre-card-title {
    margin: 0 0 6px;
    font-size: 16px;
}
.dre-card-title a {
    text-decoration: none;
    color: #1a1a1a;
}
.dre-card-title a:hover { color: #0073aa; }

.dre-card-address {
    margin: 0 0 10px;
    color: #777;
    font-size: 13px;
}

.dre-card-price {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}
.dre-card-price small {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.dre-card-specs {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #555;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

/* ── Search form ────────────────────────────────────────────────────────────── */
.dre-search-form {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 32px;
}
.dre-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}
.dre-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #444;
}
.dre-field input,
.dre-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.dre-field input:focus,
.dre-field select:focus {
    border-color: #0073aa;
    outline: none;
}

.dre-search-actions {
    margin-top: 20px;
    text-align: center;
}
.dre-clear-link {
    margin-left: 12px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}
.dre-clear-link:hover { color: #0073aa; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.dre-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s, opacity .15s;
}
.dre-btn-primary   { background: #0073aa; color: #fff; }
.dre-btn-primary:hover { background: #005f8d; color: #fff; }
.dre-btn-secondary { background: #6c757d; color: #fff; }
.dre-btn-secondary:hover { opacity: .85; }

/* ── Enquiry form ───────────────────────────────────────────────────────────── */
.dre-enquiry-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #eee;
}
.dre-enquiry-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}
.dre-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .15s;
}
.dre-input:focus { border-color: #0073aa; outline: none; }
.dre-success { color: #2a7d2a; font-weight: 600; font-size: 16px; padding: 12px 0; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.dre-pagination { margin-top: 40px; text-align: center; }
.dre-pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 3px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}
.dre-pagination .page-numbers.current { background: #0073aa; color: #fff; border-color: #0073aa; }
.dre-pagination .page-numbers:hover   { background: #f0f0f0; }

/* ── No results ─────────────────────────────────────────────────────────────── */
.dre-no-results { padding: 20px; background: #f9f9f9; border-radius: 8px; color: #666; }
.dre-no-results-block {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    color: #666;
    font-size: 17px;
}
.dre-results-header { margin-top: 30px; margin-bottom: 20px; }

/* ── Map shortcode ──────────────────────────────────────────────────────────── */
.dre-map-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }

.dre-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    background: #f8f9fa;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.dre-map-geocoder { flex: 1; min-width: 280px; }
.dre-map-input,
.dre-map-select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    height: 44px;
    min-width: 160px;
    background: #fff;
}

.dre-map-body {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.dre-map-canvas { flex: 2; min-width: 500px; }
#properties-map { height: 620px; border-radius: 12px; border: 1px solid #ddd; }

.dre-map-list { flex: 1; min-width: 360px; max-width: 460px; }
#properties-list { max-height: 620px; overflow-y: auto; padding-right: 6px; }

.dre-map-card {
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow .15s;
}
.dre-map-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.dre-map-card img  { width: 100%; height: 150px; object-fit: cover; display: block; }
.dre-map-card-body { padding: 12px; }
.dre-map-card h4   { margin: 0 0 6px; font-size: 15px; }
.dre-map-card p    { margin: 0 0 6px; font-size: 13px; color: #666; }
.dre-map-price     { font-size: 17px !important; font-weight: 700; color: #0073aa !important; }

/* Map marker */
.dre-map-marker {
    width: 26px;
    height: 26px;
    background: #0073aa;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.35);
    cursor: pointer;
    transition: transform .15s;
}
.dre-map-marker:hover { transform: scale(1.2); }

/* Map popup */
.dre-map-popup img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
.dre-map-popup h4  { margin: 0 0 6px; font-size: 15px; }
.dre-map-popup p   { margin: 0 0 8px; font-size: 13px; color: #555; }
.dre-map-popup .dre-btn { display: block; text-align: center; margin-top: 10px; }

/* ── Single property template ───────────────────────────────────────────────── */
.dre-single-property { max-width: 1200px; margin: 40px auto; padding: 0 20px; }

@media (max-width: 768px) {
    .dre-listings-grid  { grid-template-columns: 1fr; }
    .dre-search-grid    { grid-template-columns: 1fr; }
    .dre-map-body       { flex-direction: column; }
    .dre-map-canvas,
    .dre-map-list       { min-width: 100%; max-width: 100%; }
    .dre-map-filters    { gap: 10px; }
}

/* ── Vendor form address autocomplete dropdown ──────────────────────────────── */
.dre-ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
}
.dre-ac-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
}
.dre-ac-item:last-child { border-bottom: none; }
.dre-ac-item:hover { background: #f0f7ff; color: #0073aa; 
}

