/* ==========================================================================
   Genvel Inmobiliaria — ajustes visuales de Essential Real Estate
   Se carga después de Bootstrap y de los estilos de ERE.
   ========================================================================== */

/* Paleta de la marca en las variables de ERE (reemplaza su naranja #FE6A00).
   Va en :root (doble para ganar especificidad) porque ERE deriva otras
   variables allí mismo y una variable se resuelve donde se declara. */
:root:root {
	--ere-color-accent: var(--wp--preset--color--accent-1);
	--ere-color-accent-foreground: #fff;
	--ere-color-border: var(--wp--preset--color--accent-6);
	--ere-btn-step-bg-color: var(--wp--preset--color--accent-3);
}

/* Bootstrap (que carga ERE) redefine la tipografía base: se devuelve la del tema. */
body {
	font-family: var(--wp--preset--font-family--manrope), sans-serif;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
}
h1, h2, h3, h4, h5, h6 {
	font-family: inherit;
	color: var(--gv-primary-dark);
	font-weight: 700;
	letter-spacing: -0.02em;
}
a {
	color: var(--gv-primary);
}
a:hover {
	color: var(--gv-primary-dark);
}

/* Contenedor de las plantillas PHP de ERE */
.gv-ere-main {
	padding: 24px var(--wp--preset--spacing--50, 24px) var(--wp--preset--spacing--60, 60px);
}
.gv-ere-container {
	max-width: 1240px;
	margin: 0 auto;
}

/* Migas de pan */
.gv-breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0;
	margin: 0 0 18px;
	font-size: 0.875rem;
	color: var(--gv-muted);
}
.gv-breadcrumbs li + li::before {
	content: "›";
	margin-right: 6px;
	color: var(--gv-muted);
}
.gv-breadcrumbs a {
	color: var(--gv-muted);
	text-decoration: none;
}
.gv-breadcrumbs a:hover {
	color: var(--gv-primary);
	text-decoration: underline;
}

/* Botones de ERE con el estilo del tema */
.ere-property-wrap .btn-primary,
.ere__btn-primary,
.ere-search-properties .btn-primary,
.ere-property-advanced-search .btn-primary,
[class*="ere"] .btn.btn-primary {
	background-color: var(--gv-primary);
	border-color: var(--gv-primary);
	border-radius: 8px;
	font-weight: 600;
}
[class*="ere"] .btn.btn-primary:hover,
[class*="ere"] .btn.btn-primary:focus {
	background-color: var(--gv-primary-dark);
	border-color: var(--gv-primary-dark);
}

/* Buscador del hero */
.gv-hero .ere-search-properties {
	text-align: left;
}
/* Pestañas Venta / Arriendo / Anticresis del buscador: píldoras */
.ere-search-status-tab,
.ere-search-status-tab-inner {
	background: transparent !important;
	padding: 0 !important;
}
.ere-search-status-tab .btn-status-filter {
	border-radius: 999px !important;
	border: 1px solid var(--gv-border) !important;
	background: #fff !important;
	color: var(--gv-text) !important;
	padding: 8px 20px !important;
	margin: 0 8px 10px 0 !important;
	font-weight: 600;
	line-height: 1.3 !important;
	height: auto !important;
}
.ere-search-status-tab .btn-status-filter.active,
.ere-search-status-tab .btn-status-filter:hover {
	background: var(--gv-primary) !important;
	border-color: var(--gv-primary) !important;
	color: #fff !important;
}
.gv-hero .ere-search-status-tab .btn-status-filter {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: rgba(255, 255, 255, 0.45) !important;
	color: #fff !important;
}
.gv-hero .ere-search-status-tab .btn-status-filter.active,
.gv-hero .ere-search-status-tab .btn-status-filter:hover {
	background: var(--gv-accent) !important;
	border-color: var(--gv-accent) !important;
	color: var(--gv-text) !important;
}
/* Resultados de búsqueda: ERE los pega sin separación (col-gap-0) */
.ere-property.property-grid.col-gap-0 {
	margin-left: -12px;
	margin-right: -12px;
}
.ere-property.property-grid.col-gap-0 .ere-item-wrap {
	padding: 0 12px;
	margin-bottom: 24px;
}

