/* ==========================================================================
   Hush — Mobile app-shell
   Bottom tab bar, sticky add-to-cart, search sheet. Loaded on all viewports
   but only shown on mobile. Uses env(safe-area-inset-*) for notch/home-bar.
   ========================================================================== */

/* Hidden on desktop by default */
.hush-tabbar,
.hush-sticky-atc{display:none}

@media (max-width:860px){

	:root{
		--hush-tabbar-h:64px;
		--hush-safe-b:env(safe-area-inset-bottom, 0px);
	}

	/* Give page bottom padding so content clears the fixed bars */
	body.hush{padding-bottom:calc(var(--hush-tabbar-h) + var(--hush-safe-b))}
	body.hush.single-product{padding-bottom:calc(var(--hush-tabbar-h) + 68px + var(--hush-safe-b))}

	/* ---------- Bottom tab bar ---------- */
	.hush-tabbar{
		display:flex;position:fixed;bottom:0;inset-inline:0;z-index:85;
		background:rgba(255,252,245,.94);backdrop-filter:saturate(150%) blur(16px);
		-webkit-backdrop-filter:saturate(150%) blur(16px);
		border-top:1px solid var(--hush-line);
		padding-bottom:var(--hush-safe-b);
		box-shadow:0 -6px 24px rgba(28,19,64,.06);
	}
	.hush-tabbar__item{
		flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
		height:var(--hush-tabbar-h);background:none;border:none;
		color:var(--hush-muted);font-size:.62rem;font-weight:700;letter-spacing:.01em;
		text-decoration:none;transition:color .2s var(--hush-ease);position:relative;
	}
	.hush-tabbar__item svg{width:24px;height:24px;transition:transform .25s var(--hush-ease)}
	.hush-tabbar__item.is-active{color:var(--hush-blue)}
	.hush-tabbar__item.is-active svg{transform:translateY(-1px) scale(1.05)}
	.hush-tabbar__item:active svg{transform:scale(.9)}
	.hush-tabbar__item.is-active::before{
		content:"";position:absolute;top:6px;width:22px;height:3px;border-radius:3px;background:var(--hush-blue);
	}
	.hush-tabbar__cartwrap{position:relative;display:inline-flex}
	.hush-tabbar__cartwrap .hush-cart-count{
		position:absolute;top:-6px;inset-inline-end:-8px;min-width:16px;height:16px;padding:0 3px;
		background:var(--hush-pink);color:#fff;border-radius:var(--hush-r-pill);font-size:.6rem;
		font-weight:800;display:grid;place-items:center;line-height:1;
	}

	/* ---------- Sticky add-to-cart (product) ---------- */
	.hush-sticky-atc{
		display:flex;align-items:center;gap:1rem;position:fixed;
		bottom:calc(var(--hush-tabbar-h) + var(--hush-safe-b));inset-inline:0;z-index:84;
		background:#fff;border-top:1px solid var(--hush-line);
		padding:.7rem var(--hush-gutter);
		transform:translateY(120%);transition:transform .35s var(--hush-ease);
		box-shadow:0 -6px 20px rgba(28,19,64,.08);
	}
	.hush-sticky-atc.is-visible{transform:translateY(0)}
	.hush-sticky-atc__info{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
	.hush-sticky-atc__name{font-weight:700;font-size:.85rem;color:var(--hush-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
	.hush-sticky-atc__price{font-size:.85rem;color:var(--hush-muted)}
	.hush-sticky-atc__price .amount{color:var(--hush-ink);font-weight:700}
	.hush-sticky-atc__btn{white-space:nowrap;padding-inline:1.4rem}

	/* App-like momentum + tap sizing */
	.hush-tabbar__item,.hush-sticky-atc__btn{-webkit-tap-highlight-color:transparent}
}

/* Extra small — tighten tab labels */
@media (max-width:360px){
	.hush-tabbar__item{font-size:.58rem}
	.hush-tabbar__item svg{width:22px;height:22px}
}
