/* ==========================================================================
   Beauty Mary · Catálogo de productos — v1.0.1 (Ludico Business)
   Paleta y tipografías de la web: Oxygen (títulos), Open Sans 300 (texto),
   rosa #E8B7B7, texto #120F0A / #2B2B2B, beige #F1ECE6, dorado #A48B60.
   ========================================================================== */

.bmc,
.bmc-modal {
	--bmc-ink: #120F0A;
	--bmc-text: #2B2B2B;
	--bmc-muted: #6B6158;
	--bmc-pink: #E8B7B7;
	--bmc-pink-dark: #DEA3A3;
	--bmc-gold: #A48B60;
	--bmc-heading: "Oxygen", var(--e-global-typography-primary-font-family, inherit), sans-serif;
	--bmc-radius: 5px;
	--bmc-gap: 2px;
	--bmc-ease: cubic-bezier(.22, .61, .36, 1);
}

.bmc {
	width: 100%;
	--bmc-card-bg: #F1ECE6;
}

.bmc *,
.bmc-modal * { box-sizing: border-box; }

/* ---------- Rejilla ---------- */
.bmc .bmc-grid {
	display: grid;
	grid-template-columns: repeat(var(--bmc-cols, 4), minmax(0, 1fr));
	gap: var(--bmc-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}

.bmc .bmc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	background: var(--bmc-card-bg);
	overflow: hidden;
	container-type: inline-size;
}
.bmc .bmc-card::before { content: none; } /* por si el tema añade viñetas */

/* ---------- Imagen ---------- */
.bmc .bmc-card button.bmc-media {
	all: unset;
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 7%;
	cursor: pointer;
	box-sizing: border-box;
}
.bmc .bmc-card button.bmc-media:focus-visible {
	outline: 2px solid var(--bmc-ink);
	outline-offset: -6px;
}
.bmc .bmc-media .bmc-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	transition: transform .7s var(--bmc-ease);
}
.bmc--blend .bmc-media .bmc-img,
.bmc-modal.bmc--blend .bmc-dialog-media img { mix-blend-mode: multiply; }
.bmc .bmc-img--empty { background: rgba(18, 15, 10, .04); border-radius: var(--bmc-radius); }

/* ---------- Texto ---------- */
.bmc .bmc-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 2px 24px 28px;
	text-align: center;
}
.bmc .bmc-title {
	margin: 0;
	padding: 0;
	font-family: var(--bmc-heading);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -.2px;
	color: var(--bmc-ink);
	text-transform: none;
}
.bmc .bmc-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.6;
	color: var(--bmc-muted);
}

/* «Leer más» — anula los estilos de botón de Hello Elementor */
.bmc .bmc-card button.bmc-more,
.bmc .bmc-card button.bmc-more:hover,
.bmc .bmc-card button.bmc-more:focus {
	appearance: none;
	margin: auto 0 0;
	padding: 6px 0 2px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--bmc-heading);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--bmc-ink);
	text-decoration: underline;
	text-decoration-color: var(--bmc-pink);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
	cursor: pointer;
	transition: text-decoration-color .25s ease, color .25s ease;
}
.bmc .bmc-card button.bmc-more:hover { text-decoration-color: var(--bmc-ink); }
.bmc .bmc-card button.bmc-more:focus-visible { outline: 2px solid var(--bmc-ink); outline-offset: 3px; }

/* ---------- Botón WhatsApp (estilo «Reserva una Cita») ---------- */
.bmc a.bmc-wa,
.bmc-modal a.bmc-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-height: 46px;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--bmc-radius);
	background: var(--bmc-pink);
	color: var(--bmc-text);
	font-family: var(--bmc-heading);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 6px 18px -8px rgba(18, 15, 10, .35);
	transition: background-color .25s ease, color .25s ease, transform .35s var(--bmc-ease), opacity .35s var(--bmc-ease);
}
.bmc a.bmc-wa:hover,
.bmc a.bmc-wa:focus-visible,
.bmc-modal a.bmc-wa:hover,
.bmc-modal a.bmc-wa:focus-visible {
	background: var(--bmc-ink);
	color: #fff;
	text-decoration: none;
}
.bmc a.bmc-wa:focus-visible,
.bmc-modal a.bmc-wa:focus-visible { outline: 2px solid var(--bmc-ink); outline-offset: 3px; }
.bmc .bmc-wa-icon,
.bmc-modal .bmc-wa-icon { width: 19px; height: 19px; flex: 0 0 19px; }
.bmc .bmc-wa-short { display: none; }

