/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Child theme for Astra
Author: Chalex
Template: astra
Version: 1.0
*/

/* =========================================================
   1. GLOBAL BASE
========================================================= */
body {
	background: #ffffff;
	color: #1f2f46;
}

a {
	text-decoration: none;
}

/* =========================================================
   2. SIMPLE LISTINGS SHORTCODE GRID
   Temporary support for shortcode page
========================================================= */
.chalex-listings-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 26px;
}

/* =========================================================
   3. LISTINGS ARCHIVE WRAP
========================================================= */
.chalex-listings-archive-wrap {
	padding: 50px 20px 70px;
	background: #f7f8fc;
}

.chalex-listings-archive-container {
	max-width: 1240px;
	margin: 0 auto;
}

.chalex-listings-archive-header {
	margin-bottom: 28px;
}

.chalex-listings-archive-header h1 {
	margin: 0 0 8px;
	font-size: 40px;
	line-height: 1.1;
	color: #1f2f46;
}

.chalex-listings-archive-header p {
	margin: 0;
	color: #5f6b7a;
	font-size: 16px;
}

/* =========================================================
   4. LISTING CARD
========================================================= */
.chalex-listing-card,
.chalex-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 18px;
	overflow: hidden;
	box-shadow:
		0 14px 34px rgba(15, 35, 60, 0.10),
		0 4px 10px rgba(15, 35, 60, 0.05);
	position: relative;
	transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.chalex-listing-card:hover,
.chalex-card:hover {
	transform: translateY(-4px);
	box-shadow:
		0 20px 44px rgba(15, 35, 60, 0.14),
		0 8px 18px rgba(15, 35, 60, 0.08);
}

.chalex-listing-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
	height: 100%;
}

/* =========================================================
   5. LISTING IMAGE
========================================================= */
.chalex-listing-card-image-wrap,
.chalex-card-img-wrap {
	position: relative;
}

.chalex-listing-card-image,
.chalex-listing-card-image-placeholder,
.chalex-card-img {
	aspect-ratio: 3 / 2;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.chalex-listing-card-image-placeholder {
	background: linear-gradient(135deg, #dbe4f0, #eef2f7);
}

/* =========================================================
   6. SALE TAG
========================================================= */
.chalex-sale-tag {
	position: absolute;
	top: 14px;
	right: 14px;
	background: #111827;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 999px;
	z-index: 5;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   7. CORNER RIBBON
========================================================= */
.chalex-ribbon {
	position: absolute;
	top: -14px;
	left: -14px;
	width: 148px;
	height: 148px;
	overflow: hidden;
	z-index: 8;
	pointer-events: none;
	filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.22));
}

.chalex-ribbon::before,
.chalex-ribbon::after {
	content: "";
	position: absolute;
	z-index: 1;
	background: rgba(0, 0, 0, 0.22);
}

.chalex-ribbon::before {
	top: 24px;
	left: 8px;
	width: 18px;
	height: 18px;
	transform: skewY(-45deg);
	border-radius: 2px;
}

.chalex-ribbon::after {
	top: 8px;
	left: 24px;
	width: 18px;
	height: 18px;
	transform: skewX(-45deg);
	border-radius: 2px;
}

.chalex-ribbon span {
	position: absolute;
	display: block;
	width: 205px;
	padding: 10px 0;
	top: 31px;
	left: -49px;
	transform: rotate(-45deg);
	text-align: center;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ffffff;
	z-index: 3;
	box-shadow:
		0 10px 18px rgba(0, 0, 0, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		inset 0 -1px 0 rgba(0, 0, 0, 0.12);
	background: linear-gradient(135deg, #c5161d 0%, #991b1b 100%);
}

.chalex-ribbon span::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.42) 0%,
			rgba(255, 255, 255, 0.18) 18%,
			rgba(255, 255, 255, 0.04) 42%,
			rgba(255, 255, 255, 0) 100%
		);
	pointer-events: none;
}

