/* ============================================================
   HOUSING TRIO — Property Listings Page Stylesheet
   listings.css  |  page-specific only, no shared overrides
   ============================================================ */

/* ---------- Section Wrapper ---------- */
.listings-page {
	padding-top: 14px;
	padding-bottom: 70px;
	font-family: 'Poppins', sans-serif;
	background-color: #f4f6f9;
	min-height: 60vh;
}

/* ============================================================
   MOBILE FILTER TOGGLE BAR
   ============================================================ */
.listings-mobile-filter-bar {
	background: #fff;
	border-bottom: 1px solid #e4e7eb;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	position: sticky;
	top: 64px;
	/* sits just below the navbar */
	z-index: 100;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.listings-filter-toggle-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #0f2a44;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 9px 18px;
	font-size: 13px;
	font-weight: 600;
	font-family: 'Poppins', sans-serif;
	cursor: pointer;
	transition: background 0.2s;
}

.listings-filter-toggle-btn:hover {
	background: #183554;
}

.listings-toggle-chevron {
	font-size: 11px;
	transition: transform 0.3s ease;
}

.listings-active-filters-count {
	background: #e8f0fe;
	color: #0f2a44;
	border-radius: 20px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
	align-items: center;
}

/* ============================================================
   SEARCH BAR SECTION
   ============================================================ */
.listings-search-bar {
	background: #0f2a44;
	border-radius: 12px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 0;
	margin-bottom: 22px;
}

.listings-search-bar .listings-location-dropdown {
	background: #1c3d5e;
	border: none;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	padding: 10px 14px;
	border-radius: 8px 0 0 8px;
	min-width: 130px;
	cursor: pointer;
	appearance: auto;
	font-family: 'Poppins', sans-serif;
}

.listings-search-bar .listings-location-dropdown option {
	background: #0f2a44;
	color: #fff;
}

.listings-search-bar .listings-search-input {
	flex: 1;
	border: none;
	background: transparent;
	color: #ffffffcc;
	font-size: 14px;
	padding: 10px 14px;
	outline: none;
	font-family: 'Poppins', sans-serif;
}

.listings-search-bar .listings-search-input::placeholder {
	color: #ffffff88;
}

.listings-search-btn {
	background: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 600;
	color: #0f2a44;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 7px;
	transition: background 0.2s;
	font-family: 'Poppins', sans-serif;
	flex-shrink: 0;
}

.listings-search-btn:hover {
	background: #e9ecef;
}

/* ============================================================
   FILTERS SIDEBAR
   ============================================================ */
.listings-filters-sidebar {
	background: #fff;
	border-radius: 14px;
	padding: 20px 18px;
	box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
	position: sticky;
	top: 88px;
}

/* Header row with title + Clear All */
.listings-filters-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.listings-filters-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f2a44;
	margin: 0;
}

.listings-clear-all-btn {
	background: none;
	border: 1px solid #ccd1d9;
	border-radius: 6px;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 600;
	color: #6c757d;
	cursor: pointer;
	transition: all 0.2s;
	font-family: 'Poppins', sans-serif;
}

.listings-clear-all-btn:hover {
	background: #f0f2f5;
	color: #0f2a44;
	border-color: #0f2a44;
}

/* Filter Group */
.listings-filter-group {
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid #f0f2f5;
}

.listings-filter-group:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.listings-filter-label {
	font-size: 13px;
	font-weight: 600;
	color: #0f2a44;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

/* BHK Buttons */
.listings-bhk-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.listings-bhk-btn {
	background: #f0f3f7;
	border: 1.5px solid #dde3ec;
	border-radius: 7px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 500;
	color: #4a5568;
	cursor: pointer;
	transition: all 0.18s;
	font-family: 'Poppins', sans-serif;
	user-select: none;
}

.listings-bhk-btn:hover {
	background: #e2e8f0;
	border-color: #0f2a44;
	color: #0f2a44;
}

.listings-bhk-btn.active {
	background: #0f2a44;
	color: #fff;
	border-color: #0f2a44;
}

/* Price Range Dual Slider */
.listings-price-display {
	font-size: 12px;
	font-weight: 700;
	color: #1a6bff;
	background: #edf2ff;
	border-radius: 6px;
	padding: 2px 8px;
	white-space: nowrap;
}

.listings-range-track {
	position: relative;
	height: 32px;
	/* Taller for easier interaction */
	display: flex;
	align-items: center;
	margin-top: 5px;
}

/* Visual Track Background */
.listings-range-track::before {
	content: '';
	position: absolute;
	width: 100%;
	height: 6px;
	background: #e4e7eb;
	border-radius: 3px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 0;
}

.listings-price-slider {
	width: 100%;
	position: absolute;
	left: 0;
	cursor: pointer;
	background: transparent;
	height: 24px;
	-webkit-appearance: none;
	pointer-events: none;
	z-index: 1;
	/* Keep base sliders slightly elevated */
	margin: 0;
}

.listings-price-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	background: #0f2a44;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
	pointer-events: auto;
}

