/**
 * GPBid app shell — buyer chrome without Martfury header/footer.
 */

:root {
	--gpbid-shell-gutter: 16px;
	--gpbid-content-feed: 720px;   /* Shop home / catalog / PDP / Me / Wishlist / Groups / Live hub / Store */
	--gpbid-content-hub: 1100px;   /* Checkout */
	--gpbid-content-form: 860px;   /* Cart */
}

@media (min-width: 960px) {
	:root {
		--gpbid-shell-gutter: 24px;
	}
}

body.gpbid-app-shell {
	margin: 0;
	background: #111;
	color: #eee;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	min-height: 100vh;
}

/* Top bar */
.gpbid-shell-top {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(17, 17, 17, 0.96);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid #2a2a2a;
}

.gpbid-shell-top__row {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px var(--gpbid-shell-gutter);
	min-height: 48px;
	max-width: var(--gpbid-content-hub);
	margin: 0 auto;
	box-sizing: border-box;
	width: 100%;
}

/* Feed pages: topbar column matches feed content */
body.gpbid-app-shell--home .gpbid-shell-top__row,
body.gpbid-app-shell--account .gpbid-shell-top__row,
body.gpbid-app-shell--wishlist .gpbid-shell-top__row,
body.gpbid-app-shell--auth .gpbid-shell-top__row,
body.gpbid-app-shell--store .gpbid-shell-top__row,
body.gpbid-app-shell--live .gpbid-shell-top__row,
body.gpbid-app-shell--shop .gpbid-shell-top__row {
	max-width: var(--gpbid-content-feed);
}

body.gpbid-app-shell--cart .gpbid-shell-top__row {
	max-width: var(--gpbid-content-form);
}

.gpbid-shell-top__lead {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-shrink: 0;
	min-width: 72px;
	z-index: 1;
}

.gpbid-shell-top__brand {
	flex-shrink: 0;
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 0.02em;
	color: #f5c518;
	text-decoration: none;
}

.gpbid-shell-top__title {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: min(56vw, 360px);
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	text-align: center;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}

.gpbid-shell-top__actions {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	min-width: 72px;
	justify-content: flex-end;
	z-index: 1;
}

.gpbid-shell-top__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	color: #eee;
	text-decoration: none;
}

.gpbid-shell-top__icon:hover {
	background: #222;
	color: #f5c518;
}

.gpbid-shell-top__badge {
	position: absolute;
	top: 4px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #e53935;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
}

.gpbid-shell-subnav {
	display: flex;
	justify-content: center;
	gap: 4px;
	padding: 0 var(--gpbid-shell-gutter);
	border-bottom: 1px solid #222;
	max-width: var(--gpbid-content-hub);
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.gpbid-shell-subnav__link {
	flex: 1;
	max-width: 120px;
	text-align: center;
	padding: 8px 6px;
	font-size: 13px;
	font-weight: 700;
	color: #888;
	text-decoration: none;
	border-bottom: 2px solid transparent;
}

.gpbid-shell-subnav__link.is-active {
	color: #f5c518;
	border-bottom-color: #f5c518;
}

/* Default hub width (PDP / checkout) */
.gpbid-shell-main {
	max-width: var(--gpbid-content-hub);
	margin: 0 auto;
	padding: 12px var(--gpbid-shell-gutter) 24px;
	min-height: 50vh;
	width: 100%;
	box-sizing: border-box;
}

/* Feed pages */
body.gpbid-app-shell--account .gpbid-shell-main,
body.gpbid-app-shell--wishlist .gpbid-shell-main,
body.gpbid-app-shell--auth .gpbid-shell-main,
body.gpbid-app-shell--cms .gpbid-shell-main,
body.gpbid-app-shell--live .gpbid-shell-main,
body.gpbid-app-shell--shop .gpbid-shell-main,
body.gpbid-app-shell--product .gpbid-shell-main {
	max-width: var(--gpbid-content-feed);
}

/* Live / Shop catalog / PDP: gpbid-sh owns gutter */
body.gpbid-app-shell--live .gpbid-shell-main,
body.gpbid-app-shell--shop .gpbid-shell-main,
body.gpbid-app-shell--product .gpbid-shell-main {
	padding-left: 0;
	padding-right: 0;
	padding-top: 0;
}

/* Home / Live: bottom nav covers Live·Groups·Shop — hide chrome subnav */
body.gpbid-app-shell--home .gpbid-shell-subnav,
body.gpbid-app-shell--live .gpbid-shell-subnav,
body.gpbid-app-shell--shop .gpbid-shell-subnav {
	display: none !important;
}

/* Form pages */
body.gpbid-app-shell--cart .gpbid-shell-main {
	max-width: var(--gpbid-content-form);
}

/* Home / store: shell main is full-bleed; inner columns own the max-width */
body.gpbid-app-shell--home .gpbid-shell-main,
body.gpbid-app-shell--store .gpbid-shell-main {
	padding-left: 0;
	padding-right: 0;
	max-width: none;
}

body.gpbid-app-shell--store .gpbid-shell-store {
	padding: 0 0 16px;
	max-width: var(--gpbid-content-feed);
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

body.gpbid-app-shell--store .gpbid-shell-top__title {
	/* Store pages already show identity below — keep h1 for a11y only */
	visibility: hidden;
}

body.gpbid-app-shell--home .gpbid-shell-top__title {
	visibility: visible;
	position: static;
	left: auto;
	transform: none;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	font-size: 26px;
	font-weight: 800;
	text-align: left;
	white-space: nowrap;
	overflow: visible;
	text-overflow: clip;
	pointer-events: auto;
	flex: 0 0 auto;
}

body.gpbid-app-shell--home .gpbid-shell-top__title.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Home site mark — logo in gold ring */
.gpbid-shell-top__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	text-decoration: none;
	line-height: 0;
}

.gpbid-shell-top__mark-ring {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	box-sizing: border-box;
	padding: 2px;
	border: 2px solid #f5c518;
	background: #151515;
	box-shadow:
		0 0 0 1px rgba(245, 197, 24, 0.28),
		0 0 10px rgba(245, 197, 24, 0.18);
}

.gpbid-shell-top__mark-img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: #111;
}

