/* Portal Inmobiliario Pro */
:root {
	--pip-bg: #f5f7fb;
	--pip-surface: #ffffff;
	--pip-text: #172033;
	--pip-muted: #687389;
	--pip-line: #e5e9f2;
	--pip-primary: #1f4cff;
	--pip-primary-dark: #1739c7;
	--pip-success: #16a34a;
	--pip-shadow: 0 12px 30px rgba(19, 31, 56, 0.10);
	--pip-radius: 18px;
}

.pip-wrapper {
	background: var(--pip-bg);
	border-radius: 24px;
	padding: 20px;
	color: var(--pip-text);
}

.pip-filters {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 14px;
	align-items: end;
	margin-bottom: 22px;
}

.pip-field,
.pip-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pip-field--search {
	grid-column: span 2;
}

.pip-field label {
	font-size: 14px;
	font-weight: 600;
	color: var(--pip-text);
}

.pip-field input,
.pip-field select {
	min-height: 46px;
	padding: 12px 14px;
	border: 1px solid var(--pip-line);
	border-radius: 14px;
	background: var(--pip-surface);
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pip-field input:focus,
.pip-field select:focus {
	border-color: rgba(31, 76, 255, 0.55);
	box-shadow: 0 0 0 4px rgba(31, 76, 255, 0.12);
}

.pip-actions {
	justify-content: end;
}

.pip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 12px 18px;
	border: 0;
	border-radius: 14px;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	box-shadow: 0 10px 20px rgba(20, 34, 65, 0.08);
}

.pip-btn:hover {
	transform: translateY(-1px);
}

.pip-btn--primary {
	background: var(--pip-primary);
	color: #fff;
}

.pip-btn--primary:hover {
	background: var(--pip-primary-dark);
	color: #fff;
}

.pip-btn--success {
	background: var(--pip-success);
	color: #fff;
}

.pip-btn--success:hover {
	filter: brightness(0.95);
	color: #fff;
}

.pip-btn--ghost {
	background: #fff;
	color: var(--pip-text);
	border: 1px solid var(--pip-line);
	box-shadow: none;
}

.pip-results {
	min-height: 180px;
}

.pip-loading,
.pip-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	background: rgba(255,255,255,0.65);
	border: 1px dashed var(--pip-line);
	border-radius: 18px;
	color: var(--pip-muted);
	text-align: center;
	padding: 20px;
}

.pip-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.pip-card {
	background: var(--pip-surface);
	border-radius: var(--pip-radius);
	overflow: hidden;
	box-shadow: var(--pip-shadow);
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pip-card__media {
	position: relative;
	overflow: hidden;
}

.pip-card__featured {
	width: 100%;
	height: 270px;
	object-fit: cover;
	display: block;
	cursor: zoom-in;
	transition: transform 0.35s ease;
}

.pip-card:hover .pip-card__featured {
	transform: scale(1.03);
}

.pip-card__body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pip-card__header {
	display: flex;
	justify-content: space-between;
	align-items: start;
	gap: 14px;
}

.pip-card__title {
	margin: 0;
	font-size: 22px;
	line-height: 1.2;
}

.pip-card__price {
	font-size: 20px;
	font-weight: 800;
	white-space: nowrap;
	color: var(--pip-primary);
}

.pip-card__excerpt {
	margin: 0;
	color: var(--pip-muted);
	line-height: 1.6;
}

.pip-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pip-badge {
	font-size: 12px;
	font-weight: 700;
	color: var(--pip-primary);
	background: rgba(31, 76, 255, 0.08);
	padding: 8px 10px;
	border-radius: 999px;
}

.pip-gallery-wrap {
	position: relative;
}

.pip-gallery {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 4px 36px;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.pip-gallery::-webkit-scrollbar {
	height: 8px;
}

.pip-gallery__item {
	flex: 0 0 132px;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: zoom-in;
	scroll-snap-align: start;
}

.pip-gallery__item img {
	width: 132px;
	height: 94px;
	border-radius: 14px;
	object-fit: cover;
	display: block;
	box-shadow: 0 6px 18px rgba(20, 34, 65, 0.12);
}

.pip-slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,0.9);
	background: rgba(23, 32, 51, 0.82);
	color: #fff;
	cursor: pointer;
}

.pip-slider-btn--prev { left: 0; }
.pip-slider-btn--next { right: 0; }

.pip-map iframe {
	width: 100%;
	height: 240px;
	border: 0;
	border-radius: 16px;
	display: block;
}

.pip-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.pip-modal {
	position: fixed;
	inset: 0;
	background: rgba(9, 14, 26, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	z-index: 99999;
}

.pip-modal.is-active {
	display: flex;
}

.pip-modal__image {
	max-width: min(1280px, 96vw);
	max-height: 90vh;
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.pip-modal__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	border: 0;
	background: rgba(255,255,255,0.14);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 1180px) {
	.pip-filters {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pip-field--search {
		grid-column: span 3;
	}

	.pip-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.pip-wrapper {
		padding: 14px;
		border-radius: 18px;
	}

	.pip-filters,
	.pip-grid {
		grid-template-columns: 1fr;
	}

	.pip-field--search {
		grid-column: span 1;
	}

	.pip-card__header,
	.pip-card__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.pip-card__featured {
		height: 220px;
	}

	.pip-gallery {
		padding-left: 0;
		padding-right: 0;
	}

	.pip-slider-btn {
		display: none;
	}
}