.listings-price-slider::-moz-range-thumb {
	width: 22px;
	height: 22px;
	background: #0f2a44;
	border: 2px solid #fff;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	transition: transform 0.15s;
	pointer-events: auto;
}

.listings-price-slider::-webkit-slider-thumb:hover {
	transform: scale(1.15);
}

.listings-price-slider::-moz-range-thumb:hover {
	transform: scale(1.15);
}

.listings-range-labels {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: #9aa3af;
	margin-top: 4px;
}

/* Radio Groups */
.listings-radio-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.listings-radio-group.inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 12px;
}

.listings-radio-item {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12.5px;
	color: #444;
	cursor: pointer;
	line-height: 1;
}

.listings-radio-item input[type="radio"] {
	accent-color: #0f2a44;
	width: 15px;
	height: 15px;
	cursor: pointer;
	margin: 0;
	flex-shrink: 0;
}

/* ============================================================
   PROPERTY CARDS CONTAINER
   ============================================================ */
.listings-cards-container {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

/* ============================================================
   PROPERTY CARD BASE
   ============================================================ */
.listings-property-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 18px rgba(0, 0, 0, .07);
	overflow: hidden;
	transition: box-shadow 0.3s, transform 0.22s;
}

.listings-property-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
	transform: translateY(-2px);
}

/* Card inner: image left + details right */
.listings-card-inner {
	display: flex;
	min-height: 260px;
}

/* ============================================================
   IMAGE PANEL
   ============================================================ */
.listings-card-image {
	position: relative;
	width: 42%;
	flex-shrink: 0;
	overflow: hidden;
	background: #e4e7eb;
}

.listings-card-image img:first-child {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.3s;
}

/* Makes main gallery image clickable */
.gallery-main-img {
	cursor: pointer;
}

/* Thumbnail strip */
.listings-card-image--gallery {
	display: flex;
	flex-direction: column;
	height: 350px;
}

.listings-card-image--gallery>img:first-child {
	flex: 1;
	height: 0;
	min-height: 0;
}

.listings-thumb-strip {
	display: flex;
	gap: 5px;
	padding: 7px 8px;
	background: rgba(0, 0, 0, .55);
	flex-shrink: 0;
}

.listings-thumb {
	flex: 1;
	box-sizing: border-box;
	/* Fix for uneven widths caused by border */
	width: 52px !important;
	height: 42px !important;
	object-fit: cover !important;
	border-radius: 6px;
	cursor: pointer;
	border: 2px solid transparent;
	opacity: 0.72;
	transition: opacity 0.2s, border-color 0.2s;
	flex-shrink: 0;
}

.listings-thumb:hover {
	opacity: 1;
	border-color: #fff;
}

.listings-thumb.active {
	opacity: 1;
	border-color: #1a6bff;
}

/* ============================================================
   DETAILS PANEL
   ============================================================ */
.listings-card-details {
	flex: 1;
	padding: 16px 20px 16px 18px;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Date badge (Card 1 Original) */
.listings-card-date {
	font-size: 10.5px;
	color: #0f2a44;
	text-align: right;
	font-weight: 600;
	margin-bottom: 3px;
	opacity: 0.7;
}

/* Card Title (Card 1 Original) */
.listings-card-title {
	font-size: 14px;
	font-weight: 700;
	color: #0f2a44;
	text-align: center;
	line-height: 1.45;
	margin-bottom: 12px;
}

/* ============================================================
   CARD 2 & 3 LAYOUT UPDATES (NEW)
   ============================================================ */
.listings-card-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.listings-location-top {
	font-size: 12px;
	color: #6c757d;
	display: flex;
	align-items: center;
	gap: 5px;
	font-weight: 500;
}

.listings-location-top i {
	color: #e53e3e;
	font-size: 13px;
}

.listings-card-title-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 15px;
	margin-bottom: 12px;
}

