/* ==========================================================================
   KMJ listing UX layer — single property pages and listing archives.
   Loaded after the child stylesheet (see inc/kmj-property-ux.php).
   ========================================================================== */

:root {
    --kmjx-ink: #14110f;
    --kmjx-text: #45403b;
    --kmjx-muted: #6f6861;
    --kmjx-line: #ebe7e1;
    --kmjx-soft: #f6f4f0;
    --kmjx-burgundy: #14110f;   /* 2026-11 refresh: ink, not burgundy */
    --kmjx-gold: #ebe7e1;
    --kmjx-gold-deep: #6f6861;
    --kmjx-radius: 14px;
    --kmjx-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --kmjx-display: var(--kmj-display, "Bebas Neue", "Arial Narrow", sans-serif);
}

/* ---------- Header: breadcrumb, context chips, title ---------- */
.single-property .property-wrap,
.single-property .property-wrap p,
.single-property .property-wrap li {
    font-family: var(--kmjx-sans);
}

.single-property .breadcrumb {
    font-size: 13px;
    margin-bottom: 0.5rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.single-property .breadcrumb .breadcrumb-item,
.single-property .breadcrumb .breadcrumb-item::before,
.single-property .breadcrumb .breadcrumb-item i {
    color: var(--kmjx-muted) !important;
}

.single-property .breadcrumb a {
    color: var(--kmjx-text) !important;
    text-decoration: none;
}

.single-property .breadcrumb a:hover {
    color: var(--kmjx-burgundy) !important;
    text-decoration: underline;
}

.single-property .breadcrumb .breadcrumb-item.active {
    color: var(--kmjx-ink) !important;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* "Business Bay · Amali Residences · Developer" — was pale gold text on white. */
.kmj-listing-context {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0;            /* hides the " · " text separators */
    line-height: 1;
    margin: 0.25rem 0 1rem !important;
}

.kmj-listing-context a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    font-family: var(--kmjx-sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--kmjx-burgundy) !important;
    background: var(--kmjx-soft);
    border: 1px solid var(--kmjx-line);
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.kmj-listing-context a:hover {
    background: #fff;
    border-color: var(--kmjx-burgundy);
}

@media (max-width: 767.98px) {
    .kmj-listing-context {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin: 12px 0 !important;
        padding: 0 12px 2px;
    }
    .kmj-listing-context::-webkit-scrollbar {
        display: none;
    }
}

.single-property .page-title-wrap h1 {
    color: var(--kmjx-ink);
    letter-spacing: 0.01em;
}

.single-property .property-address,
.single-property .item-address {
    color: var(--kmjx-muted) !important;
    font-size: 14px;
}

/* ---------- Hero for listings with only a featured image ---------- */
.kmj-hero-single {
    margin: 0 0 1.5rem;
    border-radius: var(--kmjx-radius);
    overflow: hidden;
    background: var(--kmjx-soft);
}

.kmj-hero-single__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 8;
    max-height: 480px;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .kmj-hero-single-container {
        padding: 0;
    }
    .kmj-hero-single {
        border-radius: 0;
        margin-bottom: 0;
    }
    .kmj-hero-single__img {
        aspect-ratio: 4 / 3;
    }
}

/* ---------- Section cards: lighter frames, more air ---------- */
.single-property .property-section-wrap .block-wrap {
    border: 1px solid var(--kmjx-line) !important;
    border-radius: var(--kmjx-radius) !important;
    box-shadow: none !important;
    padding: 28px 32px !important;
    margin-bottom: 20px !important;
}

.single-property .property-section-wrap .block-title-wrap {
    border-bottom: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 18px !important;
}

.single-property .property-section-wrap .block-title-wrap h2 {
    font-family: var(--kmjx-display) !important;
    font-size: 26px !important;
    letter-spacing: 0.02em;
    color: var(--kmjx-ink) !important;
    margin: 0;
}

@media (max-width: 767.98px) {
    .single-property .property-section-wrap .block-wrap {
        border-radius: 0 !important;
        border-width: 0 0 1px !important;
        padding: 24px 16px !important;
        margin-bottom: 0 !important;
    }
    .single-property .property-section-wrap .block-title-wrap h2 {
        font-size: 24px !important;
    }
}

/* ---------- Overview: one clean fact grid ---------- */
.single-property .kmj-overview-dev-tag {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--kmjx-muted);
    font-weight: 600;
    font-size: 13px;
}

.single-property .kmj-overview-cards .kmj-ov-tile {
    background: var(--kmjx-soft);
    border: 0;
    border-radius: 12px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
}

/* Price first: it is what most visitors look for. */
.single-property .kmj-overview-cards .col:has(.highlight-tile) {
    order: -1;
}

.single-property .kmj-overview-cards .kmj-ov-tile:hover {
    box-shadow: none;
}

.single-property .kmj-overview-cards .kmj-ov-icon {
    font-size: 20px;
    margin-top: 2px;
    color: var(--kmjx-gold-deep);
}

.single-property .kmj-overview-cards .kmj-ov-content {
    flex-direction: column-reverse;   /* label above value */
    gap: 3px;
}

.single-property .kmj-overview-cards .kmj-ov-lbl {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: var(--kmjx-muted);
    margin: 0;
}

.single-property .kmj-overview-cards .kmj-ov-val {
    font-size: 15px;
    color: var(--kmjx-ink);
}

/* The price tile leads: solid burgundy. */
.single-property .kmj-overview-cards .kmj-ov-tile.highlight-tile {
    background: var(--kmjx-burgundy);
}

