/**

 * Property detail — premium full-width desktop (Zillow/Realtor-style), hero + thumb gallery.

 */

/* ==========================================================================

   Ancestor unchain: beat TT4 / city platform content caps (~620px–1120px)

   ========================================================================== */

@media (min-width: 992px) {

	body:has(.plf-property-detail-page) .wp-site-blocks,

	body:has(.plf-property-detail-page) main,

	body:has(.plf-property-detail-page) .entry-content,

	body:has(.plf-property-detail-page) .wp-block-post-content,

	body:has(.plf-property-detail-page) .post-content,

	body:has(.plf-property-detail-page) .is-layout-constrained,

	body:has(.plf-property-detail-page) .wp-block-group:not(.plf-city-listing-detail-shell),

	body:has(.plf-property-detail-page) .alignwide,

	body:has(.plf-property-detail-page) .alignfull,

	body.plf-city-platform-surface:has(.plf-property-detail-page) main.plf-city-factory-page-main,

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) main.plf-city-factory-page-main,

	.plf-city-listing-detail-shell > .wp-block-group__inner-container {

		--wp--style--global--content-size: 100% !important;

		--wp--style--global--wide-size: 100% !important;

		max-width: none !important;

		width: 100% !important;

		margin-left: 0 !important;

		margin-right: 0 !important;

		padding-left: 0 !important;

		padding-right: 0 !important;

		box-sizing: border-box;

	}

	/* City platform inner-page column cap (1120px) — detail only */

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page)

		.is-layout-constrained

		> :where(:not(.alignleft):not(.alignright):not(.alignfull)),

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page)

		.wp-block-post-content

		> :not(.alignfull):not(.plf-city-listing-detail-shell),

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page)

		.entry-content

		> :not(.alignfull):not(.plf-city-listing-detail-shell),

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page)

		.wp-block-post-content

		> .wp-block-group:not(.plf-city-listing-detail-shell),

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page)

		.entry-content

		> .wp-block-group:not(.plf-city-listing-detail-shell) {

		max-width: none !important;

		width: 100% !important;

		margin-left: 0 !important;

		margin-right: 0 !important;

	}

	/* Top-level detail shell gutters (beat ancestor unchain + alignfull breakout) */
	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .plf-city-listing-detail-shell,
	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .plf-city-listing-detail-shell.alignfull {
		width: min(1680px, calc(100vw - 48px)) !important;
		max-width: min(1680px, calc(100vw - 48px)) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 32px !important;
		padding-right: 32px !important;
		box-sizing: border-box;
		left: auto !important;
		right: auto !important;
		display: block !important;
	}

	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .plf-city-listing-detail-shell.alignfull {
		margin-inline: auto !important;
	}

	@media (min-width: 1440px) {
		body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .plf-city-listing-detail-shell,
		body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .plf-city-listing-detail-shell.alignfull {
			width: min(1680px, calc(100vw - 96px)) !important;
			max-width: min(1680px, calc(100vw - 96px)) !important;
		}
	}

	.plf-city-listing-detail-shell > .wp-block-group__inner-container {

		display: block !important;

		max-width: none !important;

		width: 100% !important;

	}

	.plf-city-listing-detail-shell > .wp-block-group__inner-container > * {
		display: block !important;
		width: 100% !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		box-sizing: border-box;
	}

}

/* ==========================================================================

   Desktop shell + two-column page grid (main | sticky sidebar)

   ========================================================================== */

