/* ==========================================================================
   InmoPortal — single property page (loaded with dep inmo-public)
   Mobile first; two columns from 960px. Reuses the base tokens/components.
   ========================================================================== */

/* Layout ------------------------------------------------------------------ */

.inmo-single__grid {
	display: block;
}

@media (min-width: 960px) {
	.inmo-single__grid {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
		gap: 28px;
		align-items: start;
	}
}

.inmo-single__main > * + * {
	margin-top: 20px;
}

.inmo-single__side {
	margin-top: 24px;
}

@media (min-width: 960px) {
	.inmo-single__side {
		margin-top: 0;
	}

	.inmo-side-sticky {
		position: sticky;
		top: 96px;
	}
}

.inmo-side-sticky > * + * {
	margin-top: 16px;
}

.inmo-ssection h2 {
	font-size: 1.25rem;
	margin-bottom: 12px;
}

/* Owner bar --------------------------------------------------------------- */

.inmo-ownerbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--inmo-border);
	border-radius: var(--inmo-radius-sm);
	background: var(--inmo-bg-soft);
	margin-bottom: 16px;
	font-size: 0.92rem;
}

/* Vista de administrador sobre la ficha de otro: se distingue a simple vista de la del dueño. */
.inmo-ownerbar--staff {
	border-color: #cfe0f5;
	background: #eef4fb;
}

.inmo-ownerbar__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
}

.inmo-ownerbar__actions {
	display: inline-flex;
	gap: 8px;
}

/* Gallery ----------------------------------------------------------------- */

.inmo-gallery {
	position: relative;
	border-radius: var(--inmo-radius);
	overflow: hidden;
	background: #10151c;
}

.inmo-gallery__mainbtn {
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	line-height: 0;
}

.inmo-gallery__img,
.inmo-gallery__placeholder {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
}

@supports not (aspect-ratio: 16 / 10) {
	.inmo-gallery__img {
		height: 340px;
	}
}

.inmo-gallery__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #9aa3af;
	background:
		linear-gradient(135deg, #1d2635 0%, #10151c 100%);
	font-weight: 600;
	line-height: 1.4;
	min-height: 240px;
}

.inmo-gallery__placeholder .inmo-ic {
	width: 42px;
	height: 42px;
	opacity: 0.6;
}

.inmo-gallery__count {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.75);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	pointer-events: none;
}

.inmo-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--inmo-text);
	cursor: pointer;
	box-shadow: var(--inmo-shadow);
	transition: background 0.15s, transform 0.1s;
}

.inmo-gallery__nav:hover {
	background: #fff;
}

.inmo-gallery__nav:active {
	transform: translateY(-50%) scale(0.94);
}

.inmo-gallery__nav--prev {
	left: 12px;
}

.inmo-gallery__nav--next {
	right: 12px;
}

.inmo-gallery__thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding: 10px 2px 4px;
	scrollbar-width: thin;
}

.inmo-gallery__thumb {
	flex: 0 0 auto;
	width: 88px;
	height: 66px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: var(--inmo-radius-sm);
	overflow: hidden;
	background: var(--inmo-bg-soft);
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.15s, border-color 0.15s;
}

.inmo-gallery__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.inmo-gallery__thumb:hover {
	opacity: 1;
}

.inmo-gallery__thumb.is-active {
	border-color: var(--inmo-primary);
	opacity: 1;
}

/* Sold / rented ribbon ---------------------------------------------------- */

.inmo-ribbon {
	position: absolute;
	top: 22px;
	left: -44px;
	z-index: 5;
	transform: rotate(-35deg);
	background: #1f2937;
	color: #fff;
	font-weight: 800;
	font-size: 0.95rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 8px 56px;
	box-shadow: var(--inmo-shadow-lg);
	pointer-events: none;
}

/* Header ------------------------------------------------------------------ */

.inmo-shead__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.inmo-shead__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 6px;
}

.inmo-price--xl {
	font-size: 1.9rem;
	line-height: 1.1;
}

.inmo-shead__summary {
	font-size: 1.05rem;
	font-weight: 600;
	margin: 0 0 6px;
}

.inmo-shead__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 0;
}

.inmo-shead__zone {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Key stats --------------------------------------------------------------- */

.inmo-stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 14px 18px;
	padding: 16px;
	border: 1px solid var(--inmo-border);
	border-radius: var(--inmo-radius);
	background: var(--inmo-bg-soft);
}

/* Description ------------------------------------------------------------- */

.inmo-desc {
	white-space: normal;
	overflow-wrap: anywhere;
}

/* Static feature chips ---------------------------------------------------- */

.inmo-chips--static {
	list-style: none;
	margin: 0;
	padding: 0;
}

.inmo-chips--static .inmo-chip {
	cursor: default;
}

/* Energy scale ------------------------------------------------------------ */

.inmo-energy {
	display: flex;
	gap: 6px;
	align-items: center;
}

.inmo-energy__cell {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--inmo-radius-sm);
	color: #fff;
	font-weight: 800;
	font-size: 1rem;
	opacity: 0.3;
	transition: transform 0.15s;
}

.inmo-energy__cell.is-active {
	opacity: 1;
	transform: scale(1.18);
	box-shadow: 0 0 0 3px var(--inmo-bg), 0 0 0 5px currentColor;
}

