.spk-popup {
	--spk-accent: #16a34a;
	position: fixed;
	z-index: 999999;
	width: 340px;
	max-width: calc(100vw - 24px);
	background: #fff;
	color: #1f2937;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18), 0 2px 6px rgba(0, 0, 0, .08);
	border-left: 4px solid var(--spk-accent);
	font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease, transform .35s ease;
}
.spk-bottom-left  { left: 16px;  bottom: 16px; transform: translateY(20px); }
.spk-bottom-right { right: 16px; bottom: 16px; transform: translateY(20px); }
.spk-top-left     { left: 16px;  top: 16px;    transform: translateY(-20px); }
.spk-top-right    { right: 16px; top: 16px;    transform: translateY(-20px); }
.spk-popup.spk-show { opacity: 1; transform: translateY(0); pointer-events: auto; }

.spk-inner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 30px 10px 10px;
	color: inherit !important;
	text-decoration: none !important;
}
.spk-img {
	width: 68px;
	height: 68px;
	flex: 0 0 68px;
	object-fit: cover;
	border-radius: 10px;
	background: #f3f4f6;
}
.spk-body { min-width: 0; }
.spk-who strong { color: #111827; }
.spk-action { margin-top: 2px; }
.spk-product {
	font-weight: 600;
	color: var(--spk-accent);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.spk-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; margin-top: 2px; }
.spk-review {
	font-style: italic;
	color: #4b5563;
	margin-top: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.spk-time { font-size: 11px; color: #9ca3af; margin-top: 4px; }

.spk-close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #9ca3af;
	font-size: 18px;
	line-height: 22px;
	cursor: pointer;
	box-shadow: none;
}
.spk-close:hover { color: #111827; background: transparent; }

/* ---------- Computers: compact REVIEW popup (3 lines instead of 5); purchase popup unchanged ---------- */
@media (min-width: 641px) {
	.spk-popup:has(.spk-stars) { width: 320px; }
	.spk-popup:has(.spk-stars) .spk-inner { gap: 11px; padding: 9px 28px 9px 9px; }
	.spk-popup:has(.spk-stars) .spk-img { width: 54px; height: 54px; flex-basis: 54px; border-radius: 9px; }
	.spk-popup:has(.spk-stars) .spk-body {
		flex: 1;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 8px;
		row-gap: 2px;
		align-items: baseline;
	}
	.spk-popup:has(.spk-stars) .spk-who { grid-column: 1; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.spk-popup:has(.spk-stars) .spk-stars { grid-column: 2; grid-row: 1; margin: 0; font-size: 11px; letter-spacing: .5px; }
	.spk-popup:has(.spk-stars) .spk-review { grid-column: 1 / -1; margin: 0; -webkit-line-clamp: 1; font-size: 12.5px; }
	.spk-popup:has(.spk-stars) .spk-action { grid-column: 1; margin: 0; font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.spk-popup:has(.spk-stars) .spk-product { display: inline; -webkit-line-clamp: unset; }
	.spk-popup:has(.spk-stars) .spk-time { grid-column: 2; margin: 0; font-size: 10.5px; white-space: nowrap; }
}

/* Tablets/phones: stay above the sticky "Buy" bar on product pages. */
@media (max-width: 900px) {
	.single-product .spk-bottom-left,
	.single-product .spk-bottom-right { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- Phones: small, clean two-line toast ---------- */
@media (max-width: 640px) {
	.spk-popup {
		z-index: 44; /* under the header/menu and the product page "Buy" bar */
		width: auto;
		max-width: 340px;
		top: auto !important;
		left: 10px !important;
		right: 86px !important; /* leaves the WhatsApp button free */
		bottom: calc(12px + env(safe-area-inset-bottom));
		transform: translateY(12px);
		background: rgba(255, 255, 255, .97);
		border-left: 0;
		border-radius: 12px;
		box-shadow: 0 10px 28px -12px rgba(30, 26, 22, .45), 0 0 0 1px rgba(30, 26, 22, .06);
		font: 12px/1.3 var(--f-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
	}
	.single-product .spk-popup { bottom: calc(88px + env(safe-area-inset-bottom)); }
	.spk-inner { gap: 10px; padding: 7px 28px 7px 7px; }
	.spk-img { width: 40px; height: 40px; flex-basis: 40px; border-radius: 8px; }
	.spk-body {
		flex: 1;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		column-gap: 8px;
		row-gap: 2px;
		align-items: baseline;
	}
	.spk-who {
		grid-column: 1;
		grid-row: 1;
		color: #6b7280;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.spk-who strong { font-weight: 600; }
	.spk-time { grid-column: 2; grid-row: 1; margin: 0; font-size: 10.5px; white-space: nowrap; }
	.spk-action, .spk-stars { grid-column: 1 / -1; }
	.spk-action {
		margin: 0;
		color: #6b7280;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.spk-product { display: inline; -webkit-line-clamp: unset; }
	.spk-stars { font-size: 11px; line-height: 1.1; margin: 0; }
	.spk-review { display: none; }
	.spk-close {
		top: 50%;
		right: 2px;
		width: 26px;
		height: 26px;
		margin-top: -13px;
		font-size: 17px;
		line-height: 26px;
		color: #b4b4b4;
	}
}
