/**
 * Brisa Mar Cards — estilos do front-end.
 * As cores vêm de variáveis CSS injetadas pelo painel admin.
 */

.bmc-hero *,
.bmc-cardcarousel *,
.bmc-lista *,
.bmc-search * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------------------
   Reset defensivo contra o tema (Hello Elementor).
   O tema aplica uma cor de destaque (rosa) nos estados :focus/:active dos
   botões. Aqui neutralizamos isso para os botões/setas do plugin, mantendo
   sempre as cores configuradas no painel.
--------------------------------------------------------------------------- */
.bmc-hero button,
.bmc-cardcarousel button,
.bmc-lista .bmc-btn,
.bmc-search .bmc-btn,
.bmc-card .bmc-btn {
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	box-shadow: none;
}
.bmc-hero button:focus,
.bmc-hero button:active,
.bmc-hero button:focus-visible,
.bmc-cardcarousel button:focus,
.bmc-cardcarousel button:active,
.bmc-cardcarousel button:focus-visible {
	background-color: inherit;
	color: #fff;
	border-color: transparent;
}
/* Acessibilidade: foco por teclado visível, mas na cor do plugin (não rosa). */
.bmc-hero button:focus-visible,
.bmc-cardcarousel button:focus-visible,
.bmc-btn:focus-visible {
	outline: 3px solid var(--bmc-secondary);
	outline-offset: 2px;
}

:root {
	--bmc-primary: #2f6b6b;
	--bmc-secondary: #c9a24b;
	--bmc-price: #c9a24b;
	--bmc-text: #333333;
	--bmc-card-bg: #ffffff;
	--bmc-radius: 14px;
	--bmc-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
	--bmc-gap: 24px;
}

/* ---------------------------------------------------------------------------
   Grid
--------------------------------------------------------------------------- */
.bmc-grid {
	display: grid;
	gap: var(--bmc-gap);
	grid-template-columns: repeat(3, 1fr);
}
.bmc-grid--cols-1 { grid-template-columns: 1fr; }
.bmc-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.bmc-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.bmc-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

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

/* ---------------------------------------------------------------------------
   Card
--------------------------------------------------------------------------- */
.bmc-card {
	display: flex;
	flex-direction: column;
	height: 100%; /* preenche a célula do grid -> todos os cards da linha ficam iguais. */
	background: var(--bmc-card-bg);
	border-radius: var(--bmc-radius);
	box-shadow: var(--bmc-shadow);
	overflow: hidden;
	color: var(--bmc-text);
	border: 1px solid rgba(0, 0, 0, 0.04);
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.bmc-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.bmc-card__media {
	position: relative;
	display: block;
	aspect-ratio: 3 / 2; /* proporção consistente -> todas as fotos com a mesma altura. */
	overflow: hidden;
	background: #eef1f1;
}
.bmc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}
.bmc-card:hover .bmc-card__media img { transform: scale(1.06); }
.bmc-card__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #dfe6e6, #eef1f1);
}

.bmc-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background: var(--bmc-secondary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 5px 13px;
	border-radius: 999px;
	letter-spacing: 0.04em;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.bmc-card__body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1; /* corpo cresce; o CTA no fim usa margin-top:auto. */
}

.bmc-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.32;
	font-weight: 700;
	color: var(--bmc-primary);
	/* Reserva sempre 2 linhas: cards com título curto ou longo alinham igual. */
	min-height: calc(1.32em * 2);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bmc-card__title a {
	color: inherit;
	text-decoration: none;
}
.bmc-card__title a:hover { color: var(--bmc-secondary); }

.bmc-card__price {
	font-size: 20px;
	font-weight: 800;
	color: var(--bmc-price);
	letter-spacing: 0.01em;
}

