/* ============================================================
   Move Faster — Property Detail Page Apple-Glass Hex Theme
   Version: 4.0.0
   Target: body:has(.gn-espo-idx-detail-route)
   Strategy: body::before fixed hex overlay. All WP containers
   transparent. Content sections use light silver glassmorphism.
   ============================================================ */

/* ── 1. Body base + hex wallpaper overlay ── */
body:has(.gn-espo-idx-detail-route) {
    background-color: #ffffff !important;
    background-image: none !important;
    position: relative;
}
body:has(.gn-espo-idx-detail-route)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://movefaster.ca/wp-content/uploads/2026/03/HEXWALLPAPER.png') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    opacity: 0.32;
    z-index: 0;
    pointer-events: none;
}

/* ── 2. The Transparency Tunnel (CRITICAL) ── */
body:has(.gn-espo-idx-detail-route) #wrapper,
body:has(.gn-espo-idx-detail-route) .site,
body:has(.gn-espo-idx-detail-route) .wp-site-blocks,
body:has(.gn-espo-idx-detail-route) #inner-wrap,
body:has(.gn-espo-idx-detail-route) #primary,
body:has(.gn-espo-idx-detail-route) .content-area,
body:has(.gn-espo-idx-detail-route) .content-container,
body:has(.gn-espo-idx-detail-route) .site-container,
body:has(.gn-espo-idx-detail-route) #main,
body:has(.gn-espo-idx-detail-route) .site-main,
body:has(.gn-espo-idx-detail-route) .content-wrap,
body:has(.gn-espo-idx-detail-route) .entry,
body:has(.gn-espo-idx-detail-route) .content-bg,
body:has(.gn-espo-idx-detail-route) .entry-content-wrap,
body:has(.gn-espo-idx-detail-route) .entry-content,
body:has(.gn-espo-idx-detail-route) .single-content,
body:has(.gn-espo-idx-detail-route) .wp-block-group,
body:has(.gn-espo-idx-detail-route) .wp-block-group__inner-container,
body:has(.gn-espo-idx-detail-route) [class*="wp-container-core-group"],
body:has(.gn-espo-idx-detail-route) [class*="wp-container-core-columns"],
body:has(.gn-espo-idx-detail-route) [class*="wp-container-core-column"],
body:has(.gn-espo-idx-detail-route) .wp-block-columns,
body:has(.gn-espo-idx-detail-route) .wp-block-column,
body:has(.gn-espo-idx-detail-route) .kb-row-layout-wrap,
body:has(.gn-espo-idx-detail-route) .kt-row-column-wrap,
body:has(.gn-espo-idx-detail-route) .kt-inside-inner-col,
body:has(.gn-espo-idx-detail-route) .wp-block-kadence-column,
body:has(.gn-espo-idx-detail-route) .wp-block-kadence-rowlayout {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    position: relative;
    z-index: 1;
}

/* ── 3. The IDX app wrapper — transparent ── */
body:has(.gn-espo-idx-detail-route) .gn-espo-idx {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* ── 4. Header — solid white, stays above hex ── */
body:has(.gn-espo-idx-detail-route) .site-header,
body:has(.gn-espo-idx-detail-route) #masthead {
    background-color: #ffffff !important;
    position: relative;
    z-index: 100;
}

/* ── 5. Breadcrumbs — light glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__breadcrumbs {
    background: rgba(255, 255, 255, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    position: relative;
    z-index: 2;
}

/* ── 6. Hero — light glass overlay on top of the photo ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__hero {
    background: transparent !important;
    position: relative;
    z-index: 2;
}

/* ── 7. Info bar (price/beds/baths sticky bar) — solid white glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__info-bar {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.80) !important;
    position: relative;
    z-index: 50;
}

/* ── 8. Nav tabs — solid white glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__nav {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(12px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    position: relative;
    z-index: 50;
}

/* ── 9. Body / main / sidebar — transparent so hex shows ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__body,
body:has(.gn-espo-idx-detail-route) .gn-detail__main,
body:has(.gn-espo-idx-detail-route) .gn-detail__sidebar {
    background: transparent !important;
}

/* ── 10. Content sections — light silver glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__section {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(6px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(110%) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255,255,255,0.45) !important;
    padding: 28px !important;
}

/* ── 11. Section headings ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__section h2,
body:has(.gn-espo-idx-detail-route) .gn-detail__section h3 {
    color: #1a1a1a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* ── 12. Table rows inside sections ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__section table tr {
    background: transparent !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__section table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* ── 13. Contact form — light silver glass ── */
