/**
 * MYBIKE.CH — Brand Design System
 * ================================
 *
 * Design language: Swiss International Typographic Style, applied to a
 * modern marketplace. Precision grid, one grotesk typeface, functional
 * red used only for action and status — never as decoration. Flat
 * surfaces with hairline borders instead of drop shadows; sharp corners
 * (2px, not fully square) instead of the rounded-card-with-soft-shadow
 * default. This file carries the sitewide brand layer: color tokens,
 * typography, buttons, header, footer. Marketplace-specific components
 * (search bar, filters, listing cards, dashboard) are in marketplace.css.
 */

:root {
	/* Color */
	--mb-red: #E1000F;          /* Primary action color — Swiss red, used sparingly */
	--mb-red-dark: #B5000C;
	--mb-ink: #16181D;          /* Primary text / headings */
	--mb-ink-soft: #4A4E57;     /* Secondary text */
	--mb-paper: #FFFFFF;
	--mb-surface: #F5F5F3;      /* Page background */
	--mb-line: #E1E1DD;         /* Hairline borders/dividers */
	--mb-line-strong: #C9C9C3;
	--mb-success: #1A7F37;
	--mb-focus: #0B5FFF;

	/* Type */
	--mb-font: 'MyBikeGrotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	/* Spacing scale */
	--mb-space-1: 4px;
	--mb-space-2: 8px;
	--mb-space-3: 16px;
	--mb-space-4: 24px;
	--mb-space-5: 40px;
	--mb-space-6: 64px;
	--mb-space-7: 96px;

	/* Radius: sharp, functional — not the rounded-everything default */
	--mb-radius: 2px;

	/* Grid */
	--mb-container: 1240px;
}

/* -------------------------------------------------------------------- */
/* Reset / base                                                          */
/* -------------------------------------------------------------------- */

.mybike-homepage,
.mybike-search-page,
.mybike-listing,
.mybike-dashboard,
.mybike-my-listings,
.mybike-favorites-page,
.mybike-messages,
.mybike-wizard,
.mybike-dealer-storefront,
.mybike-dealer-directory,
.mybike-dealer-dashboard,
.mybike-account-settings,
.mybike-login-required,
.mybike-empty-state {
	font-family: var(--mb-font);
	color: var(--mb-ink);
	-webkit-font-smoothing: antialiased;
}

.mybike-page-container {
	max-width: var(--mb-container);
	margin: 0 auto;
	padding: 0 var(--mb-space-4);
}

.mybike-page-container--wide {
	max-width: 1440px;
}

.mybike-container {
	max-width: var(--mb-container);
	margin: 0 auto;
	padding: 0 var(--mb-space-4);
}

/* -------------------------------------------------------------------- */
/* Typography                                                            */
/* -------------------------------------------------------------------- */

.mybike-homepage h1,
.mybike-listing h1,
.mybike-dashboard h1,
.mybike-my-listings h1,
.mybike-favorites-page h1,
.mybike-messages h1,
.mybike-dealer-storefront h1,
.mybike-dealer-directory h1,
.mybike-dealer-dashboard h1,
.mybike-account-settings h1 {
	font-size: 2.25rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0 0 var(--mb-space-3);
}

.mybike-hero__title {
	font-size: clamp(2.25rem, 5vw, 3.75rem);
	font-weight: 700;
	line-height: 1.02;
	letter-spacing: -0.02em;
	margin: 0 0 var(--mb-space-2);
	max-width: 14ch;
}

.mybike-hero__subtitle {
	font-size: 1.125rem;
	color: var(--mb-ink-soft);
	max-width: 46ch;
	margin: 0 0 var(--mb-space-4);
}

.mybike-section__title {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin: 0 0 var(--mb-space-4);
	padding-bottom: var(--mb-space-2);
	border-bottom: 1px solid var(--mb-line);
}

h2 {
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------- */
/* Buttons                                                               */
/* -------------------------------------------------------------------- */

.mybike-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--mb-space-2);
	font-family: var(--mb-font);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.75rem 1.25rem;
	border-radius: var(--mb-radius);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.mybike-btn--primary {
	background: var(--mb-red);
	color: #fff;
}