.listings-card-title-inline {
	font-size: 14px;
	font-weight: 700;
	color: #0f2a44;
	margin: 0;
	line-height: 1.45;
	flex: 1;
	text-align: left;
}

.listings-card-price-inline {
	font-size: 18px;
	font-weight: 700;
	color: var(--primary-light);
	white-space: nowrap;
	margin-top: -2px;
	display: flex;
	flex-direction: column;
}

.listings-card-rent-price {
	font-size: .8rem;
	;
}

.listings-action-row-updated {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 3px;
	padding-top: 15px;
	border-top: 1px solid #edf0f3;
}

/* Info Grid */
.listings-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 7px;
	margin-bottom: 12px;
}

.listings-info-box {
	background: #f5f8fb;
	border: 1px solid #e4eaf2;
	border-radius: 9px;
	padding: 8px 10px;
	text-align: center;
}

.listings-info-box .listings-info-value {
	font-size: 12.5px;
	font-weight: 700;
	color: #0f2a44;
	display: block;
	line-height: 1.3;
}

.listings-info-box .listings-info-label {
	font-size: 10.5px;
	color: #7a8595;
	font-weight: 400;
	line-height: 1.3;
}

/* Floor row spanning full width */
.listings-floor-info {
	background: #f5f8fb;
	border: 1px solid #e4eaf2;
	border-radius: 9px;
	padding: 8px 12px;
	grid-column: 1 / -1;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.listings-floor-info .listings-info-value {
	font-size: 12.5px;
	font-weight: 700;
	color: #0f2a44;
	display: block;
}

.listings-floor-info .listings-info-label {
	font-size: 10.5px;
	color: #7a8595;
}

/* Know More / CTA Button */
.listings-btn-know-more {
	display: inline-block;
	background: #0f2a44;
	color: #fff;
	border: none;
	border-radius: 9px;
	padding: 9px 30px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
	text-decoration: none;
	font-family: 'Poppins', sans-serif;
}

.listings-btn-know-more:hover {
	background: #1c3d5e;
	color: #fff;
	transform: scale(1.02);
}

/* Location Row */
.listings-location-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	margin-top: 9px;
	font-size: 12px;
	color: #6c757d;
}

.listings-location-row i {
	color: #e53e3e;
	font-size: 13px;
}

/* Action Row (Original) */
.listings-action-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #edf0f3;
}

.listings-btn-contact-owner {
	background: #0f2a44;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	text-decoration: none;
	font-family: 'Poppins', sans-serif;
}

.listings-btn-contact-owner:hover {
	background: #1c3d5e;
	color: #fff;
}

.listings-contact-whatsapp {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 12px;
	color: #6c757d;
	text-decoration: none;
}

.listings-wa-icon {
	width: 30px;
	height: 30px;
	background: #25d366;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	flex-shrink: 0;
	transition: background 0.2s;
}

.listings-contact-whatsapp:hover .listings-wa-icon {
	background: #1ebe57;
}

/* ============================================================
   LIGHTBOX MODAL 
   ============================================================ */
.property-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.85);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.property-lightbox.active {
	opacity: 1;
	pointer-events: auto;
}

.property-lightbox .lightbox-close {
	position: absolute;
	top: 20px;
	right: 30px;
	color: #fff;
	font-size: 40px;
	cursor: pointer;
	line-height: 1;
	z-index: 10000;
}

.property-lightbox .lightbox-content {
	max-width: 85%;
	max-height: 85vh;
}

.property-lightbox img {
	max-width: 100%;
	max-height: 85vh;
	border-radius: 8px;
	box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
	object-fit: contain;
}

.lightbox-prev,
.lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border: none;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	font-size: 20px;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
	background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
	left: 20px;
}

.lightbox-next {
	right: 20px;
}

/* ============================================================
   RESPONSIVE — TABLET  (md breakpoint)
   ============================================================ */
@media (max-width: 991.98px) {
	.listings-filters-sidebar {
		position: static;
		margin-bottom: 16px;
	}

	.listings-card-image {
		width: 45%;
	}

	.listings-card-title {
		font-size: 13px;
	}
}

/* ============================================================
   RESPONSIVE — MOBILE  (< 768px)
   ============================================================ */
