/* Colors come from WooCommerce → Promoção da Semana (inline CSS variables). */
.bmps {
	--bmps-bg: #d0021b;
	--bmps-text: #fff;
	--bmps-btn-bg: #fff;
	--bmps-btn-text: #d0021b;
	color: var(--bmps-text);
	font-size: 14px;
	line-height: 1.35;
}

/* ---------- Floating card ---------- */

.bmps--floating {
	position: fixed;
	z-index: 99990;
	width: 300px;
	max-width: calc(100vw - 32px);
	padding: 14px 14px 16px;
	border-radius: 12px;
	background: var(--bmps-bg);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.bmps--floating[hidden] { display: none; }
.bmps--floating.is-visible { opacity: 1; transform: none; }

.bmps--bottom-left { bottom: 20px; left: 20px; }
.bmps--bottom-right { bottom: 20px; right: 20px; }
.bmps--top-left { top: 20px; left: 20px; transform: translateY(-16px); }
.bmps--top-right { top: 20px; right: 20px; transform: translateY(-16px); }
.admin-bar .bmps--top-left,
.admin-bar .bmps--top-right { top: 52px; }
.bmps--center {
	inset: 0;
	height: max-content;
	margin: auto;
	transform: scale(0.96);
}

.bmps__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--bmps-text);
	font-size: 22px;
	line-height: 32px;
	cursor: pointer;
}
.bmps__close:hover { background: rgba(0, 0, 0, 0.15); }

/* ---------- Shared content ---------- */

.bmps__label {
	margin: 0 28px 10px 0;
	color: var(--bmps-text);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bmps__item {
	display: flex;
	gap: 12px;
	align-items: center;
	color: var(--bmps-text);
	text-decoration: none;
}
.bmps__item[hidden] { display: none; }
.bmps__item:hover,
.bmps__item:focus { color: var(--bmps-text); text-decoration: none; }

.bmps__media {
	position: relative;
	flex: 0 0 88px;
	width: 88px;
	height: 88px;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
}
.bmps__media .bmps__img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}
.bmps__badge {
	position: absolute;
	top: 4px;
	left: 4px;
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--bmps-bg);
	color: var(--bmps-text);
	font-size: 12px;
	font-weight: 700;
}

.bmps__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.bmps__name {
	display: -webkit-box;
	overflow: hidden;
	color: var(--bmps-text);
	font-weight: 600;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.bmps .bmps__price,
.bmps .bmps__price * {
	color: var(--bmps-text) !important;
	background: transparent !important;
}
.bmps__price { font-size: 16px; font-weight: 700; }
.bmps__price del { margin-right: 4px; font-size: 13px; font-weight: 400; opacity: 0.8; }
.bmps__price ins { text-decoration: none; }

.bmps__cta {
	align-self: flex-start;
	margin-top: 2px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--bmps-btn-bg);
	color: var(--bmps-btn-text);
	font-size: 13px;
	font-weight: 700;
}
.bmps__item:hover .bmps__cta { filter: brightness(0.94); }

.bmps__item:focus-visible,
.bmps__close:focus-visible {
	outline: 2px solid var(--bmps-text);
	outline-offset: 3px;
}

/* ---------- Tile between products ---------- */

.bmps--inline { display: flex; }
.bmps--inline[hidden] { display: none; }
.bmps--inline .bmps__inner {
	display: flex;
	flex: 1;
	flex-direction: column;
	width: 100%;
	padding: 16px;
	border-radius: 12px;
	background: var(--bmps-bg);
}
.bmps--inline .bmps__label { margin-right: 0; text-align: center; }
.bmps--inline .bmps__items { display: flex; flex: 1; }
.bmps--inline .bmps__item {
	flex: 1;
	flex-direction: column;
	text-align: center;
}
.bmps--inline .bmps__media {
	flex: 0 0 auto;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}
.bmps--inline .bmps__img { max-width: 100%; height: 100%; object-fit: contain; }
.bmps--inline .bmps__body { align-items: center; }
.bmps--inline .bmps__cta { align-self: center; margin-top: 6px; padding: 8px 18px; }
.products-list .bmps--inline .bmps__item { flex-direction: row; text-align: left; }
.products-list .bmps--inline .bmps__media { width: 160px; flex-basis: 160px; }
.products-list .bmps--inline .bmps__body { align-items: flex-start; }

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
	.bmps--floating { width: auto; max-width: none; left: 16px; right: 16px; }
	.bmps--bottom-left,
	.bmps--bottom-right { bottom: 16px; }
	.bmps--top-left,
	.bmps--top-right { top: 16px; }
	.bmps--floating .bmps__media { flex-basis: 72px; width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
	.bmps--floating { transition: none; transform: none; }
}

/* ---------- "Estás a esquecer este?" ---------- */

.bmps--viewed .bmps__label { font-size: 14px; letter-spacing: 0.02em; text-transform: none; }
.bmps--viewed .bmps__price { font-size: 15px; }