.mybike-btn--primary:hover,
.mybike-btn--primary:focus-visible {
	background: var(--mb-red-dark);
}

.mybike-btn--secondary {
	background: transparent;
	color: var(--mb-ink);
	border-color: var(--mb-line-strong);
}

.mybike-btn--secondary:hover,
.mybike-btn--secondary:focus-visible {
	border-color: var(--mb-ink);
}

.mybike-btn--text {
	background: transparent;
	color: var(--mb-ink-soft);
	padding: 0.5rem 0.25rem;
}

.mybike-btn--text:hover,
.mybike-btn--text:focus-visible {
	color: var(--mb-ink);
	text-decoration: underline;
}

.mybike-btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--mb-focus);
	outline-offset: 2px;
}

/* -------------------------------------------------------------------- */
/* Header                                                                */
/* -------------------------------------------------------------------- */

.mybike-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mb-space-4);
	padding: var(--mb-space-3) var(--mb-space-4);
	border-bottom: 1px solid var(--mb-line);
	background: var(--mb-paper);
	position: relative;
	z-index: 50;
}

.mybike-header.is-scrolled {
	box-shadow: 0 1px 0 var(--mb-line);
}

/* The shell wraps the thin utility topline + the header itself, so both
   scroll away together and the header can be made sticky independently
   of Avada's own admin-bar offset handling. */
.mybike-shell-header {
	position: relative;
	z-index: 60;
	background: var(--mb-paper);
}

.mybike-topline {
	background: var(--mb-ink);
	color: var(--mb-surface);
	font-size: 0.75rem;
	letter-spacing: 0.02em;
}

.mybike-topline .mybike-container {
	display: flex;
	justify-content: space-between;
	padding-top: 7px;
	padding-bottom: 7px;
}

/* Wider max-width and taller min-height than the base .mybike-header, for
   the marketplace's own site-wide chrome (as opposed to the plain header
   a future non-marketplace page might use). */
.mybike-header--premium {
	max-width: 1440px;
	margin-inline: auto;
	min-height: 74px;
	padding: var(--mb-space-3) var(--mb-space-5);
}

.mybike-header__logo-image {
	max-height: 40px;
	width: auto;
	display: block;
}

.mybike-header__logo {
	font-weight: 700;
	font-size: 1.25rem;
	letter-spacing: -0.02em;
	color: var(--mb-ink);
	text-decoration: none;
	white-space: nowrap;
}

.mybike-header__logo span {
	color: var(--mb-red);
}

