/*    4. HEADER & NAVIGATION
   ------------------------------------------- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: var(--z-header);
	background: linear-gradient(180deg, rgba(15, 7, 23, 0.94) 0%, rgba(26, 10, 46, 0.82) 100%);
	/* No backdrop-filter: the v4 theme paints an opaque header (see
	   `.site-header.ord-header` in ord.css), so the blur was invisible while
	   still forcing the browser to re-blur everything behind the sticky bar on
	   every scroll frame. */
	border-bottom: 1px solid var(--color-glass-border);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	transition: all var(--transition-base);
}

/* Slim brand-gradient accent line under the header */
.site-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 2px;
	background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-purple) 50%, var(--color-accent) 100%);
	opacity: 0.8;
	pointer-events: none;
}

.site-header.scrolled {
	background: linear-gradient(180deg, rgba(15, 7, 23, 0.97) 0%, rgba(26, 10, 46, 0.9) 100%);
	box-shadow: 0 1px 0 rgba(255, 210, 30, 0.08), 0 16px 44px rgba(0, 0, 0, 0.4);
}

.site-header.scrolled .header-bottom {
	border-top-color: var(--color-glass-border);
}

/* Push main content below fixed header */
.site-main {
	padding-top: 35px;
}

/* Header Row 1 — Branding + Actions */
.header-top {
	padding: var(--space-md) 0 var(--space-xs);
	transition: padding var(--transition-base);
}

.site-header.scrolled .header-top {
	padding: var(--space-sm) 0 var(--space-xs);
}

.header-top .header-container {
	justify-content: space-between;
}

.header-top-actions {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
}

/* Header action buttons (Login, Dashboard) */
.header-btn {
	display: inline-block;
	padding: 7px 16px;
	font-size: var(--text-sm);
	font-weight: 600;
	border-radius: var(--radius-md);
	transition: all var(--transition-base);
}

.header-btn-login {
	color: var(--color-text-primary);
	background: rgba(255, 210, 30, 0.08);
	border: 1.5px solid rgba(255, 210, 30, 0.28);
	border-radius: 999px;
}

.header-btn-login:hover {
	color: var(--color-bg-dark);
	border-color: var(--color-accent);
	background: var(--color-accent);
	box-shadow: var(--shadow-accent);
	transform: translateY(-1px);
}

/* Header Row 2 — Navigation (compact, centered) */
.header-bottom {
	padding: 0 0 var(--space-xs);
	border-top: 1px solid transparent;
	transition: all var(--transition-base);
}

.header-bottom .header-container {
	justify-content: center;
}

.main-navigation {
	margin: 0 auto;
}

.site-header.scrolled .header-bottom {
	padding: 0 0 var(--space-xs);
	border-top-color: var(--color-glass-border);
}

.header-container {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--space-xl);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Site Branding */
.site-title {
	font-family: var(--font-heading);
	font-size: var(--text-2xl);
	font-weight: 800;
	color: var(--color-text-primary);
	line-height: 1;
}

.site-title:hover {
	color: var(--color-text-primary);
}

.site-title-text {
	color: var(--color-text-primary);
}

.site-title .text-accent {
	color: var(--color-accent);
}

.site-logo img {
	max-height: 40px;
	width: auto;
}

/* Navigation */
.main-navigation {
	display: flex;
	align-items: center;
	gap: var(--space-xl);
}

#primary-menu {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	list-style: none;
}

#primary-menu .menu-item a {
	padding: 8px 16px;
	font-size: var(--text-sm);
	font-weight: 500;
	color: var(--color-text-secondary);
	border-radius: 999px;
	transition: all var(--transition-fast);
	position: relative;
}

#primary-menu .menu-item a::after {
	content: '';
	position: absolute;
	bottom: 2px;
	left: 50%;
	transform: translateX(-50%);
	width: 0;
	height: 2px;
	background-color: var(--color-accent);
	transition: width var(--transition-base);
	border-radius: 1px;
}

#primary-menu .menu-item a:hover {
	color: var(--color-text-primary);
	background: rgba(255, 210, 30, 0.08);
}

#primary-menu .menu-item a:hover::after {
	width: 60%;
}

#primary-menu .menu-item.current-menu-item a {
	color: var(--color-accent);
	background: rgba(255, 210, 30, 0.08);
}

/* Mobile Toggle */
.menu-toggle {
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: rgba(255, 210, 30, 0.08);
	border: 1px solid rgba(255, 210, 30, 0.25);
	cursor: pointer;
	padding: 0;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	z-index: calc(var(--z-header) + 1);
	transition: background var(--transition-fast), border-color var(--transition-fast);
}

.menu-toggle:hover {
	background: rgba(255, 210, 30, 0.16);
	border-color: var(--color-accent);
}

/* Slide panel parts — hidden on desktop, shown in mobile overlay */
.slide-panel-wrapper,
.slide-panel-header,
.slide-footer {
	display: none;
}