.gpbid-shell-top__mark-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: #222;
	color: #f5c518;
	font-size: 16px;
	font-weight: 800;
	line-height: 1;
}

body.gpbid-app-shell--home .gpbid-shell-top__row,
body.gpbid-app-shell--live .gpbid-shell-top__row,
body.gpbid-app-shell--shop .gpbid-shell-top__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

body.gpbid-app-shell--home .gpbid-shell-top__home-left,
body.gpbid-app-shell--live .gpbid-shell-top__home-left,
body.gpbid-app-shell--shop .gpbid-shell-top__home-left {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
	max-width: calc(100% - 96px);
}

body.gpbid-app-shell--home .gpbid-shell-top__home-left .gpbid-loc-pill,
body.gpbid-app-shell--live .gpbid-shell-top__home-left .gpbid-loc-pill,
body.gpbid-app-shell--shop .gpbid-shell-top__home-left .gpbid-loc-pill {
	flex: 0 1 auto;
	min-width: 0;
}

body.gpbid-app-shell--home .gpbid-shell-top__title.screen-reader-text,
body.gpbid-app-shell--live .gpbid-shell-top__title.screen-reader-text,
body.gpbid-app-shell--shop .gpbid-shell-top__title.screen-reader-text {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Content width for Woo blocks inside shell */
body.gpbid-app-shell .woocommerce,
body.gpbid-app-shell .site-content,
body.gpbid-app-shell .gpbid-shell-page {
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

body.gpbid-app-shell .page-header,
body.gpbid-app-shell .entry-header,
body.gpbid-app-shell .woocommerce-products-header h1.page-title {
	color: #fff;
}

/* Shell top bar already shows page title — reduce duplicate H1 noise */
body.gpbid-app-shell--cart .entry-header,
body.gpbid-app-shell--checkout .entry-header,
body.gpbid-app-shell--account .entry-title,
body.gpbid-app-shell--auth .entry-header,
body.gpbid-app-shell--wishlist .entry-header,
body.gpbid-app-shell--live .entry-header,
body.gpbid-app-shell--cart .page-title,
body.gpbid-app-shell--checkout .page-title,
body.gpbid-app-shell--account h1.entry-title,
body.gpbid-app-shell--live h1.entry-title {
	display: none !important;
}

/* Hide leftover Martfury / theme chrome if any widget leaks in */
body.gpbid-app-shell .site-header,
body.gpbid-app-shell #site-header,
body.gpbid-app-shell .mf-navigation-mobile,
body.gpbid-app-shell .site-footer,
body.gpbid-app-shell #colophon,
body.gpbid-app-shell .footer-layout,
body.gpbid-app-shell .d-department,
body.gpbid-app-shell #primary-mobile-nav,
body.gpbid-app-shell .primary-mobile-nav,
body.gpbid-app-shell #primary-user-nav,
body.gpbid-app-shell .primary-user-nav,
body.gpbid-app-shell #mf-els-modal-mobile,
body.gpbid-app-shell .mf-els-modal-mobile,
body.gpbid-app-shell #mf-cart-mobile,
body.gpbid-app-shell .mf-cart-mobile,
body.gpbid-app-shell #mf-off-canvas-layer,
body.gpbid-app-shell .martfury-off-canvas-layer,
body.gpbid-app-shell .navigation-mobile,
body.gpbid-app-shell #scroll-top,
body.gpbid-app-shell .backtotop,
body.gpbid-app-shell #sticky-product-info-wapper,
body.gpbid-app-shell .sticky-product-info-wapper {
	display: none !important;
}

@media (min-width: 960px) {
	.gpbid-shell-main {
		padding-top: 20px;
		padding-bottom: 40px;
	}
}

/* Bottom tabs use the same column width as the header row. */
body.gpbid-app-shell .gpbid-app-bottom-nav {
	left: 50%;
	right: auto;
	width: 100%;
	max-width: var(--gpbid-content-hub);
	transform: translateX(-50%);
	box-sizing: border-box;
}

body.gpbid-app-shell--home .gpbid-app-bottom-nav,
body.gpbid-app-shell--account .gpbid-app-bottom-nav,
body.gpbid-app-shell--wishlist .gpbid-app-bottom-nav,
body.gpbid-app-shell--auth .gpbid-app-bottom-nav,
body.gpbid-app-shell--store .gpbid-app-bottom-nav,
body.gpbid-app-shell--live .gpbid-app-bottom-nav,
body.gpbid-app-shell--shop .gpbid-app-bottom-nav {
	max-width: var(--gpbid-content-feed);
}

body.gpbid-app-shell--cart .gpbid-app-bottom-nav {
	max-width: var(--gpbid-content-form);
}

/*
 * Martfury #martfury-preloader is a full-screen layer dismissed via NProgress.
 * NProgress is often missing on app-shell pages, so the overlay stays and
 * eats taps on iOS Safari (PC mouse can still reach controls). Force it off.
 */
body.gpbid-app-shell #martfury-preloader,
body.gpbid-app-shell .martfury-preloader {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	opacity: 0 !important;
	z-index: -1 !important;
}
