/*
 * Free shipping bar — themed from the live Kadence "Clover" palette
 * (--global-palette* custom properties), with hardcoded hex fallbacks
 * so the bar still looks right if those variables aren't in scope.
 */

.dsb-bar-wrap,
.dsb-banner {
	--dsb-accent: var(--global-palette2, #d2b8ad); /* dusty rose */
	--dsb-accent-strong: var(--global-palette1, #9b8259); /* tan */
	--dsb-heading: var(--global-palette4, #7d746c);
	--dsb-ink: var(--global-palette3, #333333);
	--dsb-line: var(--global-palette7, #eae4de);
	--dsb-cream: var(--global-palette8, #f9f6f4);
	--dsb-font-heading: 'Cormorant Garamond', 'Gilda Display', Georgia, serif;
	--dsb-font-body: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.dsb-bar-wrap {
	margin: 1rem 0;
	font-family: var(--dsb-font-body);
	transition: opacity 0.2s ease;
}

.dsb-bar-wrap[hidden] {
	display: none;
}

.dsb-bar-track {
	position: relative;
	width: 100%;
	height: 10px;
	background: var(--dsb-line);
	border-radius: 999px;
	overflow: hidden;
}

.dsb-bar-fill {
	height: 100%;
	background: var(--dsb-accent);
	border-radius: 999px;
	transition: width 0.4s ease;
}

.dsb-bar-wrap.dsb-qualified .dsb-bar-fill {
	background: var(--dsb-accent-strong);
}

.dsb-bar-copy {
	margin: 0.5rem 0 0;
	font-size: 0.9rem;
	color: var(--dsb-heading);
	text-align: center;
	line-height: 1.4;
}

.dsb-bar-wrap.dsb-qualified .dsb-bar-copy {
	font-family: var(--dsb-font-heading);
	font-size: 1.05rem;
	font-weight: 400;
	color: var(--dsb-heading);
}

/* Cart & Checkout order-summary placement: a soft card so it reads as part of the panel */
.dsb-context-cart,
.dsb-context-checkout {
	background: var(--dsb-cream);
	border: 1px solid var(--dsb-line);
	border-radius: 8px;
	padding: 0.85rem 1rem;
	margin-bottom: 1rem;
}

/* Site-wide top banner (replaces VillaTheme's). Pinned to the very top rather than
   sitting in normal document flow: the theme's sticky header calculates its "stuck"
   position from where the header naturally rests on load, which already reserves
   space for whatever precedes it — if the banner scrolled away like ordinary content,
   the sticky header would stick below an empty gap where the banner used to be. */
.dsb-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: var(--dsb-accent);
	color: #ffffff;
	text-align: center;
	padding: 0.5rem 1rem;
}

/* Keep the banner below the WP admin bar (logged-in view only) — same breakpoint/heights WP core uses for it. */
body.admin-bar .dsb-banner {
	top: 32px;
}

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

.dsb-banner-copy {
	margin: 0;
	font-family: var(--dsb-font-body);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

@media (max-width: 480px) {
	.dsb-bar-track {
		height: 8px;
	}

	.dsb-bar-copy {
		font-size: 0.8rem;
	}

	.dsb-bar-wrap.dsb-qualified .dsb-bar-copy {
		font-size: 0.95rem;
	}

	.dsb-context-cart,
	.dsb-context-checkout {
		padding: 0.6rem 0.75rem;
	}

	.dsb-banner-copy {
		font-size: 0.75rem;
	}
}