.ere-advanced-search-btn,
.ere-search-properties .ere-advanced-search-btn {
	background-color: var(--wp--preset--color--accent-2);
	border-color: var(--wp--preset--color--accent-2);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	border-radius: 8px;
	min-height: 44px;
	padding: 0.6rem 1.6rem;
}
.ere-advanced-search-btn:hover,
.ere-advanced-search-btn:focus-visible {
	background-color: #b4832f;
	border-color: #b4832f;
}

/* ==========================================================================
   Tarjeta de propiedad (listados, Inicio, archivos, asesores)
   ========================================================================== */
.ere-property.property-grid .property-inner,
.ere-property.property-carousel .property-inner,
.ere-property.property-list .property-inner,
.ere-property .property-inner {
	background: #fff;
	padding: 0;
	border: 1px solid var(--gv-border);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(15, 40, 40, 0.05), 0 6px 18px rgba(15, 40, 40, 0.06);
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ere-property .property-inner:hover {
	box-shadow: var(--gv-shadow-hover);
	transform: translateY(-3px);
}
.ere-property .property-image {
	position: relative;
	overflow: hidden;
	margin: 0;
}
.ere-property .property-image img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.ere-property .property-inner:hover .property-image img {
	transform: scale(1.04);
}
/* Etiquetas sobre la foto: píldoras en lugar de flechas */
.ere-property .ere__loop-property-badge-item {
	border-radius: 999px;
	padding: 0;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.ere-property .ere__loop-property-badge-item::before,
.ere-property .ere__loop-property-badge-item::after,
.ere-property .ere__loop-property-badge .ere__loop-property-badge-item .ere__lpbi-inner::after,
.ere-property .ere__loop-property-badge .ere__loop-property-badge-item .ere__lpbi-inner::before {
	display: none !important;
}
.ere-property .ere__loop-property-badge .ere__loop-property-badge-item .ere__lpbi-inner {
	display: inline-block;
	padding: 4px 12px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
}
.ere-property .ere__lpb-featured-label .ere__loop-property-badge-item {
	background: var(--gv-accent);
}
.ere-property .ere__lpb-featured-label .ere__lpbi-inner {
	background: var(--gv-accent);
	color: var(--gv-text);
}
/* Acciones sobre la foto (galería, favorito, comparar) */
.ere-property .ere__loop-property-action .ere__loop-property_action-item {
	background: rgba(255, 255, 255, 0.92);
	color: var(--gv-primary);
	border-radius: 50%;
}

/* Contenido */
.ere-property.property-grid .property-item-content,
.ere-property.property-carousel .property-item-content,
.ere-property.property-list .property-item-content,
.ere-property .property-item-content {
	padding: 16px 20px 0;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.ere-property .property-heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 6px;
}
.ere-property .property-heading .ere__loop-property-price {
	order: -1;
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--gv-primary);
	letter-spacing: -0.02em;
	line-height: 1.1;
}
.ere-property .property-heading .ere__loop-property-price span,
.ere-property .property-heading .ere__loop-property-price small {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--gv-muted);
}
.ere-property .property-title {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
	white-space: normal;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	min-height: 2.7em;
}
.ere-property .property-title a {
	color: var(--gv-primary-dark);
	text-decoration: none;
}
.ere-property .property-title a:hover {
	color: var(--gv-primary);
}
.ere-property .property-location {
	font-size: 0.85rem;
	color: var(--gv-muted);
	margin: 2px 0 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ere-property .property-location i {
	color: var(--gv-accent);
	margin-right: 4px;
}
.ere-property .property-location a {
	color: inherit;
}
/* Tipo, asesor y fecha: ruido en la tarjeta */
.ere-property .property-grid .property-element-inline,
.ere-property.property-grid .property-element-inline,
.ere-property.property-grid .property-excerpt {
	display: none;
}
/* Datos clave: franja clara al pie */
.ere-property .property-item-content .ere__loop-property-info {
	background: transparent !important;
	margin: auto -20px 0 !important;
	padding: 12px 20px !important;
	border-top: 1px solid var(--gv-border);
	color: var(--gv-text);
}
.ere-property .property-item-content .ere__loop-property-info .property-info-inner {
	justify-content: space-between;
}
.ere-property .property-item-content .ere__loop-property-info i {
	color: var(--gv-primary) !important;
}
.ere-property .property-item-content .ere__loop-property-info .ere__lpi-value {
	color: var(--gv-text) !important;
	font-weight: 600;
}
.ere-property .ere-item-wrap {
	margin-bottom: 30px;
}

/* Cabecera de listados de ERE (título, filtros por operación, orden, vista) */
.above-archive-property .ere-heading h2 {
	text-transform: none;
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	letter-spacing: -0.025em;
}
.above-archive-property .ere-heading h2 sub {
	font-size: 0.5em;
	color: var(--gv-muted);
	vertical-align: middle;
	margin-left: 6px;
}
.above-archive-property .ere-heading h2::after,
.above-archive-property .ere-heading::after {
	background-color: var(--gv-accent) !important;
}
.ere__apa-status ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	background: transparent !important;
}
.ere__apa-status ul li,
.ere__apa-status ul li a {
	background: transparent !important;
	border: 0 !important;
}
.ere__apa-status ul li a {
	display: inline-block;
	height: auto;
	line-height: 1.4;
	padding: 8px 18px !important;
	border-radius: 999px;
	border: 1px solid var(--gv-border) !important;
	color: var(--gv-text) !important;
	font-weight: 600;
	font-size: 0.9rem;
	text-transform: none;
}
.ere__apa-status ul li.active a,
.ere__apa-status ul li a:hover {
	background: var(--gv-primary) !important;
	border-color: var(--gv-primary) !important;
	color: #fff !important;
}
.ere__apa-orderby .dropdown-toggle {
	border: 1px solid var(--gv-border);
	border-radius: 999px;
	background: #fff !important;
	padding: 0 18px;
	height: 38px;
	line-height: 36px;
	font-size: 0.9rem;
}
.ere__apa-status ul li {
	margin-right: 0;
}
/* Vista en lista: imagen a la izquierda sin marco gris */
.ere-property.property-list .property-inner {
	flex-direction: row;
}
.ere-property.property-list .property-image {
	flex: 0 0 38%;
	max-width: 38%;
}
.ere-property.property-list .property-image img {
	height: 100%;
}
@media (max-width: 767px) {
	.ere-property.property-list .property-inner {
		flex-direction: column;
	}
	.ere-property.property-list .property-image {
		flex-basis: auto;
		max-width: 100%;
	}
}
.ere__apa-switch-layout .view-as a,
.ere__apa-switch-layout .view-as span {
	border-radius: 8px;
}