/* Escritorio con ratón: el botón aparece al pasar por encima, sobre la base de la imagen */
@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
	.bmc a.bmc-wa {
		position: absolute;
		left: 50%;
		top: calc(100cqw - 66px);
		z-index: 2;
		opacity: 0;
		transform: translate(-50%, 12px);
		pointer-events: none;
	}
	.bmc .bmc-card:hover a.bmc-wa,
	.bmc .bmc-card:focus-within a.bmc-wa {
		opacity: 1;
		transform: translate(-50%, 0);
		pointer-events: auto;
	}
	.bmc .bmc-card:hover .bmc-media .bmc-img { transform: scale(1.045); }

	/* Navegadores sin container queries: botón fijo debajo del texto */
	@supports not (top: 1cqw) {
		.bmc a.bmc-wa {
			position: static;
			opacity: 1;
			transform: none;
			pointer-events: auto;
			margin: 0 24px 28px;
		}
	}
}

/* Táctil / tablet / móvil: botón siempre visible bajo el texto */
@media (hover: none), (pointer: coarse), (max-width: 1024px) {
	.bmc a.bmc-wa {
		position: static;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		margin: 0 20px 24px;
		box-shadow: none;
	}
	.bmc .bmc-body { padding-bottom: 18px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.bmc .bmc-grid { grid-template-columns: repeat(var(--bmc-cols-t, 3), minmax(0, 1fr)); }
	.bmc .bmc-title { font-size: 17px; }
	.bmc .bmc-body { padding-left: 18px; padding-right: 18px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 767px) {
	.bmc .bmc-grid { grid-template-columns: repeat(var(--bmc-cols-m, 2), minmax(0, 1fr)); }
	.bmc .bmc-card button.bmc-media { padding: 8%; }
	.bmc .bmc-body { gap: 6px; padding: 0 12px 14px; }
	.bmc .bmc-title { font-size: 15px; line-height: 1.28; letter-spacing: 0; }
	.bmc .bmc-excerpt { font-size: 13px; line-height: 1.5; }
	.bmc .bmc-card button.bmc-more { font-size: 11px; letter-spacing: .12em; }
	.bmc a.bmc-wa {
		min-height: 42px;
		margin: 0 10px 12px;
		padding: 10px 10px;
		font-size: 14px;
		gap: 7px;
	}
	.bmc .bmc-wa-icon { width: 18px; height: 18px; flex-basis: 18px; }
}
/* Tarjetas estrechas (2 columnas en móvil): texto corto en el botón */
@media (max-width: 767px) {
	.bmc:not(.bmc--m1) .bmc-wa-full { display: none; }
	.bmc:not(.bmc--m1) .bmc-wa-short { display: inline; }
}

.bmc-empty {
	padding: 24px;
	border: 1px dashed #E3DCD4;
	text-align: center;
	color: #6B6158;
}

/* ==========================================================================
   Ventana «Leer más»
   ========================================================================== */
html.bmc-lock,
html.bmc-lock body { overflow: hidden; }

.bmc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	--bmc-card-bg: #F1ECE6;
	--bmc-dialog-h: min(86vh, 680px);
}
.bmc-modal[hidden] { display: none; }

.bmc-modal .bmc-overlay {
	position: absolute;
	inset: 0;
	background: rgba(18, 15, 10, .55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .35s ease;
}

.bmc-modal .bmc-dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	width: min(960px, 100%);
	max-height: var(--bmc-dialog-h);
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 30px 80px -20px rgba(18, 15, 10, .45);
	opacity: 0;
	transform: translateY(18px) scale(.985);
	transition: opacity .35s var(--bmc-ease), transform .45s var(--bmc-ease);
}
.bmc-modal.is-open .bmc-overlay { opacity: 1; }
.bmc-modal.is-open .bmc-dialog { opacity: 1; transform: none; }

.bmc-modal .bmc-dialog-media {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	max-height: var(--bmc-dialog-h);
	padding: 48px;
	background: var(--bmc-card-bg);
}
.bmc-modal .bmc-dialog-media[hidden] { display: none; }
.bmc-modal .bmc-dialog.is-text-only { grid-template-columns: minmax(0, 1fr); width: min(640px, 100%); }
.bmc-modal .bmc-dialog-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 560px;
	object-fit: contain;
}

