@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Root tokens ── */
.pw-detail-page {
    --pw-brand:        #000E22;
    --pw-brand-mid:    #034CB2;
    --pw-brand-light:  #2EA3F9;
    --pw-text-muted:   #7A7A7A;
    --pw-silver:       #F2F4F7;
    --pw-white:        #FFFFFF;
    --pw-green:        #3B6D11;
    --pw-green-bg:     #EAF3DE;
    --pw-border:       rgba(0,14,34,0.10);
    --pw-radius-sm:    8px;
    --pw-radius-md:    12px;
    --pw-radius-lg:    16px;
}

/* ── Fix WpResidence global SVG override ── */
.pw-detail-page svg {
    display: inline-block;
    flex-shrink: 0;
    width: auto;
    height: auto;
    max-width: none;
}
.pw-nav-back svg         { width: 16px !important; height: 16px !important; }
.pw-nav-btn svg          { width: 20px !important; height: 20px !important; }
.pw-prop-location svg    { width: 13px !important; height: 13px !important; }
.pw-agent-btn svg        { width: 17px !important; height: 17px !important; }
.pw-map-link svg         { width: 13px !important; height: 13px !important; }
.pw-amenity svg          { width: 14px !important; height: 14px !important; }
.pw-floor-thumb-placeholder svg { width: 18px !important; height: 18px !important; }
.pw-dev-logo-placeholder svg    { width: 22px !important; height: 22px !important; }
.pw-hero-placeholder svg        { width: 48px !important; height: 48px !important; }
.pw-wishlist-btn svg     { width: 20px !important; height: 20px !important; }

/* ── Page wrapper ── */
.pw-detail-page {
    font-family: 'DM Sans', sans-serif;
    color: var(--pw-brand);
    background: var(--pw-silver);
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow-x: hidden;
}

/* ── NAV BAR ── */
.pw-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--pw-white);
    border-bottom: 1px solid var(--pw-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.pw-nav-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--pw-text-muted);
    text-decoration: none;
}
.pw-nav-actions { display: flex; gap: 16px; }
.pw-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--pw-brand);
    padding: 0;
    display: flex;
    align-items: center;
}

/* ── HERO ── */
.pw-hero {
    position: relative;
    background: #ccc;
    overflow: hidden;
}
.pw-hero-main {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}
.pw-hero-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #d0d8e8 0%, #b8c4d8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pw-text-muted);
    font-size: 14px;
}
.pw-hero-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,14,34,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}
.pw-gallery-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    padding: 3px 16px 0;
}
.pw-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--pw-radius-sm);
    cursor: pointer;
}
.pw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-thumb-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #c8d2e4 0%, #aab8d0 100%); }
.pw-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,14,34,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--pw-radius-sm);
}

/* ── CONTENT ── */
.pw-content { padding: 0 16px; }

/* ── TITLE BLOCK ── */
.pw-title-block { padding: 16px 0 4px; }
.pw-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pw-pill {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(3,76,178,0.25);
    color: var(--pw-brand-mid);
    background: var(--pw-white);
}
.pw-pill-green { background: var(--pw-green-bg); border-color: transparent; color: var(--pw-green); }
.pw-pill-dark  { background: var(--pw-brand); border-color: transparent; color: #fff; }

.pw-prop-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--pw-brand);
    margin: 0 0 4px;
}
.pw-prop-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--pw-text-muted);
    margin-bottom: 14px;
}

/* ── STATS ── */
.pw-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.pw-stat { background: var(--pw-white); border-radius: var(--pw-radius-sm); padding: 12px 10px; text-align: center; }
.pw-stat-val {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--pw-brand);
    display: block;
    line-height: 1.2;
}
.pw-stat-key { font-size: 10px; color: var(--pw-text-muted); letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; display: block; }

/* ── PRICE BLOCK ── */
.pw-price-block {
    background: var(--pw-brand);
    border-radius: var(--pw-radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
}
.pw-price-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pw-brand-light); }
.pw-price-val { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 700; color: #fff; margin-top: 2px; }
.pw-price-badge {
    background: rgba(46,163,249,0.15);
    border: 1px solid rgba(46,163,249,0.3);
    color: var(--pw-brand-light);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}

/* ── DIVIDER ── */
.pw-divider { height: 1px; background: var(--pw-border); margin: 16px 0; }

/* ── SECTION HEADING ── */
.pw-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pw-section-title { font-size: 9.5px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--pw-brand-mid); white-space: nowrap; }
.pw-section-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--pw-brand-mid), transparent); opacity: 0.2; }

