.jfmx-ad {
	box-sizing: border-box;
	margin: 16px auto;
	max-width: 100%;
	position: relative;
	text-align: center;
}

.jfmx-ad *,
.jfmx-ad *::before,
.jfmx-ad *::after {
	box-sizing: inherit;
}

.jfmx-ad-link {
	display: inline-block;
	max-width: 100%;
	text-decoration: none;
}

.jfmx-ad-image {
	--jfmx-ad-active-width: var(--jfmx-ad-width);
	--jfmx-ad-active-height: var(--jfmx-ad-height);
	max-width: calc(var(--jfmx-ad-active-width) * 1px);
	width: 100%;
}

.jfmx-ad-image .jfmx-ad-frame {
	aspect-ratio: var(--jfmx-ad-active-width) / var(--jfmx-ad-active-height);
	overflow: hidden;
	width: 100%;
}

.jfmx-ad-image .jfmx-ad-link {
	display: block;
	width: 100%;
}

.jfmx-ad-image picture {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

.jfmx-ad-frame {
	display: inline-block;
	max-width: 100%;
	position: relative;
	vertical-align: top;
}

.jfmx-ad picture,
.jfmx-ad img {
	display: block;
	height: auto;
	max-width: 100%;
}

.jfmx-ad-image img {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
	pointer-events: none;
	user-select: none;
	width: 100%;
}

.jfmx-ad-fallback {
	background: #f8fafc;
	border: 1px solid #e5e7eb;
	color: #1f2933;
	padding: 16px;
}

.jfmx-ad .jfmx-ad-frame > .jfmx-ad-disclosure {
	background: rgba(17, 24, 39, 0.52);
	border: 0;
	border-radius: 999px;
	bottom: 3px;
	color: #fff;
	display: inline-block;
	font-size: 8px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	margin: 0;
	opacity: 0.82;
	padding: 2px 5px;
	pointer-events: none;
	position: absolute;
	right: 3px;
	text-transform: uppercase;
	white-space: nowrap;
	z-index: 2;
}

.jfmx-ad[data-jfmx-placement="shop_between_products"] {
	max-width: 100%;
	width: 100%;
}

.jfmx-ad[data-jfmx-placement="shop_between_products"] .jfmx-ad-frame {
	max-width: calc(var(--jfmx-ad-active-width) * 1px);
}

.jfmx-ad[data-jfmx-placement="shop_between_products"] .jfmx-ad-link,
.jfmx-ad[data-jfmx-placement="shop_between_products"] picture {
	display: block;
	margin: 0 auto;
	max-width: 100%;
}

.jfmx-floating-ad {
	background: #fff;
	border-radius: 10px;
	bottom: 20px;
	box-shadow: 0 12px 32px rgba(17, 24, 39, 0.24);
	box-sizing: border-box;
	max-height: calc(100vh - 40px);
	max-width: calc(100vw - 40px);
	position: fixed;
	right: 20px;
	z-index: 99998;
}

.jfmx-floating-ad[hidden] {
	display: none !important;
}

.jfmx-floating-ad .jfmx-ad {
	margin: 0;
	max-height: calc(100vh - 40px);
	overflow: hidden;
}

.jfmx-floating-ad .jfmx-ad img {
	max-height: calc(100vh - 40px);
	object-fit: contain;
}

.jfmx-floating-ad__close {
	align-items: center;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	box-shadow: 0 3px 10px rgba(17, 24, 39, 0.2);
	color: #111827;
	cursor: pointer;
	display: flex;
	font-size: 20px;
	font-weight: 700;
	height: 32px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: -10px;
	top: -10px;
	width: 32px;
	z-index: 2;
}

@media (max-width: 767px) {
	.jfmx-ad-image {
		--jfmx-ad-active-width: var(--jfmx-ad-mobile-width, var(--jfmx-ad-width));
		--jfmx-ad-active-height: var(--jfmx-ad-mobile-height, var(--jfmx-ad-height));
	}

	.jfmx-floating-ad {
		bottom: 12px;
		max-height: calc(100vh - 24px);
		max-width: calc(100vw - 24px);
		right: 12px;
	}

	.jfmx-floating-ad .jfmx-ad,
	.jfmx-floating-ad .jfmx-ad img {
		max-height: min(300px, calc(100vh - 24px));
	}
}

.jfmx-zone-chat {
	bottom: 18px;
	position: fixed;
	right: 18px;
	z-index: 99999;
}

.jfmx-zone-chat__launcher {
	background: #102a43;
	border: 0;
	border-radius: 999px;
	box-shadow: 0 10px 22px rgba(16, 42, 67, 0.18);
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 10px 13px;
}

.jfmx-zone-chat__launcher::before {
	content: "";
}

.jfmx-zone-chat__launcher:hover,
.jfmx-zone-chat__launcher:focus {
	background: #e63946;
	color: #fff;
}

.jfmx-zone-chat.is-open .jfmx-zone-chat__launcher {
	display: none;
}

.jfmx-zone-chat__panel {
	background: #fff;
	border: 1px solid #d8e2ec;
	border-radius: 18px;
	bottom: 0;
	box-shadow: 0 16px 36px rgba(16, 42, 67, 0.18);
	color: #1f2933;
	overflow: hidden;
	padding: 18px;
	position: absolute;
	right: 0;
	width: min(318px, calc(100vw - 32px));
}

.jfmx-zone-chat__panel::before {
	background: linear-gradient(90deg, #f4b400, #e63946);
	content: "";
	display: block;
	height: 3px;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
}

.jfmx-zone-chat__panel h2 {
	color: #102a43;
	font-size: 16px;
	line-height: 1.25;
	margin: 2px 28px 6px 0;
}

.jfmx-zone-chat__panel p {
	color: #475569;
	font-size: 12px;
	line-height: 1.4;
	margin: 0 0 13px;
}

.jfmx-zone-chat__panel label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 10px;
}

.jfmx-zone-chat__panel select {
	background: #f8fafc;
	border: 1px solid #d8e2ec;
	border-radius: 10px;
	color: #1f2933;
	font-size: 13px;
	min-height: 34px;
	margin-top: 5px;
	padding: 6px 9px;
	width: 100%;
}

.jfmx-zone-chat__close {
	background: transparent;
	border: 0;
	color: #64748b;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	position: absolute;
	right: 10px;
	top: 10px;
}

.jfmx-zone-chat__actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.jfmx-zone-chat__save,
.jfmx-zone-chat__later,
.jfmx-zone-chat__optout {
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
}

.jfmx-zone-chat__save {
	background: #e63946;
	border: 0;
	border-radius: 999px;
	color: #fff;
	flex: 1;
	padding: 10px 14px;
}

.jfmx-zone-chat__later {
	background: #f8fafc;
	border: 1px solid #d8e2ec;
	border-radius: 999px;
	color: #102a43;
	padding: 10px 14px;
}

.jfmx-zone-chat__optout {
	background: transparent;
	border: 0;
	color: #64748b;
	font-size: 12px;
	margin-top: 10px;
	padding: 0;
	text-decoration: underline;
}

@media (max-width: 480px) {
	.jfmx-zone-chat {
		bottom: 14px;
		left: auto;
		right: 14px;
	}

	.jfmx-zone-chat__launcher {
		align-items: center;
		animation: jfmxZoneBounce 1.8s ease-in-out infinite;
		display: flex;
		height: 48px;
		justify-content: center;
		margin-left: 0;
		padding: 0;
		width: 48px;
	}

	.jfmx-zone-chat__launcher::before {
		color: #fff;
		content: "⌖";
		font-size: 24px;
		font-weight: 700;
		line-height: 1;
	}

	.jfmx-zone-chat__launcher span {
		border: 0;
		clip: rect(0 0 0 0);
		height: 1px;
		margin: -1px;
		overflow: hidden;
		padding: 0;
		position: absolute;
		width: 1px;
	}

	.jfmx-zone-chat__panel {
		border-radius: 16px;
		bottom: 0;
		left: auto;
		max-height: min(68vh, 430px);
		overflow-y: auto;
		padding: 14px;
		right: 0;
		width: min(304px, calc(100vw - 28px));
	}

	.jfmx-zone-chat__panel h2 {
		font-size: 15px;
		margin-bottom: 4px;
	}

	.jfmx-zone-chat__panel p {
		font-size: 11px;
		margin-bottom: 10px;
	}

	.jfmx-zone-chat__panel label {
		font-size: 11px;
		margin-bottom: 8px;
	}

	.jfmx-zone-chat__panel select {
		font-size: 12px;
		min-height: 32px;
		padding: 5px 8px;
	}

	.jfmx-zone-chat__actions {
		gap: 6px;
		margin-top: 10px;
	}

	.jfmx-zone-chat__save,
	.jfmx-zone-chat__later {
		font-size: 12px;
		padding: 9px 11px;
	}

	.jfmx-zone-chat__optout {
		font-size: 11px;
	}

	@keyframes jfmxZoneBounce {
		0%,
		100% {
			transform: translateY(0);
		}
		45% {
			transform: translateY(-6px);
		}
	}
}