@media (min-width: 992px) {

	.plf-property-detail-page {

		--plf-detail-shell-max: 1680px;

		--plf-detail-sidebar-w: 380px;

		--plf-detail-gap: 40px;

		box-sizing: border-box;

		width: 100% !important;

		max-width: none !important;

		margin-left: auto !important;

		margin-right: auto !important;

		padding: 0 !important;

		display: grid !important;

		grid-template-columns: minmax(0, 1fr) var(--plf-detail-sidebar-w);

		column-gap: var(--plf-detail-gap);

		row-gap: 0;

		align-items: start;

	}

	/* Duplicate favorites strip (price row already has favorites) */

	.plf-property-detail-page > .plf-favorites-button-wrapper {

		display: none !important;

	}

	/* Flatten inner flex wrapper — page grid owns columns */

	.plf-property-detail-page .plf-feature-detail-layout.feature-property-detail-container {

		display: contents !important;

		margin: 0 !important;

		gap: 0 !important;

	}

	.plf-feature-detail-main {

		grid-column: 1;

		grid-row: 1;

		min-width: 0;

		width: 100% !important;

		max-width: none !important;

	}

	.plf-feature-detail-sidebar {

		grid-column: 2;

		grid-row: 1 / span 40;

		width: var(--plf-detail-sidebar-w) !important;

		max-width: var(--plf-detail-sidebar-w) !important;

		min-width: var(--plf-detail-sidebar-w);

		align-self: start;

		display: flex;

		flex-direction: column;

		gap: 16px;

	}

	.plf-property-detail-page .plf-feature-detail__cma {

		grid-column: 1;

		grid-row: 2;

		width: 100% !important;

		max-width: none !important;

		margin: 24px 0 32px !important;

		box-sizing: border-box;

	}

	.plf-feature-detail-sidebar .plf-feature-detail__contact-card {

		position: sticky;

		top: clamp(12px, 2vh, 28px);

		z-index: 2;

		margin: 0;

		padding: 20px;

		border: 1px solid #d8e2ef;

		border-radius: 14px;

		background: #fff;

		box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);

		text-align: left;

	}

	.plf-feature-detail__summary {
		margin-bottom: 20px;
		overflow: visible;
	}

	.plf-feature-detail__price-row,
	.plf-feature-detail__address-row,
	.plf-feature-detail__stats-row {
		margin: 0 0 12px;
		padding: 0;
		overflow: visible;
	}

	.plf-feature-detail-main .price-detail,
	.plf-feature-detail-main .plf-feature-detail__price-row {
		overflow: visible;
		max-width: 100%;
	}

	.plf-feature-detail-main .price-detail {

		font-size: clamp(1.75rem, 2.2vw, 2.35rem);

		line-height: 1.15;

	}

	.plf-feature-detail-main .address-detail {

		font-size: 1.125rem;

		line-height: 1.45;

		display: block;

	}

	.plf-feature-detail__gallery,

	.plf-feature-detail__gallery #map-view,

	.plf-feature-detail__gallery .map-view-container,

	.plf-feature-detail-main #property-listing.grid-view,

	.plf-feature-detail-main #property-listing.grid-view .property-page,

	.plf-feature-detail-main .plf-detail-gallery {

		width: 100% !important;

		max-width: none !important;

		min-width: 0;

		box-sizing: border-box;

	}

	.plf-detail-gallery__stage,
	.plf-detail-gallery__hero {
		position: relative;
		width: 100%;
		margin-bottom: 12px;
		border-radius: 12px;
		overflow: hidden;
		box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
	}

	.plf-detail-gallery__nav {
		position: absolute;
		top: 50%;
		z-index: 5;
		transform: translateY(-50%);
		display: flex;
		align-items: center;
		justify-content: center;
		width: 56px;
		height: 56px;
		padding: 0;
		margin: 0;
		border: 2px solid rgba(255, 255, 255, 0.9);
		border-radius: 50%;
		background: rgba(15, 23, 42, 0.78);
		color: #fff;
		box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
		cursor: pointer;
		transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
	}

	.plf-detail-gallery__nav:hover,
	.plf-detail-gallery__nav:focus-visible {
		background: rgba(15, 23, 42, 0.95);
		transform: translateY(-50%) scale(1.06);
		box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
		outline: none;
	}

	.plf-detail-gallery__nav--prev {
		left: 20px;
	}

	.plf-detail-gallery__nav--next {
		right: 20px;
	}

	.plf-detail-gallery__nav-icon {
		font-size: 2.35rem;
		line-height: 1;
		font-weight: 400;
		pointer-events: none;
	}

	.plf-detail-gallery-main-img,

	.plf-detail-gallery__hero-img,

	.plf-feature-detail-main .plf-feature-detail-cover-img {

		display: block;

		width: 100% !important;

		max-width: none !important;

		height: auto;

		min-height: 420px;

		max-height: min(72vh, 820px);

		object-fit: cover;

		object-position: center;

		border-radius: 12px;

		margin: 0;

		opacity: 1 !important;

		visibility: visible !important;

	}

	.plf-property-detail-page .plf-detail-gallery ~ .property-carousel.plf-detail-thumbnail-carousel,

	.plf-property-detail-page .plf-detail-gallery .property-carousel,

	.plf-property-detail-page .plf-detail-gallery .slick-slider {

		display: none !important;

	}

	.plf-detail-gallery__thumbs {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 10px;
		width: 100%;
		margin-top: 16px;
		padding: 4px 0;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.plf-detail-gallery__thumb {
		flex: 0 0 auto;
		width: 112px;
		height: 84px;
		padding: 0;
		margin: 0;
		border: 2px solid transparent;
		border-radius: 10px;
		overflow: hidden;
		cursor: pointer;
		background: #f1f5f9;
		line-height: 0;
		opacity: 0.82;
		transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
	}

	.plf-detail-gallery__thumb:hover {
		opacity: 1;
		transform: translateY(-1px);
		border-color: #94a3b8;
	}

	.plf-detail-gallery__thumb.is-active {
		border-color: #1e5fa8;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
		opacity: 1;
	}

	.plf-detail-gallery__thumb img {

		display: block;

		width: 100%;

		height: 100%;

		object-fit: cover;

		object-position: center;

	}

	.plf-detail-gallery .property-carousel,

	.plf-detail-gallery .slick-slider,

	.plf-detail-gallery .slick-list,

	.plf-detail-gallery .slick-track,

	.plf-detail-gallery .slick-slide,

	.plf-detail-gallery .slick-dots,

	.plf-detail-gallery .slick-arrow {

		display: none !important;

		height: auto !important;

		min-height: 0 !important;

		max-height: none !important;

		opacity: 1 !important;

		visibility: visible !important;

	}

	.plf-feature-detail__about,

	.plf-feature-detail__map-poi {

		margin-bottom: 24px;

		width: 100% !important;

		max-width: none !important;

	}

	.plf-feature-detail-main .about-home h3,

	.plf-feature-detail-sidebar-card h3 {

		font-size: 1.35rem;

		margin-bottom: 12px;

	}

	.plf-feature-detail__gallery #map-view .map-container,

	.plf-feature-detail-main .map-view-container .map-container {

		width: 100% !important;

		height: min(48vh, 520px) !important;

		min-height: 320px;

		border-radius: 12px;

		overflow: hidden;

	}

	.plf-feature-detail-sidebar-card {

		background: #fff;

		border: 1px solid #e2e8f0;

		border-radius: 12px;

		padding: 18px 20px;

		box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);

	}

	.plf-feature-detail-sidebar .plf-contact-cta-row--detail {

		display: flex;

		flex-direction: row;

		flex-wrap: wrap;

		gap: 10px;

		margin: 0 0 14px;

	}

	.plf-feature-detail-sidebar .plf-contact-cta-lede {

		flex: 1 1 100%;

		margin: 0 0 4px;

		font-size: 0.95rem;

		line-height: 1.45;

		color: #334155;

	}

	.plf-feature-detail-sidebar .plf-client-inquiry-wrap {

		margin-bottom: 12px;

	}

	.plf-feature-detail-sidebar .plf-client-inquiry-btn,

	.plf-feature-detail-sidebar .plf-contact-cta--inquiry {

		display: flex;

		align-items: center;

		justify-content: center;

		width: 100%;

		min-height: 46px;

		padding: 12px 16px;

		border-radius: 10px;

		font-weight: 700;

		font-size: 1rem;

		text-decoration: none;

		box-sizing: border-box;

	}

	.plf-feature-detail-sidebar .plf-client-inquiry-btn {

		border: none;

		background: #0f4c81;

		color: #fff;

		cursor: pointer;

	}

	.plf-feature-detail-sidebar .plf-client-inquiry-btn:hover {

		background: #0c3d68;

	}

	.plf-feature-detail-sidebar .plf-contact-cta-row--detail .plf-contact-cta--call,

	.plf-feature-detail-sidebar .plf-contact-cta-row--detail .plf-contact-cta--sms {

		flex: 1 1 calc(50% - 5px);

		min-height: 44px;

		display: inline-flex;

		align-items: center;

		justify-content: center;

		border-radius: 10px;

		border: 1px solid #cbd5e1;

		background: #f8fafc;

		color: #0f172a;

		font-weight: 600;

		text-decoration: none;

		box-sizing: border-box;

	}

	.plf-feature-detail-sidebar .plf-contact-cta-row--detail .plf-contact-cta--inquiry {

		display: none;

	}

	.plf-feature-detail-sidebar .plf-collab-section--featured-detail,

	.plf-feature-detail-sidebar .plf-collab-section--utility {

		margin-top: 12px;

		padding-top: 12px;

		border-top: 1px solid #e2e8f0;

	}

	.plf-feature-detail-sidebar .plf-collab-btn,

	.plf-feature-detail-sidebar .plf-more-contact-trigger {

		width: 100%;

		min-height: 44px;

		border-radius: 10px;

	}

	.plf-feature-detail-sidebar .plf-more-contact-trigger {

		margin-top: 8px;

		border: 1px dashed #94a3b8;

		background: #f8fafc;

		font-weight: 600;

		cursor: pointer;

	}

	.plf-feature-detail-sidebar-card dl {

		display: grid;

		grid-template-columns: minmax(120px, 42%) minmax(0, 1fr);

		gap: 8px 16px;

		padding: 0;

		margin: 0 0 16px;

		border: none;

	}

	.plf-feature-detail-sidebar-card dt {

		display: block;

		width: auto;

		margin: 0;

		font-weight: 600;

		font-size: 0.9rem;

		color: #475569;

	}

	.plf-feature-detail-sidebar-card dd {

		display: block;

		width: auto;

		margin: 0;

		font-size: 0.95rem;

		color: #0f172a;

		line-height: 1.45;

		word-break: break-word;

	}

	.plf-feature-detail-sidebar-card h5 {

		margin: 12px 0 6px;

		font-size: 0.8rem;

		text-transform: uppercase;

		letter-spacing: 0.06em;

		color: #64748b;

	}

	.plf-feature-detail-sidebar-card.facts-features > div {

		display: contents;

	}

}