/* ── TABS ── */
.pw-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--pw-border);
    margin: 0 -16px;
    padding: 0 16px;
    scrollbar-width: none;
}
.pw-tabs::-webkit-scrollbar { display: none; }
.pw-tab {
    font-size: 12px;
    font-weight: 400;
    padding: 10px 16px;
    white-space: nowrap;
    color: var(--pw-text-muted);
    border-bottom: 2px solid transparent;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
    flex-shrink: 0;
    background: none;
    transition: color 0.2s, border-color 0.2s;
}
.pw-tab.active, .pw-tab:focus { color: var(--pw-brand-mid); border-bottom-color: var(--pw-brand-mid); font-weight: 500; outline: none; }

/* ── PANELS ── */
.pw-panel { display: none; padding-top: 16px; }
.pw-panel.active { display: block; }

/* ── DESCRIPTION ── */
.pw-desc { font-size: 13px; line-height: 1.75; color: #3a4a5c; margin-bottom: 10px; }
.pw-read-more { font-size: 12px; color: var(--pw-brand-mid); cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }

/* ── DEVELOPER CARD ── */
.pw-developer-card { background: var(--pw-white); border-radius: var(--pw-radius-md); padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.pw-dev-logo { width: 48px; height: 48px; border-radius: var(--pw-radius-sm); object-fit: contain; background: var(--pw-silver); flex-shrink: 0; }
.pw-dev-logo-placeholder { width: 48px; height: 48px; border-radius: var(--pw-radius-sm); background: var(--pw-silver); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pw-dev-name { font-size: 14px; font-weight: 500; color: var(--pw-brand); }
.pw-dev-sub { font-size: 11px; color: var(--pw-text-muted); margin-top: 2px; }

/* ── TIMELINE ── */
.pw-timeline { display: flex; align-items: center; margin: 4px 0 16px; }
.pw-tl-node { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pw-tl-lbl { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pw-text-muted); }
.pw-tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pw-brand-mid); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--pw-brand-mid); }
.pw-tl-dot-end { background: var(--pw-brand-light); box-shadow: 0 0 0 2px var(--pw-brand-light); }
.pw-tl-val { font-family: 'Cormorant Garamond', serif; font-size: 14px; font-weight: 600; color: var(--pw-brand); }
.pw-tl-line { flex: 1; height: 2px; background: linear-gradient(90deg, var(--pw-brand-mid), var(--pw-brand-light)); margin: 0 8px; margin-bottom: 20px; opacity: 0.35; }

/* ── PAYMENT CARDS ── */
.pw-payment-cards { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pw-pay-card {
    flex: 1 1 80px;
    min-width: 80px;
    background: var(--pw-brand);
    border-radius: var(--pw-radius-md);
    padding: 18px 12px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.pw-pay-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--pw-brand-mid), var(--pw-brand-light)); }
.pw-pay-pct { font-family: 'Cormorant Garamond', serif; font-size: 36px; font-weight: 700; color: #fff; line-height: 1; }
.pw-pay-pct sup { font-size: 18px; }
.pw-pay-lbl { font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pw-brand-light); margin-top: 6px; }

/* ── PAYMENT BAR ── */
.pw-pay-bar { display: flex; border-radius: 6px; overflow: hidden; height: 8px; gap: 2px; margin-bottom: 6px; }
.pw-pay-seg { height: 100%; border-radius: 3px; }
.pw-pay-bar-labels { display: flex; justify-content: space-between; margin-bottom: 16px; }
.pw-pay-bar-lbl { font-size: 9px; color: var(--pw-text-muted); text-transform: uppercase; }