@media (max-width: 767.98px) {
	.listings-page {
		padding-top: 12px;
		padding-bottom: 90px;
	}

	/* ---- Search Bar ---- */
	.listings-search-bar {
		flex-wrap: wrap;
		gap: 8px;
		padding: 10px 12px;
		border-radius: 10px;
		margin-bottom: 14px;
	}

	.listings-search-bar .listings-location-dropdown {
		min-width: auto;
		width: 100%;
		border-radius: 8px;
		font-size: 13px;
		padding: 9px 12px;
	}

	.listings-search-bar .listings-search-input {
		flex: 1;
		font-size: 13px;
		padding: 9px 10px;
	}

	.listings-search-btn {
		padding: 9px 14px;
		font-size: 13px;
	}

	/* ---- Filter Sidebar ---- */
	#listingsFilterCol {
		width: 100% !important;
		max-width: 100% !important;
	}

	.listings-filters-sidebar {
		border-radius: 12px;
		padding: 16px 14px;
		margin-bottom: 14px;
		position: static;
		box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
	}

	/* ---- Cards — stack vertically ---- */
	.listings-card-inner {
		flex-direction: column;
		min-height: auto;
	}

	.listings-card-image,
	.listings-card-image--gallery {
		width: 100%;
		height: 220px;
		min-height: 220px;
		flex: none;
	}

	.listings-card-image--gallery {
		display: flex;
		flex-direction: column;
		height: 230px;
	}

	.listings-card-image--gallery img:first-child {
		flex: 1;
		min-height: 0;
		height: 0;
	}

	.listings-thumb-strip {
		gap: 5px;
		padding: 6px 8px;
	}

	.listings-thumb {
		width: 44px !important;
		height: 36px !important;
	}

	.listings-card-details {
		padding: 14px 14px;
	}

	.listings-card-date {
		font-size: 10px;
	}

	.listings-card-title {
		font-size: 13px;
		margin-bottom: 10px;
	}

	/* Card 2 & 3 Responsive Updates */
	.listings-card-header-row {
		margin-bottom: 6px;
	}

	.listings-card-title-row {
		flex-direction: column;
		gap: 6px;
		margin-bottom: 10px;
	}

	.listings-card-title-inline {
		font-size: 13px;
	}

	.listings-card-price-inline {
		font-size: 16px;
	}

	/* Buttons rest on the same row inside mobile flex */
	.listings-action-row-updated {
		flex-direction: row;
		align-items: center;
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 8px;
		margin-top: 10px;
	}

	.listings-action-row-updated>a {
		width: auto;
	}

	.listings-btn-know-more {
		padding: 8px 16px;
		font-size: 12px;
		flex: 1;
	}

	.listings-contact-whatsapp {
		font-size: 11px;
		flex: 1;
		justify-content: flex-end;
	}

	/* End Card 2 & 3 Updates */

	.listings-info-grid {
		gap: 6px;
		margin-bottom: 10px;
	}

	.listings-info-box {
		padding: 7px 8px;
	}

	.listings-info-box .listings-info-value {
		font-size: 12px;
	}

	.listings-info-box .listings-info-label {
		font-size: 10px;
	}

	.listings-floor-info {
		padding: 7px 10px;
	}

	.listings-floor-info .listings-info-value {
		font-size: 12px;
	}

	.listings-action-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.listings-btn-contact-owner {
		width: 100%;
		text-align: center;
	}

	.listings-bhk-filters {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}

	.listings-bhk-btn {
		text-align: center;
		padding: 6px 8px;
	}

	/* Lightbox Mobile Adjustments */
	.lightbox-prev,
	.lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}

	.lightbox-prev {
		left: 10px;
	}

	.lightbox-next {
		right: 10px;
	}
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE  (< 400px)
   ============================================================ */
@media (max-width: 399.98px) {
	.listings-search-btn {
		width: 100%;
		justify-content: center;
	}

	.listings-bhk-filters {
		grid-template-columns: repeat(2, 1fr);
	}

	.listings-card-image,
	.listings-card-image--gallery {
		height: 185px;
		min-height: 185px;
	}

	.listings-card-details {
		padding: 12px 12px;
	}

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

	/* Ensure text wrapping handles small screens gracefully */
	.listings-action-row-updated {
		gap: 5px;
	}

	.listings-btn-know-more {
		padding: 8px 10px;
		font-size: 11px;
	}
}