/*
 * Mobile bottom nav (#deu-bottom-nav, rendered by functions.php) and the floating desktop
 * basket button (#deu-floating-cart) — hidden from/shown to each other by breakpoint so they
 * never duplicate the same basket affordance. Pattern ported from the Mimi Joi theme build.
 */

#deu-bottom-nav { display: none; }
@media (max-width: 1020px) {
	body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
	#deu-bottom-nav {
		display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998;
		background: var(--deu-indigo); border-top: 1px solid rgba(255,255,255,.1);
		box-shadow: 0 -8px 24px rgba(20,14,45,.24);
		padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
	}
	#deu-bottom-nav a {
		flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
		text-decoration: none; padding: 6px 2px; position: relative; min-width: 0;
	}
	#deu-bottom-nav svg { width: 20px; height: 20px; color: #9b93b8; flex-shrink: 0; }
	#deu-bottom-nav span { font: 600 9.5px "Mulish", sans-serif; color: #9b93b8; white-space: nowrap; }
	#deu-bottom-nav a.active svg { color: var(--deu-coral); }
	#deu-bottom-nav a.active span { color: var(--deu-coral); }
	#deu-bottom-nav a.active::before {
		content: ''; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
		width: 26px; height: 3px; background: var(--deu-gold); border-radius: 0 0 3px 3px;
	}
	.deu-nav-count, #deu-bottom-nav .deu-nav-count {
		position: absolute; top: -2px; right: calc(50% - 20px); min-width: 15px; height: 15px;
		padding: 0 3px; border-radius: 999px; background: var(--deu-coral-deep); color: #fff;
		font-size: 9px; font-weight: 800; line-height: 15px; text-align: center; border: 1.5px solid var(--deu-indigo);
	}
}

#deu-floating-cart {
	position: fixed; left: 18px; bottom: 18px; z-index: 9997; width: 54px; height: 54px; border-radius: 50%;
	background: var(--deu-indigo); display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 24px rgba(36,27,78,.3); transition: transform .2s ease, filter .2s ease;
}
#deu-floating-cart:hover { transform: translateY(-2px); filter: brightness(1.1); }
#deu-floating-cart svg { width: 24px; height: 24px; color: #fff; }
#deu-floating-cart .deu-cart-count {
	position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 4px;
	border-radius: 999px; background: var(--deu-coral-deep); color: #fff; font: 800 11px "Sora", sans-serif;
	display: flex; align-items: center; justify-content: center; border: 2px solid var(--deu-mist);
}
@media (max-width: 1020px) { #deu-floating-cart { display: none !important; } }
