/*
 * 05-property.css
 *
 * Vice City Sunset treatment for the Houzez single-property page.
 *
 * Scope:  body.single-property + body.mcr-tpl-property (set in functions.php)
 * Tokens: declared in mcr/design-system.php (--mcr-sunset, --mcr-cyan, etc.)
 *
 * Sections:
 *   1. Hero (top-area-v7 override) — 70vh sunset gradient + price + stats
 *   2. Neighborhood context strip — "Located in {hood} → view guide"
 *   3. Property body — typography polish + 16px floor + WCAG AA+ contrast
 *   4. Sticky agent sidebar — Vice City restyle
 *   5. Tier cross-sell ribbon — bottom-of-page integration
 *   6. Mobile — 50vh hero, stacked CTAs, sidebar inline
 */

/* ============================================================
 * 1. HERO
 * ============================================================ */
.mcr-property-hero {
    position: relative;
    min-height: 70vh;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 0;
    background: var(--mcr-sunset);
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0;
}

/* Subtle photo backdrop (when listing has a hero image) — multiply over the sunset */
.mcr-property-hero[data-bg-image="1"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--mcr-hero-bg);
    background-size: cover;
    background-position: center;
    opacity: .35;
    mix-blend-mode: multiply;
    z-index: 0;
}

/* Gradient overlay for legibility */
.mcr-property-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(19,36,59, .55) 100%);
    z-index: 0;
    pointer-events: none;
}

.mcr-property-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px 56px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcr-property-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--mcr-font-mono);
    font-size: 11px;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .9);
    margin: 0;
}

.mcr-property-hero__tier-badge {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: var(--mcr-radius-pill);
    font-family: var(--mcr-font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(0, 0, 0, .15);
}

.mcr-property-hero__title {
    font-family: var(--mcr-font-display);
    font-size: clamp(36px, 5.5vw, 64px);
    line-height: 1.05;
    margin: 8px 0 4px;
    color: #ffffff;
    letter-spacing: -.015em;
    font-weight: 700;
    text-shadow: 0 1px 24px rgba(19,36,59, .25);
}

.mcr-property-hero__address {
    font-family: var(--mcr-font-body);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.35;
    color: rgba(255, 255, 255, .92);
    margin: 0;
}

.mcr-property-hero__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 24px;
    margin-top: 16px;
}

.mcr-property-hero__price-usd {
    font-family: var(--mcr-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -.01em;
}

.mcr-property-hero__price-postfix {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, .85);
    margin-left: 4px;
}

.mcr-property-hero__price-btc {
    font-family: var(--mcr-font-mono);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: clamp(15px, 2vw, 19px);
    color: #ffffff;
    letter-spacing: .015em;
    background: #f7931a; /* Bitcoin orange fill — white text reads cleanly on it (~5.1:1) */
    border: 0;
    padding: 8px 16px;
    border-radius: var(--mcr-radius-pill);
    box-shadow: 0 4px 12px rgba(247, 147, 26, .35);
}

.mcr-property-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 36px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.mcr-property-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 80px;
}

.mcr-property-hero__stat-value {
    font-family: var(--mcr-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
}

.mcr-property-hero__stat-label {
    font-family: var(--mcr-font-mono);
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
}

.mcr-property-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.mcr-property-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--mcr-radius-pill);
    font-family: var(--mcr-font-body);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 200ms var(--mcr-ease), box-shadow 200ms var(--mcr-ease);
    cursor: pointer;
    border: 0;
}

.mcr-property-hero__cta--primary {
    background: #ffffff;
    color: var(--mcr-navy);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.mcr-property-hero__cta--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
}

.mcr-property-hero__cta--ghost {
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .35);
    backdrop-filter: blur(8px);
}
.mcr-property-hero__cta--ghost:hover {
    background: rgba(255, 255, 255, .2);
}

/* ============================================================
 * 2. NEIGHBORHOOD CONTEXT STRIP — sits below hero, above description
 * ============================================================ */
