/* e2-listing.css — Phase E2 listing page (FABLE-REVIEW-5.4 §3/§4.4). Loaded after pages.css. Tokens only. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- content blocks (white cards) ---- */
.am24-block { background: var(--am24-surface); border-radius: var(--am24-radius); padding: var(--am24-s3); margin: 0 0 var(--am24-s2); }
.am24-block__title { font-size: var(--am24-fs-h3); font-weight: var(--am24-fw-head); margin: 0 0 var(--am24-s2); color: var(--am24-text); line-height: 1.3; }
.am24-na { color: var(--am24-muted); }

/* details table: 2 columns desktop, 1 on phones */
.am24-facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--am24-s4); margin: 0; }
.am24-facts > div { display: flex; justify-content: space-between; gap: var(--am24-s2); padding: 12px 0; border-bottom: 1px solid var(--am24-border); min-width: 0; }
.am24-facts dt { font-weight: 400; color: var(--am24-muted); flex: 0 0 auto; }
.am24-facts dd { margin: 0; font-weight: 600; text-align: right; color: var(--am24-text); min-width: 0; overflow-wrap: anywhere; }
.am24-facts dd a { color: var(--am24-accent); }

/* health checklist */
.am24-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px var(--am24-s3); }
.am24-checks li { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.am24-checks__mark { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; position: relative; }
.am24-checks .is-yes { color: var(--am24-text); font-weight: 600; }
.am24-checks .is-yes .am24-checks__mark { background: var(--am24-accent); }
.am24-checks .is-yes .am24-checks__mark::after { content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.am24-checks .is-no { color: var(--am24-muted); }
.am24-checks .is-no .am24-checks__mark::after { content: ""; position: absolute; left: 6px; top: 10px; width: 10px; height: 2px; background: var(--am24-border); }
.am24-microchip { margin: var(--am24-s2) 0 0; font-weight: 600; }
.am24-microchip .am24-na { font-weight: 400; margin-right: 8px; }

.am24-desc__text { white-space: normal; overflow-wrap: anywhere; line-height: 1.6; }
.am24-loc__city { margin: 0; font-weight: 600; }
.am24-loc__note { margin: 4px 0 0; color: var(--am24-muted); font-size: var(--am24-fs-sm); }

/* how buying works lives in pages.css; give it the same spacing */
.listing-details .am24-howbuy { margin-top: 0; margin-bottom: var(--am24-s2); }

/* related articles */
.am24-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--am24-s2); }
.am24-rel { background: var(--am24-bg); border-radius: var(--am24-radius); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.am24-rel__pic { display: block; aspect-ratio: 16 / 9; background: var(--am24-surface-2); }
.am24-rel__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.am24-rel__body { padding: var(--am24-s2); display: flex; flex-direction: column; gap: 6px; }
.am24-rel__cat { font-size: var(--am24-fs-xs); color: var(--am24-muted); }
.am24-rel__title { font-weight: 600; color: var(--am24-text) !important; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.am24-rel__title:hover { color: var(--am24-accent) !important; }

/* ---- sidebar: buy box ---- */
aside.left .am24-buybox { padding: var(--am24-s3); }
.am24-actions { flex-direction: column; gap: 12px; margin-top: var(--am24-s2); }
.am24-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; padding: 0 var(--am24-s3); border-radius: var(--am24-radius-pill); font: 600 16px var(--am24-font); cursor: pointer; border: 2px solid var(--am24-accent); text-decoration: none; margin: 0 !important; }
.am24-btn--wa { background: var(--am24-accent); color: #fff; }
.am24-btn--wa:hover { background: var(--am24-accent-hover); border-color: var(--am24-accent-hover); }
.am24-btn--call { background: var(--am24-surface); color: var(--am24-accent); }
.am24-btn--call:hover { background: var(--am24-tint); }
.am24-btn--msg { background: var(--am24-surface); color: var(--am24-accent); border-color: var(--am24-border); }
.am24-btn--msg:hover { border-color: var(--am24-accent); background: var(--am24-tint); }
.am24-safety { margin: var(--am24-s2) 0 0; font-size: var(--am24-fs-sm); color: var(--am24-muted); line-height: 1.5; }
.am24-safety a { color: var(--am24-accent); white-space: nowrap; }

/* ---- sidebar: seller card ---- */
.am24-seller { padding: var(--am24-s3); }
.am24-seller__top { display: flex; align-items: center; gap: var(--am24-s2); }
.am24-seller__avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: var(--am24-tint); color: var(--am24-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; }
.am24-seller__name, .am24-seller__name a { font-weight: var(--am24-fw-head); font-size: 18px; color: var(--am24-text); text-decoration: none; overflow-wrap: anywhere; }
.am24-seller__name a:hover { color: var(--am24-accent); }
.am24-seller__meta { color: var(--am24-muted); font-size: var(--am24-fs-sm); }
.am24-seller__ads { margin-top: var(--am24-s2); font-size: var(--am24-fs-sm); }
.am24-seller__ads a { color: var(--am24-accent); font-weight: 600; }
.am24-seller .listing-details-stat { margin-top: var(--am24-s2); padding-top: var(--am24-s2); border-top: 1px solid var(--am24-border); display: flex !important; flex-direction: column !important; gap: 4px; font-size: var(--am24-fs-sm); color: var(--am24-muted); }
.am24-seller .listing-details-stat ul { margin: 0; padding: 0; list-style: none; }
.am24-seller .listing-details-stat .link { cursor: pointer; color: var(--am24-accent); display: inline-flex; align-items: center; min-height: 32px; }
.am24-seller .listing-details-stat .rbl-icon svg { width: 16px; height: 16px; }
/* rating leftovers */
#listing_rating_dom, .listing_rating_ul, .listing-details-stat [id^=listing_rating] { display: none !important; }

/* ---- mobile contact bar ---- */
.am24-cbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--am24-surface); border-top: 1px solid var(--am24-border); }
.am24-cbar .am24-btn { flex: 1 1 0; min-width: 0; padding: 0 8px; min-height: 48px; font-size: 15px; }
.contact-owner-navbar, .contact-owner-navbar-crossbar { display: none !important; }