.single-property .kmj-overview-cards .highlight-tile .kmj-ov-icon,
.single-property .kmj-overview-cards .highlight-tile .kmj-ov-lbl {
    color: var(--kmjx-gold);
}

.single-property .kmj-overview-cards .kmj-ov-val.highlight-val {
    color: #fff;
}

.single-property .kmj-overview-cards .kmj-ov-sub {
    order: -1;                       /* sits under the value (column-reverse) */
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
}

.single-property .kmj-map-card {
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.single-property .kmj-map-meta {
    font-size: 13px;
    color: var(--kmjx-text);
}

@media (max-width: 767.98px) {
    .single-property .kmj-overview-cards {
        --bs-gutter-x: 10px;
        --bs-gutter-y: 10px;
    }
    .single-property .kmj-overview-cards .kmj-ov-tile {
        padding: 12px;
    }
    .single-property .kmj-overview-cards .kmj-ov-val {
        font-size: 14px;
    }
    .single-property .kmj-map-card #houzez-overview-listing-map {
        height: 180px;
    }
}

/* ---------- Description: clamped with "Read more" ---------- */
.single-property .description-content {
    font-size: 15px;
    line-height: 1.7;
    color: var(--kmjx-text);
}

.single-property .description-content.kmj-clamped {
    max-height: 9.5em;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 60%, transparent);
    mask-image: linear-gradient(#000 60%, transparent);
}

.kmj-read-more,
.kmj-detail-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 6px;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    font-family: var(--kmjx-sans);
    font-size: 14px;
    font-weight: 700;
    color: var(--kmjx-burgundy);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* ---------- Details: closed by default (it repeats the overview) ---------- */
.single-property .kmj-detail-updated {
    color: var(--kmjx-muted);
}

.single-property #property-detail-wrap.kmj-detail-collapsed .block-content-wrap {
    display: none;
}

.single-property #property-detail-wrap.kmj-detail-collapsed .block-title-wrap {
    margin-bottom: 4px !important;
}

.single-property .detail-wrap {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

.single-property .property-detail-wrap .kmj-detail-long .list-lined-item {
    flex-direction: column;
    gap: 4px;
}

.single-property .property-detail-wrap .kmj-detail-long .list-lined-item span {
    text-align: left;
    font-weight: 500;
}

/* ---------- Features: quiet chips ---------- */
.single-property #property-features-wrap li i {
    color: var(--kmjx-gold-deep);
}

.single-property #property-features-wrap li a {
    color: var(--kmjx-text);
}

@media (max-width: 767.98px) {
    .single-property #property-features-wrap li {
        margin-bottom: 0 !important;
    }
}

/* ---------- Section nav ---------- */
.single-property .property-navigation-wrap {
    border-bottom: 1px solid var(--kmjx-line);
    box-shadow: none;
}

.single-property .property-navigation-wrap a {
    color: var(--kmjx-text);
    font-weight: 600;
}

.single-property .property-navigation-wrap a.active {
    box-shadow: inset 0 -2px var(--kmjx-burgundy) !important;
}

/* ---------- Listing archives ---------- */
body.archive .item-listing-wrap,
body.page-template-template-search .item-listing-wrap {
    font-family: var(--kmjx-sans);
}

body.archive .item-listing-wrap .item-address,
body.archive .item-listing-wrap .item-address a,
body.page-template-template-search .item-listing-wrap .item-address,
body.page-template-template-search .item-listing-wrap .item-address a {
    color: var(--kmjx-muted) !important;
}

body.archive .item-listing-wrap .item-address i,
body.page-template-template-search .item-listing-wrap .item-address i {
    color: var(--kmjx-gold-deep) !important;
}

body.archive .item-listing-wrap .label-status,
body.archive .item-listing-wrap .hz-label,
body.page-template-template-search .item-listing-wrap .label-status,
body.page-template-template-search .item-listing-wrap .hz-label {
    font-size: 12px !important;
    letter-spacing: 0.01em;
    padding: 5px 8px !important;
    line-height: 1 !important;
}

body.archive .item-listing-wrap .item-wrap,
body.page-template-template-search .item-listing-wrap .item-wrap {
    border-radius: var(--kmjx-radius);
    overflow: hidden;
}

/* ---------- Mobile first screen: photo, title and price above the contact bar ---------- */
@media (max-width: 767.98px) {
    /* Ad visitors land on one listing; the site search and the
       community/developer chips pushed the price under the sticky bar. */
    .single-property .advanced-search-nav.mobile-search-nav,
    .single-property .property-detail-v7 .kmj-listing-context {
        display: none !important;
    }

    .single-property .property-detail-v7 .property-banner > .d-block.d-md-none {
        height: 240px !important;
    }
    .single-property .property-detail-v7 .property-banner > .d-block.d-md-none .property-featured-image {
        object-fit: cover;
    }
    .kmj-hero-single__img {
        aspect-ratio: 16 / 10;
    }

    .single-property .mobile-property-title.block-wrap {
        padding: 16px 16px 4px !important;
    }
    .single-property .mobile-property-title .property-labels-wrap {
        flex-wrap: wrap;
    }
    .single-property .mobile-property-title > .d-flex.mb-3 {
        margin-bottom: 10px !important;
    }
    .single-property .page-title-mobile {
        font-size: 24px !important;
        line-height: 1.15 !important;
        text-wrap: balance;
    }
    .single-property .mobile-property-title .item-address {
        margin-bottom: 4px !important;
    }
    .single-property .mobile-property-title .item-price {
        margin-bottom: 0 !important;
    }
}
