/* LandDU listings (Rooms, Cars, Buy & Sell): lists and singles in the round 6 look. Loaded only on those pages (includes/pages/listings.php).
   Built from landdu.css tokens and the approved .ld-card; Adrian's idu-listings CSS stays loaded underneath and is overridden here. */

/* ---- Page ground: the theme's cream becomes the round 6 listings surface ---- */
body.ld-listings .site-content { background: var(--ld-surface); } /* top spacing under the header is the header's own (set by the header builder) */
body.ld-listings .idu-wrap { color: var(--ld-ink); font-family: var(--ld-text); }
body.ld-listings .idu-archive { padding: 40px 0 72px; }
body.ld-listings .idu-single { padding: 8px 0 72px; }
body.ld-listings .idu-wrap h1, body.ld-listings .idu-wrap h2, body.ld-listings .idu-wrap h3 { font-family: var(--ld-heading); }

/* ---- Archive: header ---- */
body.ld-listings .idu-results { background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0; }
body.ld-listings .idu-archive-head { align-items: flex-end; flex-wrap: wrap; gap: 16px 24px; margin-bottom: 28px; padding: 0; border: 0; }
body.ld-listings .idu-archive-head-title { align-items: center; flex-wrap: wrap; gap: 8px 14px; min-width: 0; }
body.ld-listings .idu-archive-title { margin: 0; font: var(--ld-weight-display) var(--ld-fs-h2)/1.02 var(--ld-heading); font-stretch: var(--ld-stretch-h2); letter-spacing: -.01em; color: var(--ld-midnight); overflow-wrap: anywhere; }
body.ld-listings .idu-archive-count,
body.ld-listings .idu-archive-head-title .idu-archive-count { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: var(--ld-r-pill); background: var(--ld-info-bg); color: var(--ld-deep); font: 600 var(--ld-fs-pill)/1 var(--ld-text); }
body.ld-listings .idu-archive-head-title .idu-archive-count::before { display: none; }
body.ld-listings .idu-archive-head-tools { flex-wrap: wrap; gap: 10px 12px; }

/* ---- Sort, view switch, Post Ad ---- */
body.ld-listings .idu-sort-label { font: 500 13px/1 var(--ld-text); color: var(--ld-text-muted); }
body.ld-listings .idu-sort select, body.ld-listings .idu-sort .facetwp-sort-select {
	height: 44px; padding: 0 38px 0 16px; border: 0; border-radius: var(--ld-r-pill); background-color: var(--ld-white); color: var(--ld-midnight);
	font: 600 14px/1 var(--ld-text); box-shadow: inset 0 0 0 1px var(--ld-line); cursor: pointer; max-width: 100%;
}
body.ld-listings .idu-sort select, body.ld-listings .idu-sort .facetwp-sort-select { height: auto !important; min-height: 44px; }
body.ld-listings .idu-sort select:focus-visible { outline: 2px solid var(--ld-electric); outline-offset: 2px; }
body.ld-listings .idu-view-switch { border: 0; background: var(--ld-white); border-radius: var(--ld-r-pill); box-shadow: inset 0 0 0 1px var(--ld-line); padding: 3px; gap: 2px; }
body.ld-listings .idu-view-btn { border-radius: var(--ld-r-pill); border: 0; background: none; color: var(--ld-midnight); }
body.ld-listings .idu-view-btn.is-active { background: var(--ld-info-bg); color: var(--ld-deep); }
body.ld-listings .idu-view-btn svg path { fill: currentColor; }
body.ld-listings .idu-btn.idu-btn--primary.idu-archive-post-cta, body.ld-listings .idu-single .idu-btn--primary {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border: 0; border-radius: var(--ld-r-pill);
	background: var(--ld-electric); color: var(--ld-on-primary); font: 600 14px/1 var(--ld-text); text-decoration: none; box-shadow: var(--ld-glow-primary); transition: background 200ms, transform 160ms;
}
body.ld-listings .idu-btn.idu-btn--primary.idu-archive-post-cta:hover, body.ld-listings .idu-single .idu-btn--primary:hover { background: var(--ld-deep); color: var(--ld-on-primary); }
body.ld-listings .idu-btn.idu-btn--primary.idu-archive-post-cta:active, body.ld-listings .idu-single .idu-btn--primary:active { transform: scale(.97); }