/* ── PROGRESS ── */
.pw-progress-wrap { background: var(--pw-white); border-radius: var(--pw-radius-md); padding: 16px 18px; }
.pw-progress-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.pw-progress-pct { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 700; color: var(--pw-brand); line-height: 1; }
.pw-progress-sub { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pw-text-muted); margin-top: 3px; }
.pw-track { height: 6px; background: var(--pw-silver); border-radius: 999px; overflow: hidden; }
.pw-fill { height: 100%; background: linear-gradient(90deg, var(--pw-brand) 0%, var(--pw-brand-mid) 55%, var(--pw-brand-light) 100%); border-radius: 999px; transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.pw-completion-date { font-family: 'Cormorant Garamond', serif; font-size: 14px; font-weight: 600; color: var(--pw-brand-mid); }

/* ── FLOOR PLANS ── */
.pw-floor-list { display: flex; flex-direction: column; gap: 2px; }
.pw-floor-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--pw-white); border-radius: var(--pw-radius-sm); cursor: pointer; transition: background 0.15s; }
.pw-floor-row:hover { background: #f8f9fb; }
.pw-floor-title { font-size: 13px; font-weight: 500; color: var(--pw-brand); }
.pw-floor-size { font-size: 11px; color: var(--pw-text-muted); margin-top: 2px; }
.pw-floor-thumb { width: 56px; height: 44px; border-radius: var(--pw-radius-sm); object-fit: cover; background: var(--pw-silver); flex-shrink: 0; }
.pw-floor-thumb-placeholder { width: 56px; height: 44px; border-radius: var(--pw-radius-sm); background: var(--pw-silver); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── AMENITIES ── */
.pw-amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.pw-amenity { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 6px 12px; border: 1px solid var(--pw-border); border-radius: var(--pw-radius-sm); background: var(--pw-white); color: var(--pw-brand); }

/* ── MAP ── */
.pw-map-wrap { border-radius: var(--pw-radius-md); overflow: hidden; aspect-ratio: 16/9; background: #d0d8e8; margin-bottom: 10px; }
.pw-map-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.pw-map-link { font-size: 12px; color: var(--pw-brand-mid); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; }
.pw-nearby-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.pw-nearby-tag { font-size: 11px; padding: 4px 10px; border: 1px solid var(--pw-border); border-radius: 20px; color: var(--pw-text-muted); background: var(--pw-white); }

/* ── AGENT CARD ── */
.pw-agent-card { background: var(--pw-white); border-radius: var(--pw-radius-md); padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 80px; }
.pw-agent-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.pw-agent-photo-placeholder { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--pw-brand-mid), var(--pw-brand-light)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 600; flex-shrink: 0; }
.pw-agent-info { flex: 1; min-width: 0; }
.pw-agent-name { font-size: 14px; font-weight: 500; color: var(--pw-brand); }
.pw-agent-sub { font-size: 11px; color: var(--pw-text-muted); margin-top: 2px; }
.pw-agent-actions { display: flex; gap: 8px; }
.pw-agent-btn { width: 36px; height: 36px; border-radius: var(--pw-radius-sm); border: 1px solid var(--pw-border); background: var(--pw-white); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; transition: background 0.15s; }
.pw-agent-btn:hover { background: var(--pw-silver); border-color: var(--pw-brand-mid); }

/* ── STICKY CTA ── */
.pw-cta-bar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: var(--pw-white); border-top: 1px solid var(--pw-border); padding: 12px 16px; display: flex; gap: 10px; z-index: 200; }
.pw-btn-outline { flex: 1; padding: 12px; border: 1px solid var(--pw-border); border-radius: var(--pw-radius-sm); background: var(--pw-white); color: var(--pw-brand); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.pw-btn-outline:hover { background: var(--pw-silver); }
.pw-btn-primary { flex: 1; padding: 12px; border: none; border-radius: var(--pw-radius-sm); background: var(--pw-brand-mid); color: #fff; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.pw-btn-primary:hover { background: var(--pw-brand); }

/* ── LIGHTBOX ── */
.pw-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,14,34,0.92); z-index: 9999; align-items: center; justify-content: center; flex-direction: column; }
.pw-lightbox.open { display: flex; }
.pw-lightbox img { max-width: 94vw; max-height: 80vh; object-fit: contain; border-radius: var(--pw-radius-sm); }
.pw-lightbox-close { position: absolute; top: 16px; right: 16px; background: rgba(255,255,255,0.12); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; }
.pw-lightbox-nav { display: flex; gap: 20px; margin-top: 16px; }
.pw-lightbox-prev, .pw-lightbox-next { background: rgba(255,255,255,0.12); border: none; color: #fff; padding: 8px 20px; border-radius: var(--pw-radius-sm); cursor: pointer; font-size: 13px; }

/* ── UTILITY ── */
.pw-label-sm { font-size: 9px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pw-text-muted); display: block; margin-bottom: 4px; }
.pw-mt8  { margin-top: 8px; }
.pw-mt16 { margin-top: 16px; }