@media (max-width: 991px) {
    body.view-details-page { padding-bottom: 80px !important; }
    .am24-related__grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 767px) {
    .am24-block { padding: var(--am24-s2); }
    .am24-facts { grid-template-columns: 1fr; }
    .am24-checks { grid-template-columns: 1fr; gap: 10px; }
    .am24-related__grid { grid-template-columns: 1fr; }
    .am24-rel { flex-direction: row; }
    .am24-rel__pic { flex: 0 0 120px; aspect-ratio: 4 / 3; }
}

/* ---- article page CTA ---- */
.am24-cta--pills { display: block; }
.am24-cta__pills { list-style: none; margin: var(--am24-s2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.am24-pill { display: inline-flex; align-items: center; min-height: var(--am24-tap); padding: 0 20px; border-radius: var(--am24-radius-pill); background: var(--am24-accent); color: #fff !important; font-weight: 600; text-decoration: none; }
.am24-pill:hover { background: var(--am24-accent-hover); }

/* never show a map pin: the gallery "Map" tab would point at the seller's precise address */
.listing-details .nav-buttons .map-group,
.listing-details .nav-buttons .nav-button.map,
.listing-details .nav-buttons .nav-button.gallery { display: none !important; }

/* "Get more details" block at the bottom: the seller card is already in the sidebar */
.get_more_details .seller-short .clearfix.relative { display: none; }
.am24-seller .listing-details-stat .link.hide { display: none; } /* reportBrokenListing shows one of Report / Cancel report via .hide */
/* E2: the seller card lives in the buy box now (all widths) → the round-5 mobile copy in "Message the seller" is not needed */
@media (max-width: 991px) {
    body .get_more_details .row.seller-short > div:first-child:not(:last-child) { display: none !important; }
}


/* =====================================================================================================
   E3 (builder L): Pets4homes-style listing page + helpful 404
   ===================================================================================================== */

/* ---- title row ---- */
body.view-details-page .listing-header.am24-lh { display: block; margin: 0 0 var(--am24-s2); padding: 0; }
.am24-lh__row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--am24-s3); }
.am24-lh__title { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; color: var(--am24-text); min-width: 0; overflow-wrap: anywhere; }
.am24-lh__price { flex: 0 0 auto; font-size: 28px; line-height: 1.2; font-weight: 800; color: var(--am24-accent); white-space: nowrap; }
.am24-lh__sub { display: flex; align-items: center; justify-content: space-between; gap: var(--am24-s2); margin-top: 10px; flex-wrap: wrap; }
.am24-lh__meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; color: var(--am24-muted); font-size: var(--am24-fs-sm); }
.am24-lh__meta li { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.am24-lh__meta li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--am24-muted); margin: 0 10px; opacity: .7; }
.am24-lh__meta li:first-child { color: var(--am24-text); }
.am24-sexi { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.am24-sexi--m { stroke: #2B6CB0; }
.am24-sexi--f { stroke: #B83280; }
.am24-lh__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.am24-lh__actions .icons { display: flex !important; align-items: center; gap: 4px; height: auto; }
.am24-lh__actions .icons a.print { display: none; }
.am24-lh__actions .icons a.button.low { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--am24-radius-pill); font-weight: 600; }
.am24-share, .am24-lh__actions .icons > span.favorite {
    display: inline-flex !important; align-items: center; gap: 8px; min-height: 44px; width: auto !important; height: 44px !important; padding: 0 12px !important;
    border: 0; border-radius: var(--am24-radius-pill) !important; background: transparent !important; box-shadow: none !important;
    color: var(--am24-text); font: 600 14px var(--am24-font); cursor: pointer; margin: 0 !important; line-height: 1;
}
.am24-share:hover, .am24-lh__actions .icons > span.favorite:hover { background: var(--am24-tint) !important; color: var(--am24-accent); }
.am24-share svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.am24-share svg circle { fill: none; }
.am24-lh__actions .icons > span.favorite > span.icon { width: 20px !important; height: 20px !important; flex: none; }
.am24-lh__actions .icons > span.favorite::after { content: "Save"; }
.am24-lh__actions .icons > span.favorite.remove::after { content: "Saved"; color: var(--am24-accent); }
@media (max-width: 767px) {
    .am24-lh__title, .am24-lh__price { font-size: 22px; }
    .am24-lh__row { flex-direction: column; gap: 6px; }
    .am24-lh__actions { margin-left: -12px; }
    body.view-details-page .listing-header.am24-lh { margin-bottom: var(--am24-s2); }
}

/* ---- gallery overlay ---- */
.gallery { position: relative; }
.am24-gctl { position: absolute; top: 0; left: 0; width: 100%; z-index: 6; pointer-events: none; aspect-ratio: 100 / 66; }
@media (min-width: 768px) { .am24-gctl { aspect-ratio: auto; height: 480px; } }
.am24-gctl > * { pointer-events: auto; }
.am24-gbtn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--am24-surface); color: var(--am24-text); box-shadow: 0 1px 6px rgba(16, 24, 16, .25); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.am24-gbtn:hover { background: var(--am24-tint); color: var(--am24-accent); }
.am24-gbtn svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.am24-gbtn--prev { left: 12px; }
.am24-gbtn--next { right: 12px; }
.am24-gctl .am24-photo-count { display: inline-flex; align-items: center; position: absolute; right: 12px; bottom: 12px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(20, 24, 20, .7); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.am24-enlarge { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--am24-surface); color: var(--am24-text); font: 600 13px var(--am24-font); box-shadow: 0 1px 6px rgba(16, 24, 16, .25); cursor: pointer; }
.am24-enlarge:hover { background: var(--am24-tint); color: var(--am24-accent); }
.am24-enlarge svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Nova's own "View Larger" is replaced by .am24-enlarge */
.gallery .nav-buttons { display: none !important; }
@media (max-width: 767px) {
    .am24-enlarge span { display: none; }
    .am24-enlarge { width: 40px; padding: 0; justify-content: center; }
}
.gallery > .am24-photo-count { display: none !important; }

/* ---- section headings + icons ---- */
.am24-block__title { display: flex; align-items: center; gap: 10px; }
.am24-ico { fill: none; stroke: var(--am24-accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.am24-details .am24-ico ellipse, .am24-details .am24-ico path { fill: var(--am24-accent); stroke: none; }
.am24-sec-title { font-size: var(--am24-fs-h3); font-weight: var(--am24-fw-head); margin: var(--am24-s3) 0 var(--am24-s2); color: var(--am24-text); line-height: 1.3; }
.am24-desc { margin-top: var(--am24-s2); }

/* ---- details + health side by side ---- */
.am24-pair { display: grid; grid-template-columns: 1fr; gap: var(--am24-s2); margin-bottom: var(--am24-s2); align-items: start; }
.am24-pair > .am24-block { margin-bottom: 0; }
@media (min-width: 992px) { .am24-pair--2 { grid-template-columns: 1fr 1fr; } }
.am24-pair--2 .am24-facts { grid-template-columns: 1fr; }
.am24-pair--2 .am24-checks { grid-template-columns: 1fr; gap: 0; }
.am24-pair--2 .am24-checks li { min-height: 46px; border-bottom: 1px solid var(--am24-border); }
/* ticks vertically centred with the text */
.am24-checks li { align-items: center; line-height: 1.3; }
.am24-checks__mark { align-self: center; margin: 0; }
.am24-checks .is-yes .am24-checks__mark::after { left: 7px; top: 4px; }
.am24-checks .is-no .am24-checks__mark { background: var(--am24-surface-2); }
.am24-checks .is-no .am24-checks__mark::after { left: 6px; top: 10px; width: 10px; height: 2px; background: var(--am24-muted); opacity: .6; }

/* ---- breed note ---- */
.am24-breednote__text { line-height: 1.6; overflow-wrap: anywhere; }
.am24-breednote__text.is-collapsed { max-height: 4.8em; overflow: hidden; position: relative; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.am24-breednote__text p { margin: 0 0 .6em; }
.am24-more { margin-top: 8px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--am24-accent); font: 700 15px var(--am24-font); cursor: pointer; }
.am24-more:hover { text-decoration: underline; }

/* ---- similar ads: 3 cols x 2 rows of the big card (card styles come from e2-category.css via #listings) ---- */
.am24-similar { margin: var(--am24-s3) 0 0; }
.am24-similar > #listings { margin-left: 0; margin-right: 0; }
.am24-similar #listings > article.item { flex: 0 0 50%; max-width: 50%; }
@media (min-width: 768px) { .am24-similar #listings > article.item { flex: 0 0 33.3333%; max-width: 33.3333%; } }
@media (max-width: 479px) { .am24-similar #listings > article.item { flex: 0 0 100%; max-width: 100%; } }
.aside-hidden, .similarListings { display: none !important; }

/* ---- related articles: full width, 3 big cards ---- */
.am24-related-wrap { margin: var(--am24-s4) 0 var(--am24-s2); }
.am24-related-wrap .am24-related__grid { gap: var(--am24-s2); }
.am24-rel { background: var(--am24-surface); border: 1px solid var(--am24-border); }
.am24-rel__body { padding: var(--am24-s2) var(--am24-s2) var(--am24-s3); }
.am24-rel__title { font-size: 17px; font-weight: 700; }
@media (max-width: 767px) {
    .am24-related-wrap .am24-related__grid { grid-template-columns: 1fr; }
}

/* ---- sticky buy box (desktop) ---- */
@media (min-width: 992px) {
    body.view-details-page .inside-container > .row { align-items: flex-start; }
    body.view-details-page aside.left { position: sticky; top: 16px; align-self: flex-start; }
    /* Nova's overflow: hidden on the wrapper made it the scroll container, so sticky never engaged; clip still cuts overflow but keeps sticky working */
    body.view-details-page > div.main-wrapper { overflow: clip; }
}
.am24-buybox .am24-price { color: var(--am24-accent); }

/* ---- 404 ---- */
.am24-nf { max-width: 920px; margin: 0 auto; padding: var(--am24-s3) 0 var(--am24-s5); }
.am24-nf__title { margin: 0 0 var(--am24-s1); font-size: 28px; font-weight: 800; color: var(--am24-text); line-height: 1.2; }
.am24-nf__lead { margin: 0 0 var(--am24-s3); color: var(--am24-muted); font-size: 16px; }
.am24-nf__search { display: flex; gap: 10px; margin: 0 0 var(--am24-s4); }
.am24-nf__search input[type=text] { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 18px; border: 1px solid var(--am24-border); border-radius: var(--am24-radius-pill); background: var(--am24-surface); font: 400 16px var(--am24-font); margin: 0; }
.am24-nf__search input[type=text]:focus { border-color: var(--am24-accent); outline: 0; box-shadow: 0 0 0 3px var(--am24-tint); }
.am24-nf__search button { flex: 0 0 auto; height: 52px; padding: 0 28px; border: 0; border-radius: var(--am24-radius-pill); background: var(--am24-accent); color: #fff; font: 700 16px var(--am24-font); cursor: pointer; margin: 0; }
.am24-nf__search button:hover { background: var(--am24-accent-hover); }
.am24-nf__h { margin: var(--am24-s4) 0 var(--am24-s2); font-size: var(--am24-fs-h3); font-weight: var(--am24-fw-head); color: var(--am24-text); }
.am24-nf__cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--am24-s2); }
.am24-nf__cats li { margin: 0; padding: 0; }
.am24-nf__cat { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 16px; background: var(--am24-surface); border: 1px solid var(--am24-border); border-radius: var(--am24-radius); text-decoration: none; color: var(--am24-text); transition: box-shadow .15s; }
.am24-nf__cat:hover { box-shadow: var(--am24-shadow-hover); }
.am24-nf__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--am24-tint); display: flex; align-items: center; justify-content: center; flex: none; }
.am24-nf__icon img { width: 32px; height: 32px; display: block; }
.am24-nf__name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.am24-nf__cat:hover .am24-nf__name { color: var(--am24-accent); }
.am24-nf__breeds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.am24-nf__breeds li { margin: 0; padding: 0; }
.am24-nf__breeds a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--am24-radius-pill); background: var(--am24-surface); border: 1px solid var(--am24-border); color: var(--am24-text); font-weight: 600; text-decoration: none; }
.am24-nf__breeds a:hover { border-color: var(--am24-accent); color: var(--am24-accent); background: var(--am24-tint); }
.am24-nf__home { margin: var(--am24-s4) 0 0; }
.am24-nf__home a { color: var(--am24-accent); font-weight: 700; display: inline-block; padding: 12px 0; }
@media (max-width: 991px) { .am24-nf__cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) {
    .am24-nf__title { font-size: 24px; }
    .am24-nf__cats { grid-template-columns: minmax(0, 1fr); }
    .am24-nf__search button { padding: 0 20px; }
}
.get_more_details { display: none !important; }
/* 404: the red "ERROR 404" flash would sit on top of the heading; the page itself says it */
body[class*="404-page"] .notification.error { display: none !important; }