/* ---- Filters panel, search and the phone Filter sheet: assets/css/pages/filters.css ---- */


/* ---- Results grid with the approved ld-card ---- */
body.ld-listings .idu-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { body.ld-listings .idu-grid, body.ld-listings .idu-results .idu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { body.ld-listings .idu-results .idu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.ld-listings .idu-grid > .ld-card { min-width: 0; }
body.ld-listings .idu-grid .ld-card__title, body.ld-listings .idu-grid .ld-card__meta, body.ld-listings .idu-grid .ld-card__extra { overflow-wrap: anywhere; }
body.ld-listings .idu-grid .ld-card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* list view: the same card, photo left */
body.ld-listings .idu-results.idu-view-list .idu-grid { grid-template-columns: 1fr; }
@media (min-width: 600px) {
	body.ld-listings .idu-results.idu-view-list .ld-card { flex-direction: row; }
	body.ld-listings .idu-results.idu-view-list .ld-card__photo { flex: 0 0 38%; aspect-ratio: auto; min-height: 190px; }
}
body.ld-listings .idu-empty { padding: 28px; border-radius: var(--ld-r-card); background: var(--ld-white); box-shadow: var(--ld-shadow-card); color: var(--ld-text-muted); font: 400 var(--ld-fs-support)/1.5 var(--ld-text); }

/* ---- Pager ---- */
body.ld-listings .idu-pagination { margin-top: 32px; }
body.ld-listings .idu-archive .facetwp-pager { display: flex; flex-wrap: wrap; gap: 8px; }
body.ld-listings .idu-archive .facetwp-pager .facetwp-page { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; margin: 0; border-radius: var(--ld-r-pill); background: var(--ld-white); color: var(--ld-midnight); font: 600 14px/1 var(--ld-text); box-shadow: inset 0 0 0 1px var(--ld-line); }
body.ld-listings .idu-archive .facetwp-pager .facetwp-page.active { background: var(--ld-midnight); color: var(--ld-white); box-shadow: none; }

/* ---- Fallback card (related listings on the single, search): same family as .ld-card ---- */
body.ld-listings .idu-card { background: var(--ld-white); border-radius: var(--ld-r-card); box-shadow: var(--ld-shadow-card); overflow: hidden; transition: transform 220ms var(--ld-ease), box-shadow 220ms; }
body.ld-listings .idu-card-link:hover { color: inherit; }
body.ld-listings .idu-card-body { padding: 16px 18px 20px; gap: 8px; }
body.ld-listings .idu-card-title { font: 600 var(--ld-fs-card)/1.3 var(--ld-text); letter-spacing: 0; color: var(--ld-ink); }
body.ld-listings .idu-card-price { padding: 7px 12px; font: var(--ld-weight-display) 15px/1 var(--ld-heading); letter-spacing: 0; color: var(--ld-midnight); background: var(--ld-glass); backdrop-filter: blur(8px); }
body.ld-listings .idu-card-loc { font: 400 var(--ld-fs-meta)/1.3 var(--ld-text); color: var(--ld-text-faint); }
body.ld-listings .idu-card-loc::after { display: none; }
body.ld-listings .idu-badge { background: var(--ld-scrim); color: var(--ld-white); font: 600 var(--ld-fs-pill)/1 var(--ld-text); letter-spacing: 0; box-shadow: none; }
body.ld-listings .idu-featured-flag { background: linear-gradient(90deg, var(--ld-gold), var(--ld-gold-2)); color: var(--ld-gold-ink); font: 700 var(--ld-fs-pill)/1 var(--ld-text); letter-spacing: .06em; text-transform: uppercase; }
@media (hover: hover) { body.ld-listings .idu-card:hover { transform: translateY(-6px); } }

/* ---- Single listing ---- */
body.ld-listings .idu-breadcrumbs { font: 500 13px/1.4 var(--ld-text); color: var(--ld-text-faint); overflow-wrap: anywhere; }
body.ld-listings .idu-breadcrumbs a { color: var(--ld-electric); }
body.ld-listings .idu-single .idu-gallery-main, body.ld-listings .idu-single .idu-gallery-img { border-radius: var(--ld-r-card); }
body.ld-listings .idu-single .idu-gallery-main { box-shadow: var(--ld-shadow-card); overflow: hidden; }
body.ld-listings .idu-single .idu-gallery-nav { background: var(--ld-glass); color: var(--ld-midnight); border: 0; box-shadow: 0 8px 18px -8px rgba(0,0,0,.4); }
body.ld-listings .idu-single .idu-gallery-thumb-btn { border-radius: var(--ld-r-chip); border: 0; overflow: hidden; }
body.ld-listings .idu-single .idu-gallery-thumb-btn.is-active { box-shadow: 0 0 0 2px var(--ld-electric); }
body.ld-listings .idu-single .idu-sidebar-top, body.ld-listings .idu-single .idu-panel, body.ld-listings .idu-single .idu-related {
	background: var(--ld-white); border: 0; border-radius: var(--ld-r-card); box-shadow: var(--ld-shadow-card);
}
/* the sidebar card holds the buy box, seller and share flat inside it, so no card inside a card */
body.ld-listings .idu-single .idu-buybox, body.ld-listings .idu-single .idu-share-card { background: none; border: 0; box-shadow: none; }
body.ld-listings .idu-single .idu-seller-card { background: var(--ld-pearl); border: 0; border-radius: var(--ld-r-chip); box-shadow: none; }
body.ld-listings .idu-single .idu-keyfact { background: var(--ld-pearl); border: 0; border-radius: var(--ld-r-pill); box-shadow: none; }
body.ld-listings .idu-single .idu-gallery-noimg { background: var(--ld-pearl); }
/* No photo (QA A, 15 Oct): Adrian's 4:3 WooCommerce picture frame filled a whole phone screen; it becomes a slim tinted band with the frame small in the middle */
body.ld-listings .idu-single .idu-gallery:has(> .idu-gallery-noimg) { border-radius: var(--ld-r-card); background: var(--ld-pearl); }
body.ld-listings .idu-single .idu-gallery > .idu-gallery-noimg { display: block; width: 100%; height: 132px; aspect-ratio: auto; padding: 28px 0; box-sizing: border-box; object-fit: scale-down; background: none; mix-blend-mode: multiply; opacity: .7; }
@media (min-width: 900px) { body.ld-listings .idu-single .idu-gallery > .idu-gallery-noimg { height: 240px; padding: 56px 0; } }
body.ld-listings .idu-single .idu-single-title { font: var(--ld-weight-display) clamp(26px, 5vw, 36px)/1.08 var(--ld-heading); font-stretch: var(--ld-stretch-h2); letter-spacing: -.01em; color: var(--ld-midnight); overflow-wrap: anywhere; }
body.ld-listings .idu-single .idu-price { font: var(--ld-weight-display) 30px/1 var(--ld-heading); font-stretch: 112%; color: var(--ld-midnight); }
body.ld-listings .idu-single .idu-price .idu-per { font: 500 14px/1 var(--ld-text); color: var(--ld-text-faint); }
body.ld-listings .idu-single .idu-section-title { font: var(--ld-weight-display) 22px/1.15 var(--ld-heading); color: var(--ld-midnight); }
body.ld-listings .idu-single .idu-desc, body.ld-listings .idu-single .idu-desc p { font: 400 16px/1.6 var(--ld-text); color: var(--ld-ink); overflow-wrap: anywhere; }
body.ld-listings .idu-single .idu-keyfact { color: var(--ld-ink); }
body.ld-listings .idu-single .idu-ico { color: var(--ld-electric); }
body.ld-listings .idu-single .idu-specs li { border-color: var(--ld-hairline); }
body.ld-listings .idu-single .idu-spec-label { color: var(--ld-text-muted); }
body.ld-listings .idu-single .idu-spec-value { color: var(--ld-midnight); }
body.ld-listings .idu-single .idu-feature { background: var(--ld-info-bg); color: var(--ld-deep); border-radius: var(--ld-r-pill); }
body.ld-listings .idu-single .idu-related-title { font: var(--ld-weight-display) var(--ld-fs-h2)/1.02 var(--ld-heading); font-stretch: var(--ld-stretch-h2); color: var(--ld-midnight); }
body.ld-listings .idu-single .idu-map iframe { border-radius: var(--ld-r-chip); }
body.ld-listings .idu-single .idu-message-text { border: 0; border-radius: var(--ld-r-chip); background: var(--ld-pearl); font: 400 15px/1.5 var(--ld-text); }
body.ld-listings .idu-single .idu-message-text:focus { outline: 2px solid var(--ld-electric); outline-offset: 2px; }

/* ---- Phone: nothing runs sideways ---- */
body.ld-listings .idu-wrap { overflow-wrap: break-word; }
@media (max-width: 599px) {
	body.ld-listings .idu-archive-head-tools { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { body.ld-listings .idu-card, body.ld-listings .idu-btn { transition: none; } body.ld-listings .idu-card:hover { transform: none; } }
/* QA A, 15 Oct: the Google map is 320px tall from Adrian's markup, a screen and a half of map on a phone: 200px there */
@media (max-width: 600px) { body.ld-listings .idu-single .idu-map iframe { height: 200px; } }

/* ===== Flow 1 (28 Oct): quick filters, the deciding fact on each card, loading and empty states (includes/pages/listings.php, templates/idu/archive-listing.php) ===== */
body.ld-listings .idu-results { min-width: 0; }
body.ld-listings .ldq { display: flex; gap: 8px; min-width: 0; max-width: 100%; box-sizing: border-box; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding: 2px 0; }
body.ld-listings .ldq::-webkit-scrollbar { display: none; }
body.ld-listings .ldq__c { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #dfe3ec; border-radius: 999px; background: #fff; color: #0d1224; font: 600 14px/1.2 var(--ld-text); text-decoration: none; white-space: nowrap; transition: transform 140ms cubic-bezier(.2,0,0,1), background 140ms, border-color 140ms; -webkit-tap-highlight-color: transparent; }
body.ld-listings .ldq__c:hover { border-color: #b9c2d6; color: #0d1224; }
body.ld-listings .ldq__c:active { transform: scale(.96); }
body.ld-listings .ldq__c[aria-pressed="true"] { background: #0a0e24; border-color: #0a0e24; color: #fff; }
body.ld-listings .ldq__c[aria-pressed="true"]::after { content: ""; width: 10px; height: 10px; margin-left: 8px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
@media (max-width: 900px) { body.ld-listings .ldq { width: 100vw; max-width: 100vw; margin: -4px 0 10px -16px; padding: 2px 16px; } }
/* The kind pill is gone on its own page; "New" takes its place for listings under three days old */
body.ld-listings .ld-card--lx .ld-pill--new { align-self: flex-start; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #e3f5ec; color: #12805c; font: 700 11.5px/1 var(--ld-text); letter-spacing: .02em; }
body.ld-listings .ld-card--lx .ld-card__extra { color: #3b4460; }
/* While FacetWP refreshes: the list dims under a thin moving line, so a tap always shows it was heard */
body.ld-listings .facetwp-template { transition: opacity 160ms; }
body.ldq-busy.ld-listings .facetwp-template { opacity: .45; pointer-events: none; }
body.ldq-busy.ld-listings .idu-results { position: relative; }
body.ldq-busy.ld-listings .idu-results::before { content: ""; position: fixed; top: 0; left: 0; z-index: 99999; height: 3px; width: 40%; background: #3d63ff; animation: ldq-run 900ms ease-in-out infinite; }
@keyframes ldq-run { from { transform: translateX(-100%); } to { transform: translateX(250vw); } }
/* Empty: say what happened and offer the way out */
body.ld-listings .ldq-empty { padding: 40px 20px; text-align: center; background: #fff; border-radius: 16px; border: 1px solid #e4e7ef; }
body.ld-listings .ldq-empty__t { margin: 0; font: 700 18px/1.3 var(--ld-heading); color: #0d1224; }
body.ld-listings .ldq-empty__s { margin: 6px 0 18px; font: 500 14.5px/1.45 var(--ld-text); color: #667089; }
body.ld-listings .ldq-empty__a { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
body.ld-listings .ldq-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #cfdcff; color: #0a1130; font: 600 15px/1 var(--ld-text); text-decoration: none; }
body.ld-listings .ldq-btn--go { background: #0a0e24; color: #fff; }
@media (prefers-reduced-motion: reduce) { body.ldq-busy.ld-listings .idu-results::before { animation: none; width: 100%; } }
