/* Single property detail — Rever Universal Theme tokens + 60/40 split (PC) */

/* —— Flatsome full-bleed breakout —— */
body.single-klk_property #main > .row,
body.single-klk_property #main > .container,
body.single-klk_property .page-wrapper > .row,
body.single-klk_property #content > .row,
body.single-klk_property #content > .container,
body.single-post #main > .row,
body.single-post #main > .container,
body.single-post .page-wrapper > .row,
body.single-post #content > .row,
body.single-post #content > .container {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.single-klk_property #main > .row > .col,
body.single-klk_property #content > .row > .col,
body.single-klk_property .page-wrapper .col,
body.single-post #main > .row > .col,
body.single-post #content > .row > .col,
body.single-post .page-wrapper .col {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	float: none !important;
}

/* —— Split-screen shell (mirrors klk-search-layout) —— */
.klk-detail-layout {
	--klk-detail-width: 60%;
	display: flex;
	align-items: stretch;
	min-height: 70vh;
	position: relative;
	background: var(--theme-canvas-page, #F8F9FA);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--theme-text-body, #4A5568);
	width: 100%;
}

.klk-detail-panel {
	width: var(--klk-detail-width);
	max-height: 100vh;
	overflow: auto;
	border-right: 1px solid var(--theme-border-default, #E2E8F0);
	display: flex;
	flex-direction: column;
	transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
	background: var(--theme-canvas-page, #F8F9FA);
}

.klk-detail-map-panel {
	flex: 1;
	position: sticky;
	top: 0;
	min-height: 70vh;
	height: 100vh;
	transition: opacity 0.28s ease, flex-basis 0.28s ease, width 0.28s ease;
	background: var(--theme-canvas-subtle, #F7FAFC);
}

.klk-detail-layout.is-map-off .klk-detail-panel {
	width: 100%;
	border-right: 0;
}

.klk-detail-layout.is-map-off .klk-detail-map-panel {
	display: none;
}

.klk-detail-layout.is-map-off .klk-detail-content {
	max-width: 1140px;
	margin: 0 auto;
	width: 100%;
}

.klk-post-layout.is-map-off .klk-detail-content {
	max-width: 860px;
}

.klk-detail-map {
	width: 100%;
	height: 100%;
	min-height: 70vh;
	background: var(--theme-canvas-subtle, #F7FAFC);
	border: 0;
	border-radius: 0;
}

/* —— Sticky topbar —— */
.klk-detail-topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: var(--theme-canvas-surface, #FFFFFF);
	border-bottom: 1px solid var(--theme-border-default, #E2E8F0);
	box-shadow: var(--theme-shadow-sticky, 0 2px 8px 0 rgba(0, 0, 0, 0.06));
}

.klk-detail-back {
	font-size: 14px;
	font-weight: 500;
	color: var(--theme-text-heading, #1A202C);
	text-decoration: none;
	white-space: nowrap;
}

.klk-detail-back:hover {
	color: var(--theme-brand-primary, #E03C31);
}

.klk-detail-content {
	padding: 16px 24px 60px;
}

/* Map toggle / mobile capsule → klk-map.css */

/* —— Cards & content —— */
.klk-detail-card {
	background: var(--theme-canvas-surface, #FFFFFF);
	border: 1px solid var(--theme-border-default, #E2E8F0);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 16px;
	box-shadow: var(--theme-shadow-card, 0 1px 3px 0 rgba(0, 0, 0, 0.04));
}

.klk-gallery-main {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--theme-canvas-subtle, #F7FAFC);
	overflow: hidden;
	border-radius: 8px;
}

.klk-gallery-slide {
	display: none;
	position: absolute;
	inset: 0;
}

.klk-gallery-slide.is-active {
	display: block;
}

.klk-gallery-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.klk-gallery-prev,
.klk-gallery-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	max-width: 28px;
	max-height: 28px;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	font-size: 17px;
	line-height: 1;
	overflow: hidden;
	cursor: pointer;
	box-shadow: var(--theme-shadow-card, 0 1px 3px rgba(0, 0, 0, 0.04));
}

.klk-gallery-prev { left: 12px; }
.klk-gallery-next { right: 12px; }

.klk-gallery-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
}

.klk-gallery-thumb {
	flex: 0 0 72px;
	height: 56px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	cursor: pointer;
	background: none;
}

.klk-gallery-thumb.is-active {
	border-color: var(--theme-brand-primary, #E03C31);
}

.klk-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.klk-detail-header {
	margin: 16px 0 0;
}

.klk-detail-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
}

.klk-code,
.klk-service {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 500;
	background: var(--theme-canvas-subtle, #F7FAFC);
	color: var(--theme-text-muted, #718096);
}

.klk-verified {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	background: var(--theme-brand-primary-subtle, #FFF1F0);
	color: var(--theme-brand-primary, #E03C31);
}

.klk-detail-title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--theme-text-heading, #1A202C);
}

.klk-detail-price-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 16px;
}

.klk-price,
.title-metric {
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--theme-brand-primary, #E03C31);
}

.klk-specs-inline {
	color: var(--theme-text-muted, #718096);
	font-size: 14px;
}

.klk-address,
.klk-address-fallback {
	margin: 8px 0 0;
	color: var(--theme-text-muted, #718096);
	font-size: 14px;
}

.klk-section h2,
.klk-accordion__summary {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 12px;
	color: var(--theme-text-heading, #1A202C);
}

.klk-accordion {
	padding: 0;
}

.klk-accordion__summary {
	list-style: none;
	cursor: pointer;
	padding: 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0;
}

.klk-accordion__summary::-webkit-details-marker {
	display: none;
}

.klk-accordion__summary::after {
	content: '▾';
	color: var(--theme-text-muted, #718096);
	transition: transform 0.15s ease;
}

.klk-accordion[open] .klk-accordion__summary::after {
	transform: rotate(180deg);
}

.klk-accordion .klk-overview {
	padding: 0 16px 16px;
	border-top: 1px solid var(--theme-border-subtle, #EDF2F7);
}

.klk-specs-table {
	width: 100%;
	border-collapse: collapse;
}

.klk-specs-table th,
.klk-specs-table td {
	padding: 12px 0;
	border-bottom: 1px solid var(--theme-border-subtle, #EDF2F7);
	text-align: left;
	font-size: 14px;
}

.klk-specs-table tr:last-child th,
.klk-specs-table tr:last-child td {
	border-bottom: 0;
}

.klk-specs-table th {
	width: 40%;
	color: var(--theme-text-muted, #718096);
	font-weight: 500;
}

.klk-specs-table td {
	color: var(--theme-text-heading, #1A202C);
}

.klk-specs-table a {
	color: var(--theme-brand-primary, #E03C31);
	text-decoration: none;
	font-weight: 500;
}

.klk-amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.klk-amenities li {
	padding: 6px 12px;
	background: var(--theme-brand-primary-subtle, #FFF1F0);
	color: var(--theme-brand-primary, #E03C31);
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
}

/* —— Agent card (inline in left stream) —— */
.klk-agent-card {
	position: static;
	width: 100%;
	margin-top: 16px;
	padding: 20px;
	border: 1px solid var(--theme-border-default, #E2E8F0);
	border-radius: 8px;
	background: var(--theme-canvas-surface, #FFFFFF);
	box-shadow: var(--theme-shadow-card, 0 1px 3px rgba(0, 0, 0, 0.04));
}

.klk-agent-header {
	display: flex;
	gap: 12px;
	align-items: center;
	margin-bottom: 16px;
}

.klk-agent-avatar img,
.klk-agent-avatar--placeholder {
	width: 56px;
	height: 56px;
	border-radius: 9999px;
	object-fit: cover;
	background: var(--theme-canvas-subtle, #F7FAFC);
	display: block;
}

.klk-agent-name {
	display: block;
	color: var(--theme-text-heading, #1A202C);
	font-weight: 600;
}

.klk-agent-code {
	display: block;
	font-size: 12px;
	color: var(--theme-text-caption, #A0AEC0);
}

.klk-agent-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.klk-btn-hero {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	padding: 0 20px;
	border: 0;
	border-radius: 6px;
	background: var(--theme-brand-primary, #E03C31);
	color: #FFFFFF;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s cubic-bezier(0.16, 1, 0.3, 1), transform 0.15s ease;
}

.klk-btn-hero:hover {
	background: var(--theme-brand-primary-hover, #C83228);
	color: #FFFFFF;
}

.klk-btn-hero:active {
	transform: scale(0.98);
}

.klk-btn-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 40px;
	padding: 0 20px;
	border: 1px solid var(--theme-border-default, #E2E8F0);
	border-radius: 6px;
	background: #FFFFFF;
	color: var(--theme-text-heading, #1A202C);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.klk-btn-secondary:hover {
	background: var(--theme-canvas-subtle, #F7FAFC);
	border-color: var(--theme-text-muted, #718096);
	color: var(--theme-text-heading, #1A202C);
}

.klk-modal[hidden],
.klk-lightbox[hidden] {
	display: none !important;
}

.klk-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.klk-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.klk-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(480px, 92vw);
	max-height: 90vh;
	overflow: auto;
	padding: 24px;
	background: var(--theme-canvas-surface, #FFFFFF);
	border: 1px solid var(--theme-border-default, #E2E8F0);
	border-radius: 8px;
	box-shadow: var(--theme-shadow-popover, 0 12px 24px -6px rgba(0, 0, 0, 0.12));
}

.klk-modal-dialog h3 {
	margin: 0 0 16px;
	font-size: 24px;
	font-weight: 700;
	color: var(--theme-text-heading, #1A202C);
}

.klk-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	border: 0;
	background: none;
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
	color: var(--theme-text-muted, #718096);
}

.klk-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
}

.klk-lightbox img {
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
}

.klk-lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	border: 0;
	background: none;
	color: #fff;
	font-size: 36px;
	cursor: pointer;
}

.klk-fallback-inquiry label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	color: var(--theme-text-body, #4A5568);
}

.klk-fallback-inquiry input,
.klk-fallback-inquiry textarea {
	width: 100%;
	height: 40px;
	margin-bottom: 12px;
	padding: 0 12px;
	border: 1px solid var(--theme-border-default, #E2E8F0);
	border-radius: 6px;
	font-size: 14px;
	color: var(--theme-text-heading, #1A202C);
	background: #FFFFFF;
}

.klk-fallback-inquiry textarea {
	height: auto;
	padding: 10px 12px;
}

.klk-fallback-inquiry input:focus,
.klk-fallback-inquiry textarea:focus {
	outline: none;
	border-color: var(--theme-brand-primary, #E03C31);
	box-shadow: 0 0 0 1px var(--theme-brand-primary, #E03C31);
}

/* —— Mobile stack —— */
@media (max-width: 849px) {
	.klk-detail-layout {
		flex-direction: column;
		padding-bottom: 80px;
	}

	.klk-detail-panel,
	.klk-detail-map-panel {
		width: 100% !important;
		position: relative;
		max-height: none;
	}

	.klk-detail-content {
		padding: 12px 16px 32px;
	}

	.klk-detail-map-panel {
		display: none;
		min-height: calc(100vh - 120px);
		height: calc(100vh - 120px) !important;
	}

	.klk-detail-layout.is-mobile-map .klk-detail-panel {
		display: none;
	}

	.klk-detail-layout.is-mobile-map .klk-detail-map-panel {
		display: block;
	}
}

/* —— Blog post article (single-post split) —— */
.klk-post-title {
	margin: 0 0 12px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--theme-text-heading, #1A202C);
}

.klk-post-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.klk-post-cat {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	background: var(--theme-brand-primary-subtle, #FFF1F0);
	color: var(--theme-brand-primary, #E03C31);
}

.klk-post-cat:hover {
	color: var(--theme-brand-primary-hover, #C83228);
}

.klk-post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 13px;
	color: var(--theme-text-muted, #718096);
}

.klk-post-author {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	color: var(--theme-text-heading, #1A202C);
}

.klk-post-author img {
	width: 32px;
	height: 32px;
	border-radius: 9999px;
	object-fit: cover;
}

.klk-post-meta-sep {
	opacity: 0.5;
}

.klk-post-featured {
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: var(--theme-shadow-card, 0 1px 3px rgba(0, 0, 0, 0.04));
}

.klk-post-featured img {
	display: block;
	width: 100%;
	height: auto;
}

.klk-post-panel .entry-content {
	font-size: 16px;
	line-height: 1.75;
	color: var(--theme-text-body, #4A5568);
}

.klk-post-panel .entry-content > *:first-child {
	margin-top: 0;
}

.klk-post-panel .entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	margin: 1.25em 0;
}

.klk-post-panel .entry-content h2,
.klk-post-panel .entry-content h3 {
	color: var(--theme-text-heading, #1A202C);
	line-height: 1.3;
}

.klk-post-share {
	margin-top: 24px;
	padding-top: 16px;
	border-top: 1px solid var(--theme-border-subtle, #EDF2F7);
}

.klk-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
}

.klk-post-tags a {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	background: var(--theme-canvas-subtle, #F7FAFC);
	color: var(--theme-text-muted, #718096);
}

.klk-post-tags a:hover {
	color: var(--theme-brand-primary, #E03C31);
}

.klk-post-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background: var(--theme-brand-primary-subtle, #FFF1F0);
	border-color: #FAD4D0;
}

.klk-post-banner__body strong {
	display: block;
	margin-bottom: 4px;
	font-size: 16px;
	color: var(--theme-text-heading, #1A202C);
}

.klk-post-banner__body p {
	margin: 0;
	font-size: 14px;
	color: var(--theme-text-body, #4A5568);
}

.klk-post-banner__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 200px;
}

.klk-post-author-box {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.klk-post-author-box__avatar img {
	width: 72px;
	height: 72px;
	border-radius: 9999px;
	object-fit: cover;
	display: block;
}

.klk-post-author-box__body strong {
	display: block;
	margin-bottom: 6px;
	color: var(--theme-text-heading, #1A202C);
}

.klk-post-author-box__body p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--theme-text-muted, #718096);
}

.klk-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	padding: 16px;
}

.klk-post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
	min-width: 0;
}

.klk-post-nav__next {
	text-align: right;
}

.klk-post-nav__label {
	font-size: 12px;
	font-weight: 500;
	color: var(--theme-text-muted, #718096);
}

.klk-post-nav__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--theme-text-heading, #1A202C);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.klk-post-nav__link:hover .klk-post-nav__title {
	color: var(--theme-brand-primary, #E03C31);
}

.klk-post-comments .comments-title,
.klk-post-comments .comment-reply-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--theme-text-heading, #1A202C);
}

@media (max-width: 849px) {
	.klk-post-title {
		font-size: 22px;
	}

	.klk-post-nav {
		grid-template-columns: 1fr;
	}

	.klk-post-nav__next {
		text-align: left;
	}

	.klk-post-banner__actions {
		width: 100%;
	}
}
