/**
 * Viviendax · property.css
 *
 * Estilos de la ficha individual de inmueble (single-vx_property.php).
 * Solo se carga si is_singular('vx_property').
 *
 * Reusa los tokens (--primary, --navy, etc.) del style.css del child theme
 * y los selectores de nav/footer (.vx-nav, .vx-foot) de home.css. Por eso
 * functions.php encola home.css TAMBIÉN en la ficha.
 */

/* ============================================================================
 * Reset del chrome de GeneratePress en la ficha (igual que en home).
 * ============================================================================ */
body.single-vx_property .site-header,
body.single-vx_property .site-footer,
body.single-vx_property .generate-back-to-top,
body.single-vx_property .widget-area,
body.single-vx_property #right-sidebar,
body.single-vx_property #left-sidebar {
	display: none !important;
}
body.single-vx_property #page,
body.single-vx_property #page.grid-container,
body.single-vx_property #page.container,
body.single-vx_property #page.site,
body.single-vx_property .site-content,
body.single-vx_property #primary,
body.single-vx_property #main,
body.single-vx_property .content-area {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
}
body.single-vx_property,
body.single-vx_property .site {
	background: var(--background, #fff) !important;
}

/* ============================================================================
 * Container principal de la ficha.
 * ============================================================================ */
.vx-prop { color: var(--text); }
.vx-prop * { box-sizing: border-box; }
.vx-prop .wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================================
 * Breadcrumbs
 * ============================================================================ */
.vx-prop .breadcrumbs {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
	font-size: 13px; color: var(--muted);
	padding: 16px 0;
}
.vx-prop .breadcrumbs a { color: var(--muted); text-decoration: none; }
.vx-prop .breadcrumbs a:hover { color: var(--primary-dark); }
.vx-prop .breadcrumbs .sep { color: var(--border); }
.vx-prop .breadcrumbs .current { color: var(--text); font-weight: 500; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================================
 * Galería · 1 hero grande + thumbnails row.
 * En desktop: hero a la izquierda, columna de thumbs a la derecha.
 * Click en cualquier imagen → lightbox.
 * ============================================================================ */
.vx-gallery {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 8px;
	margin-bottom: 32px;
	min-height: 480px;
	border-radius: 14px;
	overflow: hidden;
}
.vx-gallery .gal-hero {
	position: relative;
	background: var(--background-soft);
	overflow: hidden;
	cursor: zoom-in;
}
.vx-gallery .gal-hero img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .3s;
}
.vx-gallery .gal-hero:hover img { transform: scale(1.02); }
.vx-gallery .gal-thumbs {
	display: grid; grid-template-rows: repeat(2, 1fr); gap: 8px;
}
.vx-gallery .gal-thumb {
	position: relative; overflow: hidden; cursor: zoom-in;
	background: var(--background-soft);
	min-height: 0;
}
.vx-gallery .gal-thumb img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: transform .3s, opacity .15s;
}
.vx-gallery .gal-thumb:hover img { transform: scale(1.05); }
.vx-gallery .gal-thumb.more {
	cursor: pointer;
}
.vx-gallery .gal-thumb.more::after {
	content: "+" attr(data-more) " fotos";
	position: absolute; inset: 0;
	background: rgba(15, 23, 42, .6); color: #fff;
	display: grid; place-items: center;
	font-family: "Space Mono", monospace;
	font-weight: 700; font-size: 18px;
}

/* Si solo hay 1 imagen: ocupa todo el ancho */
.vx-gallery.single { grid-template-columns: 1fr; }
.vx-gallery.single .gal-thumbs { display: none; }

@media (max-width: 900px) {
	.vx-gallery { grid-template-columns: 1fr; min-height: 320px; }
	.vx-gallery .gal-thumbs { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; }
	.vx-gallery .gal-thumb { aspect-ratio: 4/3; }
}

/* ============================================================================
 * Lightbox
 * ============================================================================ */