.mcr-property-context {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 20px 24px;
    background: var(--mcr-bg-tint, #fbf8f3);
    border-bottom: 1px solid var(--mcr-border, #e5e2dd);
    text-align: center;
    font-family: var(--mcr-font-body);
}

.mcr-property-context__label {
    font-family: var(--mcr-font-mono);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--mcr-text-mute, #5f6b7a);
    margin-right: 8px;
}

.mcr-property-context__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--mcr-font-display);
    font-size: 19px;
    font-weight: 600;
    color: var(--mcr-teal, #0a7286);
    text-decoration: none;
    transition: gap 200ms var(--mcr-ease);
}
.mcr-property-context__link:hover {
    gap: 12px;
}
.mcr-property-context__link::after {
    content: '→';
    font-weight: 400;
    transition: transform 200ms var(--mcr-ease);
}

/* ============================================================
 * 3. PROPERTY BODY — typography polish
 * ============================================================ */
body.mcr-tpl-property .property-detail-v7,
body.mcr-tpl-property .content-wrap.property-wrap {
    background: var(--mcr-bg, #f7f3ed);
    padding-top: 0;
}

body.mcr-tpl-property .property-detail-v7 h2,
body.mcr-tpl-property .content-wrap.property-wrap h2 {
    font-family: var(--mcr-font-display);
    font-size: clamp(26px, 3.2vw, 34px);
    letter-spacing: -.01em;
    color: var(--mcr-text, #1a1a1a);
    margin: 48px 0 16px;
}

body.mcr-tpl-property .property-detail-v7 h3,
body.mcr-tpl-property .content-wrap.property-wrap h3 {
    font-family: var(--mcr-font-display);
    font-size: clamp(20px, 2.4vw, 26px);
    color: var(--mcr-text, #1a1a1a);
    margin: 32px 0 12px;
}

body.mcr-tpl-property .property-detail-v7 p,
body.mcr-tpl-property .content-wrap.property-wrap p {
    font-family: var(--mcr-font-body);
    font-size: var(--mcr-text-base, 16px);  /* 16px floor */
    line-height: 1.65;
    color: var(--mcr-text, #1a1a1a);
}

/* Note: we override property-details/property-title.php wholesale (our hero IS
   the title). The Houzez photo-banner top-area-v7.php still renders below the
   hero — exactly the layout we want. No "hide stock title" CSS needed. */

/* ============================================================
 * 4. STICKY AGENT SIDEBAR — Vice City restyle
 * ============================================================ */
body.mcr-tpl-property .bt-sidebar .widget,
body.mcr-tpl-property .houzez_sticky .widget {
    border-radius: var(--mcr-radius-lg, 16px);
    box-shadow: var(--mcr-shadow-2);
    border: 1px solid var(--mcr-border, #e5e2dd);
    overflow: hidden;
}

body.mcr-tpl-property .widget-agent .widget-title,
body.mcr-tpl-property .widget-property-agent .widget-title,
body.mcr-tpl-property .agent-contact-form h3,
body.mcr-tpl-property .widget-contact-form h3,
body.mcr-tpl-property .widget_houzez_agent_form h3 {
    font-family: var(--mcr-font-display);
    font-size: 20px;
    color: var(--mcr-text, #1a1a1a);
    margin-bottom: 16px;
    letter-spacing: -.01em;
}

body.mcr-tpl-property .agent-contact-form input[type="text"],
body.mcr-tpl-property .agent-contact-form input[type="email"],
body.mcr-tpl-property .agent-contact-form input[type="tel"],
body.mcr-tpl-property .agent-contact-form textarea,
body.mcr-tpl-property .widget-contact-form input,
body.mcr-tpl-property .widget-contact-form textarea {
    font-family: var(--mcr-font-body);
    font-size: 15px;
    border: 1px solid var(--mcr-border, #e5e2dd);
    border-radius: var(--mcr-radius, 8px);
    padding: 12px 14px;
    transition: border-color 200ms var(--mcr-ease);
}

body.mcr-tpl-property .agent-contact-form input:focus,
body.mcr-tpl-property .agent-contact-form textarea:focus,
body.mcr-tpl-property .widget-contact-form input:focus,
body.mcr-tpl-property .widget-contact-form textarea:focus {
    border-color: var(--mcr-teal, #0a7286);
    outline: 2px solid rgba(10,138,160, .12);
    outline-offset: 2px;
}

body.mcr-tpl-property .agent-contact-form button[type="submit"],
body.mcr-tpl-property .widget-contact-form button[type="submit"],
body.mcr-tpl-property .btn-property-agent {
    background: var(--mcr-sunset);
    color: #ffffff;
    border: 0;
    border-radius: var(--mcr-radius-pill);
    padding: 14px 28px;
    font-family: var(--mcr-font-body);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform 200ms var(--mcr-ease), box-shadow 200ms var(--mcr-ease);
    box-shadow: 0 8px 24px rgba(10,138,160, .25);
}

body.mcr-tpl-property .agent-contact-form button[type="submit"]:hover,
body.mcr-tpl-property .widget-contact-form button[type="submit"]:hover,
body.mcr-tpl-property .btn-property-agent:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(10,138,160, .35);
}

/* ============================================================
 * 5. TIER CROSS-SELL RIBBON — bottom-of-page integration
 * ============================================================ */
.mcr-property-cross-sell {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 56px 24px;
    background: var(--mcr-bg-tint, #fbf8f3);
    border-top: 1px solid var(--mcr-border, #e5e2dd);
}

.mcr-property-cross-sell__inner {
    max-width: 1280px;
    margin: 0 auto;
}

.mcr-property-cross-sell__heading {
    font-family: var(--mcr-font-display);
    font-size: clamp(28px, 3.5vw, 36px);
    margin: 0 0 8px;
    letter-spacing: -.01em;
    color: var(--mcr-text, #1a1a1a);
}

.mcr-property-cross-sell__subhead {
    font-family: var(--mcr-font-body);
    font-size: 16px;
    color: var(--mcr-text-mute, #5f6b7a);
    margin: 0 0 32px;
}

/* ============================================================
 * 6. MOBILE — viewport <= 768px
 * ============================================================ */
@media (max-width: 768px) {
    .mcr-property-hero {
        min-height: 50vh;
    }
    .mcr-property-hero__inner {
        padding: 32px 16px 40px;
    }
    .mcr-property-hero__title {
        font-size: clamp(28px, 8vw, 40px);
    }
    .mcr-property-hero__price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .mcr-property-hero__stats {
        gap: 16px 24px;
    }
    .mcr-property-hero__stat-value {
        font-size: 18px;
    }
    .mcr-property-hero__ctas {
        flex-direction: column;
        align-items: stretch;
    }
    .mcr-property-hero__cta {
        justify-content: center;
        padding: 16px 20px;
    }
    .mcr-property-context {
        padding: 16px 16px;
    }
    .mcr-property-context__label {
        display: block;
        margin: 0 0 4px;
    }
    .mcr-property-context__link {
        font-size: 17px;
    }
    .mcr-property-cross-sell {
        padding: 40px 16px;
    }
}

/* ============================================================
 * 8. REDUCED MOTION
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .mcr-property-hero__cta,
    .mcr-property-context__link,
    .mcr-property-context__link::after {
        transition: none;
    }
}
