/*
 * Paleta y tipografía calcadas de la home de Barreira (bbrwebsite_1.zip).
 * Se usan como var(--nombre, fallback): si el tema ya define esas custom
 * properties (--bg, --gold, etc.) las toma de ahí; si no, usa el fallback.
 * Así el plugin sigue siendo theme-agnostic pero combina 1:1 en ese sitio.
 */

.tokko-grid,
.tokko-rail,
.tokko-single {
	font-family: 'Montserrat', system-ui, sans-serif;
	color: var(--ink, #F2EFEA);
}

.tokko-error,
.tokko-empty {
	color: #d98a8a;
	font-family: 'Montserrat', system-ui, sans-serif;
}

.tokko-gallery .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- GRID (layout="grid", página de listado completo) ---------- */

.tokko-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 24px 0;
}

@media (max-width: 960px) {
	.tokko-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.tokko-grid {
		grid-template-columns: 1fr;
	}
}

.tokko-card {
	display: block;
	color: inherit;
	text-decoration: none;
	background: var(--panel, #1C232C);
	border: 1px solid var(--line, rgba(255,255,255,.10));
	border-radius: 14px;
	overflow: hidden;
	transition: transform .4s cubic-bezier(.22,.61,.36,1), border-color .4s cubic-bezier(.22,.61,.36,1);
}

.tokko-card:hover {
	transform: translateY(-4px);
	border-color: rgba(170,144,107,.5);
}

.tokko-card__photo {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	background: var(--bg-2, #171B21);
}

.tokko-card__body {
	padding: 16px 18px;
}

.tokko-card__title {
	font-weight: 700;
	font-size: 1.05rem;
	margin: 0 0 6px;
}

.tokko-card__location {
	color: var(--muted, #98A2AD);
	font-size: .85rem;
	margin: 0 0 10px;
}

.tokko-card__price {
	font-weight: 800;
	color: var(--gold, #AA906B);
	margin: 0 0 10px;
}

.tokko-card__attrs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: .82rem;
	color: var(--muted, #98A2AD);
}

/* ---------- FILTROS Y MAPA (página de listado completo) ---------- */

.tokko-filterbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-bottom: 14px;
}

.tokko-toggle {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	background: rgba(255,255,255,.04);
	border: 1px solid var(--line, rgba(255,255,255,.10));
	border-radius: 100px;
	padding: 3px;
}

.tokko-toggle button {
	border: none;
	background: transparent;
	color: var(--gold, #AA906B);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .03em;
	padding: 8px 15px;
	border-radius: 100px;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.tokko-toggle button.active {
	background: var(--gold, #AA906B);
	color: #14181d;
}

.tokko-maplink {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: var(--gold, #AA906B);
	font-family: inherit;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 4px 2px;
	margin-bottom: 18px;
}

.tokko-count {
	color: var(--muted, #98A2AD);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	margin: 0 0 14px;
}

.tokko-card.tokko-card--hidden {
	display: none;
}

.tokko-mapoverlay {
	position: fixed;
	inset: 0;
	z-index: 998;
	background: rgba(0,0,0,.5);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s;
}

.tokko-mapoverlay.show {
	opacity: 1;
	pointer-events: auto;
}

.tokko-mappanel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 420px;
	max-width: 92vw;
	background: var(--bg-2, #171B21);
	border-left: 1px solid var(--line, rgba(255,255,255,.10));
	z-index: 999;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.22,.61,.36,1);
}

.tokko-mappanel.open {
	transform: translateX(0);
}

.tokko-maphead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--line, rgba(255,255,255,.10));
	flex: none;
}

.tokko-maphead span {
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--gold, #AA906B);
}

.tokko-mapclose {
	background: none;
	border: none;
	color: var(--muted, #98A2AD);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.tokko-mapcanvas {
	position: relative;
	flex: 1;
	background: var(--bg, #13161A);
}

.tokko-pin {
	width: 18px;
	height: 18px;
	border-radius: 50% 50% 50% 0;
	background: var(--gold, #AA906B);
	transform: rotate(-45deg);
	cursor: pointer;
	box-shadow: 0 0 0 3px rgba(170,144,107,.3);
}

.tokko-pin.active {
	background: #fff;
}

.tokko-mappreview {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 12px;
	z-index: 500;
	display: none;
	background: var(--bg, #13161A);
	border: 1px solid var(--line, rgba(255,255,255,.10));
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

.tokko-mappreview.show {
	display: flex;
}

.tokko-mappreview__photo {
	width: 84px;
	height: 84px;
	flex: none;
	object-fit: cover;
	background: var(--panel, #1C232C);
}

.tokko-mappreview__body {
	padding: 10px 12px;
	flex: 1;
	min-width: 0;
}

.tokko-mappreview__op {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--gold, #AA906B);
	text-transform: uppercase;
	margin-bottom: 4px;
}

.tokko-mappreview__zone {
	font-size: 12px;
	color: var(--muted, #98A2AD);
	margin: 0 0 2px;
}

.tokko-mappreview__price {
	font-size: 13px;
	font-weight: 700;
	margin: 0;
}

.tokko-mappreview__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--gold, #AA906B);
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
	margin-top: 3px;
}

@media (max-width: 760px) {
	.tokko-mappanel {
		top: auto;
		left: 0;
		right: 0;
		width: auto;
		max-width: none;
		height: 88vh;
		border-left: none;
		border-top: 1px solid var(--line, rgba(255,255,255,.10));
		border-radius: 20px 20px 0 0;
		transform: translateY(105%);
	}

	.tokko-mappanel.open {
		transform: translateY(0);
	}
}

/* ---------- RAIL (layout="rail", tira estilo home #propiedades) ---------- */
/* Nombres duplicados a propósito (.tokko-tile.tile) para heredar el CSS del
   tema si ya existe (.rail/.tile de la home) y este fallback si no. */

.tokko-rail {
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding: 6px 0 22px;
	scrollbar-width: none;
}

.tokko-rail::-webkit-scrollbar {
	display: none;
}

.tokko-tile {
	position: relative;
	flex: 0 0 300px;
	aspect-ratio: 9 / 16;
	border-radius: 14px;
	overflow: hidden;
	scroll-snap-align: start;
	border: 1px solid var(--line, rgba(255,255,255,.10));
	cursor: pointer;
	background: var(--panel, #1C232C);
	text-decoration: none;
	color: inherit;
	display: block;
	transition: transform .5s cubic-bezier(.22,.61,.36,1), border-color .5s cubic-bezier(.22,.61,.36,1);
}

.tokko-tile:hover {
	transform: translateY(-6px);
	border-color: rgba(170,144,107,.5);
}

.tokko-tile__media {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.78) 100%),
		linear-gradient(135deg, #2a323d, #141a20 70%);
	background-size: cover;
	background-position: center;
}

.tokko-tile__live {
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
	background: rgba(0,0,0,.4);
	padding: 5px 10px;
	border-radius: 100px;
	backdrop-filter: blur(4px);
}

.tokko-tile__live i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gold, #AA906B);
	display: block;
}

.tokko-tile__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 18px;
}

.tokko-tile__zone {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--gold, #AA906B);
	background: rgba(0,0,0,.45);
	border: 1px solid rgba(170,144,107,.4);
	padding: 4px 10px;
	border-radius: 100px;
	margin-bottom: 8px;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tokko-tile__type {
	font-weight: 600;
	font-size: 18px;
	line-height: 1.25;
}

.tokko-tile__price {
	margin-top: 8px;
	font-size: 14px;
	color: rgba(242,239,234,.85);
}

.tokko-tile__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(0,0,0,.5);
	border: 1px solid rgba(255,255,255,.5);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
}

/* ---------- FICHA INDIVIDUAL ---------- */

.tokko-single {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px 64px;
}

.tokko-single__hero {
	padding: 128px 0 28px;
	text-align: center;
}

.tokko-single__eyebrow {
	display: inline-block;
	font-size: 12px;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--gold, #AA906B);
	font-weight: 600;
	margin-bottom: 14px;
}

.tokko-single__title {
	font-weight: 800;
	font-size: clamp(28px, 4.4vw, 46px);
	line-height: 1.08;
	letter-spacing: -.01em;
}

.tokko-single__ref {
	color: var(--muted, #98A2AD);
	font-size: 13px;
	margin-top: 10px;
}

.tokko-gallery {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 10px;
	margin-bottom: 32px;
	height: 420px;
}

.tokko-gallery__main {
	display: block;
	height: 100%;
	border-radius: 16px;
	background-size: cover;
	background-position: center;
	background-color: var(--panel, #1C232C);
	cursor: pointer;
}

.tokko-gallery__thumbs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: repeat(2, 1fr);
	gap: 10px;
	height: 100%;
}

.tokko-gallery__thumb {
	position: relative;
	display: block;
	background-size: cover;
	background-position: center;
	background-color: var(--panel, #1C232C);
	border-radius: 12px;
	cursor: pointer;
}

.tokko-gallery__more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-weight: 700;
	font-size: 20px;
	border-radius: 12px;
}

.tokko-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	margin-bottom: 32px;
	border-radius: 16px;
	overflow: hidden;
	background: var(--panel, #1C232C);
}

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

.tokko-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10,12,15,.94);
}

.tokko-lightbox.in {
	display: flex;
}

.tokko-lightbox__img {
	max-width: 88vw;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 6px;
}

.tokko-lightbox__close {
	position: absolute;
	top: 20px;
	right: 28px;
	background: none;
	border: 0;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
}

.tokko-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,.08);
	border: 1px solid rgba(255,255,255,.25);
	color: #fff;
	font-size: 32px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
}

.tokko-lightbox__prev {
	left: 20px;
}

.tokko-lightbox__next {
	right: 20px;
}

.tokko-lightbox__count {
	position: absolute;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255,255,255,.7);
	font-size: 13px;
	letter-spacing: .05em;
}

@media (max-width: 760px) {
	.tokko-gallery {
		grid-template-columns: 1fr;
		height: auto;
	}

	.tokko-gallery__main {
		height: 240px;
	}

	.tokko-gallery__thumbs {
		grid-template-columns: repeat(4, 1fr);
		grid-template-rows: none;
		height: 70px;
	}
}

.tokko-single__body {
	display: grid;
	grid-template-columns: 1.7fr 1fr;
	gap: 36px;
	align-items: start;
}

.tokko-single__type {
	color: var(--muted, #98A2AD);
	font-size: 15px;
	margin-bottom: 16px;
}

.tokko-single__attrs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	list-style: none;
	padding: 0;
	margin: 0 0 26px;
	font-size: 14px;
}

.tokko-single__description {
	color: rgba(242,239,234,.82);
	font-size: 15px;
	line-height: 1.7;
}

.tokko-single__map {
	margin-top: 26px;
	height: 260px;
	border-radius: 14px;
	overflow: hidden;
}

.tokko-single__map iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.tokko-single__map-link {
	display: inline-block;
	margin-top: 10px;
	color: var(--gold, #AA906B);
	font-size: 13px;
	letter-spacing: .04em;
	text-decoration: underline;
}

.tokko-single__aside {
	position: sticky;
	top: 24px;
	background: rgba(255,255,255,.055);
	border: 1px solid rgba(255,255,255,.14);
	-webkit-backdrop-filter: blur(20px) saturate(125%);
	backdrop-filter: blur(20px) saturate(125%);
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.14);
	padding: 30px 28px;
}

.tokko-single__price {
	font-size: 26px;
	font-weight: 800;
	color: var(--gold, #AA906B);
}

.tokko-single__location {
	color: var(--muted, #98A2AD);
	font-size: 14px;
	margin: 8px 0 22px;
}

.tokko-whatsapp-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	background: var(--gold, #AA906B);
	color: #14181d;
	padding: 14px 24px;
	border-radius: 100px;
	font-size: 13px;
	letter-spacing: .05em;
	font-weight: 600;
	text-decoration: none;
	transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s cubic-bezier(.22,.61,.36,1);
}

.tokko-whatsapp-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(170,144,107,.32);
	color: #14181d;
}

.tokko-lead__or {
	text-align: center;
	color: var(--muted, #98A2AD);
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	margin: 18px 0 12px;
}

.tokko-lead {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tokko-lead input,
.tokko-lead textarea {
	width: 100%;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 10px;
	padding: 11px 12px;
	color: var(--ink, #F2EFEA);
	font-family: inherit;
	font-size: 14px;
	outline: none;
}

.tokko-lead input::placeholder,
.tokko-lead textarea::placeholder {
	color: rgba(242,239,234,.4);
}

.tokko-lead input:focus,
.tokko-lead textarea:focus {
	border-color: var(--gold, #AA906B);
}

.tokko-lead textarea {
	min-height: 80px;
	resize: vertical;
}

.tokko-lead__submit {
	background: transparent;
	border: 1px solid var(--gold, #AA906B);
	color: var(--gold, #AA906B);
	padding: 11px 20px;
	border-radius: 100px;
	font-size: 13px;
	letter-spacing: .05em;
	font-weight: 600;
	cursor: pointer;
	transition: background .3s cubic-bezier(.22,.61,.36,1), color .3s cubic-bezier(.22,.61,.36,1);
}

.tokko-lead__submit:hover {
	background: var(--gold, #AA906B);
	color: #14181d;
}

.tokko-lead__msg {
	font-size: 13px;
	margin: 0;
}

.tokko-lead__msg[data-state="ok"] {
	color: var(--gold, #AA906B);
}

.tokko-lead__msg[data-state="error"] {
	color: #e08a8a;
}

.tokko-lead__done {
	text-align: center;
	padding: 18px 6px;
}

.tokko-lead__done-title {
	font-size: 22px;
	font-weight: 800;
	color: var(--gold, #AA906B);
	margin: 0 0 8px;
}

.tokko-lead__done-text {
	font-size: 14px;
	color: rgba(242,239,234,.82);
	margin: 0;
}

@media (max-width: 760px) {
	.tokko-tile {
		flex-basis: 66vw;
	}

	.tokko-single__body {
		grid-template-columns: 1fr;
	}

	.tokko-single__aside {
		position: static;
	}
}