.bmc-card__local {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--bmc-text);
	opacity: 0.82;
	min-height: 1.4em; /* mantém a linha mesmo quando algum card não tem local. */
}
.bmc-card__local svg { color: var(--bmc-secondary); flex: 0 0 auto; }
.bmc-card__local span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bmc-card__specs {
	list-style: none;
	margin: 10px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 14px;
	font-size: 13.5px;
}
.bmc-card__specs li {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.bmc-card__specs li span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bmc-card__specs svg { color: var(--bmc-primary); flex: 0 0 auto; }
.bmc-card__specs strong { font-weight: 700; }

/* ---------------------------------------------------------------------------
   Botões
--------------------------------------------------------------------------- */
.bmc-btn {
	display: inline-block;
	background: var(--bmc-secondary);
	color: #fff;
	text-decoration: none;
	text-align: center;
	font-weight: 600;
	font-size: 15px;
	padding: 11px 22px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.1s ease;
	line-height: 1.2;
}
.bmc-btn:hover,
.bmc-btn:focus,
.bmc-btn:active {
	background: var(--bmc-secondary);
	color: #fff;
	filter: brightness(0.93);
}
.bmc-btn:active { transform: translateY(1px); }
.bmc-btn--lg { padding: 14px 34px; font-size: 16px; }
.bmc-btn--ghost {
	background: transparent;
	color: var(--bmc-primary);
	border: 2px solid var(--bmc-primary);
}
.bmc-btn--ghost:hover,
.bmc-btn--ghost:focus,
.bmc-btn--ghost:active {
	background: var(--bmc-primary);
	color: #fff;
	border-color: var(--bmc-primary);
}

.bmc-card__cta {
	margin-top: auto; /* empurra o botão para a base, alinhando entre cards. */
	padding-top: 16px;
	align-self: stretch;
	text-align: center;
}

/* ---------------------------------------------------------------------------
   Lista
--------------------------------------------------------------------------- */
.bmc-lista__titulo {
	text-align: center;
	color: var(--bmc-primary);
	margin: 0 0 28px;
}
.bmc-lista__footer {
	text-align: center;
	margin-top: 34px;
}

/* ---------------------------------------------------------------------------
   Carrossel HERO (largura total, imagem de fundo, 1 slide por vez)
--------------------------------------------------------------------------- */
.bmc-hero {
	position: relative;
	width: 100%;
	height: var(--bmc-hero-h, 560px);
	overflow: hidden;
	background: #0a1a1a;
}
.bmc-hero__track {
	position: relative;
	width: 100%;
	height: 100%;
}
.bmc-hero__slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0;
	visibility: hidden;
	transform: scale(1.06);
	transition: opacity 0.9s ease, transform 6s ease;
	display: flex;
	align-items: center;
}
.bmc-hero__slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: scale(1); /* leve zoom-out contínuo (efeito Ken Burns). */
	z-index: 1;
}
.bmc-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.05) 100%);
}
.bmc-hero__content {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
	padding: 0 clamp(20px, 6vw, 80px);
	color: #fff;
	transform: translateY(16px);
	opacity: 0;
	transition: transform 0.7s ease 0.15s, opacity 0.7s ease 0.15s;
}
.bmc-hero__slide.is-active .bmc-hero__content {
	transform: translateY(0);
	opacity: 1;
}
.bmc-hero__badge {
	display: inline-block;
	background: var(--bmc-secondary);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 5px 14px;
	border-radius: 999px;
	margin-bottom: 14px;
}
.bmc-hero__title {
	margin: 0 0 10px;
	color: #fff;
	font-size: clamp(26px, 4vw, 46px);
	line-height: 1.1;
	font-weight: 800;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.bmc-hero__local {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 16px;
	margin-bottom: 12px;
	opacity: 0.95;
}
.bmc-hero__local svg { color: var(--bmc-secondary); }
.bmc-hero__price {
	font-size: clamp(20px, 2.6vw, 30px);
	font-weight: 800;
	color: #fff;
	margin-bottom: 22px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
/* Botão WhatsApp no hero */
.bmc-hero__whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #25d366;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	padding: 14px 34px;
	border-radius: 999px;
	text-decoration: none;
	margin-bottom: 22px;
	align-self: flex-start;
	line-height: 1.2;
	box-shadow: 0 4px 16px rgba(37,211,102,.35);
	transition: transform .2s, box-shadow .2s, filter .2s;
}
.bmc-hero__whatsapp:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(37,211,102,.45);
	filter: brightness(1.06);
	color: #fff;
	text-decoration: none;
}
.bmc-hero__whatsapp svg {
	width: 20px;
	height: 20px;
	fill: #fff !important;
	stroke: none !important;
	flex-shrink: 0;
	display: block;
}
.bmc-hero__whatsapp svg path,
.bmc-hero__whatsapp svg circle,
.bmc-hero__whatsapp svg rect {
	fill: #fff !important;
	stroke: none !important;
}
.bmc-hero__cta { align-self: flex-start; }

.bmc-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22) !important;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	color: #fff !important;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 5;
	transition: background 0.2s ease;
}
.bmc-hero__nav:hover,
.bmc-hero__nav:focus,
.bmc-hero__nav:active {
	background: rgba(255, 255, 255, 0.42) !important;
	color: #fff !important;
}
.bmc-hero__nav--prev { left: 18px; }
.bmc-hero__nav--next { right: 18px; }

.bmc-hero__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	display: flex;
	justify-content: center;
	gap: 10px;
	z-index: 5;
}
.bmc-hero__dots button {
	width: 11px;
	height: 11px;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}
.bmc-hero__dots button.is-active {
	background: var(--bmc-secondary);
	border-color: var(--bmc-secondary);
	transform: scale(1.2);
}

