/* Agma Miracle Black Friday — frontend */

.agma-bf-wrap:empty { display: none; }

.agma-bf-notice {
	margin: 0 0 12px;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 15px;
	line-height: 1.45;
	border: 1px solid transparent;
}
.agma-bf-notice:last-child { margin-bottom: 1.25em; }

.agma-bf-notice.agma-bf-info {
	background: #fbeef2;
	border-color: #e7c3d1;
	color: #7a1f3d;
}
.agma-bf-notice.agma-bf-success {
	background: #eafaf0;
	border-color: #a9e6c1;
	color: #14663a;
	font-weight: 600;
}
.agma-bf-notice a { color: inherit; font-weight: 700; text-decoration: underline; }

.agma-bf-notice.agma-bf-mini {
	margin: 8px 0;
	padding: 9px 12px;
	font-size: 12px;
	border-radius: 6px;
}

/* Gift line badges */
.agma-bf-badge {
	display: inline-block;
	background: #7a1f3d;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 2px 8px;
	border-radius: 4px;
	vertical-align: middle;
	margin-left: 4px;
	text-transform: uppercase;
}
.agma-bf-badge--lotion { background: #9a5410; }

/* Round product badge: BLACK / FRIDAY / deal */
.agma-bf-round-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	width: 62px;
	height: 62px;
	border-radius: 50%;
	background: #6b1b32; /* бордо */
	color: #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.25);
	border: 1.5px solid #d9b35c; /* златист outline */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	line-height: 1.05;
	pointer-events: none;
}
.agma-bf-round-badge span {
	display: block;
	font-weight: 700;
	letter-spacing: 0.04em;
	font-size: 10px;
	text-transform: uppercase;
}
.agma-bf-round-badge .agma-bf-round-badge__deal {
	font-size: 11px;
	margin-top: 1px;
	color: #f3d58a;
}

/* Ensure the product image wrapper is a positioning context */
.products .product,
.product .woocommerce-product-gallery,
li.product {
	position: relative;
}

/* When the BF round badge is present, push the theme's own labels
   (НОВО etc.) down so they sit directly BELOW the BF circle, and hide the
   -% onsale flash entirely (campaign shows regular price, раздел 3). */
.wd-product-thumb:has(.agma-bf-round-badge) .product-labels,
.wd-product:has(.agma-bf-round-badge) .product-labels {
	top: 84px; /* 62px badge (top:12) + gap */
	left: 12px;
}

/* Hide the theme's onsale percentage label on BF products. */
.wd-product-thumb:has(.agma-bf-round-badge) .product-labels .onsale,
.wd-product:has(.agma-bf-round-badge) .product-labels .onsale,
.single-product .product:has(.agma-bf-round-badge) .onsale {
	display: none !important;
}

@media (max-width: 480px) {
	.wd-product-thumb:has(.agma-bf-round-badge) .product-labels,
	.wd-product:has(.agma-bf-round-badge) .product-labels {
		top: 66px; /* 52px badge (top:8) + gap */
		left: 8px;
	}
}

@media (max-width: 480px) {
	.agma-bf-round-badge {
		width: 52px;
		height: 52px;
		top: 8px;
		left: 8px;
	}
	.agma-bf-round-badge span { font-size: 9px; }
	.agma-bf-round-badge .agma-bf-round-badge__deal { font-size: 10px; }
}

/* Shop hero panel (раздел 5.2) */
.agma-bf-hero {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 18px;
	padding: 12px 20px;
	background: #f7e9ec; /* blush */
	border: 1px solid #e7c3d1;
	border-radius: 10px;
}
.agma-bf-hero--reposition { display: none; }
.agma-bf-hero--reposition.agma-bf-hero--ready { display: flex; }

.agma-bf-hero__icon {
	font-size: 26px;
	line-height: 1;
	flex: 0 0 auto;
}
.agma-bf-hero__body { display: block; }
.agma-bf-hero__line1 {
	display: block;
	font-weight: 800;
	color: #6b1b32; /* бордо */
	font-size: 15px;
	letter-spacing: 0.02em;
}
.agma-bf-hero__line2 {
	display: block;
	font-size: 13px;
	color: #7a1f3d;
	margin-top: 2px;
}

@media (max-width: 768px) {
	.agma-bf-hero { gap: 10px; padding: 10px 14px; }
	.agma-bf-hero__icon { font-size: 22px; }
	.agma-bf-hero__line1 { font-size: 13px; }
	.agma-bf-hero__line2 { font-size: 11px; }
}

/* Mini cart discount + final rows */
.woocommerce-mini-cart__promo.agma-bf-mini-discount,
.woocommerce-mini-cart__final.agma-bf-mini-final {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	margin: 6px 0;
	font-size: 13px;
}
.woocommerce-mini-cart__promo.agma-bf-mini-discount { color: #14663a; }
.woocommerce-mini-cart__final.agma-bf-mini-final {
	font-weight: 700;
	font-size: 15px;
	padding-top: 6px;
	border-top: 1px solid #eee;
}
.agma-bf-mini-discount span,
.agma-bf-mini-final span { white-space: nowrap; }