/* new listing = gold metallic */
.chalex-ribbon.new-listing span {
	background:
		linear-gradient(135deg,
			#fff4bf 0%,
			#f8d76b 14%,
			#f8ae22 32%,
			#d49317 52%,
			#ffdc73 70%,
			#c7850d 100%);
	color: #1f2f46;
}

/* coming soon = blue metallic */
.chalex-ribbon.coming-soon span {
	background:
		linear-gradient(135deg,
			#c6ebff 0%,
			#5eb5ea 14%,
			#2980b9 34%,
			#1f6693 54%,
			#7dc8f3 72%,
			#175276 100%);
	color: #ffffff;
}

/* sold = red metallic */
.chalex-ribbon.sold span {
	background:
		linear-gradient(135deg,
			#ffd0d0 0%,
			#f36c6c 14%,
			#c5161d 34%,
			#991b1b 54%,
			#ff8f8f 72%,
			#7f1313 100%);
	color: #ffffff;
}

/* reduced = orange metallic */
.chalex-ribbon.reduced span {
	background:
		linear-gradient(135deg,
			#ffe0bf 0%,
			#ffad5a 14%,
			#d96b1f 34%,
			#b45309 54%,
			#ffc27a 72%,
			#a74808 100%);
	color: #ffffff;
}

/* =========================================================
   8. LISTING CARD BODY
========================================================= */
.chalex-listing-card-body,
.chalex-card-content {
	padding: 16px 16px 18px;
}

.chalex-listing-category {
	font-size: 14px;
	font-weight: 700;
	color: #2980b9;
	margin-bottom: 8px;
}

.chalex-listing-title,
.chalex-card-content h3 {
	font-size: 24px;
	line-height: 1.25;
	margin: 0 0 8px;
	color: #1f2f46;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.chalex-listing-location,
.chalex-card-content .location {
	font-size: 14px;
	color: #667085;
	margin-bottom: 12px;
}

.chalex-listing-price-row {
	margin-bottom: 14px;
}

.chalex-listing-price-old {
	display: inline-block;
	margin-right: 8px;
	font-size: 15px;
	color: #8b95a7;
	text-decoration: line-through;
}

.chalex-listing-price,
.chalex-card-content .price {
	font-size: 30px;
	line-height: 1.1;
	font-weight: 700;
	color: #d4a53a;
	margin: 10px 0;
}

.chalex-listing-metrics {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	border-top: 1px solid #edf1f5;
	padding-top: 14px;
}

.chalex-listing-metric-label {
	display: block;
	font-size: 12px;
	color: #667085;
	margin-bottom: 4px;
}

.chalex-listing-metric-value {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #1f2f46;
}

/* =========================================================
   9. BUTTONS
========================================================= */
.chalex-btn {
	display: inline-block;
	padding: 10px 14px;
	background: #d4a53a;
	color: #ffffff;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
}

.chalex-btn:hover {
	background: #be932f;
	color: #ffffff;
}

/* =========================================================
   10. PAGINATION / EMPTY STATE
========================================================= */
.chalex-listings-pagination {
	margin-top: 34px;
}

.chalex-listings-pagination .nav-links {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.chalex-listings-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 14px;
	background: #fff;
	border: 1px solid #dde4ee;
	border-radius: 10px;
	color: #1f2f46;
	text-decoration: none;
}

.chalex-listings-pagination .page-numbers.current {
	background: #2980b9;
	border-color: #2980b9;
	color: #fff;
}

.chalex-no-listings {
	padding: 30px 0;
}

/* =========================================================
   11. RESPONSIVE
========================================================= */
@media (max-width: 1200px) {
	.chalex-listings-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.chalex-listings-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.chalex-listings-archive-header h1 {
		font-size: 32px;
	}

	.chalex-listings-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
   12. SINGLE LISTING
========================================================= */

.chalex-single-listing-wrap {
	padding: 56px 20px 96px;
	background: linear-gradient(180deg, #f7f8fc 0%, #f3f5fa 100%);
}

.chalex-single-listing-container {
	max-width: 1280px;
	margin: 0 auto;
}

.chalex-single-listing-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 28px;
	align-items: start;
	margin-bottom: 32px;
}

.chalex-single-category {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #2980b9;
	margin-bottom: 10px;
}

.chalex-single-listing-summary h1 {
	margin: 0 0 16px;
	font-size: 48px;
	line-height: 1.05;
	color: #1f2f46;
	letter-spacing: -0.02em;
}

.chalex-single-price-row {
	margin-bottom: 22px;
}

.chalex-single-price-old {
	display: inline-block;
	margin-right: 10px;
	font-size: 18px;
	color: #8b95a7;
	text-decoration: line-through;
}

.chalex-single-price {
	font-size: 42px;
	line-height: 1.05;
	font-weight: 800;
	color: #d4a53a;
	letter-spacing: -0.02em;
}

.chalex-single-key-metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
}

.chalex-single-key-metric {
	position: relative;
	padding-right: 28px;
}

.chalex-single-key-metric:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 6px;
	right: 0;
	width: 1px;
	height: 30px;
	background: #dbe3ee;
}

.chalex-single-key-metric .label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #667085;
	margin-bottom: 4px;
}

.chalex-single-key-metric .value {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: #1f2f46;
}

.chalex-single-listing-actions {
	text-align: right;
}

.chalex-single-location {
	font-size: 18px;
	font-weight: 700;
	color: #1f2f46;
	margin-bottom: 16px;
}

.chalex-single-action-icons {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.chalex-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 90px;
	height: 42px;
	padding: 0 15px;
	background: #111827;
	color: #fff;
	border: none;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(17, 24, 39, 0.14);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.chalex-action-btn:hover {
	background: #1f2937;
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 12px 22px rgba(17, 24, 39, 0.18);
}

.chalex-single-listing-gallery {
	margin-bottom: 38px;
}

.chalex-single-main-image-wrap {
	position: relative;
	border-radius: 22px;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e5eaf1;
	box-shadow:
		0 18px 38px rgba(15, 35, 60, 0.10),
		0 6px 14px rgba(15, 35, 60, 0.05);
}

.chalex-single-main-image-wrap img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.chalex-single-image-placeholder {
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #dbe4f0, #eef2f7);
}

.chalex-single-thumbs {
	display: flex;
	gap: 14px;
	margin-top: 18px;
	flex-wrap: wrap;
}

.chalex-thumb-btn {
	border: 2px solid transparent;
	padding: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	cursor: pointer;
	box-shadow: 0 10px 20px rgba(15, 35, 60, 0.08);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chalex-thumb-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 24px rgba(15, 35, 60, 0.12);
}

.chalex-thumb-btn img {
	display: block;
	width: 108px;
	height: 76px;
	object-fit: cover;
}

.chalex-thumb-btn.is-active {
	border-color: #2980b9;
}

.chalex-single-listing-content-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.48fr) minmax(330px, 0.72fr);
	gap: 34px;
	align-items: start;
}

.chalex-single-main-content {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.chalex-single-overview-card,
.chalex-single-section-card,
.chalex-agent-card,
.chalex-contact-card {
	background: #fff;
	border: 1px solid #e3e9f1;
	border-radius: 20px;
	padding: 26px;
	box-shadow:
		0 16px 34px rgba(15, 35, 60, 0.08),
		0 4px 10px rgba(15, 35, 60, 0.04);
}

.chalex-single-overview-card h2,
.chalex-single-section-card h3,
.chalex-agent-card h3,
.chalex-contact-card h3 {
	margin: 0 0 18px;
	font-size: 25px;
	line-height: 1.2;
	color: #1f2f46;
}

.chalex-single-overview-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.chalex-single-overview-grid .item {
	padding: 16px 18px;
	background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
	border: 1px solid #e8eef5;
	border-radius: 14px;
}

.chalex-single-overview-grid .label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #667085;
	margin-bottom: 5px;
}

.chalex-single-overview-grid .value {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #1f2f46;
}

.chalex-single-section-card p,
.chalex-wysiwyg-content {
	color: #425466;
	line-height: 1.75;
	font-size: 15px;
}

.chalex-wysiwyg-content p:last-child,
.chalex-single-section-card p:last-child {
	margin-bottom: 0;
}

.chalex-single-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	position: sticky;
	top: 24px;
}

.chalex-agent-card {
	background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.chalex-agent-card-header {
	display: flex;
	gap: 16px;
	align-items: center;
	margin-bottom: 18px;
}

.chalex-agent-avatar {
	width: 88px;
	height: 88px;
	border-radius: 50%;
	background: linear-gradient(135deg, #2980b9, #1f6693);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	font-weight: 700;
	overflow: hidden;
	flex-shrink: 0;
	box-shadow: 0 10px 22px rgba(41, 128, 185, 0.20);
}

.chalex-agent-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.chalex-agent-meta h3 {
	margin: 0 0 6px;
	font-size: 22px;
}

.chalex-agent-meta p {
	margin: 0;
	color: #667085;
	font-size: 14px;
}

.chalex-agent-contact-lines .line {
	font-size: 14px;
	color: #425466;
	margin-bottom: 10px;
	line-height: 1.5;
}

.chalex-contact-card h3 {
	margin-bottom: 18px;
}

.chalex-listing-contact-form .row {
	margin-bottom: 14px;
}

.chalex-listing-contact-form input,
.chalex-listing-contact-form textarea {
	width: 100%;
	border: 1px solid #d9e2ec;
	border-radius: 12px;
	padding: 13px 14px;
	font-size: 14px;
	color: #1f2f46;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chalex-listing-contact-form input:focus,
.chalex-listing-contact-form textarea:focus {
	outline: none;
	border-color: #2980b9;
	box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.10);
}

.chalex-listing-contact-form textarea {
	resize: vertical;
	min-height: 130px;
}

@media (max-width: 1024px) {
	.chalex-single-listing-summary h1 {
		font-size: 40px;
	}

	.chalex-single-listing-content-grid {
		grid-template-columns: 1fr;
	}

	.chalex-single-sidebar {
		position: static;
	}
}

@media (max-width: 920px) {
	.chalex-single-listing-top {
		grid-template-columns: 1fr;
	}

	.chalex-single-listing-actions {
		text-align: left;
	}

	.chalex-single-action-icons {
		justify-content: flex-start;
	}
}

@media (max-width: 640px) {
	.chalex-single-listing-wrap {
		padding: 36px 16px 64px;
	}

	.chalex-single-listing-summary h1 {
		font-size: 34px;
	}

	.chalex-single-price {
		font-size: 34px;
	}

	.chalex-single-overview-grid {
		grid-template-columns: 1fr;
	}

	.chalex-thumb-btn img {
		width: 88px;
		height: 64px;
	}
}