/**
 * Cart drawer restyle — scoped to Flatsome's off-canvas mini-cart.
 *
 * Adopts the ECS drawer's visual language — a gradient header with a soft
 * decorative halo, borderless item rows on a white panel, and a summary row
 * above a single full-width CTA — in BeleefBreda's red palette.
 */

/* ---- Panel ---------------------------------------------------------- */
.off-canvas-cart .mfp-content #cart-popup,
.off-canvas-cart #cart-popup {
	background: #fff;
}

.off-canvas-cart .cart-popup-inner {
	padding: 0;
	background: #fff;
}

/* ---- Header --------------------------------------------------------- */
.off-canvas-cart .cart-popup-title {
	position: relative;
	overflow: hidden;
	margin: 0;
	padding: 24px 28px;
	background: var(--bb-grad, linear-gradient(135deg, #b01e22, #c93a3e));
	color: #fff;
	text-align: left;
}

/* Soft decorative halo, top-right (ECS drawer header). */
.off-canvas-cart .cart-popup-title::before {
	content: "";
	position: absolute;
	top: -80px;
	right: -60px;
	width: 220px;
	height: 220px;
	background: rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	pointer-events: none;
}

.off-canvas-cart .cart-popup-title .heading-font {
	position: relative;
	z-index: 1;
	color: #fff;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.off-canvas-cart .cart-popup-title .is-divider {
	display: none;
}

/* ---- Close button --------------------------------------------------- */
/* Flatsome renders the close button outside the panel (a fixed child of
   .mfp-wrap) as a bare "×" with mix-blend-mode: difference at 60% opacity,
   which gets lost on darker backgrounds. A solid white chip with a soft shadow
   reads on the red header, the dark overlay and the white item rows alike.
   Flatsome only puts off-canvas-cart on .mfp-content, hence the :has(). The
   inset is a transform because Flatsome pins `top` with !important while the
   admin bar shows. */
.mfp-wrap:has(.off-canvas-cart) .mfp-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: #2d2d2d;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	mix-blend-mode: normal;
	transform: translate(-12px, 12px);
	transition: opacity 0.6s 0.15s, color 0.2s ease, background 0.2s ease;
}

.mfp-wrap.mfp-ready:has(.off-canvas-cart) .mfp-close {
	opacity: 1;
}

.mfp-wrap:has(.off-canvas-cart) .mfp-close:hover {
	color: #fff;
	background: var(--bb-red, #b01e22);
}

.mfp-wrap:has(.off-canvas-cart) .mfp-close:focus-visible {
	outline: 2px solid var(--bb-red, #b01e22);
	outline-offset: 2px;
}

.mfp-wrap:has(.off-canvas-cart) .mfp-close svg {
	width: 20px;
	height: 20px;
}

/* ---- Body ----------------------------------------------------------- */
.off-canvas-cart .widget_shopping_cart {
	padding: 0;
}

/* Single source of horizontal inset for both the item list and the footer. */
.off-canvas-cart .widget_shopping_cart_content {
	padding: 8px 28px 0;
}

/* Item list — borderless rows separated by a hairline. */
.off-canvas-cart ul.woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item {
	position: relative;
	margin: 0;
	padding: 16px 34px 16px 86px;
	/* Flatsome's border-box + overflow:hidden on this <li>: the min-height must
	   hold the 72px thumbnail plus both 16px paddings, or the image is clipped. */
	min-height: 104px;
	background: none;
	border: 0;
	border-bottom: 1px solid #f0f0f0;
	border-radius: 0;
	box-shadow: none;
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item:last-child {
	border-bottom: 0;
}

/* Product thumbnail — 72px rounded, pinned left. */
.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item img {
	position: absolute;
	top: 16px;
	left: 0;
	width: 72px;
	height: 72px;
	margin: 0;
	object-fit: cover;
	border-radius: 12px;
}

/* Product name (the link wrapping the thumbnail + title text). */
.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a:not(.remove_from_cart_button) {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	color: #2d2d2d;
	line-height: 1.3;
	text-decoration: none;
}

/* Remove button — rounded square top-right, hover brand red. Flatsome's
   a.remove forces a 2px border plus !important font-size/line-height, which
   pushed the "×" glyph off-centre; the glyph is hidden and the cross is drawn
   with two centred bars so it stays centred regardless of the theme font. */
.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button {
	position: absolute;
	top: 16px;
	right: 0;
	width: 26px;
	height: 26px;
	padding: 0;
	font-size: 0 !important;
	line-height: 0 !important;
	color: #b9b9b9 !important;
	background: #f2f2f2;
	border: 0;
	border-radius: 7px;
	transition: color 0.2s ease, background 0.2s ease;
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button::before,
.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 12px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item a.remove_from_cart_button:hover {
	color: #fff !important;
	background: var(--bb-red, #b01e22);
}

/* Quantity / line price ("2 × €10,00"). */
.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item .quantity {
	display: block;
	margin-top: 4px;
	color: #7a7a7a;
	font-size: 0.85em;
}

.off-canvas-cart ul.woocommerce-mini-cart li.mini_cart_item .quantity .amount {
	color: var(--bb-red-dark, #8f181c);
	font-weight: 700;
}

/* Consumption / variation lines. */
.off-canvas-cart .woocommerce-mini-cart-item .variation,
.off-canvas-cart .woocommerce-mini-cart-item dl {
	margin: 4px 0 0;
	font-size: 0.8em;
	color: #7a7a7a;
}

/* ---- Footer (total + CTA) ------------------------------------------ */
.off-canvas-cart .ux-mini-cart-footer {
	padding: 0 0 6px;
}

/* Total as a summary row, not a card. */
.off-canvas-cart .woocommerce-mini-cart__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0;
	padding: 16px 0 4px;
	border: 0;
	border-top: 1px solid #f0f0f0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-size: 1rem;
	font-weight: 700;
	color: #2d2d2d;
}

.off-canvas-cart .woocommerce-mini-cart__total .amount {
	margin-left: auto;
	font-size: 1.3rem;
	font-weight: 900;
	color: var(--bb-red-dark, #8f181c);
}

/* Small indicative-total note under the total. */
.off-canvas-cart .bb-drawer-indicative,
.bb-drawer-indicative {
	margin: 0 0 10px;
	font-size: 0.78em;
	color: #9a9a9a;
	text-align: left;
}

/* Buttons wrapper (a <p> that browsers auto-close around our block content —
   so spacing lives on the elements themselves, not this container). */
.off-canvas-cart .woocommerce-mini-cart__buttons,
.woocommerce-mini-cart__buttons {
	margin: 0;
	padding: 0;
}

/* Single full-width CTA — the ECS "proceed" button look, in brand red. */
.bb-drawer-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 15px 18px;
	text-align: center;
	font-weight: 700;
	font-size: 1rem;
	text-transform: none;
	letter-spacing: 0;
	border: 0;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.bb-drawer-btn--primary {
	background: var(--bb-red, #b01e22);
	color: #fff;
	box-shadow: 0 4px 20px rgba(var(--bb-red-rgb, 176, 30, 34), 0.28);
}

.bb-drawer-btn--primary:hover {
	background: var(--bb-red-dark, #8f181c);
	color: #fff;
	box-shadow: 0 8px 28px rgba(var(--bb-red-rgb, 176, 30, 34), 0.32);
	transform: translateY(-2px);
}

/* Outline variant kept for any future secondary CTA. */
.bb-drawer-btn--outline {
	background: #fff;
	color: var(--bb-red, #b01e22);
	border: 2px solid var(--bb-red, #b01e22);
}

.bb-drawer-btn--outline:hover {
	background: var(--bb-red-tint, #f8ecec);
	color: var(--bb-red, #b01e22);
	box-shadow: none;
}

/* ---- Reassurance line ---------------------------------------------- */
.off-canvas-cart .bb-drawer-reassurance,
.bb-drawer-reassurance {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 20px;
	padding: 12px 16px;
	font-size: 0.82em;
	color: #4a4a4a;
	background: var(--bb-red-tint, #f8ecec);
	border-radius: 14px;
}

.bb-drawer-reassurance__icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--bb-red, #b01e22);
	position: relative;
}

.bb-drawer-reassurance__icon::after {
	content: "";
	position: absolute;
	top: 4px;
	left: 6px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
