/* Listing detail layout inspired by the supplied reference. */
body.wc-theme.page-listing.listing-reference {
    --listing-accent: #00aeef;
    --listing-accent-soft: #edfaff;
    background: #fff;
    color: #252525;
}
body.listing-reference .listing-page-shell { max-width: 1260px; }
body.wc-theme.page-listing.listing-reference .listing-page-shell > .listing-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    line-height: 1.7;
}
body.wc-theme.page-listing.listing-reference .listing-page-shell > .listing-breadcrumb a {
    color: #82939c;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}
body.wc-theme.page-listing.listing-reference .listing-page-shell > .listing-breadcrumb .listing-breadcrumb-current {
    color: #17353e;
    font-weight: 600;
}
body.wc-theme.page-listing.listing-reference .listing-breadcrumb-separator { color: #b2bec4; }
body.wc-theme.page-listing.listing-reference .listing-page-shell > .listing-breadcrumb a:hover { color: #008bc2; }
/* Similar listings stay flat, including the hover state retained after a mobile tap. */
body.wc-theme.page-listing.listing-reference .listing-card,
body.wc-theme.page-listing.listing-reference .listing-card:hover {
    box-shadow: none;
    transform: none;
}
body.wc-theme.page-listing.listing-reference .listing-card .img-wrap,
body.wc-theme.page-listing.listing-reference .listing-card:hover .img-wrap {
    box-shadow: none;
}
body.wc-theme.page-listing.listing-reference .listing-card:hover .img-wrap img { transform: none; }
body.wc-theme.page-listing.listing-reference .listing-card .img-wrap::after { display: none; }
body.listing-reference .listing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px 40px; align-items: start; }
body.listing-reference .listing-main { display: grid; gap: 24px; grid-column: 1; grid-row: 2; min-width: 0; }
body.listing-reference .listing-sidebar { display: block; grid-column: 2; grid-row: 2; min-width: 0; position: sticky; top: 94px; }

/* Full photograph above a horizontal thumbnail strip, on every screen size. */
body.wc-theme.page-listing.listing-reference .listing-gallery-card {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    --gallery-height: clamp(380px, 38vw, 510px);
    grid-template-columns: minmax(0, 1fr);
    direction: rtl;
    gap: 12px;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}
body.wc-theme.page-listing.listing-reference .listing-gallery-card:not(:has(.gallery-thumbs)) { grid-template-columns: minmax(0, 1fr); }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-main { height: var(--gallery-height); min-width: 0; max-height: none; aspect-ratio: auto; border: 0; border-radius: 16px; overflow: hidden; background: #f6f7f9; box-shadow: none; direction: rtl; }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-bg,
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-main::after { display: none; }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-fg { width: 100%; height: 100%; object-fit: contain; background: transparent; transform: none; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs { display: flex; justify-content: safe center; gap: 10px; padding: 4px 4px 8px; margin: 0; max-height: none; min-width: 0; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain; direction: rtl; background: transparent; scrollbar-width: thin; scrollbar-color: #d4dbe1 transparent; scroll-padding-inline: 4px; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs img { width: 104px; height: 78px; flex: 0 0 104px; min-width: 0; object-fit: cover; padding: 3px; border: 2px solid transparent; border-radius: 10px; background: #f6f7f9; opacity: .8; box-shadow: none; cursor: pointer; transition: opacity .15s ease, border-color .15s ease; }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-thumbs { border: 0; }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-thumbs img:hover { opacity: 1; border-color: #b9dbe7; transform: none; }
body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-thumbs img.active { opacity: 1; border-color: var(--listing-accent); background: #fff; box-shadow: none; transform: none; }
body.wc-theme.page-listing.listing-reference .gallery-counter,
body.wc-theme.page-listing.listing-reference .gallery-open-hint { border: 1px solid #e8e5ec; background: #fffffff2; color: #514a5d; box-shadow: 0 2px 8px #25212d08; border-radius: 9px; direction: rtl; padding: 9px 13px; font-size: 13px; font-weight: 500; line-height: 1.4; backdrop-filter: blur(8px); }
body.wc-theme.page-listing.listing-reference .gallery-counter { direction: ltr; inset: auto auto 16px 16px; transform: none; min-width: 56px; text-align: center; }
body.wc-theme.page-listing.listing-reference .gallery-open-hint { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; inset: auto 16px 16px auto; min-height: 40px; transform: none; white-space: nowrap; cursor: pointer; pointer-events: auto; }
body.wc-theme.page-listing.listing-reference .gallery-open-hint:hover { color: #008bc2; border-color: #8fcfe7; background: #fff; }
body.wc-theme.page-listing.listing-reference .gallery-nav { width: 46px; height: 46px; border: 1px solid #e8e5ec; border-radius: 12px; background: #fffffff2; color: #514a5d; box-shadow: 0 2px 10px #25212d0d; opacity: 1; }
body.wc-theme.page-listing.listing-reference .gallery-nav:hover { background: #fff; color: #008bc2; border-color: #8fcfe7; transform: translateY(-50%); }
body.wc-theme.page-listing.listing-reference :is(.gallery-back-action, .gallery-floating-actions .gfa-btn) { border: 1px solid #e8e5ec; border-radius: 10px; background: #fffffff2; color: #514a5d; box-shadow: 0 2px 10px #25212d0d; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs::-webkit-scrollbar { width: 4px; height: 4px; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs::-webkit-scrollbar-thumb { border-radius: 4px; background: #d4dbe1; }
body.wc-theme.page-listing.listing-reference .gallery-thumbs img:focus-visible { outline: 2px solid #008bc2; outline-offset: 1px; opacity: 1; }
body.wc-theme.page-listing.listing-reference .gallery-fg:focus-visible { outline: 3px solid var(--listing-accent); outline-offset: -4px; }
body.listing-reference .gallery-empty { grid-column: 1 / -1; min-height: 260px; }

/* The title and key facts sit over the description rather than the contact card. */
body.wc-theme.page-listing.listing-reference .listing-summary-card { position: relative; padding: 24px; border: 0; border-radius: 12px; background: #f8f8f9; box-shadow: none; }
body.listing-reference .listing-summary-kicker { display: none; }
body.listing-reference .listing-summary-kicker a { padding: 0; border: 0; border-radius: 0; color: #777; background: none; font-size: 11px; font-weight: 400; }
body.listing-reference .listing-summary-kicker a i { display: none; }
body.wc-theme.page-listing.listing-reference .listing-title { margin: 0 0 8px; font-size: 24px; font-weight: 700; line-height: 1.4; letter-spacing: -.3px; color: #242424; }
body.listing-reference .listing-reference-specs { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #303030; font-size: 14px; font-weight: 500; line-height: 1.7; }
body.listing-reference .listing-reference-specs span + span::before { content: '·'; margin-inline-end: 12px; color: #888; }
body.listing-reference .listing-meta-chips { display: flex; flex-wrap: wrap; align-items: center; min-height: 38px; gap: 8px 16px; margin: 14px 0 0; }
body.listing-reference .listing-meta-chips > span { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #606060; font-size: 13px; font-weight: 400; }
body.listing-reference .listing-reference-actions { position: absolute; inset-inline-end: 24px; bottom: 24px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; }
body.listing-reference .listing-reference-actions :is(a, button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 7px 14px; background: #fff; border: 1px solid #ddd; border-radius: 22px; color: #333; font: inherit; font-size: 13px; text-decoration: none; }
body.listing-reference .listing-reference-actions .listing-reference-favorite { position: static; width: 38px; padding: 0; box-shadow: none; }
body.listing-reference .listing-reference-actions .listing-reference-favorite.active { color: var(--listing-accent); border-color: var(--listing-accent); }
body.wc-theme.page-listing.listing-reference .listing-details-card { display: flex; flex-direction: column; gap: 28px; padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
body.listing-reference .listing-description-section { order: 0; padding: 0; margin: 0; border: 0; }
body.wc-theme.page-listing.listing-reference .listing-section-title { padding: 0; margin: 0 0 12px; border: 0; color: #252525; font-size: 19px; font-weight: 700; }
body.listing-reference .listing-section-title > i { display: none; }
body.wc-theme.page-listing.listing-reference .listing-description-text { margin: 0; font-size: 15px; font-weight: 400; line-height: 1.9; color: #333; white-space: pre-line; overflow-wrap: anywhere; }
body.wc-theme.page-listing.listing-reference .listing-hashtag { color: #087da8; unicode-bidi: isolate; display: inline-block; max-width: 100%; vertical-align: bottom; text-decoration: none; }
body.wc-theme.page-listing.listing-reference .listing-hashtag:hover { color: #00688f; text-decoration: underline; }
body.listing-reference .listing-details-card .listing-specs { order: 2; padding: 22px 0 0; border-top: 1px solid #eee; }
body.wc-theme.page-listing.listing-reference .listing-details-card .spec-item { min-height: 66px; padding: 12px; border-radius: 8px; border-color: #e9e9ed; box-shadow: none; transform: none; }
body.wc-theme.page-listing.listing-reference .listing-details-card .spec-icon { width: 30px; height: 30px; flex-basis: 30px; border: 0; border-radius: 6px; background: #f4f8fa; color: #71657f; box-shadow: none; }
body.wc-theme.page-listing.listing-reference .listing-details-card .spec-value { font-weight: 600; color: #333; }

/* Price and existing seller/contact actions form one compact sticky card. */
body.wc-theme.page-listing.listing-reference .seller-card { padding: 24px; border: 1px solid #e8e5ec; border-radius: 16px; background: #fff; box-shadow: none; }
body.wc-theme.page-listing.listing-reference .seller-card .listing-price { display: block; margin: 0 0 22px; padding: 0 0 20px; border-bottom: 1px solid #efedf2; text-align: start; color: #25212d; font-size: 30px; font-weight: 600; letter-spacing: -.5px; line-height: 1.25; }
body.listing-reference .seller-section-title { margin: 0 0 16px; color: #726b79; font-size: 13px; font-weight: 500; }
body.listing-reference .seller-head { justify-content: flex-start; align-items: flex-start; gap: 12px; }
body.listing-reference .seller-info { min-width: 0; flex: 1; }
body.listing-reference .seller-name { overflow-wrap: anywhere; }
body.listing-reference .seller-avatar { width: 56px; height: 56px; flex-basis: 56px; border: 1px solid #e2e2e7; border-radius: 50%; background: #f3f9fb; color: var(--listing-accent); box-shadow: none; }
body.listing-reference .seller-name { font-size: 16px; font-weight: 650; color: #333; }
body.listing-reference .seller-name a { color: inherit; }
body.listing-reference .seller-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 8px; color: #726b79; font-size: 12px; line-height: 1.7; }
body.listing-reference .seller-dot { display: none; }
body.listing-reference .seller-publisher { margin-top: 6px; color: #726b79; font-size: 12px; }
body.listing-reference .seller-bizlink { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #087da8; font-size: 12px; font-weight: 500; }
body.listing-reference .seller-card .realtor-license-badge { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 10px 12px; margin-top: 18px; border: 0; border-radius: 8px; background: #f9fbfc; color: #514a5d; font-size: 12px; box-shadow: none; }
body.listing-reference .seller-card .realtor-license-badge code { background: transparent; color: #514a5d; }
body.listing-reference .seller-divider { margin: 18px 0; border-color: #eee; }
body.wc-theme.page-listing.listing-reference .seller-card .reveal-phone-btn,
body.wc-theme.page-listing.listing-reference .listing-sticky-cta .lsc-phone { min-height: 46px; border: 1px solid var(--listing-accent); border-radius: 7px; background: var(--listing-accent); color: #fff; box-shadow: 0 2px 5px #00aeef1a; font-size: 15px; font-weight: 650; }
body.wc-theme.page-listing.listing-reference .seller-card > a.btn-primary { background-color: #fff !important; color: var(--listing-accent); border: 1px solid #c5ecfa; box-shadow: none; border-radius: 7px; font-weight: 500; }
body.wc-theme.page-listing.listing-reference .seller-card > a.btn-primary:hover { background-color: var(--listing-accent-soft) !important; }
body.listing-reference .seller-card [data-listing-report] { color: #726b79 !important; font-size: 12px; }
body.listing-reference .seller-card [data-listing-report]:hover { color: #b94343 !important; }
body.listing-reference .seller-secondary-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; }
body.listing-reference .seller-card .seller-favorite.fav-btn { position: static; inset: auto; align-items: center; gap: 6px; width: auto; height: auto; min-height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; color: #726b79; font: inherit; font-size: 12px; box-shadow: none; transform: none; }
body.listing-reference .seller-card .seller-favorite.fav-btn:is(:hover, .active) { color: #008bc2; }
body.listing-reference .listing-extras { margin-top: 6px; }
body.listing-reference .share-card { scroll-margin-top: 100px; box-shadow: none; border: 1px solid #e9e9ed; }

/* Restyle the real assistant only when the existing feature is enabled. */
body.wc-theme.page-listing.listing-reference .listing-ai-section { order: 1; margin: 0; padding: 0; border: 0; }
body.listing-reference .wc-ai-panel { border: 1px solid #b3eaff; border-radius: 12px; background: var(--listing-accent-soft); box-shadow: none; }
body.listing-reference .wc-ai-head { background: transparent; border: 0; justify-content: center; padding: 22px 24px 4px; color: var(--listing-accent); }
body.listing-reference .wc-ai-head .wc-ai-title { flex: 0 1 auto; text-align: center; }
body.listing-reference .wc-ai-head .wc-ai-avatar { background: transparent; color: var(--listing-accent); }
body.listing-reference .wc-ai-body { background: transparent; padding: 16px 24px; }
body.listing-reference .wc-ai-welcome { text-align: center; }
body.listing-reference .wc-ai-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.listing-reference .wc-ai-card { min-height: 36px; border: 0; border-radius: 22px; padding: 8px 14px; font-weight: 400; }
body.listing-reference .wc-ai-card i { display: none; }
body.listing-reference .wc-ai-foot { width: min(540px, calc(100% - 40px)); margin: 0 auto 24px; border: 1px solid #d9e9ef; border-radius: 30px; padding: 5px; background: #fff; }
body.listing-reference .wc-ai-foot textarea { border: 0; border-radius: 25px; background: #fff; box-shadow: none; }
body.listing-reference .wc-ai-send { background: var(--listing-accent); }
body.listing-reference :is(.listing-reference-actions, .gallery-thumbs) :is(a, button, img):focus-visible { outline: 3px solid var(--listing-accent); outline-offset: 3px; }

@media (max-width: 991.98px) {
    body.wc-theme.page-listing.listing-reference .listing-page-shell { padding-inline: 16px !important; padding-top: 16px !important; }
    body.listing-reference .listing-layout { display: flex; flex-direction: column; gap: 20px; }
    body.listing-reference .listing-main { display: contents; }
    body.listing-reference .listing-sidebar { display: contents; position: static; }
    body.wc-theme.page-listing.listing-reference .listing-gallery-card { order: 0; width: 100%; grid-template-columns: minmax(0, 1fr); gap: 10px; }
    body.wc-theme.page-listing.listing-reference .listing-gallery-card .gallery-main { height: clamp(280px, 78vw, 460px); border-radius: 12px; }
    body.wc-theme.page-listing.listing-reference .gallery-thumbs { gap: 8px; padding: 3px 3px 7px; }
    body.wc-theme.page-listing.listing-reference .gallery-thumbs img { width: 80px; height: 64px; flex: 0 0 80px; border-radius: 8px; }
    body.wc-theme.page-listing.listing-reference .gallery-nav { width: 40px; height: 44px; border-radius: 10px; }
    body.wc-theme.page-listing.listing-reference .gallery-counter { inset: auto auto 12px 12px; }
    body.wc-theme.page-listing.listing-reference .gallery-open-hint { inset: auto 12px 12px auto; min-height: 38px; padding: 8px 10px; font-size: 12px; }
    body.wc-theme.page-listing.listing-reference .listing-summary-card { order: 1; width: 100%; margin: 0; padding: 20px; border-radius: 10px; }
    body.wc-theme.page-listing.listing-reference .listing-title { font-size: 22px; }
    body.wc-theme.page-listing.listing-reference .seller-card { display: none; }
    body.listing-reference .listing-sticky-cta .lsc-fav.fav-btn { position: static; inset: auto; flex: 0 0 44px; width: 44px; height: 46px; padding: 0; border: 1px solid #e8e5ec; border-radius: 9px; background: #fff; color: #726b79; box-shadow: none; transform: none; }
    body.listing-reference .listing-sticky-cta .lsc-fav.fav-btn.active { color: #008bc2; border-color: #8fcfe7; background: #effbff; }
    body.wc-theme.page-listing.listing-reference .seller-card .listing-price { display: none; }
    body.listing-reference .listing-mobile-price { margin-bottom: 10px; color: #242424; font-size: 27px; font-weight: 700; line-height: 1.25; }
    body.wc-theme.page-listing.listing-reference .listing-details-card { order: 3; width: 100%; margin: 0; }
    body.listing-reference .listing-extras { order: 5; width: 100%; gap: 8px; }
    body.listing-reference .listing-extras > .nadlan-widget { margin-bottom: 0 !important; }
    body.listing-reference .listing-report-mobile { padding: 0; }
    body.listing-reference .listing-report-mobile a { min-height: 44px; }
    body.listing-reference .listing-similar-divider { margin-block: 16px !important; }
    body.wc-theme.page-listing.listing-reference .listing-details-card .listing-specs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.listing-reference .listing-reference-specs { font-size: 13px; }
    body.listing-reference .listing-reference-actions { position: static; margin-top: 12px; }
    body.listing-reference .listing-meta-chips { padding-inline-end: 0; min-height: 0; }
    body.listing-reference .wc-ai-mobile-launcher { background: var(--listing-accent-soft); color: var(--listing-accent); border: 1px solid #b3eaff; box-shadow: none; }
    body.listing-reference .wc-ai-mobile-launcher-copy span { color: #655874; }
}
@media (max-width: 575.98px) {
    body.wc-theme.page-listing.listing-reference .listing-page-shell { padding-inline: 12px !important; }
    body.wc-theme.page-listing.listing-reference .listing-summary-card { padding: 18px; }
    body.wc-theme.page-listing.listing-reference .listing-title { font-size: 20px; }
    body.listing-reference .listing-description-text { font-size: 14px; }
    body.wc-theme.page-listing.listing-reference .seller-card .listing-price { font-size: 27px; }
    body.listing-reference .wc-ai-body { padding: 14px; }
    body.listing-reference .wc-ai-foot { width: calc(100% - 24px); }
}

/* Native modal stays above the mobile contact bar and contains keyboard focus. */
body.listing-reference .listing-report-dialog {
    width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
    margin: auto; padding: 28px; overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid #e8e5ec; border-radius: 16px; background: #fff;
    color: #25212d; box-shadow: 0 24px 80px #25212d26; text-align: start;
}
.listing-report-dialog::backdrop { background: #25212d70; }
body:has(.listing-report-dialog[open]) { overflow: hidden; }
.listing-report-dialog .listing-report-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
body.listing-reference .listing-report-header h2 { margin: 0; color: #25212d; font-size: 22px; font-weight: 600; }
.listing-report-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: #f7f7f9; color: #514a5d; font-size: 26px; }
#listingReportContext { margin: 0 0 24px; color: #726b79; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.listing-report-dialog .form-label { color: #514a5d; font-size: 14px; font-weight: 500; }
.listing-report-dialog .form-label span { color: #726b79; font-weight: 400; }
.listing-report-dialog :is(.form-control, .form-select) { min-height: 46px; border: 1px solid #dcd9e2; border-radius: 9px; background-color: #fff; color: #25212d; font-size: 16px; }
.listing-report-dialog :is(.form-control, .form-select):focus { border-color: #168db8; box-shadow: 0 0 0 3px #00aeef15; }
.listing-report-actions { display: flex; gap: 10px; margin-top: 24px; }
.listing-report-actions .btn { flex: 1; min-height: 46px; border-radius: 9px; font-weight: 500; }
body.listing-reference .listing-report-submit { background: #00aeef; border: 1px solid #00aeef; border-radius: 9px; color: #fff; min-height: 46px; }
body.listing-reference .listing-report-submit:hover { background: #008bc2; border-color: #008bc2; }
.listing-report-dialog .report-feedback { margin-bottom: 20px; padding: 14px; border-radius: 9px; font-size: 14px; line-height: 1.8; }
.listing-report-dialog .is-success { background: #edf8f2; color: #226342; }
.listing-report-dialog .is-error { background: #fff2f2; color: #a52c35; }
.listing-report-dialog [hidden] { display: none !important; }
@media (max-width: 575.98px) {
    body.listing-reference .listing-report-dialog { padding: 20px; }
}