.menu-toggle-bar {
	display: block;
	width: 18px;
	height: 2px;
	background-color: var(--color-text-primary);
	border-radius: 2px;
	transition: all var(--transition-base);
}

.menu-toggle.active .menu-toggle-bar:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .menu-toggle-bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle.active .menu-toggle-bar:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav CTA Button */
.btn-nav-cta {
	display: inline-block;
	padding: 8px 20px;
	background: var(--color-accent);
	color: var(--color-bg-dark);
	font-size: var(--text-sm);
	font-weight: 600;
	border-radius: var(--radius-md);
	transition: all var(--transition-base);
}

.btn-nav-cta:hover {
	background: var(--color-accent-light);
	color: var(--color-bg-dark);
	box-shadow: var(--shadow-accent);
	transform: translateY(-1px);
}

/* Slide overlay (hidden on desktop) */
.slide-overlay {
	display: none;
}

/* Floating Admin Button */
.float-admin-btn {
	position: fixed;
	bottom: 96px;
	right: 24px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	background: var(--color-accent);
	color: var(--color-bg-dark);
	border-radius: 50px;
	font-size: var(--text-sm);
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 4px 20px rgba(255, 210, 30, 0.4);
	z-index: calc(var(--z-header) + 10);
	transition: all var(--transition-fast);
}

.float-admin-btn:hover {
	background: var(--color-accent-light);
	color: var(--color-bg-dark);
	box-shadow: 0 6px 28px rgba(255, 210, 30, 0.6);
	transform: translateY(-2px);
}

.float-admin-label {
	display: none;
}

@media (min-width: 769px) {
	.float-admin-btn {
		padding: 12px 20px;
	}

	.float-admin-label {
		display: inline;
	}
}

@media (max-width: 768px) {
	.float-admin-btn {
		bottom: 84px;
		right: 16px;
		padding: 14px;
		border-radius: 50%;
	}
}

/* Sticky Bottom CTA Banner — the single floating CTA site-wide.
   Height is pinned to fixed px values (rather than rem-derived line boxes)
   so a host webview scaling text cannot change how tall the bar is; the
   safe-area inset is capped for the same reason, since in-app browsers
   report a bottom inset that the standalone browser does not. */
.ord-sticky-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 850;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 14px;
	padding: 7px 20px calc(7px + env(safe-area-inset-bottom, 0px));
	padding: 7px 20px calc(7px + min(env(safe-area-inset-bottom, 0px), 20px));
	background: var(--ink, #241046);
	color: #ffffff;
	text-decoration: none;
	border-top: 2.5px solid var(--ink, #241046);
	box-shadow: 0 -6px 0 0 var(--mint, #ffd21e);
}

.ord-sticky-cta:hover,
.ord-sticky-cta:focus-visible {
	color: #ffffff;
	text-decoration: none;
}

.ord-sticky-cta:focus-visible {
	outline: 3px solid var(--mint, #ffd21e);
	outline-offset: -6px;
}

.ord-sticky-cta-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

/* One line per label: a wrapped label is what turned the bar two storeys
   tall inside in-app webviews. */
.ord-sticky-cta-copy strong,
.ord-sticky-cta-copy small {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ord-sticky-cta-copy strong {
	font-family: var(--ord-font-heading, inherit);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
}

.ord-sticky-cta-copy small {
	font-size: 0.78rem;
	line-height: 1.3;
	opacity: 0.72;
}

.ord-sticky-cta-btn {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 20px;
	font-family: var(--ord-font-heading, inherit);
	font-size: 0.875rem;
	/* px line box (≈ the inherited 1.7 at 0.875rem) keeps the button height
	   fixed even when a host webview scales text up. */
	line-height: 20px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--ink, #241046);
	background: var(--mint, #ffd21e);
	border: 2px solid var(--ink, #241046);
	border-radius: 50px;
	box-shadow: 3px 3px 0 0 var(--ink, #241046);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ord-sticky-cta:hover .ord-sticky-cta-btn {
	transform: translate(-2px, -2px);
	box-shadow: 5px 5px 0 0 var(--ink, #241046);
}

@media (max-width: 768px) {
	.ord-sticky-cta {
		gap: 10px;
		padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px));
		padding: 6px 14px calc(6px + min(env(safe-area-inset-bottom, 0px), 20px));
	}

	.ord-sticky-cta-copy small {
		display: none;
	}

	.ord-sticky-cta-btn {
		padding: 6px 16px;
		font-size: 0.8rem;
		line-height: 19px;
	}
}

/* Very narrow phones: shrink the label a touch so the single-line bar never
   has to truncate the price. */
@media (max-width: 359px) {
	.ord-sticky-cta {
		gap: 8px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.ord-sticky-cta-copy strong {
		font-size: 0.9rem;
	}

	.ord-sticky-cta-btn {
		padding: 6px 13px;
	}
}

/* Keep the footer clear of the sticky bottom CTA banner. */
.ord-footer-bottom {
	padding-bottom: 56px;
}

@media (max-width: 768px) {
	.ord-footer-bottom {
		padding-bottom: 50px;
	}
}