@media (max-width: 640px) {
	/* Altura FIXA no mobile: os slides são position:absolute e precisam de um
	   pai com altura definida, senão colapsam e a imagem de fundo some. */
	.bmc-hero {
		height: 460px;
		min-height: 0;
	}
	.bmc-hero__track { height: 100%; }
	.bmc-hero__slide {
		align-items: flex-end; /* conteúdo na base, sobre a foto. */
		/* Desativa o Ken Burns no mobile: o scale inicial não é contido
		   corretamente por alguns temas e gera overflow lateral. */
		transform: scale(1) !important;
		transition: opacity 0.9s ease !important;
	}
	.bmc-hero__slide.is-active {
		transform: scale(1) !important;
	}
	.bmc-hero__content {
		padding: 0 56px 36px 56px; /* 56px = seta (38px) + gap (8px) + folga (10px) */
		width: 100%;
	}
	.bmc-hero__badge {
		margin-left: 0; /* garante que não some atrás da seta */
	}
	.bmc-hero__title {
		font-size: clamp(20px, 5.5vw, 28px);
	}
	.bmc-hero__whatsapp {
		font-size: 14px;
		padding: 12px 20px;
	}
	.bmc-hero__nav {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}
	.bmc-hero__nav--prev { left: 8px; }
	.bmc-hero__nav--next { right: 8px; }
	/* Overlay de baixo pra cima: escurece o rodapé (onde fica o texto) e
	   deixa o topo da foto visível. */
	.bmc-hero__overlay {
		background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 55%, rgba(0, 0, 0, 0.12) 100%);
	}
}

/* ---------------------------------------------------------------------------
   Carrossel de CARDS (shortcode 4)
--------------------------------------------------------------------------- */
.bmc-cardcarousel {
	position: relative;
	padding: 6px 4px;
}
.bmc-cardcarousel__viewport { overflow: hidden; padding: 6px; }
.bmc-cardcarousel__track {
	display: flex;
	gap: var(--bmc-gap);
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: transform;
}
.bmc-cardcarousel__slide {
	flex: 0 0 calc((100% - (var(--bmc-gap) * 2)) / 3);
	min-width: 0;
}
.bmc-cardcarousel__slide .bmc-card { height: 100%; }
@media (max-width: 1024px) {
	.bmc-cardcarousel__slide { flex-basis: calc((100% - var(--bmc-gap)) / 2); }
}
@media (max-width: 640px) {
	.bmc-cardcarousel__slide { flex-basis: 100%; }
}

.bmc-cardcarousel__nav {
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--bmc-primary) !important;
	color: #fff !important;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: filter 0.2s ease, transform 0.1s ease;
}
.bmc-cardcarousel__nav:hover,
.bmc-cardcarousel__nav:focus,
.bmc-cardcarousel__nav:active {
	background: var(--bmc-primary) !important;
	color: #fff !important;
	filter: brightness(1.12);
}
.bmc-cardcarousel__nav:active { transform: translateY(-50%) scale(0.94); }
.bmc-cardcarousel__nav--prev { left: -10px; }
.bmc-cardcarousel__nav--next { right: -10px; }

.bmc-cardcarousel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}
.bmc-cardcarousel__dots button {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}
.bmc-cardcarousel__dots button.is-active {
	background: var(--bmc-secondary);
	transform: scale(1.35);
}

/* ---------------------------------------------------------------------------
   Busca
--------------------------------------------------------------------------- */
.bmc-search__title {
	color: var(--bmc-primary);
	text-align: center;
	margin: 0 0 24px;
}

.bmc-filters {
	background: var(--bmc-card-bg);
	border-radius: var(--bmc-radius);
	box-shadow: var(--bmc-shadow);
	padding: 22px 24px;
	margin-bottom: 26px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.bmc-filters__row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: flex-end;
}
.bmc-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 160px;
	font-size: 13px;
	color: var(--bmc-text);
}
.bmc-field--grow { flex: 3 1 260px; }
.bmc-field > span { font-weight: 600; }
.bmc-field input,
.bmc-field select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: var(--bmc-text);
}
.bmc-field input:focus,
.bmc-field select:focus {
	outline: none;
	border-color: var(--bmc-primary);
	box-shadow: 0 0 0 3px rgba(47, 107, 107, 0.15);
}
.bmc-field--buttons {
	flex-direction: row;
	gap: 10px;
	flex: 1 1 auto;
}

.bmc-search__meta {
	margin-bottom: 16px;
	font-size: 15px;
	color: var(--bmc-text);
}
.bmc-search__pagination {
	text-align: center;
	margin-top: 30px;
}
.bmc-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 16px;
	color: var(--bmc-text);
	opacity: 0.7;
	font-size: 16px;
}

.bmc-search__loading {
	display: none; /* oculto por padrão — JS usa .is-visible para mostrar */
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px;
	color: var(--bmc-primary);
	font-weight: 600;
}
.bmc-search__loading.is-visible {
	display: flex;
}
.bmc-spinner {
	width: 20px;
	height: 20px;
	border: 3px solid rgba(47, 107, 107, 0.25);
	border-top-color: var(--bmc-primary);
	border-radius: 50%;
	animation: bmc-spin 0.7s linear infinite;
}
@keyframes bmc-spin { to { transform: rotate(360deg); } }

.bmc-search__results.is-loading { opacity: 0.5; pointer-events: none; }