.mybike-header__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	gap: var(--mb-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.mybike-header__nav a {
	color: var(--mb-ink);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}

.mybike-header__nav a:hover {
	color: var(--mb-red);
}

.mybike-nav-cta {
	background: var(--mb-red);
	color: #fff !important;
	padding: 0.5rem 1rem;
	border-radius: var(--mb-radius);
}

.mybike-header__actions {
	display: flex;
	align-items: center;
	gap: var(--mb-space-2);
}

/* Circular icon buttons: compare, notifications, messages, account. */
.mybike-header-action {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.375rem;
	height: 2.375rem;
	border: 1px solid var(--mb-line);
	border-radius: 50%;
	color: var(--mb-ink);
	text-decoration: none !important;
	transition: border-color 120ms ease, background-color 120ms ease;
}

.mybike-header-action:hover {
	border-color: var(--mb-line-strong);
	background: var(--mb-surface);
}

.mybike-header-action .mybike-svg-icon {
	width: 19px;
	height: 19px;
}

.mybike-header-action--notify b {
	position: absolute;
	top: -3px;
	right: -3px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 99px;
	background: var(--mb-red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	font-style: normal;
	line-height: 1;
}

/* -------------------------------------------------------------------- */
/* Mobile menu toggle + slide-out nav                                    */
/* -------------------------------------------------------------------- */

.mybike-mobile-menu-toggle {
	display: none;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid var(--mb-line);
	border-radius: var(--mb-radius);
	background: var(--mb-paper);
	cursor: pointer;
	position: relative;
}

.mybike-mobile-menu-toggle__bars,
.mybike-mobile-menu-toggle__bars::before,
.mybike-mobile-menu-toggle__bars::after {
	content: '';
	position: absolute;
	left: 25%;
	width: 50%;
	height: 2px;
	background: var(--mb-ink);
}

.mybike-mobile-menu-toggle__bars {
	top: 50%;
	transform: translateY(-50%);
}

.mybike-mobile-menu-toggle__bars::before {
	top: -6px;
}

.mybike-mobile-menu-toggle__bars::after {
	top: 6px;
}

.mybike-mobile-nav {
	display: none;
	position: fixed;
	inset: 0 0 0 auto;
	width: min(320px, 85vw);
	height: 100vh;
	background: var(--mb-paper);
	border-left: 1px solid var(--mb-line);
	padding: var(--mb-space-5) var(--mb-space-4);
	z-index: 200;
	overflow-y: auto;
	flex-direction: column;
	gap: var(--mb-space-2);
}

.mybike-mobile-nav.is-open {
	display: flex;
}

.mybike-mobile-nav__list {
	list-style: none;
	margin: 0 0 var(--mb-space-4);
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.mybike-mobile-nav__list a,
.mybike-mobile-nav > a {
	display: block;
	padding: 0.6rem 0;
	color: var(--mb-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--mb-line);
	font-weight: 500;
}

.mybike-mobile-nav__cta {
	margin: var(--mb-space-3) 0;
	width: 100%;
}

.mybike-footer__copyright {
	max-width: var(--mb-container);
	margin: var(--mb-space-5) auto 0;
	padding-top: var(--mb-space-3);
	border-top: 1px solid var(--mb-line);
	font-size: 0.8rem;
	color: var(--mb-ink-soft);
}

/* -------------------------------------------------------------------- */
/* Footer                                                                */
/* -------------------------------------------------------------------- */

.mybike-footer {
	border-top: 1px solid var(--mb-line);
	background: var(--mb-surface);
	padding: var(--mb-space-6) var(--mb-space-4) var(--mb-space-4);
	margin-top: var(--mb-space-7);
}

.mybike-footer__grid {
	max-width: var(--mb-container);
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--mb-space-4);
}

.mybike-footer__grid h3 {
	font-size: 0.85rem;
	font-weight: 700;
	margin: 0 0 var(--mb-space-2);
}

.mybike-footer__grid ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mybike-footer__grid a {
	color: var(--mb-ink-soft);
	text-decoration: none;
	font-size: 0.9rem;
	line-height: 2;
}

.mybike-footer__grid a:hover {
	color: var(--mb-ink);
}

/* -------------------------------------------------------------------- */
/* Shared components                                                     */
/* -------------------------------------------------------------------- */

.mybike-verified-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--mb-success);
	font-weight: 700;
	font-size: 0.85em;
}

.mybike-brand-disclaimer,
.mybike-notice {
	color: var(--mb-ink-soft);
	font-size: 0.85rem;
}

.mybike-login-required,
.mybike-empty-state {
	text-align: center;
	padding: var(--mb-space-6) var(--mb-space-4);
	border: 1px solid var(--mb-line);
	border-radius: var(--mb-radius);
	background: var(--mb-paper);
}

.mybike-login-required .mybike-btn,
.mybike-empty-state .mybike-btn {
	margin: 0 var(--mb-space-1);
}


/* -------------------------------------------------------------------- */
/* Marketplace-view page background                                     */
/* -------------------------------------------------------------------- */

/*
 * Only applied when MyBike Core adds 'mybike-marketplace-active' to
 * <body> (see mybike_enhancement_body_classes()) — i.e. only on the
 * marketplace's own pages, never on the rest of an Avada site built
 * around this child theme.
 */
body.mybike-marketplace-active {
	background: var(--mb-surface);
}

