.custom-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.4s ease;
}
.custom-popup-overlay.visible {
	opacity: 1;
}

.custom-popup {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	transform: scale(0.85);
	opacity: 0;
	transition: all 0.4s ease;
}
.custom-popup.visible {
	transform: scale(1);
	opacity: 1;
}

.custom-popup-link {
	position: relative;
	display: inline-block;
	border-radius: 12px;
	overflow: hidden;
	line-height: 0;
}

.custom-popup-link img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.custom-popup-ribbon {
	position: absolute;
	top: 0;
	left: 0;
	background: linear-gradient(135deg, #ff2a2a, #b60000);
	color: #fff;
	font-size: clamp(18px, 3.5vw, 26px);
	font-weight: 800;
	padding: 16px 16px;
	border-bottom-right-radius: 12px;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.custom-popup-timer {
	position: absolute;
	right: 12px;
	bottom: 12px;
	background: rgba(0, 0, 0, 0.8);
	color: #fff;
	font-weight: 700;
	font-size: clamp(15px, 2.8vw, 20px);
	padding: 0.6em 1em;
	border-radius: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
	.custom-popup {
		aspect-ratio: 2 / 3;

		width: min(90vw, calc(90vh * (2 / 3)));
		max-width: 90%;
		max-height: 90vh;
		height: auto;
	}

	.custom-popup-link,
	.custom-popup-link img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
}
