
/*
 * BestPropertyPlug — Project Search Mobile Card Refinement V3.8.5
 *
 * Focused polish on top of V3.8.2 + V3.8.3 + V3.8.4:
 * 1) true centered metric columns
 * 2) smaller View Details pill
 * 3) slightly tighter project titles
 * 4) shallower price footer
 *
 * Mobile: 2 columns preserved
 * Tablet portrait: 2 columns preserved
 * Tablet landscape: 3 columns preserved
 * Desktop >=1200px: unchanged
 */

/* =========================================================
   MOBILE — FINAL CARD REFINEMENT
   ========================================================= */
@media (max-width: 767px) {

    /* -----------------------------------------------------
       1. TRUE CENTERED METRIC COLUMNS
       ----------------------------------------------------- */
    html body .bppp2-card .bppp2-stats,
    html body .bppp2-card .bppp2-meta,
    html body .bppp2-card [class*="stats"] {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        justify-items: stretch !important;
        gap: 0 !important;

        width: auto !important;
        margin: 0 8px 6px !important;
        padding: 7px 3px !important;

        border: 1px solid #dce9e2 !important;
        border-radius: 10px !important;
        background: #f5faf7 !important;
    }

    html body .bppp2-card .bppp2-stats > *,
    html body .bppp2-card .bppp2-meta > *,
    html body .bppp2-card [class*="stats"] > * {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 3px !important;

        text-align: center !important;
        line-height: 1 !important;

        border-left: 1px solid transparent !important;
    }

    /* subtle separators between metrics */
    html body .bppp2-card .bppp2-stats > * + *,
    html body .bppp2-card .bppp2-meta > * + *,
    html body .bppp2-card [class*="stats"] > * + * {
        border-left-color: #e4eee9 !important;
    }

    /* icon: small and visually secondary */
    html body .bppp2-card .bppp2-stats svg,
    html body .bppp2-card .bppp2-meta svg,
    html body .bppp2-card [class*="stats"] svg,
    html body .bppp2-card .bppp2-stats i,
    html body .bppp2-card .bppp2-meta i,
    html body .bppp2-card [class*="stats"] i {
        display: block !important;
        flex: 0 0 auto !important;

        width: 11px !important;
        height: 11px !important;
        max-width: 11px !important;
        max-height: 11px !important;

        margin: 0 0 2px !important;
        padding: 0 !important;

        font-size: 11px !important;
        line-height: 11px !important;
    }

    /* number/value */
    html body .bppp2-card .bppp2-stats strong,
    html body .bppp2-card .bppp2-meta strong,
    html body .bppp2-card [class*="stats"] strong,
    html body .bppp2-card .bppp2-stats b,
    html body .bppp2-card .bppp2-meta b,
    html body .bppp2-card [class*="stats"] b {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        color: #17362b !important;
        font-size: 9px !important;
        line-height: 1.05 !important;
        font-weight: 800 !important;

        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    /* metric label */
    html body .bppp2-card .bppp2-stats small,
    html body .bppp2-card .bppp2-meta small,
    html body .bppp2-card [class*="stats"] small {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;

        margin: 2px 0 0 !important;
        padding: 0 !important;

        color: #87958e !important;
        font-size: 6.6px !important;
        line-height: 1.05 !important;
        font-weight: 500 !important;

        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        text-align: center !important;
    }

    /* -----------------------------------------------------
       2. SMALLER VIEW DETAILS PILL
       ----------------------------------------------------- */
    html body .bppp2-card .bpp-v383-view-details {
        right: 6px !important;
        bottom: 6px !important;

        min-height: 22px !important;
        padding: 4px 6px !important;
        gap: 3px !important;

        border-radius: 999px !important;

        font-size: 6.9px !important;
        line-height: 1 !important;
        font-weight: 800 !important;

        box-shadow: 0 4px 12px rgba(8, 44, 30, .13) !important;
    }

    html body .bppp2-card .bpp-v383-view-details::after {
        font-size: 7.5px !important;
        line-height: 1 !important;
    }

    /* slightly smaller wishlist control too */
    html body .bppp2-card [class*="wishlist"],
    html body .bppp2-card [class*="favorite"],
    html body .bppp2-card [class*="heart"],
    html body .bppp2-card button[aria-label*="favorite" i],
    html body .bppp2-card button[aria-label*="wishlist" i] {
        transform: scale(.62) !important;
        transform-origin: top right !important;
    }

    /* -----------------------------------------------------
       3. TIGHTER PROJECT TITLES
       ----------------------------------------------------- */
    html body .bppp2-card h3,
    html body .bppp2-card h4,
    html body .bppp2-card .bppp2-title {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;

        min-height: 26px !important;
        max-height: 27px !important;

        margin: 7px 8px 3px !important;

        font-size: 9.4px !important;
        line-height: 1.35 !important;
        font-weight: 800 !important;
        letter-spacing: -.012em !important;

        overflow: hidden !important;
    }

    html body .bppp2-card .bppp2-location,
    html body .bppp2-card [class*="location"] {
        margin: 0 8px 6px !important;
        font-size: 8.2px !important;
        line-height: 1.15 !important;
    }

    /* -----------------------------------------------------
       4. SHALLOWER PRICE FOOTER
       ----------------------------------------------------- */
    html body .bppp2-card .bppp2-price {
        width: auto !important;
        min-width: 0 !important;

        margin: auto 8px 7px !important;
        padding-top: 5px !important;

        border-top: 1px solid #edf3f0 !important;
    }

    html body .bppp2-card .bppp2-price small {
        display: block !important;
        margin: 0 0 2px !important;

        color: #7e8d85 !important;
        font-size: 7px !important;
        line-height: 1.05 !important;
        font-weight: 600 !important;
    }

    html body .bppp2-card .bppp2-price strong {
        display: block !important;
        width: 100% !important;

        margin: 0 !important;

        color: #17362b !important;
        font-size: 7.8px !important;
        line-height: 1.22 !important;
        font-weight: 800 !important;

        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* Slightly reduce overall card vertical rhythm */
    html body .bppp2-card {
        min-height: 0 !important;
    }
}

/* =========================================================
   NARROW PHONES — STILL 2 COLUMNS
   ========================================================= */
@media (max-width: 390px) {
    html body .bppp2-card .bppp2-stats,
    html body .bppp2-card .bppp2-meta,
    html body .bppp2-card [class*="stats"] {
        padding: 6px 2px !important;
    }

    html body .bppp2-card .bppp2-stats > *,
    html body .bppp2-card .bppp2-meta > *,
    html body .bppp2-card [class*="stats"] > * {
        padding: 0 2px !important;
    }

    html body .bppp2-card .bppp2-stats svg,
    html body .bppp2-card .bppp2-meta svg,
    html body .bppp2-card [class*="stats"] svg {
        width: 10px !important;
        height: 10px !important;
        max-width: 10px !important;
        max-height: 10px !important;
    }

    html body .bppp2-card .bppp2-stats strong,
    html body .bppp2-card .bppp2-meta strong,
    html body .bppp2-card [class*="stats"] strong {
        font-size: 8.3px !important;
    }

    html body .bppp2-card .bppp2-stats small,
    html body .bppp2-card .bppp2-meta small,
    html body .bppp2-card [class*="stats"] small {
        font-size: 6.2px !important;
    }

    html body .bppp2-card .bpp-v383-view-details {
        min-height: 21px !important;
        padding: 4px 5px !important;
        font-size: 6.5px !important;
    }

    html body .bppp2-card h3,
    html body .bppp2-card h4,
    html body .bppp2-card .bppp2-title {
        min-height: 25px !important;
        max-height: 26px !important;
        font-size: 9px !important;
    }

    html body .bppp2-card .bppp2-price strong {
        font-size: 7.4px !important;
    }
}

/* =========================================================
   TABLET POLISH — KEEP CURRENT BREAKPOINTS
   ========================================================= */
@media (min-width: 768px) and (max-width: 1023px) {
    html body .bppp2-card .bppp2-stats,
    html body .bppp2-card .bppp2-meta,
    html body .bppp2-card [class*="stats"] {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0 !important;
    }

    html body .bppp2-card .bppp2-stats > *,
    html body .bppp2-card .bppp2-meta > *,
    html body .bppp2-card [class*="stats"] > * {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 0 7px !important;
    }

    html body .bppp2-card .bppp2-stats svg,
    html body .bppp2-card .bppp2-meta svg,
    html body .bppp2-card [class*="stats"] svg {
        width: 13px !important;
        height: 13px !important;
        margin-bottom: 3px !important;
    }

    html body .bppp2-card .bppp2-stats strong,
    html body .bppp2-card .bppp2-meta strong,
    html body .bppp2-card [class*="stats"] strong {
        font-size: 10px !important;
    }

    html body .bppp2-card .bppp2-stats small,
    html body .bppp2-card .bppp2-meta small,
    html body .bppp2-card [class*="stats"] small {
        margin-top: 2px !important;
        font-size: 7.5px !important;
    }

    html body .bppp2-card .bpp-v383-view-details {
        min-height: 27px !important;
        padding: 6px 8px !important;
        font-size: 8px !important;
    }

    html body .bppp2-card .bppp2-price {
        padding-top: 6px !important;
        margin-bottom: 9px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    html body .bppp2-card .bppp2-stats,
    html body .bppp2-card .bppp2-meta,
    html body .bppp2-card [class*="stats"] {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    html body .bppp2-card .bppp2-stats > *,
    html body .bppp2-card .bppp2-meta > *,
    html body .bppp2-card [class*="stats"] > * {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

/* Desktop >= 1200px intentionally untouched. */