body:has(.gn-espo-idx-detail-route) #gn-contact-form,
body:has(.gn-espo-idx-detail-route) .gn-detail__contact {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(6px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(110%) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255,255,255,0.45) !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__contact input,
body:has(.gn-espo-idx-detail-route) .gn-detail__contact select,
body:has(.gn-espo-idx-detail-route) .gn-detail__contact textarea {
    background: rgba(255, 255, 255, 0.50) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 10px !important;
    color: #1a1a1a !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__contact input:focus,
body:has(.gn-espo-idx-detail-route) .gn-detail__contact select:focus,
body:has(.gn-espo-idx-detail-route) .gn-detail__contact textarea:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.18) !important;
    outline: none !important;
}

/* ── 14. Contact submit button ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__contact-submit,
body:has(.gn-espo-idx-detail-route) #gn-contact-submit {
    background: #007bff !important;
    border: none !important;
    border-radius: 50px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.30) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__contact-submit:hover,
body:has(.gn-espo-idx-detail-route) #gn-contact-submit:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.40) !important;
    background: #0062c4 !important;
}

/* ── 15. Nav buttons (Book Showing, etc.) ── */
body:has(.gn-espo-idx-detail-route) #gn-btn-showing,
body:has(.gn-espo-idx-detail-route) .gn-detail__nav-btn--primary {
    background: #007bff !important;
    border: none !important;
    border-radius: 50px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.30) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
body:has(.gn-espo-idx-detail-route) #gn-btn-showing:hover,
body:has(.gn-espo-idx-detail-route) .gn-detail__nav-btn--primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.40) !important;
    background: #0062c4 !important;
}

/* ── 16. Mortgage section — light silver glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__mortgage {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(6px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(110%) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255,255,255,0.45) !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__mortgage input {
    background: rgba(255, 255, 255, 0.50) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 10px !important;
}

/* ── 17. Similar property cards — light silver glass ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__similar-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(6px) saturate(110%) !important;
    -webkit-backdrop-filter: blur(6px) saturate(110%) !important;
    border: 1px solid rgba(255, 255, 255, 0.30) !important;
    border-radius: 24px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255,255,255,0.45) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__similar-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.10) !important;
}

/* ── 18. Similar / sold sections — transparent ── */
body:has(.gn-espo-idx-detail-route) #gn-similar-properties,
body:has(.gn-espo-idx-detail-route) #gn-sold-properties {
    background: transparent !important;
}

/* ── 19. CTA section — solid dark (intentional brand element) ── */
body:has(.gn-espo-idx-detail-route) .gn-detail__cta {
    background: rgba(10, 10, 20, 0.88) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    position: relative;
    z-index: 2;
}
body:has(.gn-espo-idx-detail-route) .gn-detail__cta-btn {
    background: #007bff !important;
    border-radius: 50px !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.30) !important;
}

/* ── 20. Footer — solid white ── */
body:has(.gn-espo-idx-detail-route) footer.site-footer,
body:has(.gn-espo-idx-detail-route) #colophon,
body:has(.gn-espo-idx-detail-route) .site-footer-wrap {
    background-color: #ffffff !important;
    position: relative;
    z-index: 2;
}

/* ── 21. Responsive ── */
@media (max-width: 767px) {
    body:has(.gn-espo-idx-detail-route) .gn-detail__section,
    body:has(.gn-espo-idx-detail-route) .gn-detail__contact,
    body:has(.gn-espo-idx-detail-route) .gn-detail__mortgage,
    body:has(.gn-espo-idx-detail-route) .gn-detail__similar-card {
        border-radius: 12px !important;
        padding: 18px !important;
    }
}