.bmc-modal .bmc-dialog-content {
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: var(--bmc-dialog-h); /* sin esto, los textos largos se cortaban en escritorio */
	padding: 56px 48px 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	color: var(--bmc-text);
}
.bmc-modal .bmc-dialog-title {
	margin: 0 0 18px;
	padding: 0 32px 18px 0;
	border-bottom: 1px solid #EFE7E1;
	font-family: var(--bmc-heading);
	font-size: 32px;
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -1px;
	color: var(--bmc-ink);
	text-transform: none;
}
.bmc-modal .bmc-dialog-title::after {
	content: "";
	display: block;
	width: 44px;
	height: 2px;
	margin-top: 18px;
	margin-bottom: -19px;
	background: var(--bmc-pink);
}
.bmc-modal .bmc-dialog-text {
	font-size: 15px;
	font-weight: 300;
	line-height: 1.75;
	color: var(--bmc-text);
}
.bmc-modal .bmc-dialog-text > *:first-child { margin-top: 0; }
.bmc-modal .bmc-dialog-text p { margin: 0 0 14px; }
.bmc-modal .bmc-dialog-text ul,
.bmc-modal .bmc-dialog-text ol { margin: 0 0 14px; padding-left: 20px; }
.bmc-modal .bmc-dialog-text li { margin-bottom: 6px; }
.bmc-modal .bmc-dialog-text strong { font-weight: 600; color: var(--bmc-ink); }

.bmc-modal .bmc-dialog-actions {
	position: sticky;
	bottom: 0;
	margin-top: auto;
	padding: 22px 0 40px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 22px);
}
.bmc-modal .bmc-dialog-actions a.bmc-wa { width: 100%; }
.bmc-modal .bmc-wa-short { display: none; }
.bmc-modal .bmc-wa-full { display: inline; }

.bmc-modal .bmc-dialog button.bmc-close,
.bmc-modal .bmc-dialog button.bmc-close:hover,
.bmc-modal .bmc-dialog button.bmc-close:focus {
	appearance: none;
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid #EFE7E1;
	border-radius: 50%;
	background: #fff;
	color: var(--bmc-ink);
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s ease, transform .3s var(--bmc-ease);
}
.bmc-modal .bmc-dialog button.bmc-close:hover { background: var(--bmc-card-bg); transform: rotate(90deg); }
.bmc-modal .bmc-dialog button.bmc-close:focus-visible { outline: 2px solid var(--bmc-ink); outline-offset: 2px; }
.bmc-modal .bmc-close svg { width: 16px; height: 16px; }

/* Tablet */
@media (max-width: 1024px) {
	.bmc-modal .bmc-dialog { width: min(820px, 100%); grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
	.bmc-modal .bmc-dialog-media { padding: 32px; }
	.bmc-modal .bmc-dialog-content { padding: 48px 32px 0; }
	.bmc-modal .bmc-dialog-title { font-size: 27px; }
	.bmc-modal .bmc-dialog-actions { padding-bottom: 32px; }
}

/* Móvil: hoja inferior */
@media (max-width: 767px) {
	.bmc-modal { align-items: flex-end; padding: 0; }
	.bmc-modal .bmc-dialog {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 18px 18px 0 0;
		transform: translateY(100%);
		transition: opacity .25s ease, transform .45s var(--bmc-ease);
	}
	.bmc-modal .bmc-dialog::before {
		content: "";
		position: absolute;
		top: 8px;
		left: 50%;
		z-index: 3;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 4px;
		background: rgba(18, 15, 10, .18);
	}
	.bmc-modal .bmc-dialog-media {
		flex: 0 0 auto;
		height: 34vh;
		height: 34dvh;
		min-height: 200px;
		padding: 26px 24px 18px;
	}
	.bmc-modal .bmc-dialog-content { flex: 1 1 auto; max-height: none; padding: 22px 20px 0; }
	.bmc-modal .bmc-dialog-title { font-size: 24px; letter-spacing: -.5px; margin-bottom: 14px; padding: 0 0 14px; }
	.bmc-modal .bmc-dialog-title::after { margin-top: 14px; margin-bottom: -15px; }
	.bmc-modal .bmc-dialog-text { font-size: 14.5px; line-height: 1.7; }
	.bmc-modal .bmc-dialog-actions { padding: 16px 0 calc(16px + env(safe-area-inset-bottom)); }
	.bmc-modal .bmc-dialog button.bmc-close { top: 12px; right: 12px; width: 38px; height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
	.bmc *,
	.bmc-modal,
	.bmc-modal * { transition: none !important; }
}
