/* VenturePhilly Listings - Frontend Styles
   Brand: Astra + Elementor Pro
   Colors: #C0392B (red), #1a1a2e (dark), #4a5568 (slate)
*/

/* =====================
   Grid & Layout
   ===================== */
.vp-listing-grid-wrap { width: 100%; }

.vp-listing-grid {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}
.vp-cols-1 { grid-template-columns: 1fr; }
.vp-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.vp-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .vp-cols-3,
    .vp-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .vp-listing-grid { grid-template-columns: 1fr !important; }
}

/* =====================
   Filter Bar
   ===================== */
.vp-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
}

.vp-filter-bar select {
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    min-width: 150px;
}

.vp-filter-bar select:focus {
    outline: none;
    border-color: #C0392B;
}

/* =====================
   Cards
   ===================== */
.vp-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.vp-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Card Image */
.vp-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #e8eaf0;
}

.vp-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vp-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e8eaf0 100%);
    font-size: 48px;
}
.vp-placeholder-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 6px 14px;
    border: 1px solid #e0e3ea;
    border-radius: 20px;
    background: rgba(255,255,255,0.7);
}

/* Off-Market image treatment */
.vp-card-img-om {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eaf0;
    position: relative;
}

.vp-lock-icon {
    font-size: 40px;
    opacity: 0.4;
}

.vp-om-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(74,85,104,0.7) 0%, transparent 100%);
    display: flex;
    gap: 12px;
}

.vp-om-overlay span {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}

/* Badges */
.vp-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.vp-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.vp-badge-cs { background: #C0392B; color: #fff; }
.vp-badge-om { background: #4a5568; color: #fff; }
.vp-badge-type { background: rgba(255,255,255,0.92); color: #333; }

/* Card Body */
.vp-card-body { padding: 16px; }

.vp-card-price {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.vp-card-address {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

/* Stats Row */
.vp-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
}

.vp-stat {
    font-size: 12px;
    color: #555;
}

/* Card Footer */
.vp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.vp-agent-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.vp-agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8edf5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #4a5568;
}

.vp-btn-details {
    font-size: 12px;
    font-weight: 600;
    color: #C0392B;
    border: 1.5px solid #C0392B;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
}

.vp-btn-details:hover {
    background: #C0392B;
    color: #fff;
}

/* Off-Market access note */
.vp-om-access-note {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* OM card spacer — keeps agent chip aligned with CS card which has a stats row */
.vp-card-om .vp-card-address {
    margin-bottom: 0;
}
.vp-card-om .vp-om-spacer {
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

/* =====================
   Lead Capture Forms
   ===================== */
.vp-lead-form {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.vp-form-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.vp-form-subtitle {
    font-size: 11px;
    color: #888;
    margin-bottom: 10px;
}

.vp-form-fields {
    width: 100%;
    box-sizing: border-box;
}

.vp-form-fields input[type="text"],
.vp-form-fields input[type="email"],
.vp-form-fields input[type="tel"] {
    width: 100%;
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
    color: #333;
    margin-bottom: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.vp-form-fields input:focus {
    outline: none;
    border-color: #C0392B;
    background: #fff;
}

.vp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.vp-submit-btn {
    width: 100%;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 4px;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.vp-submit-btn:hover { opacity: 0.9; }
.vp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.vp-btn-cs,
button.vp-btn-cs,
.vp-submit-btn.vp-btn-cs,
.vp-lead-form .vp-btn-cs,
.vp-lead-form button.vp-btn-cs { background: #C0392B !important; color: #fff !important; border: none !important; }

.vp-btn-om,
button.vp-btn-om,
.vp-submit-btn.vp-btn-om,
.vp-lead-form .vp-btn-om,
.vp-lead-form button.vp-btn-om { background: #4a5568 !important; color: #fff !important; border: none !important; }

/* Form Messages */
.vp-form-message {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.vp-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vp-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =====================
   No Listings State
   ===================== */
.vp-no-listings {
    text-align: center;
    padding: 48px 24px;
    color: #888;
    font-size: 15px;
}

/* =====================
   Single Listing Detail Page
   ===================== */
.vp-listing-detail { max-width: 1100px; margin: 0 auto; }
.vp-listing-detail .vp-lead-form { max-width: 480px; }

/* -------------------------------------------------------
   Detail page hero placeholder — fires when no featured
   image is set on the listing (body.vp-no-thumbnail).
   Targets the first stretched full-width section which
   Elementor uses as the hero background via Featured Image
   dynamic tag.
------------------------------------------------------- */
body.vp-no-thumbnail .elementor-section-stretched:first-of-type {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA4MDAgNTAwIj4KICA8ZGVmcz4KICAgIDxsaW5lYXJHcmFkaWVudCBpZD0iYmciIHgxPSIwIiB5MT0iMCIgeDI9IjEiIHkyPSIxIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2YwZjJm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bGw9IiM5Y2EzYWYiIHRleHQtYW5jaG9yPSJtaWRkbGUiPlBIT1RPIENPTUlORyBTT09OPC90ZXh0Pgo8L3N2Zz4=") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
