/* ========================================
   MUDAH.MY DESIGN - COMPLETE STYLING
   Version: 2.0.0 - CORRECTED
   ======================================== */

:root {
    /* Mudah.my Color Palette */
    --primary: #E31E24;
    --orange: #F39200;
    --green: #00B050;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --bg-light: #F5F5F5;
    --border: #E0E0E0;
}

/* This file is enqueued on every page (mudah-listing-theme.php) but none
   of its class names are emitted by any template or render function --
   it's dead for layout. Three rules below DID leak site-wide though:
   a global `*` reset, a body font-family fighting the real Open Sans
   every template actually uses, and a `.container{max-width:1200px}`
   that conflicts with the live 1280px content width every template's
   own layout math assumes (see e.g. listing-page.php's own comment on
   its `.mlp-projects` rule). Removed per Figma-fidelity audit,
   2026-08-09 -- verified all 4 pages unaffected at 1440px and 375px
   after removal. The rest of the file is left in place; deleting it
   entirely is a lower-risk follow-up once nothing else is confirmed to
   depend on it. */

/* ========================================
   HEADER & BREADCRUMB
   ======================================== */

/* .mudah-header/-h1/-p removed 2026-08-29: dead here (no template in this
   plugin ever emits the class), but it collided with the THEME's real
   sitewide <header class="mudah-header">, so this stylesheet -- enqueued
   on every page -- was stamping 40px/20px padding, a gradient background
   and a border onto the real site header on every page, including car
   spec pages. Confirmed by Ajay 2026-08-28. This is the full removal the
   2026-08-09 comment above flagged as a safe follow-up once something
   was confirmed to depend on it being gone -- this incident is that
   confirmation. */

.filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   DEVELOPER CAROUSEL SECTION
   ======================================== */

.mudah-carousel-section {
    padding: 40px 20px;
    background: white;
}

.mudah-carousel-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-dark);
}

.developer-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dev-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
}

.dev-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.dev-logo {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.dev-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.dev-usp {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 40px;
}

.view-all-btn {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.view-all-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: white;
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    padding: 40px 20px;
    background: var(--bg-light);
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ========================================
   ALL PROJECTS SECTION
   ======================================== */

.all-projects-heading {
    font-size: 28px;
    font-weight: 700;
    padding: 40px 20px 20px;
    color: var(--text-dark);
}

.mudah-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    padding: 20px;
    margin-bottom: 40px;
}

/* ========================================
   PROJECT CARD
   ======================================== */

.mudah-project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mudah-project-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
}

.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge[data-status="in-progress"],
.status-badge[data-status="under construction"] {
    background: var(--orange);
    color: white;
}

.status-badge[data-status="completed"],
.status-badge[data-status="ready"] {
    background: var(--green);
    color: white;
}

/* ========================================
   CARD CONTENT
   ======================================== */

.card-content {
    padding: 24px;
}

.project-header {
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.project-developer {
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.verified-badge {
    color: var(--green);
    font-weight: bold;
}

.project-location {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.benefits-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.benefit-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.benefit-badge.overflow {
    background: var(--primary);
    color: white;
}

.project-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.project-price-sqft {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.unit-info {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-gray);
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-bottom: 16px;
}

.unit-info span {
    display: flex;
    align-items: center;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.view-project-btn,
.view-developer-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-project-btn {
    background: var(--primary);
    color: white;
}

.view-project-btn:hover {
    background: #C41820;
}

.view-developer-btn {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.view-developer-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   PAGINATION
   ======================================== */

.mudah-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .mudah-listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .developer-carousel {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .mudah-listings-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .developer-carousel {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .dev-card {
        padding: 20px 16px;
    }

    .features-section {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .unit-info {
        flex-direction: column;
        gap: 8px;
    }

    .card-actions {
        flex-direction: column;
    }

    .all-projects-heading {
        font-size: 22px;
        padding: 30px 16px 16px;
    }
}

@media (max-width: 480px) {
    .filters {
        gap: 8px;
    }

    .filter-chip {
        padding: 8px 12px;
        font-size: 12px;
    }

    .mudah-carousel-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .mudah-listings-grid {
        grid-template-columns: 1fr;
    }

    .developer-carousel {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}
/* =========================================================
   Shared card atoms — used by mlp_render_project_card() on both
   the Listing page and the Developer Microsite, so they live here
   rather than being duplicated into each template's inline <style>.
   ========================================================= */

/* Visually hidden, still read aloud. Figma's card shows bed/bath as a
   bare "2+" next to the icon with no unit word (nodes 5428:2600/2614);
   this restores that word for screen readers only, so matching the
   design doesn't cost the card its accessible meaning. */
.mlp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Real location pin (node 5428:2569), replacing the 📍 emoji. Figma
   draws it 10.5x15 inside an 18x18 icon box; height is what's fixed,
   width follows the aspect ratio. */
.mlp-loc-icon {
    width: auto;
    height: 15px;
    flex-shrink: 0;
    vertical-align: -2px;
}

/* Verified developer mark (node 5428:2556) — 14x14.25 in Figma, and
   now a real asset rather than a U+2713 glyph, so the old
   `color`/`font-weight` styling no longer applies to it. */
img.mlp-verified {
    width: 14px;
    height: auto;
    flex-shrink: 0;
    vertical-align: -2px;
}