.vx-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	background: rgba(15, 23, 42, .92);
	display: none; align-items: center; justify-content: center;
	padding: 24px;
}
.vx-lightbox.open { display: flex; }
.vx-lightbox img {
	max-width: 100%; max-height: 100%;
	object-fit: contain;
	border-radius: 8px;
}
.vx-lightbox .close {
	position: absolute; top: 16px; right: 16px;
	width: 44px; height: 44px; border-radius: 999px;
	background: rgba(255, 255, 255, .12); border: 0; color: #fff;
	font-size: 22px; cursor: pointer; line-height: 1;
}
.vx-lightbox .close:hover { background: rgba(255, 255, 255, .22); }
.vx-lightbox .nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 56px; height: 56px; border-radius: 999px;
	background: rgba(255, 255, 255, .12); border: 0; color: #fff;
	font-size: 28px; cursor: pointer; line-height: 1;
}
.vx-lightbox .nav.prev { left: 16px; }
.vx-lightbox .nav.next { right: 16px; }
.vx-lightbox .nav:hover { background: rgba(255, 255, 255, .22); }
.vx-lightbox .counter {
	position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
	font-family: "Space Mono", monospace; font-size: 14px; color: #fff;
	background: rgba(0, 0, 0, .5); padding: 6px 14px; border-radius: 999px;
}
.vx-lightbox .attrib {
	position: absolute; bottom: 20px; right: 24px;
	font-size: 12px; color: #94A3B8;
}
.vx-lightbox .attrib a { color: #CBD5E1; }
.vx-lightbox .attrib a:hover { color: #66BB6A; }

/* ============================================================================
 * Header del inmueble (post-galería)
 * ============================================================================ */
.vx-prop-header {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: end;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--border);
}
.vx-prop-header .badges {
	display: flex; gap: 8px; align-items: center;
	margin-bottom: 12px;
}
.vx-prop-header .badge {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 4px 10px; border-radius: 999px;
	font-family: "Space Mono", monospace;
	font-size: 11px; font-weight: 700;
	letter-spacing: .05em; text-transform: uppercase;
}
.vx-prop-header .badge-op {
	background: var(--primary-light); color: var(--primary-dark);
	border: 1px solid var(--primary-border);
}
.vx-prop-header .badge-verified {
	background: var(--primary); color: #fff;
}
.vx-prop-header .badge-status-disponible { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.vx-prop-header .badge-status-reservado  { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.vx-prop-header .badge-status-vendido,
.vx-prop-header .badge-status-alquilado  { background: #F3F4F6; color: #4B5563; border: 1px solid #D1D5DB; }

.vx-prop-header h1 {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 700; font-size: clamp(24px, 3.4vw, 36px);
	letter-spacing: -.025em; line-height: 1.1;
	margin: 0 0 10px;
	max-width: 22ch;
}
.vx-prop-header .location {
	display: flex; align-items: center; gap: 7px;
	color: var(--muted); font-size: 15px; margin: 0;
}
.vx-prop-header .location .ico { color: var(--primary-dark); width: 16px; height: 16px; }

.vx-prop-header .price-block { text-align: right; }
.vx-prop-header .price {
	font-family: "Space Mono", monospace;
	font-weight: 700; font-size: clamp(24px, 3vw, 34px);
	color: var(--primary-dark); white-space: nowrap;
	letter-spacing: -.02em;
}
.vx-prop-header .price .per {
	font-size: 12px; color: var(--muted); font-weight: 400;
	display: block; margin-top: 2px;
}

@media (max-width: 700px) {
	.vx-prop-header { grid-template-columns: 1fr; }
	.vx-prop-header .price-block { text-align: left; }
}

/* ============================================================================
 * Specs bar
 * ============================================================================ */
.vx-specs-bar {
	display: flex;
	background: var(--background-soft);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 4px;
	margin-bottom: 36px;
	overflow-x: auto;
}
.vx-specs-bar .spec {
	flex: 1; min-width: 100px;
	display: flex; flex-direction: column; align-items: center; gap: 4px;
	padding: 16px 12px;
	position: relative;
}
.vx-specs-bar .spec + .spec::before {
	content: ""; position: absolute; left: 0; top: 25%; bottom: 25%;
	width: 1px; background: var(--border);
}
.vx-specs-bar .spec .ico { width: 22px; height: 22px; color: var(--primary-dark); margin-bottom: 4px; }
.vx-specs-bar .spec .val { font-family: "Space Mono", monospace; font-weight: 700; font-size: 16px; color: var(--text); }
.vx-specs-bar .spec .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ============================================================================
 * Two-column layout: contenido + sidebar contacto
 * ============================================================================ */
.vx-prop-body {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 40px;
	align-items: start;
	margin-bottom: 60px;
}
.vx-prop-body .col-main > section { margin-bottom: 40px; }
.vx-prop-body .col-aside { position: sticky; top: 88px; }

@media (max-width: 980px) {
	.vx-prop-body { grid-template-columns: 1fr; }
	.vx-prop-body .col-aside { position: static; }
}

/* Sections */
.vx-prop-body h2 {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 700; font-size: 22px;
	letter-spacing: -.015em; margin: 0 0 14px;
}
.vx-prop-body .description p {
	font-size: 15px; line-height: 1.7; color: var(--text); margin: 0 0 14px;
}

/* Amenidades chips */
.vx-amenities {
	display: flex; flex-wrap: wrap; gap: 8px;
	list-style: none; padding: 0; margin: 0;
}
.vx-amenities li {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 7px 14px;
	background: var(--primary-light);
	color: var(--primary-dark);
	border: 1px solid var(--primary-border);
	border-radius: 999px;
	font-size: 13px; font-weight: 500;
}
.vx-amenities li .ico { width: 14px; height: 14px; }

/* Mapa */
.vx-map {
	height: 360px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--border);
	background: var(--background-soft);
}
.vx-map .leaflet-container { height: 100%; width: 100%; border-radius: 14px; font-family: "Inter", system-ui, sans-serif; }

/* FAQ */
.vx-prop-faqs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vx-prop-faqs .faq {
	background: var(--background); border: 1px solid var(--border);
	border-radius: 14px; padding: 16px 18px;
}
.vx-prop-faqs .faq .q {
	font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: flex-start;
	margin: 0 0 8px;
}
.vx-prop-faqs .faq .q .ico { color: var(--primary-dark); margin-top: 2px; width: 16px; height: 16px; flex: none; }
.vx-prop-faqs .faq .a { font-size: 14px; color: var(--muted); margin: 0; }
@media (max-width: 700px) { .vx-prop-faqs { grid-template-columns: 1fr; } }

/* ============================================================================
 * Sidebar: card de contacto del anunciante
 * ============================================================================ */
.vx-contact-card {
	background: var(--background);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 22px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 30px -16px rgba(15, 23, 42, .12);
}
.vx-contact-card .announcer {
	display: flex; align-items: center; gap: 12px;
	padding-bottom: 16px; margin-bottom: 16px;
	border-bottom: 1px solid var(--border);
}
.vx-contact-card .announcer .avatar {
	width: 52px; height: 52px; border-radius: 999px;
	background: var(--primary-light); color: var(--primary-dark);
	display: grid; place-items: center;
	font-family: "Inter", sans-serif; font-weight: 700; font-size: 18px;
	overflow: hidden;
	flex: none;
}
.vx-contact-card .announcer .avatar img { width: 100%; height: 100%; object-fit: cover; }
.vx-contact-card .announcer .meta .nm { font-weight: 600; font-size: 15px; color: var(--text); }
.vx-contact-card .announcer .meta .role { font-size: 12px; color: var(--muted); }

.vx-contact-card .quick-actions {
	display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
	margin-bottom: 16px;
}
.vx-contact-card .qa {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 10px; border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--background);
	font-size: 13px; font-weight: 600; color: var(--text);
	text-decoration: none; cursor: pointer;
	transition: .15s;
}
.vx-contact-card .qa:hover { border-color: var(--primary); color: var(--primary-dark); }
.vx-contact-card .qa.wa { background: #25D366; color: #fff; border-color: #25D366; }
.vx-contact-card .qa.wa:hover { background: #1ea957; }
.vx-contact-card .qa .ico { width: 16px; height: 16px; }

/* Form lead */
.vx-contact-card h3 {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 700; font-size: 15px; margin: 0 0 12px;
}
.vx-contact-card form { display: flex; flex-direction: column; gap: 10px; }
.vx-contact-card input,
.vx-contact-card textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--border);
	border-radius: 8px;
	font-family: "Inter", system-ui, sans-serif;
	font-size: 14px;
	color: var(--text);
	background: var(--background);
	transition: border-color .15s;
}
.vx-contact-card input:focus,
.vx-contact-card textarea:focus {
	outline: 0; border-color: var(--primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.vx-contact-card textarea { resize: vertical; min-height: 80px; }
.vx-contact-card button[type="submit"] {
	background: var(--primary); color: #fff;
	border: 0; border-radius: 8px;
	padding: 13px;
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 600; font-size: 14px;
	cursor: pointer; transition: .15s;
}
.vx-contact-card button[type="submit"]:hover { background: var(--primary-dark); }
.vx-contact-card .legal {
	font-size: 11px; color: var(--muted); margin: 0; line-height: 1.5;
}
.vx-contact-card .form-success {
	background: var(--primary-light); border: 1px solid var(--primary-border);
	border-radius: 8px; padding: 16px;
	text-align: center; font-size: 14px; color: var(--primary-dark);
}
.vx-contact-card .form-success b { display: block; font-size: 16px; margin-bottom: 4px; }

/* ============================================================================
 * Similares (3 cards al final)
 * ============================================================================ */
.vx-similar { padding: 50px 0 60px; border-top: 1px solid var(--border); }
.vx-similar h2 {
	font-family: "Inter", system-ui, sans-serif;
	font-weight: 700; font-size: clamp(22px, 2.8vw, 28px);
	letter-spacing: -.02em; margin: 0 0 24px;
}
.vx-similar-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
/* La card en sí usa el mismo CSS que home (.icard) — encolado por home.css */
