/* Furtopia – Sale Ribbon */

:root {
	--fpsr-bg: #627DAA;        /* custom text: Furtopia light blue, darker shade (overridden from settings) */
	--fpsr-fg: #ffffff;
	--fpsr-sale-bg: #5a3a30;   /* sale % ribbon: Furtopia brown */
	--fpsr-sale-fg: #ffffff;
}

/* ── Product cards ────────────────────────────────────────────────────────── */

/* Box laid exactly over the card image (positioned by JS); clips the ribbon to the image corner. */
.fpsr-clip {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
	z-index: 5;
}

/* Sale % → diagonal ribbon across the top-right corner. */
.fpsr-ribbon {
	/* --fpsr-c = distance of the ribbon's centre line from the corner (smaller = tighter into the corner). */
	--fpsr-w: 170px;
	--fpsr-h: 24px;
	--fpsr-c: 32px;

	position: absolute;
	top: calc(var(--fpsr-c) - var(--fpsr-h) / 2);
	right: calc(var(--fpsr-c) - var(--fpsr-w) / 2);
	width: var(--fpsr-w);
	height: var(--fpsr-h);
	transform: rotate(45deg);

	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 40px;
	box-sizing: border-box;

	background: var(--fpsr-sale-bg);
	color: var(--fpsr-sale-fg);
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: 0 2px 6px rgba(85, 53, 42, 0.2);
}

/* Custom text → pill in the top-left corner (where the % badge used to be). */
.fpsr-card-pill {
	position: absolute;
	top: 12px;
	max-width: calc(100% - 90px); /* stays clear of the ribbon */
	padding: 6px 12px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--fpsr-bg);
	color: var(--fpsr-fg);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fpsr-card-pill--left  { left: 12px; }
.fpsr-card-pill--right { right: 12px; }

/* Smaller cards (phones, sliders) */
.fpsr-clip.is-small .fpsr-ribbon {
	--fpsr-w: 136px;
	--fpsr-h: 20px;
	--fpsr-c: 26px;
	padding: 0 33px;
	font-size: 9px;
	letter-spacing: 0.03em;
}
.fpsr-clip.is-small .fpsr-card-pill {
	top: 8px;
	max-width: calc(100% - 66px);
	padding: 4px 9px;
	font-size: 10px;
}
.fpsr-clip.is-small .fpsr-card-pill--left  { left: 8px; }
.fpsr-clip.is-small .fpsr-card-pill--right { right: 8px; }

/* The plugin's sale badge is turned into the ribbon by JS; hide the original once converted. */
.onsale.fpsr-sale-badge--converted {
	display: none !important;
}

/* ── Single product: pill beside the sale % badge ─────────────────────────── */

.fpsr-badge-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.fpsr-pill {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--fpsr-bg);
	color: var(--fpsr-fg);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* Fallback placement (no sale % badge on the page): sit above the title. */
.fpsr-pill--standalone {
	margin-bottom: 12px;
}