/* gutters: title, gallery and blocks share one left edge on phones/tablets */
.am24-lh__title { padding: 0; }
.listing-details .content-section { padding-left: 0; padding-right: 0; }
@media (max-width: 767px) { .am24-block.am24-desc { padding-left: var(--am24-s2); } }
/* seller card: "Posted" only when younger than 90 days (same rule as the title row); Report stays */
.am24-seller.am24-old .listing-details-stat .controls li:has(> .name) { display: none; }


/* ===================== fix round 1 ===================== */

/* -- similar ads: own flex grid (16px gap, flush with the other blocks), meta row wraps, price on its own row -- */
.am24-similar > #listings { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 !important; padding: 0; }
.am24-similar #listings > article.item { padding: 0 !important; margin: 0 !important; min-width: 0; flex: 0 0 calc((100% - 32px) / 3); max-width: calc((100% - 32px) / 3); }
@media (min-width: 576px) and (max-width: 767px) { .am24-similar #listings > article.item { flex-basis: calc((100% - 16px) / 2); max-width: calc((100% - 16px) / 2); } }
.am24-similar #listings ul.card-info { min-height: 0 !important; height: auto; }
.am24-similar #listings .am24-foot:empty { display: none; }
.am24-similar #listings .am24-meta { flex-wrap: wrap; row-gap: 6px; column-gap: 12px; justify-content: flex-start; }
.am24-similar #listings .am24-meta__i { min-width: 0; margin: 0 !important; }
.am24-similar #listings .am24-meta__price { flex: 0 0 100%; margin: 0 !important; text-align: left; align-items: flex-start; }
.am24-similar #listings .am24-meta__price b.price-tag { white-space: normal; }
/* phones: one horizontal swipe row */
@media (max-width: 575px) {
    .am24-similar > #listings { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; scrollbar-width: none; }
    .am24-similar > #listings::-webkit-scrollbar { display: none; }
    .am24-similar #listings > article.item { flex: 0 0 78%; max-width: 78%; scroll-snap-align: start; }
}

/* -- spacing at the bottom of the left column -- */
.am24-related-wrap { margin-bottom: 0; }
aside.middle { margin-top: 0 !important; }
#rv_listings { margin-top: 32px; }

/* -- title / gallery / blocks: one gutter (the 16px container) at every width -- */
.am24-lh, .am24-lh__row, .am24-lh__title { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
.listing-details, .listing-details .content-section, .listing-details .main-section { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }
#area_listing, #area_listing > .am24-block, .am24-similar, .am24-related-wrap { margin-left: 0; margin-right: 0; }

/* -- phone gallery: the desktop stage (4:3, contain) + a thumb strip instead of Nova's swipe slider -- */
@media (max-width: 767px) {
    div.gallery { padding-bottom: 0 !important; margin-bottom: 16px; }
    div.gallery > #media { padding-bottom: 0 !important; height: auto; aspect-ratio: 4 / 3; }
    div.gallery > #media[data-view=gallery] .preview { display: flex !important; height: 100%; align-items: center; justify-content: center; overflow: hidden; background: var(--am24-surface-2); border-radius: var(--am24-radius); padding: 0; }
    div.gallery > #media img.default-picture { position: static !important; width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; background: none !important; border-radius: 0; display: block; }
    div.gallery > div.thumbs { position: static !important; display: block; width: auto; margin: 12px 0 0; padding: 0; background: none; }
    div.gallery > div.thumbs .f-carousel__viewport { overflow-x: auto; overflow-y: hidden; margin: 0 !important; padding: 0; background: none; scrollbar-width: none; }
    div.gallery > div.thumbs .f-carousel__viewport::-webkit-scrollbar { display: none; }
    div.gallery > div.thumbs .f-carousel__track { transform: none !important; display: flex; gap: 8px; margin: 0 !important; width: max-content; }
    div.gallery > div.thumbs .f-carousel__slide { flex: 0 0 64px !important; width: 64px !important; height: 48px !important; padding: 0 !important; margin: 0 !important; border-radius: 8px; overflow: hidden; border: 2px solid transparent; box-sizing: border-box; position: relative; }
    div.gallery > div.thumbs .f-carousel__slide.active { border-color: var(--am24-accent); }
    div.gallery > div.thumbs .f-carousel__slide img { position: static; width: 100%; height: 100%; border: 0; border-radius: 0; object-fit: cover; display: block; }
    div.gallery > div.thumbs .f-button { display: none !important; }
    .am24-gctl { aspect-ratio: 4 / 3; height: auto; }
}

/* -- seller card -- */
.am24-seller .listing-details-stat:not(:has(li)) { display: none !important; }
@media (max-width: 991px) {
    .am24-seller .am24-seller__top, .am24-seller .am24-seller__ads { display: none; }
    .am24-seller { padding: var(--am24-s2); }
    .am24-seller .am24-safety { margin-top: 0; }
    .am24-seller .listing-details-stat { margin-top: var(--am24-s1); padding-top: var(--am24-s1); }
    .am24-seller.am24-old .listing-details-stat .controls:not(:has(li:not(:has(> .name)))) { display: none; }
    .am24-seller:not(:has(.am24-safety)) .listing-details-stat { margin-top: 0; padding-top: 0; border-top: 0; }
}
.am24-sellerm { display: flex; align-items: center; gap: var(--am24-s2); }
.am24-sellerm .am24-seller__avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--am24-tint); color: var(--am24-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.am24-sellerm__who { min-width: 0; }
.am24-sellerm .am24-seller__name, .am24-sellerm .am24-seller__name a { font-size: 17px; }
.am24-sellerm .am24-seller__meta a { color: var(--am24-accent); font-weight: 600; }

/* -- details / health rows -- */
.am24-facts > div { min-height: 46px; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.am24-checks li { min-height: 46px; }
.am24-pair { align-items: stretch; }
@media (min-width: 992px) and (max-width: 1199px) { .am24-checks li { font-size: 14px; } .am24-facts { font-size: 14px; } }

/* -- mobile bar + page bottom -- */
body.view-details-page { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
@media (min-width: 992px) { body.view-details-page { padding-bottom: 0 !important; } }

/* -- recently viewed + breadcrumb -- */
#rv_listings .rv_first { white-space: nowrap; }
@media (max-width: 575px) {
    #rv_listings .rv_last { display: none !important; }
    #rv_listings .rv_items .item img, #rv_listings .rv_items .item a { width: 56px; height: 42px; }
}
@media (min-width: 992px) {
    body.view-details-page #bread_crumbs ul > ol { display: inline-block; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
}

/* -- 404: everything on the container edge; only lead + search are narrow -- */
.am24-nf { max-width: none; margin: 0; padding: 0 0 var(--am24-s5); }
.am24-nf__lead, .am24-nf__search { max-width: 720px; }
body[class*="404-page"] #controller_area .content-padding, body[class*="404-page"] #controller_area { padding-left: 0; padding-right: 0; }
body[class*="404-page"] h1 { margin-bottom: 8px; }
.am24-nf__cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991px) { .am24-nf__cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px) { .am24-nf__cats { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 575px) { .am24-nf__cat { padding: 10px 12px; gap: 10px; } .am24-nf__name { font-size: 15px; } }
body .listing-details section.content-section { padding-left: 0 !important; padding-right: 0 !important; }
body #rv_listings { margin: 32px 0 0 !important; }
body.view-details-page #controller_area { padding-bottom: 0 !important; }
body .listing-details section.content-section { margin-top: 0 !important; }
body .listing-details .am24-desc { margin-top: 0; }
body .listing-details div.gallery { margin-bottom: 16px; }

/* =====================================================================================================
   2026-10-12 P4H polish: title + one price in the main card, 4:3 gallery, Pet details | Health & docs | Info,
   seller card, full-width lower area (breed note, similar ads, articles), approximate-area map
   ===================================================================================================== */

/* ---- main card (>= 768): header, gallery, description, info box, location, how buying works ---- */
@media (min-width: 768px) {
    body.view-details-page #controller_area > .listing-details {
        background: var(--am24-surface); border-radius: var(--am24-radius); padding: var(--am24-s3) var(--am24-s3) var(--am24-s2);
    }
    body.view-details-page #area_listing > .am24-block, body.view-details-page #area_listing > .am24-info {
        background: none; border-radius: 0; padding: var(--am24-s3) 0; margin: 0; border-top: 1px solid var(--am24-border);
    }
    body.view-details-page #area_listing > .am24-desc { border-top: 0; padding-top: 4px; }
    body.view-details-page #area_listing > .am24-howbuy { margin: 0 0 var(--am24-s1); }
}
@media (min-width: 1200px) {
    body.view-details-page #controller_area > .listing-details { padding: 28px 32px var(--am24-s2); }
}
body.view-details-page .listing-header.am24-lh { margin: 0 0 var(--am24-s2); }
.am24-lh__title { font-size: 30px; }
.am24-lh__price { font-size: 30px; color: var(--am24-text); }
@media (max-width: 767px) {
    .am24-lh__title, .am24-lh__price { font-size: 22px; }
    .am24-lh__row { flex-direction: row; align-items: flex-start; gap: 12px; }
    .am24-lh__price { font-size: 22px; }
}
@media (max-width: 400px) { .am24-lh__row { flex-direction: column; gap: 4px; } }

/* ---- gallery: one 4:3 stage at every width (photo contained, never cropped), thumb strip under it ---- */
@media (min-width: 768px) {
    div.gallery { padding-bottom: 0 !important; margin-bottom: var(--am24-s2); }
    div.gallery > #media { padding-bottom: 0 !important; height: auto !important; aspect-ratio: 4 / 3; position: relative; }
    div.gallery > #media[data-view=gallery] .preview { display: flex !important; position: absolute; inset: 0; height: 100%; align-items: center; justify-content: center; overflow: hidden; background: var(--am24-surface-2); border-radius: var(--am24-radius); padding: 0; }
    div.gallery > #media img.default-picture { position: static !important; width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; background: none !important; border-radius: 0; display: block; transform: none !important; }
    div.gallery > div.thumbs { position: static !important; display: block; width: auto; margin: 12px 0 0; padding: 0; background: none; }
    div.gallery > div.thumbs .f-carousel__viewport { overflow-x: auto; overflow-y: hidden; margin: 0 !important; padding: 0; background: none; scrollbar-width: none; }
    div.gallery > div.thumbs .f-carousel__viewport::-webkit-scrollbar { display: none; }
    div.gallery > div.thumbs .f-carousel__track { transform: none !important; display: flex; gap: 8px; margin: 0 !important; width: max-content; }
    div.gallery > div.thumbs .f-carousel__slide { flex: 0 0 96px !important; width: 96px !important; height: 72px !important; padding: 0 !important; margin: 0 !important; border-radius: 8px; overflow: hidden; border: 2px solid transparent; box-sizing: border-box; position: relative; cursor: pointer; }
    div.gallery > div.thumbs .f-carousel__slide.active { border-color: var(--am24-accent); }
    div.gallery > div.thumbs .f-carousel__slide img { position: static; width: 100%; height: 100%; border: 0; border-radius: 0; object-fit: cover; display: block; }
    div.gallery > div.thumbs .f-button { display: none !important; }
    .am24-gctl { aspect-ratio: 4 / 3 !important; height: auto !important; }
}

/* ---- Pet details | Health & docs | Info ---- */
.am24-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--am24-s3); background: var(--am24-surface); border-radius: var(--am24-radius); padding: var(--am24-s2); margin: 0 0 var(--am24-s2); }
@media (min-width: 576px) { .am24-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .am24-info--3 { grid-template-columns: 1.15fr 1.1fr .85fr; } }
.am24-info__h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--am24-text); }
.am24-ico--fill ellipse, .am24-ico--fill path { fill: var(--am24-accent); stroke: none; }
.am24-kv { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.am24-kv > div { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: 12px; padding: 5px 0; align-items: baseline; }
.am24-kv dt { font-weight: 400; color: var(--am24-muted); font-size: 15px; }
.am24-kv dd { margin: 0; font-weight: 600; color: var(--am24-text); font-size: 15px; overflow-wrap: anywhere; }
.am24-kv dd a { color: var(--am24-accent); }
.am24-hd { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.am24-hd li { display: flex; align-items: center; gap: 10px; padding: 5px 0; margin: 0; font-size: 15px; line-height: 1.35; }
.am24-hd svg { flex: none; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.am24-hd .is-yes { color: var(--am24-text); font-weight: 600; }
.am24-hd .is-yes svg { stroke: var(--am24-accent); }
.am24-hd .is-no { color: #9AA0A8; }
.am24-hd .is-no svg { stroke: #B8BEC6; stroke-width: 1.8; }
.am24-info .am24-microchip { margin: 10px 0 0; font-size: 14px; }
@media (min-width: 576px) and (max-width: 1399px) { .am24-info--3 .am24-infocol { grid-column: 1 / -1; } .am24-info--3 .am24-infocol .am24-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--am24-s3); } }

/* ---- Location ---- */
.am24-loc__city { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.am24-loc__city svg, .am24-scard__list svg { flex: none; fill: none; stroke: var(--am24-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button.am24-maplink { display: inline; padding: 0; margin: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--am24-accent); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
button.am24-maplink:hover { color: var(--am24-accent-hover); }
.am24-kv dd button.am24-maplink { font-weight: 600; }
button.am24-maplink--area { font-weight: 600; margin-left: 4px; }
button.am24-maplink.is-plain { color: inherit; text-decoration: none; cursor: default; pointer-events: none; }
button.am24-maplink--area.is-plain { display: none; }

/* ---- seller card ---- */
aside.left .am24-scard { padding: var(--am24-s3); }
.am24-scard__top { display: flex; align-items: center; justify-content: space-between; gap: var(--am24-s2); margin-bottom: var(--am24-s2); }
.am24-scard__name, .am24-scard__name a { font-size: 20px; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; color: var(--am24-text) !important; text-decoration: none; overflow-wrap: anywhere; line-height: 1.25; }
.am24-scard__name a:hover { color: var(--am24-accent) !important; }
.am24-scard__avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: var(--am24-tint); color: var(--am24-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; }
.am24-scard__actions { flex-direction: column; gap: 10px; margin-bottom: var(--am24-s2); }
.am24-scard__pair { display: flex; gap: 10px; }
.am24-scard__pair .am24-btn { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 15px; }
.am24-btn { gap: 8px; }
.am24-btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.am24-btn--primary { background: var(--am24-accent); color: #fff; border-color: var(--am24-accent); }
.am24-btn--primary:hover { background: var(--am24-accent-hover); border-color: var(--am24-accent-hover); }
.am24-scard .am24-btn--wa { background: var(--am24-surface); color: var(--am24-accent); border-color: var(--am24-accent); }
.am24-scard .am24-btn--wa:hover, .am24-scard .am24-btn--call:hover { background: var(--am24-tint); }
.am24-scard__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.am24-scard__list li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; font-size: 15px; color: var(--am24-text); }
.am24-scard .am24-safety { margin: var(--am24-s2) 0 0; padding-top: var(--am24-s2); border-top: 1px solid var(--am24-border); }
.am24-scard__all { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: var(--am24-s2); border: 2px solid var(--am24-accent); border-radius: var(--am24-radius-pill); color: var(--am24-accent) !important; font-weight: 700; font-size: 15px; text-decoration: none; }
.am24-scard__all:hover { background: var(--am24-tint); }
.am24-scard__count { margin: var(--am24-s2) 0 0; font-size: 14px; color: var(--am24-muted); }
.am24-scard .listing-details-stat { margin-top: var(--am24-s2); padding-top: var(--am24-s2); border-top: 1px solid var(--am24-border); display: flex !important; flex-direction: column !important; gap: 4px; font-size: var(--am24-fs-sm); color: var(--am24-muted); }
.am24-scard .listing-details-stat ul { margin: 0; padding: 0; list-style: none; }
.am24-scard .listing-details-stat .link { cursor: pointer; color: var(--am24-danger, #B42318); display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.am24-scard .listing-details-stat .link.hide { display: none; }
.am24-scard .listing-details-stat .rbl-icon svg { width: 16px; height: 16px; }
.am24-scard .listing-details-stat:not(:has(li)) { display: none !important; }
.am24-scard.am24-old .listing-details-stat .controls li:has(> .name) { display: none; }
@media (max-width: 991px) {
    aside.left .am24-scard { padding: var(--am24-s2); margin-top: var(--am24-s2); }
    .am24-scard .am24-safety { margin-top: var(--am24-s2); }
}

/* ---- full-width lower area (filled by am24-listing.js; >= 992 it spans both columns) ---- */
.am24-wide { margin-top: var(--am24-s4); }
.am24-wide > .am24-breednote { background: var(--am24-surface); border-radius: var(--am24-radius); padding: var(--am24-s3); margin: 0 0 var(--am24-s4); }
.am24-wide > .am24-similar { margin: 0 0 var(--am24-s4); }
.am24-wide .am24-sec-title { font-size: 24px; font-weight: 800; margin: 0 0 var(--am24-s2); }
.am24-wide .am24-similar > #listings { gap: 20px; }
.am24-wide .am24-similar #listings > article.item { flex: 0 0 calc((100% - 40px) / 3); max-width: calc((100% - 40px) / 3); }
.am24-wide .am24-similar #listings .am24-meta { display: grid !important; grid-template-columns: 1fr 1fr 1.25fr; }
.am24-wide .am24-similar #listings .am24-meta__price { grid-column: 3; flex: none; text-align: right; align-items: flex-end; }
.am24-wide .am24-similar #listings .am24-meta__price b.price-tag { white-space: nowrap; }
@media (min-width: 576px) and (max-width: 991px) { .am24-wide .am24-similar #listings > article.item { flex-basis: calc((100% - 20px) / 2); max-width: calc((100% - 20px) / 2); } .am24-wide .am24-similar #listings > article.item:nth-child(n+5) { display: none; } }
@media (max-width: 575px) {
    .am24-wide { margin-top: var(--am24-s3); }
    .am24-wide .am24-similar #listings > article.item { flex: 0 0 82%; max-width: 82%; }
    .am24-wide > .am24-breednote { padding: var(--am24-s2); }
    .am24-wide .am24-sec-title { font-size: 20px; }
}
.am24-wide .am24-related-wrap { margin: 0 0 var(--am24-s2); }

/* ---- approximate-area map modal ---- */
.am24-map-dlg { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 24, 16, .55); }
.am24-map-dlg[hidden] { display: none; }
.am24-map-dlg__box { position: relative; width: 100%; max-width: 720px; background: var(--am24-surface); border-radius: 16px; padding: 20px 24px 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.am24-map-dlg__h { margin: 0 48px 4px 0; font-size: 22px; font-weight: 800; color: var(--am24-text); line-height: 1.25; }
.am24-map-dlg__note { margin: 0 0 14px; font-size: 14px; color: var(--am24-muted); }
.am24-map-dlg__x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; cursor: pointer; color: var(--am24-accent); display: flex; align-items: center; justify-content: center; }
.am24-map-dlg__x:hover { background: var(--am24-tint); }
.am24-map-dlg__x svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.am24-map-dlg__map { width: 100%; height: min(60vh, 520px); border-radius: 10px; overflow: hidden; background: var(--am24-surface-2); }
.am24-map-dlg .leaflet-control-zoom { border: 0 !important; box-shadow: none !important; }
.am24-map-dlg .leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 34px !important; margin-bottom: 6px; border: 0 !important; border-radius: 8px !important; background: var(--am24-accent) !important; color: #fff !important; font-size: 20px !important; }
.am24-map-dlg .leaflet-control-zoom a:hover { background: var(--am24-accent-hover) !important; }
@media (max-width: 575px) { .am24-map-dlg { padding: 0; align-items: flex-end; } .am24-map-dlg__box { border-radius: 16px 16px 0 0; padding: 16px; } .am24-map-dlg__map { height: 60vh; } }
html.am24-modal-open { overflow: hidden; }
/* Nova's generic button colours win on specificity: pin the seller-card buttons */
aside.left section.am24-scard button.am24-btn--primary { background: var(--am24-accent) !important; color: #fff !important; border: 2px solid var(--am24-accent) !important; }
aside.left section.am24-scard button.am24-btn--primary:hover { background: var(--am24-accent-hover) !important; border-color: var(--am24-accent-hover) !important; }
aside.left section.am24-scard button.am24-btn--wa, aside.left section.am24-scard button.am24-btn--call { background: var(--am24-surface) !important; color: var(--am24-accent) !important; border: 2px solid var(--am24-accent) !important; }
aside.left section.am24-scard button.am24-btn--wa:hover, aside.left section.am24-scard button.am24-btn--call:hover { background: var(--am24-tint) !important; }
@media (max-width: 991px) { body.view-details-page aside.left { padding-left: 0; padding-right: 0; } body.view-details-page aside.left .am24-scard { margin-left: 0; margin-right: 0; } }
.am24-map-dlg .leaflet-control-zoom { display: flex !important; flex-direction: column; gap: 6px; margin: 10px 0 0 10px !important; }
.am24-map-dlg .leaflet-control-zoom a { display: block !important; text-align: center; text-decoration: none !important; margin: 0 !important; font-weight: 700; font-family: Arial, sans-serif; }
#rv_listings .rv-container .rv_first { flex: 0 0 auto !important; width: auto !important; min-width: max-content; max-width: none !important; }

/* ---- 2026-10-20 gallery: the photo fills the 4:3 stage (most "large" files are only 640px wide and sat small in the middle);
   the bands around it show a blurred copy of the same photo instead of flat gray. --am24-gbg is set by js/am24-listing.js ---- */
div.gallery > #media[data-view=gallery] .preview { isolation: isolate; }
@media (max-width: 767px) { div.gallery > #media[data-view=gallery] .preview { position: relative; } }
div.gallery > #media[data-view=gallery] .preview::before { content: ""; position: absolute; inset: -40px; z-index: -1; background: var(--am24-gbg, none) center / cover no-repeat; filter: blur(28px); opacity: .6; pointer-events: none; }
div.gallery > #media[data-view=gallery] .preview.video::before,
div.gallery > #media[data-view=gallery] .preview.local::before,
div.gallery > #media[data-view=gallery] .preview.locked::before { display: none; }
div.gallery > #media img.default-picture { width: 100% !important; height: 100% !important; max-width: none; max-height: none; object-fit: contain; }
/* phones: no blur (paint cost on cheap phones; the bands are thin there) */
@media (max-width: 767px) { div.gallery > #media[data-view=gallery] .preview::before { display: none; } }
/* the phone <picture> wrapper must not become the flex item: the img stays the stage child */
div.gallery > #media .preview > picture { display: contents; }