body.mybike-marketplace-active .fusion-header-wrapper {
	border-bottom: 1px solid var(--mb-line);
}

/* -------------------------------------------------------------------- */
/* Footer (premium variant)                                              */
/* -------------------------------------------------------------------- */

.mybike-footer--premium {
	background: var(--mb-ink);
	color: var(--mb-surface);
	padding: var(--mb-space-6) 0 var(--mb-space-4);
	border: 0;
	margin-top: var(--mb-space-7);
}

.mybike-footer--premium a {
	display: block;
	margin: var(--mb-space-1) 0;
	color: var(--mb-surface);
	text-decoration: none;
	font-size: 0.9rem;
	opacity: .85;
}

.mybike-footer--premium a:hover { opacity: 1; }

.mybike-footer--premium .mybike-btn--primary {
	background: var(--mb-red);
	border-color: var(--mb-red);
}

.mybike-footer__hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--mb-space-4);
	padding-bottom: var(--mb-space-5);
	border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.mybike-footer__brand {
	font-size: 2.1rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #fff;
}

.mybike-footer__brand span { color: var(--mb-red); }

.mybike-footer__hero p {
	max-width: 520px;
	margin: var(--mb-space-1) 0 0;
	color: rgba(255, 255, 255, .68);
}

.mybike-footer--premium .mybike-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--mb-space-5);
	padding: var(--mb-space-5) 0;
}

.mybike-footer--premium .mybike-footer__grid h3 {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #fff;
	margin: 0 0 var(--mb-space-2);
}

.mybike-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--mb-space-2);
	padding-top: var(--mb-space-3);
	border-top: 1px solid rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .55);
	font-size: 0.78rem;
}

/* -------------------------------------------------------------------- */
/* Market stats strip (homepage)                                        */
/* -------------------------------------------------------------------- */

.mybike-market-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border: 1px solid var(--mb-line);
	border-radius: var(--mb-radius-lg, 4px);
	overflow: hidden;
	background: var(--mb-paper);
}

.mybike-market-stats > div {
	padding: var(--mb-space-4);
	border-right: 1px solid var(--mb-line);
	text-align: center;
}

.mybike-market-stats > div:last-child { border-right: 0; }

.mybike-market-stats strong {
	display: block;
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--mb-ink);
}

.mybike-market-stats span {
	font-size: 0.78rem;
	color: var(--mb-ink-soft);
}

/* -------------------------------------------------------------------- */
/* Two-column form grid (used by the sell wizard)                       */
/* -------------------------------------------------------------------- */

.mybike-form-grid--two {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--mb-space-3);
}

.mybike-form-grid--two .mybike-form-group { margin: 0; }

@media (max-width: 900px) {
	.mybike-header--premium .mybike-header__nav { display: none; }
	.mybike-footer--premium .mybike-footer__grid { grid-template-columns: 1fr 1fr; }
	.mybike-footer__hero { align-items: flex-start; flex-direction: column; }
	.mybike-market-stats { grid-template-columns: repeat(2, 1fr); }
	.mybike-market-stats > div:nth-child(2) { border-right: 0; }
	.mybike-market-stats > div:nth-child(3),
	.mybike-market-stats > div:nth-child(4) { border-top: 1px solid var(--mb-line); }
}

@media (max-width: 650px) {
	.mybike-form-grid--two { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.mybike-topline .mybike-container span:last-child { display: none; }
	.mybike-header--premium { padding: var(--mb-space-2) var(--mb-space-3); }
	.mybike-header__sell-cta { font-size: 0.78rem; padding: 0 var(--mb-space-3); }
	.mybike-search-bar { display: grid; grid-template-columns: 1fr 1fr; }
	.mybike-search-bar__field { min-height: 52px; }
	.mybike-search-bar__field--keyword { grid-column: 1 / -1; }
	.mybike-search-bar__submit { grid-column: 1 / -1; min-height: 48px; }
	.mybike-footer--premium .mybike-footer__grid { grid-template-columns: 1fr; }
	.mybike-footer__bottom { flex-direction: column; gap: var(--mb-space-1); }
}