/* Títulos de las páginas de ERE sin mayúsculas forzadas */
.gv-ere-page .ere-heading h2 {
	text-transform: none;
	font-size: clamp(1.75rem, 3vw, 2.4rem);
	letter-spacing: -0.025em;
}
.gv-ere-page .ere-heading h2 sub {
	font-size: 0.5em;
	color: var(--gv-muted);
	vertical-align: middle;
}

/* ==========================================================================
   Tarjeta de asesor (listado de asesores, Inicio, Nosotros)
   ========================================================================== */
.ere-agent.agent-grid .agent-item-inner,
.ere-agent .agent-item-inner {
	background: #fff;
	border: 1px solid var(--gv-border);
	border-radius: 18px;
	box-shadow: 0 1px 2px rgba(15, 40, 40, 0.05), 0 6px 18px rgba(15, 40, 40, 0.06);
	padding: 28px 22px 24px;
	text-align: center;
	height: 100%;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ere-agent .agent-item-inner:hover {
	box-shadow: var(--gv-shadow-hover);
	transform: translateY(-3px);
}
.ere-agent .agent-avatar {
	margin: 0 auto 16px;
	width: 120px;
	height: 120px;
}
.ere-agent .agent-avatar img {
	width: 120px;
	height: 120px;
	object-fit: cover;
	border-radius: 50%;
	display: block;
	box-shadow: 0 0 0 4px var(--gv-soft);
}
.ere-agent .agent-info,
.ere-agent .agent-content {
	background: transparent !important;
	padding: 0 !important;
	position: static !important;
	color: var(--gv-text);
}
.ere-agent .agent-name {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 4px;
}
.ere-agent .agent-name a {
	color: var(--gv-primary-dark) !important;
	text-decoration: none;
}
.ere-agent .agent-total-properties {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--gv-soft);
	color: var(--gv-primary) !important;
	font-weight: 700;
	font-size: 0.82rem;
}
.ere-agent .agent-description {
	font-size: 0.88rem;
	color: var(--gv-muted);
	margin: 10px 0 0;
}
.ere-agent .agent-social {
	position: static !important;
	background: transparent !important;
	margin-top: 14px;
	transform: none !important;
}
.ere-agent .agent-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--gv-border);
	background: #fff !important;
	color: var(--gv-primary) !important;
}