/* Premium desktop: enforce wide main column + sidebar at viewport edge of shell */

@media (min-width: 1440px) {

	.plf-property-detail-page {

		--plf-detail-gap: 48px;

		grid-template-columns: minmax(1000px, 1fr) var(--plf-detail-sidebar-w) !important;

	}

	.plf-feature-detail-main {

		min-width: 1000px;

	}

	.plf-detail-gallery-main-img,

	.plf-detail-gallery__hero-img,

	.plf-feature-detail-main .plf-feature-detail-cover-img {

		min-height: 480px;

	}

}

@media (max-width: 991px) {

	.plf-property-detail-page {

		--plf-detail-gutter: 20px;

		width: 100% !important;

		max-width: 100% !important;

		margin-left: 0 !important;

		margin-right: 0 !important;

		display: block !important;

	}

	.plf-property-detail-page .plf-feature-detail-layout.feature-property-detail-container {

		display: flex !important;

		flex-direction: column !important;

		gap: 24px;

	}

	.plf-feature-detail-main,

	.plf-feature-detail-sidebar {

		width: 100% !important;

		max-width: 100% !important;

		min-width: 0 !important;

	}

	.plf-feature-detail-sidebar .plf-feature-detail__contact-card {

		position: static;

	}

	.plf-detail-gallery__hero-img {

		min-height: 240px;

		max-height: 50vh;

	}

	.plf-detail-gallery__thumb {

		width: 88px;

		height: 66px;

	}

	.plf-property-detail-page .plf-feature-detail__cma {

		max-width: 100% !important;

		margin-top: 16px !important;

	}

}

/* TT4 / block theme: alignfull on listing detail must not use 100vw breakout */
@media (min-width: 992px) {
	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .is-layout-constrained > .plf-city-listing-detail-shell.alignfull,
	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .wp-block-post-content > .plf-city-listing-detail-shell.alignfull,
	body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .entry-content > .plf-city-listing-detail-shell.alignfull {
		width: min(1680px, calc(100vw - 48px)) !important;
		max-width: min(1680px, calc(100vw - 48px)) !important;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 32px !important;
		padding-right: 32px !important;
		box-sizing: border-box;
	}

	@media (min-width: 1440px) {
		body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .is-layout-constrained > .plf-city-listing-detail-shell.alignfull,
		body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .wp-block-post-content > .plf-city-listing-detail-shell.alignfull,
		body.plf-city-platform-surface.plf-site-role-city:has(.plf-property-detail-page) .entry-content > .plf-city-listing-detail-shell.alignfull {
			width: min(1680px, calc(100vw - 96px)) !important;
			max-width: min(1680px, calc(100vw - 96px)) !important;
		}
	}
}