.inmo-energy__a { background: #00a651; }
.inmo-energy__b { background: #4cb848; }
.inmo-energy__c { background: #bfd730; color: #374151; }
.inmo-energy__d { background: #fff200; color: #374151; }
.inmo-energy__e { background: #fdb913; color: #374151; }
.inmo-energy__f { background: #f37021; }
.inmo-energy__g { background: #ed1c24; }

/* Video (click-to-load facade) -------------------------------------------- */

.inmo-video {
	position: relative;
	border-radius: var(--inmo-radius);
	overflow: hidden;
	background: #10151c;
	aspect-ratio: 16 / 9;
}

@supports not (aspect-ratio: 16 / 9) {
	.inmo-video {
		height: 320px;
	}
}

.inmo-video__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.85;
}

.inmo-video__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 0;
	background: rgba(17, 24, 39, 0.35);
	color: #fff;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.15s;
}

.inmo-video__play:hover {
	background: rgba(17, 24, 39, 0.5);
}

.inmo-video__play .inmo-ic {
	width: 58px;
	height: 58px;
	padding: 16px;
	border-radius: 50%;
	background: var(--inmo-primary);
	box-shadow: var(--inmo-shadow-lg);
}

.inmo-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Map --------------------------------------------------------------------- */

.inmo-single-map {
	height: 320px;
	border-radius: var(--inmo-radius);
	overflow: hidden;
	border: 1px solid var(--inmo-border);
	background: var(--inmo-bg-soft);
	z-index: 1;
}

.inmo-single-map__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 10px 0 0;
	font-size: 0.9rem;
}

.inmo-single-map__meta .inmo-muted {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Contact card ------------------------------------------------------------ */

.inmo-contact-card__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--inmo-border);
}

.inmo-contact-card__title {
	font-size: 1.1rem;
	margin: 0 0 12px;
}

.inmo-contact-card__quick {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 16px;
}

.inmo-contact-card__quick .inmo-btn:only-child {
	grid-column: 1 / -1;
}

.inmo-contact-form__msg:empty {
	display: none;
}

.inmo-contact-form__msg {
	margin-bottom: 12px;
}

/* Honeypot: hidden from humans, present for bots. */
.inmo-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Advertiser card ----------------------------------------------------------
 * Deliberately NOT called .inmo-agent-card: that name belongs to the big profile card in
 * templates/agent.php, and its rules in public.css (display:flex on the card, name at 1.45rem) were
 * leaking in here — the text column collapsed to 79px and "Alejandro Granados" broke mid-word.
 * Sizes are stated explicitly instead of inherited, because host themes (Newspaper) set a large base
 * font inside post content.
 * ------------------------------------------------------------------------- */

.inmo-owner-card {
	display: block;
}

.inmo-owner-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.inmo-owner-card__avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid var(--inmo-border);
	background: var(--inmo-bg-soft);
}

/* min-width:0 lets this column use the space left by the avatar instead of being squeezed. */
.inmo-owner-card__info {
	min-width: 0;
	flex: 1 1 auto;
}

.inmo-owner-card__name {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3;
	margin: 0 0 6px;
	/* Never hyphenate a person's or an agency's name mid-word. */
	word-break: normal;
	overflow-wrap: break-word;
}

.inmo-owner-card__info .inmo-badge {
	white-space: nowrap;
}

.inmo-owner-card__all {
	display: inline-block;
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.3;
}

/* Share ------------------------------------------------------------------- */

.inmo-share {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.inmo-share__label {
	margin-right: 2px;
}

/* Footer meta ------------------------------------------------------------- */

.inmo-single__footmeta {
	padding-top: 14px;
	border-top: 1px solid var(--inmo-border);
}

.inmo-single__report {
	margin-left: 10px;
	color: var(--inmo-muted) !important;
	text-decoration: underline;
}

.inmo-single__report:hover {
	color: var(--inmo-danger) !important;
}

/* Similars ---------------------------------------------------------------- */

.inmo-similars {
	margin-top: 32px;
}

/* Lightbox ---------------------------------------------------------------- */

.inmo-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(10, 13, 18, 0.96);
	display: flex;
	align-items: center;
	justify-content: center;
}

.inmo-lightbox[hidden] {
	display: none;
}

.inmo-lightbox__fig {
	margin: 0;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.inmo-lightbox__img {
	max-width: 96vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.inmo-lightbox__close,
.inmo-lightbox__nav {
	position: absolute;
	z-index: 2;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s;
}

.inmo-lightbox__close:hover,
.inmo-lightbox__nav:hover {
	background: rgba(255, 255, 255, 0.28);
}

.inmo-lightbox__close {
	top: 16px;
	right: 16px;
}

.inmo-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
}

.inmo-lightbox__nav--prev {
	left: 12px;
}

.inmo-lightbox__nav--next {
	right: 12px;
}

.inmo-lightbox__count {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.12);
	padding: 5px 14px;
	border-radius: 999px;
}

/* Body lock while the lightbox is open. */
body.inmo-lightbox-open {
	overflow: hidden;
}

/* Toast ------------------------------------------------------------------- */

.inmo-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(16px);
	z-index: 999999;
	background: #1f2937;
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 0.92rem;
	font-weight: 600;
	box-shadow: var(--inmo-shadow-lg);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
}

.inmo-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
