/**
 * DW Board — "listing" template base styles (image-slider detail + gallery).
 *
 * This is the DEFAULT look for the listing layout. Per-client uploaded CSS skins
 * (wp-content/uploads/dw-board-skins/) override these rules — the class hooks
 * (.dw-listing-*, .dw-lg-*) are the stable contract skins style against.
 *
 * @package DW_Board
 */

/* ---- Image gallery slider (detail hero) --------------------------------- */
.dw-board-listing .dw-listing-gallery {
	margin: 24px 0 16px;
}

.dw-board-listing .dw-lg-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #0f172a;
	border-radius: 12px;
	overflow: hidden;
}

.dw-board-listing .dw-lg-slides {
	position: absolute;
	inset: 0;
}

.dw-board-listing .dw-lg-slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.dw-board-listing .dw-lg-slide.is-active {
	opacity: 1;
}

.dw-board-listing .dw-lg-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: #111827;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 2;
}

.dw-board-listing .dw-lg-nav:hover { background: #fff; }
.dw-board-listing .dw-lg-prev { left: 12px; }
.dw-board-listing .dw-lg-next { right: 12px; }

.dw-board-listing .dw-lg-counter {
	position: absolute;
	bottom: 12px;
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 12px;
	background: rgba(15, 23, 42, 0.75);
	color: #fff;
	font-size: 13px;
	border-radius: 999px;
	z-index: 2;
}

/* Thumbnail strip */
.dw-board-listing .dw-lg-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.dw-board-listing .dw-lg-thumbs .dw-lg-go {
	flex: 0 0 auto;
	width: 90px;
	height: 64px;
	border: 2px solid transparent;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	cursor: pointer;
	padding: 0;
	opacity: 0.65;
	transition: opacity 0.15s, border-color 0.15s;
}

.dw-board-listing .dw-lg-thumbs .dw-lg-go:hover { opacity: 1; }

.dw-board-listing .dw-lg-thumbs .dw-lg-go.is-active {
	opacity: 1;
	border-color: #2563eb;
}

/* Dots variant (compact / list-card mini slider) */
.dw-board-listing .dw-lg-dots {
	position: absolute;
	bottom: 10px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 6px;
	z-index: 2;
}

.dw-board-listing .dw-lg-dots .dw-lg-go {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
}

.dw-board-listing .dw-lg-dots .dw-lg-go.is-active { background: #fff; }

/* Single image (no slider chrome needed) */
.dw-board-listing .dw-lg-stage.dw-lg--single .dw-lg-nav,
.dw-board-listing .dw-lg-stage.dw-lg--single .dw-lg-counter { display: none; }

/* ---- Listing detail: 2-column layout (main + sticky aside) -------------- */
.dw-board-listing .dw-listing-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	/* The gap under the header belongs here, not to whichever element happens
	   to come first inside a column — otherwise the two columns start at
	   different heights and the aside butts against the header's rule. */
	margin: 16px 0 20px;
}

/* On the listing layout the post header is a standalone rounded card that sits
   above the gallery, so it should match the neighbouring cards — not the
   "connects to the content below" treatment (square bottom + heavy blue rule)
   the stacked layout uses, which reads as a disconnected line over the gap. */
.dw-board-listing .dw-board-single-header {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

/* The gallery carries its own top margin for the stacked layout; as the first
   thing in a column it would push that column down on its own. */
.dw-board-listing .dw-listing-main > .dw-listing-gallery:first-child {
	margin-top: 0;
}

/* The description continues the header card in the stacked layout, so it
   carries side borders only. In a column between a rounded gallery and a
   rounded Details card that reads as an unfinished box; give it the same card
   treatment as its neighbours. */
.dw-board-listing .dw-listing-main > .dw-board-single-content {
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

/* The aside owns the spacing between its cards through gap. Several of those
   cards are shared with the stacked layout, where their own margin is what
   separates them — here that margin adds to the gap and the column drifts
   out of step with the main image. Reset every direct child, so the next card
   added cannot reintroduce this. */
.dw-board-listing .dw-listing-layout > .dw-listing-aside > * {
	margin: 0;
}

.dw-board-listing .dw-listing-main { min-width: 0; }

.dw-board-listing .dw-listing-aside {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

@media screen and (min-width: 981px) {
	.dw-board-listing .dw-listing-layout {
		grid-template-columns: minmax(0, 1fr) 340px;
	}
	.dw-board-listing .dw-listing-aside {
		position: sticky;
		top: 24px;
	}
}

/* ---- Listing detail chrome --------------------------------------------- */
/* Shared stroke icons. */
.dw-board-listing .dw-ico { flex: 0 0 auto; vertical-align: middle; }

/* Price panel — the page's primary data, given visual weight. */
.dw-board-listing .dw-listing-pricecard {
	padding: 20px 22px;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dw-board-listing .dw-listing-price-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #9ca3af;
	margin-bottom: 2px;
}

.dw-board-listing .dw-listing-price {
	font-size: 40px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	color: #16a34a;
	margin: 0;
}

.dw-board-listing .dw-listing-price .dw-listing-price-unit {
	font-size: 16px;
	font-weight: 600;
	color: #6b7280;
}

/* Attribute chips (state / city / industry / type). */
.dw-board-listing .dw-listing-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin-top: 14px;
}

.dw-board-listing .dw-listing-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 11px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background: #f7f8fa;
	color: #374151;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}

.dw-board-listing .dw-listing-chip--loc {
	background: #eff6ff;
	border-color: #dbeafe;
	color: #1d4ed8;
}

.dw-board-listing .dw-listing-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 14px 0 0;
	border-top: 1px solid #eef1f5;
	margin: 14px 0 0;
}

.dw-board-listing .dw-listing-spec {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	color: #111827;
}

.dw-board-listing .dw-listing-spec b { font-weight: 700; }
.dw-board-listing .dw-listing-spec .dw-listing-spec-label { color: #6b7280; font-size: 13px; }

/* ---- Listing LIST — horizontal cards with per-card mini slider ---------- */
.dw-board-listing .dw-listing-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.dw-board-listing .dw-listing-card {
	display: flex;
	gap: 16px;
	padding: 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s, border-color 0.15s;
}

.dw-board-listing .dw-listing-card:hover {
	border-color: #cbd5e1;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.dw-board-listing .dw-listing-card-media {
	flex: 0 0 240px;
	max-width: 240px;
}

/* Mini gallery (list card): span-background slides + dots overlay. */
.dw-board-listing .dw-lg--mini .dw-lg-stage {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
}

.dw-board-listing .dw-lg--mini .dw-lg-slide {
	background-size: cover;
	background-position: center;
}

.dw-board-listing .dw-listing-card-noimg {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	background: #f1f5f9;
}

.dw-board-listing .dw-listing-card-body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dw-board-listing .dw-listing-card-top {
	display: flex;
	gap: 6px;
	align-items: center;
}

.dw-board-listing .dw-listing-card-title {
	font-size: 17px;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
	word-break: keep-all;
}

.dw-board-listing .dw-listing-card-price {
	font-size: 20px;
	font-weight: 800;
	color: #2563eb;
	margin: 2px 0;
}

.dw-board-listing .dw-listing-card-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	color: #1f2937;
	font-size: 14px;
}

.dw-board-listing .dw-listing-card-specs .dw-listing-spec b { color: #2563eb; }

.dw-board-listing .dw-listing-card-meta {
	margin-top: auto;
	color: #9ca3af;
	font-size: 13px;
}

.dw-board-listing .dw-card-cat {
	font-size: 12px;
	color: #6b7280;
	background: #f3f4f6;
	border-radius: 4px;
	padding: 2px 8px;
}

/* ---- Listing detail: host / contact block ------------------------------ */
.dw-board-listing .dw-listing-host {
	margin: 20px 0;
	padding: 16px 18px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: #fafbfc;
}

.dw-board-listing .dw-listing-host-title {
	font-size: 14px;
	font-weight: 700;
	color: #2563eb;
	margin-bottom: 8px;
}

.dw-board-listing .dw-listing-host-name {
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	margin-bottom: 6px;
}

.dw-board-listing .dw-listing-host-row {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	color: #374151;
	margin: 7px 0;
	word-break: break-word;
}

.dw-board-listing .dw-listing-host-row .dw-ico { color: #9ca3af; }
.dw-board-listing .dw-listing-host-row a { color: #2563eb; text-decoration: none; }
.dw-board-listing .dw-listing-host-row a:hover { text-decoration: underline; }

.dw-board-listing .dw-listing-contact {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.dw-board-listing .dw-listing-cta {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 12px 16px;
	border-radius: 10px;
	border: 1.5px solid #2563eb;
	color: #1d4ed8;
	background: #fff;
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
}

.dw-board-listing .dw-listing-cta .dw-ico { width: 17px; height: 17px; }
.dw-board-listing .dw-listing-cta:hover { background: #eff6ff; }

.dw-board-listing .dw-listing-cta-primary {
	background: #2563eb;
	border-color: #2563eb;
	color: #fff;
}

.dw-board-listing .dw-listing-cta-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }

@media screen and (max-width: 600px) {
	.dw-board-listing .dw-lg-stage { aspect-ratio: 4 / 3; }
	.dw-board-listing .dw-listing-price { font-size: 32px; }
	.dw-board-listing .dw-listing-pricecard { padding: 16px 18px; }
	.dw-board-listing .dw-listing-card { flex-direction: column; }
	.dw-board-listing .dw-listing-card-media { flex-basis: auto; max-width: none; }
}

/* ============================================================
 * Listing board: header + grouped filter bar + wide row cards
 * (addresses dead space, spec legibility, header/GNB spacing)
 * ============================================================ */

/* Header — separate from the site menu, tighten title/subtitle. */
.dw-board-listing .dw-board-header { padding-top: 10px; margin-bottom: 18px; }
.dw-board-listing .dw-board-title { font-size: 30px; font-weight: 800; letter-spacing: -0.035em; margin: 0 0 4px; }
.dw-board-listing .dw-board-description { margin: 0; color: #6b7280; font-size: 15px; }

/* Search + filters as one grouped control bar; Write Post centered with it. */
.dw-board-listing .dw-board-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dw-board-listing .dw-board-search { flex: 1 1 440px; min-width: 0; }
.dw-board-listing .dw-board-search form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f7f8fa; border: 1px solid #e5e7eb; border-radius: 14px; padding: 8px; margin: 0; }
.dw-board-listing .dw-board-filter-select { height: 42px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 0 12px; font-size: 14px; }
.dw-board-listing .dw-board-search-input { flex: 1 1 180px; height: 42px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; padding: 0 14px; }
.dw-board-listing .dw-board-search-button { height: 42px; border-radius: 10px; padding: 0 22px; }
.dw-board-listing .dw-board-write-action { flex: 0 0 auto; }
.dw-board-listing .dw-board-write-button { height: 46px; padding: 0 24px; border-radius: 12px; }

/* Row card — media | details | price/CTA rail, filling the full width. */
.dw-board-listing .dw-listing-card { align-items: stretch; padding: 14px; gap: 18px; }
.dw-board-listing .dw-listing-card-media { flex: 0 0 260px; max-width: 260px; }
.dw-board-listing .dw-listing-card-body { justify-content: center; gap: 8px; }
.dw-board-listing .dw-listing-card-title { font-size: 18px; }

/* Specs as clear chips (bed / bath / sqft). */
.dw-board-listing .dw-listing-card-specs { gap: 10px; margin: 2px 0; }
.dw-board-listing .dw-listing-card-specs .dw-listing-spec {
	display: inline-flex; align-items: center; gap: 6px;
	background: #f7f8fa; border: 1px solid #eef1f5; border-radius: 8px; padding: 6px 11px; font-size: 14px; color: #374151;
}
.dw-board-listing .dw-listing-card-specs .dw-listing-spec b { color: #111827; font-weight: 800; font-size: 15px; }
.dw-board-listing .dw-listing-card-specs .dw-listing-spec-label { color: #6b7280; font-size: 12.5px; }
.dw-board-listing .dw-listing-card-meta { margin-top: 4px; }

/* Right rail: big price + "View details" — consumes the horizontal space. */
.dw-board-listing .dw-listing-card-aside {
	flex: 0 0 190px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
	gap: 12px; text-align: right; padding-left: 18px; border-left: 1px solid #f1f5f9;
}
.dw-board-listing .dw-listing-card-aside .dw-listing-card-price { margin: 0; font-size: 22px; }
.dw-board-listing .dw-listing-card-view { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: #2563eb; }

@media screen and (max-width: 900px) {
	.dw-board-listing .dw-listing-card-media { flex-basis: 200px; max-width: 200px; }
	.dw-board-listing .dw-listing-card-aside { flex-basis: 150px; }
}
@media screen and (max-width: 600px) {
	.dw-board-listing .dw-listing-card-aside {
		flex-basis: auto; flex-direction: row; align-items: center; justify-content: space-between;
		text-align: left; border-left: 0; padding-left: 0; padding-top: 12px; border-top: 1px solid #f1f5f9;
	}
	.dw-board-listing .dw-board-write-button { width: 100%; }
}
