/* CCD Bất động sản – giao diện khách xem */
:root {
	--ccd-accent: #0b6e4f;
	--ccd-accent-ink: #ffffff;
	--ccd-price: #c2410c;
	--ccd-ink: #15171c;
	--ccd-muted: #5b6270;
	--ccd-line: #e3e6eb;
	--ccd-bg: #ffffff;
	--ccd-soft: #f4f6f8;
	--ccd-radius: 14px;
}

.ccd-search *,
.ccd-lead *,
.ccd-cards * { box-sizing: border-box; }
.ccd-lead p { min-width: 0; }

.ccd-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Ô tìm kiếm */
.ccd-search {
	background: var(--ccd-bg);
	border: 1px solid var(--ccd-line);
	border-radius: var(--ccd-radius);
	padding: 12px;
	box-shadow: 0 6px 24px rgba(16, 24, 40, .06);
	margin: 24px 0 32px;
}
.ccd-search-row {
	display: grid;
	grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto;
	gap: 8px;
}
.ccd-search input,
.ccd-search select {
	width: 100%;
	height: 48px;
	border: 1px solid var(--ccd-line);
	border-radius: 10px;
	padding: 0 12px;
	font-size: 15px;
	background: #fff;
	color: var(--ccd-ink);
	margin: 0;
}
.ccd-search button,
.ccd-btn {
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 10px;
	background: var(--ccd-accent);
	color: var(--ccd-accent-ink);
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}
.ccd-search button:hover,
.ccd-btn:hover { filter: brightness(1.08); color: var(--ccd-accent-ink); }
.ccd-btn-ghost {
	background: transparent;
	color: var(--ccd-accent);
	border: 1px solid var(--ccd-accent);
}
.ccd-btn-ghost:hover { color: var(--ccd-accent); background: rgba(11, 110, 79, .06); }

@media (max-width: 921px) {
	.ccd-search-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ccd-search-row input[type="search"],
	.ccd-search-row button { grid-column: 1 / -1; }
}

/* Danh sách tin */
.ccd-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
	margin: 16px 0 32px;
}
.ccd-card {
	background: var(--ccd-bg);
	border: 1px solid var(--ccd-line);
	border-radius: var(--ccd-radius);
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
}
.ccd-card:hover { box-shadow: 0 10px 30px rgba(16, 24, 40, .10); transform: translateY(-2px); }
.ccd-card-link,
.ccd-card-link *,
.ccd-float a,
.ccd-pages a,
.ccd-btn { text-decoration: none !important; }
.ccd-card-link { display: block; color: inherit; }
.ccd-card-link:hover { color: inherit; }
.ccd-card-media { position: relative; aspect-ratio: 4 / 3; background: var(--ccd-soft); }
.ccd-card-media img,
.ccd-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccd-noimg {
	width: 100%; height: 100%;
	background:
		linear-gradient(135deg, rgba(11, 110, 79, .16), rgba(11, 110, 79, .04)),
		var(--ccd-soft);
}
.ccd-noimg::after {
	content: "";
	position: absolute; left: 50%; top: 50%;
	width: 56px; height: 56px; margin: -28px 0 0 -28px;
	background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b6e4f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 10.5 12 3l9 7.5V21H3z'/><path d='M9 21v-6h6v6'/></svg>");
	opacity: .55;
}
.ccd-badge {
	position: absolute; top: 12px; left: 12px;
	background: rgba(21, 23, 28, .78);
	color: #fff;
	font-size: 12px; font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}
.ccd-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.ccd-price { color: var(--ccd-price); font-weight: 700; font-size: 18px; }
.ccd-price-lg { font-size: 28px; }
.ccd-card-title {
	margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; color: var(--ccd-ink);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ccd-facts { font-size: 14px; color: var(--ccd-ink); }
.ccd-loc { font-size: 13px; color: var(--ccd-muted); }
.ccd-empty { padding: 24px; background: var(--ccd-soft); border-radius: var(--ccd-radius); color: var(--ccd-muted); }

.ccd-pages { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 32px; }
.ccd-pages a,
.ccd-pages span {
	min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--ccd-line); border-radius: 10px; text-decoration: none; color: var(--ccd-ink);
}
.ccd-pages span { background: var(--ccd-accent); color: #fff; border-color: var(--ccd-accent); }

/* Trang chi tiết */
.ccd-gallery-main {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-auto-rows: 160px;
	gap: 8px;
	border-radius: var(--ccd-radius);
	overflow: hidden;
	margin-bottom: 20px;
}
.ccd-g { display: block; overflow: hidden; background: var(--ccd-soft); }
.ccd-g img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccd-g-first { grid-row: span 2; }
.ccd-g:nth-child(n+6) { display: none; }
@media (max-width: 640px) {
	.ccd-gallery-main { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 120px; }
	.ccd-g-first { grid-column: 1 / -1; grid-row: span 2; }
}

.ccd-headline { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.ccd-addr { color: var(--ccd-muted); }
.ccd-specs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1px;
	background: var(--ccd-line);
	border: 1px solid var(--ccd-line);
	border-radius: var(--ccd-radius);
	overflow: hidden;
	margin-bottom: 24px;
}
.ccd-spec { background: var(--ccd-bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.ccd-spec span { font-size: 13px; color: var(--ccd-muted); }
.ccd-spec strong { font-size: 16px; color: var(--ccd-ink); }
.ccd-h { font-size: 22px; margin: 28px 0 12px; }

/* Form khách quan tâm */
.ccd-lead {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px 14px;
	background: var(--ccd-soft);
	border-radius: var(--ccd-radius);
	padding: 18px;
}
.ccd-lead p { margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; }
.ccd-lead .ccd-wide { grid-column: 1 / -1; }
.ccd-lead label { font-size: 14px; font-weight: 600; color: var(--ccd-ink); }
.ccd-lead input,
.ccd-lead textarea {
	width: 100%; border: 1px solid var(--ccd-line); border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff;
}
.ccd-lead input { height: 46px; }
.ccd-hp { position: absolute; left: -9999px; }
@media (max-width: 640px) { .ccd-lead { grid-template-columns: 1fr; } }
.ccd-notice {
	background: #e7f6ef; color: #0b5137; border: 1px solid #b7e2cf;
	padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; font-weight: 600;
}

.ccd-contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; margin-bottom: 32px; }
.ccd-contact .ccd-h { margin-top: 0; }
@media (max-width: 921px) { .ccd-contact { grid-template-columns: 1fr; } }

/* Nút gọi / Zalo nổi */
.ccd-float {
	position: fixed; right: 16px; bottom: 16px; z-index: 9999;
	display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.ccd-float a {
	display: inline-flex; align-items: center; gap: 8px;
	height: 52px; min-width: 52px; padding: 0 18px;
	border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.ccd-float a:hover { color: #fff; filter: brightness(1.08); }
.ccd-float-call { background: var(--ccd-price); }
.ccd-float-zalo { background: #0068ff; justify-content: center; }
@media (max-width: 640px) { .ccd-float-call span { display: none; } .ccd-float-call { padding: 0 15px; } }