/* ==========================================================================
   Ficha de asesor
   ========================================================================== */
.ere__single-agent-avatar img {
	width: 100%;
	max-width: 240px;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: var(--gv-shadow);
}
.ere__single-agent-avatar .btn {
	max-width: 240px;
	margin: 14px auto 0;
	border-radius: 8px;
}
.ere__single-agent-title {
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	margin-bottom: 4px;
}
.ere__single-agent-position {
	display: block;
	color: var(--gv-muted);
	font-size: 1rem;
}
.ere__single-agent-number-property {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--gv-soft);
	color: var(--gv-primary);
	font-weight: 700;
	font-size: 0.85rem;
}
.agent-single .ere__single-agent-social {
	display: none; /* El correo ya aparece en los datos de contacto */
}
.agent-single .ere__single-agent-contact-info {
	margin-top: 18px;
}
.agent-single .ere__single-agent-contact-info > div {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
}
.agent-single .ere__single-agent-contact-info > div > strong {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
.agent-single .ere__single-agent-contact-info i {
	width: 18px;
	text-align: center;
	color: var(--gv-primary);
}
.agent-single .ere__single-agent-contact-info a {
	color: var(--gv-text);
}
.agent-single .ere__single-agent-contact-info hr {
	margin: 14px 0;
	border-color: var(--gv-border);
}
.agent-single .gv-wa-btn {
	max-width: 280px;
	margin-top: 16px;
}
@media (max-width: 991px) {
	.ere__single-agent-avatar img,
	.ere__single-agent-avatar .btn {
		max-width: 180px;
	}
	.agent-single .agent-content {
		margin-top: 20px;
		text-align: center;
	}
	.agent-single .ere__single-agent-contact-info > div {
		justify-content: center;
	}
	.agent-single .gv-wa-btn {
		margin-left: auto;
		margin-right: auto;
	}
}
/* Formulario del asesor en tarjeta */
.agent-single .ere__contact-form,
.agent-single .agent-contact-form,
.agent-single [class*="col-lg-4"] .ere__contact-form {
	background: #fff;
	border: 1px solid var(--gv-border);
	border-radius: 18px;
	box-shadow: var(--gv-shadow);
	padding: 22px;
}
.agent-single .ere__contact-form label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}
.agent-single .ere__contact-form .btn {
	width: 100%;
	min-height: 46px;
}
/* Botón de WhatsApp (lo añade genvel-contacto.js) */
.gv-wa-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 46px;
	border-radius: 8px;
	background: #1f7a4d;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
}
.gv-wa-btn:hover {
	background: #18603c;
}

/* El selector de sectores (select2) con la misma altura que los demás campos */
.ere-search-properties .select2-container .select2-selection--single {
	height: 44px;
	border-radius: 8px;
	border-color: #b9c2bf;
	display: flex;
	align-items: center;
}
.ere-search-properties .select2-container .select2-selection--single .select2-selection__arrow {
	height: 42px;
}

/* Título de la ficha (ahora H1) con el tamaño que tenía */
.ere__single-property-title {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	margin: 0 0 0.5rem;
}

/* Mapa OpenStreetMap de la ficha */
.gv-osm-map__actions {
	display: flex;
	gap: 14px;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 12px;
}
.gv-osm-map__actions small {
	color: var(--gv-muted);
}

/* Campos de formulario de ERE */
[class*="ere"] .form-control {
	border-radius: 8px;
	border-color: #b9c2bf;
	min-height: 44px;
}
