/* AccountsBazaar mobile UX layer. */

.mobile-bottom-nav {
	display: none;
}

.mobile-filter-trigger,
.mobile-filter-close {
	display: none;
}

@media (max-width: 900px) {
	/* Fixed mobile header: always visible, with page content offset below it. */
	.site-header {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		z-index: 10000 !important;
		background: rgba(255,255,255,.98) !important;
		box-shadow: 0 8px 24px -20px rgba(17,24,39,.6);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}

	body {
		padding-top: 64px !important;
	}

	/* Compact mobile header with a reliable hamburger menu. */
	.nav-toggle {
		position: relative;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		width: 44px !important;
		min-width: 44px !important;
		max-width: 44px !important;
		height: 44px !important;
		min-height: 44px !important;
		padding: 8px !important;
		margin: 0 !important;
		border: 1px solid #d8e1ec !important;
		border-radius: 12px !important;
		background: #fff !important;
		box-sizing: border-box !important;
		cursor: pointer !important;
		touch-action: manipulation !important;
		-webkit-tap-highlight-color: transparent !important;
		z-index: 10002 !important;
		pointer-events: auto !important;
	}
	.nav-toggle-bar {
		display: block !important;
		width: 4px !important;
		height: 4px !important;
		margin: 3px 0 !important;
		border-radius: 50% !important;
		background: #17304d !important;
		pointer-events: none !important;
	}
	.nav-toggle { flex-direction: column !important; }

	.site-header .nav {
		position: relative;
		min-height: 64px;
		gap: 8px;
	}
	.site-header .logo {
		width: auto !important;
		max-width: calc(100% - 60px);
		flex: 1 1 auto !important;
		height: 50px;
		min-width: 0;
		pointer-events: auto;
	}
	.site-header .logo .site-logo-wordmark {
		height: 42px;
		max-width: 105px;
		flex: 0 0 auto;
	}
	.site-header .site-logo-text {
		font-size: 17px !important;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.nav-actions {
		display: none !important;
	}
	.site-header .nav-toggle {
		flex: 0 0 44px !important;
	}
	.site-nav {
		display: none;
		position: absolute;
		top: calc(100% + 1px);
		left: 0;
		right: 0;
		z-index: 60;
		padding: 12px;
		background: rgba(255,255,255,.98);
		border: 1px solid #e2e6f0;
		border-top: 0;
		border-radius: 0 0 20px 20px;
		box-shadow: 0 24px 46px -24px rgba(17,24,39,.55);
	}
	.site-nav.is-open {
		display: block !important;
	}
	.site-nav .menu-list {
		display: grid;
		grid-template-columns: 1fr;
		gap: 4px;
		flex-wrap: nowrap;
	}
	.site-nav .menu-list a {
		display: block;
		padding: 13px 12px;
		border-radius: 12px;
	}
	.site-nav .menu-list a:hover,
	.site-nav .menu-list .current-menu-item > a {
		background: #f3f6ff;
	}
	.site-nav .menu-list a::after {
		display: none;
	}
	.mobile-cta {
		display: block !important;
		padding: 10px 0 2px !important;
	}

	/* Persistent high-value actions without taking desktop space. */
	.mobile-bottom-nav {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(10px + env(safe-area-inset-bottom));
		z-index: 80;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 8px;
		background: rgba(17,24,39,.96);
		border: 1px solid rgba(255,255,255,.08);
		border-radius: 18px;
		box-shadow: 0 24px 45px -20px rgba(17,24,39,.72);
		backdrop-filter: blur(12px);
	}
	.mobile-bottom-nav a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 46px;
		border-radius: 12px;
		font-size: 13px;
		font-weight: 800;
		letter-spacing: .01em;
		color: #fff;
	}
	.mobile-bottom-nav a:last-child {
		background: linear-gradient(180deg,#f2cf78 0%,#d9b45b 100%);
		color: #33270a;
	}
	body { padding-bottom: 88px; }

	/* Marketplace: a clean Filter & Sort trigger + bottom-sheet filter UI. */
	main#primary .mobile-filter-trigger {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		width: 100%;
		min-height: 48px;
		margin: 18px 0 10px;
		padding: 12px 16px;
		border: 1px solid #d9dfec;
		border-radius: 14px;
		background: #fff;
		color: #111827;
		font: inherit;
		font-weight: 800;
		box-shadow: 0 12px 26px -22px rgba(17,24,39,.45);
		cursor: pointer;
	}
	main#primary .filters {
		display: none;
	}
	main#primary .filters.mobile-filter-open {
		display: grid;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 110;
		grid-template-columns: 1fr;
		gap: 12px;
		max-height: min(84vh, 760px);
		overflow-y: auto;
		padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
		background: #fff;
		border-radius: 24px 24px 0 0;
		border: 1px solid #e1e5ef;
		box-shadow: 0 -20px 55px -30px rgba(17,24,39,.62);
	}
	main#primary .filters .mobile-filter-close {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-height: 42px;
		margin: -2px 0 4px;
		padding: 0 0 10px;
		border: 0;
		border-bottom: 1px solid #e7eaf2;
		background: transparent;
		color: #111827;
		font: inherit;
		font-weight: 800;
		cursor: pointer;
	}
	main#primary .filters .mobile-filter-close::after {
		content: "×";
		font-size: 24px;
		line-height: 1;
		font-weight: 400;
		color: #64748b;
	}
	main#primary .filters__field {
		width: 100%;
	}
	main#primary .filters__field .btn {
		width: 100%;
		min-height: 48px;
	}
	.mobile-filter-backdrop {
		position: fixed;
		inset: 0;
		z-index: 105;
		background: rgba(10,15,27,.46);
		backdrop-filter: blur(2px);
	}

	/* Keep large hero artwork lightweight on small screens. */
	.hero-visual .asset-platform {
		animation-duration: 7s;
	}
	@media (prefers-reduced-motion: reduce) {
		.hero-visual .asset-platform { animation: none; }
	}
}

@media (max-width: 390px) {
	body { padding-top: 64px !important; }
	.site-header .site-logo-text { font-size: 16px !important; }
	.site-header .logo .site-logo-wordmark { max-width: 92px; }
	.mobile-bottom-nav { left: 8px; right: 8px; }
}
