.ftm-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.ftm-overlay[hidden] { display: none; }
.ftm-overlay.ftm-open { opacity: 1; }

.ftm-box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: min(520px, 100%);
	max-height: 100%;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.25s ease;
}
.ftm-open .ftm-box { transform: none; }

.ftm-flyer-link { display: block; line-height: 0; }
.ftm-flyer {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 120px);
	width: auto;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ftm-buy {
	display: inline-block;
	padding: 14px 34px;
	border-radius: 999px;
	background: #e63946;
	color: #fff !important;
	font: 700 17px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	letter-spacing: 0.02em;
	text-decoration: none !important;
	text-transform: uppercase;
	box-shadow: 0 6px 20px rgba(230, 57, 70, 0.45);
	transition: transform 0.15s ease, background 0.15s ease;
}
.ftm-buy:hover,
.ftm-buy:focus-visible { background: #c92a37; transform: translateY(-2px); }

.ftm-close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	font-size: 24px;
	line-height: 36px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
	z-index: 1;
}
.ftm-close:hover { background: #eee; }

@media (max-width: 560px) {
	.ftm-close { top: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.ftm-overlay, .ftm-box, .ftm-buy { transition: none; }
}

body.ftm-lock { overflow: hidden; }
