/**
 * Free Shipping Bar - Frontend styles
 */

#fsb-free-shipping-bar,
.fsb-bar-wrapper {
	--fsb-bar-color: #2ecc71;
	--fsb-bar-bg: #e9ecef;
	--fsb-bar-height: 8px;
	--fsb-text-color: #333333;
	--fsb-amount-color: #2ecc71;

	width: 100%;
	font-family: inherit;
	box-sizing: border-box;
	transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---- Dentro do conteúdo (padrão): largura limitada, centralizado ---- */
.fsb-bar-wrapper.fsb-position-content {
	position: relative;
	z-index: 10;
	max-width: 1080px;
	width: calc(100% - 32px);
	margin: 16px auto;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
}

.fsb-bar-wrapper.fsb-position-content .fsb-inner {
	max-width: 100%;
	margin: 0;
	padding: 12px 16px 14px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 8px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	text-align: center;
}

/* ---- Topo sticky (full width) ---- */
.fsb-bar-wrapper.fsb-position-top {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99990;
	max-width: none;
	width: 100%;
	margin: 0;
}

.fsb-bar-wrapper.fsb-position-top .fsb-inner {
	max-width: 100%;
	margin: 0 auto;
	padding: 10px 16px 12px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	text-align: center;
	border-radius: 0;
	border: none;
}

/* ---- Rodapé fixed ---- */
.fsb-bar-wrapper.fsb-position-bottom {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99990;
	max-width: none;
	width: 100%;
	margin: 0;
}

.fsb-bar-wrapper.fsb-position-bottom .fsb-inner {
	max-width: 100%;
	margin: 0 auto;
	padding: 10px 16px 12px;
	background: #fff;
	box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
	text-align: center;
	border-radius: 0;
	border: none;
}

/* Flatsome after_header still can be content-width when position=content */
.fsb-bar-wrapper.fsb-flatsome.fsb-position-content {
	position: relative;
	top: auto;
	bottom: auto;
}

.fsb-bar-wrapper .fsb-text {
	color: var(--fsb-text-color);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	margin-bottom: 8px;
}

.fsb-bar-wrapper .fsb-text .amount,
.fsb-bar-wrapper .fsb-text .woocommerce-Price-amount,
.fsb-bar-wrapper .fsb-text .woocommerce-Price-amount bdi {
	font-weight: 700;
	color: var(--fsb-amount-color) !important;
}

.fsb-bar-wrapper .fsb-progress-track {
	height: var(--fsb-bar-height);
	background-color: var(--fsb-bar-bg);
	border-radius: 999px;
	overflow: hidden;
	position: relative;
}

.fsb-bar-wrapper .fsb-progress-fill {
	height: 100%;
	width: 0;
	background-color: var(--fsb-bar-color);
	border-radius: 999px;
	transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

.fsb-bar-wrapper .fsb-progress-fill::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.25) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: fsb-shine 2.5s ease-in-out infinite;
	opacity: 0.6;
}

@keyframes fsb-shine {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.fsb-bar-wrapper.fsb-achieved .fsb-text {
	font-weight: 600;
	color: var(--fsb-bar-color);
}

.fsb-bar-wrapper.fsb-achieved .fsb-progress-fill {
	width: 100% !important;
}

@media (max-width: 600px) {
	.fsb-bar-wrapper.fsb-position-content {
		width: calc(100% - 24px);
		margin: 12px auto;
	}

	.fsb-bar-wrapper .fsb-inner {
		padding: 8px 12px 10px;
	}

	.fsb-bar-wrapper .fsb-text {
		font-size: 13px;
	}
}

body.admin-bar .fsb-bar-wrapper.fsb-position-top {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .fsb-bar-wrapper.fsb-position-top {
		top: 46px;
	}
}

/* ========== Mini-cart / Side cart (Flatsome off-canvas) ========== */
.fsb-bar-wrapper.fsb-minicart {
	position: relative;
	top: auto;
	bottom: auto;
	left: auto;
	right: auto;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	margin: 0 0 12px;
}

.fsb-bar-wrapper.fsb-minicart .fsb-inner {
	padding: 10px 12px 12px;
	box-shadow: none;
	border: 1px solid #eee;
	border-radius: 6px;
	background: #fafafa;
}

.fsb-bar-wrapper.fsb-minicart .fsb-text {
	font-size: 13px;
	margin-bottom: 6px;
}

.cart-popup-inner .fsb-bar-wrapper.fsb-minicart,
.widget_shopping_cart .fsb-bar-wrapper.fsb-minicart,
.off-canvas-cart .fsb-bar-wrapper.fsb-minicart,
#cart-popup .fsb-bar-wrapper.fsb-minicart {
	margin-bottom: 14px;
}

#cart-popup .fsb-minicart,
.mfp-content .fsb-minicart,
.off-canvas-cart .fsb-minicart {
	margin: 0 0 16px;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

#cart-popup .fsb-minicart .fsb-inner,
.mfp-content .fsb-minicart .fsb-inner {
	padding: 12px 14px;
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
}

/* Align with Flatsome container on larger screens */
@media (min-width: 850px) {
	.fsb-bar-wrapper.fsb-position-content {
		max-width: 1080px;
	}
}

@media (min-width: 1300px) {
	.fsb-bar-wrapper.fsb-position-content {
		max-width: 1200px;
	}
}
