/**
 * Mobile-only bottom dock + sheets. Desktop top navbar unchanged (lg+).
 */

@media (max-width: 991.98px) {
	:root {
		--mobile-top-logo-h: calc(48px + env(safe-area-inset-top, 0px));
	}

	html {
		/* Space for fixed dock + iOS home indicator */
		scroll-padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
		scroll-padding-top: var(--mobile-top-logo-h);
	}

	body {
		padding-top: var(--mobile-top-logo-h);
		padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	.site-navbar.site-navbar--desktop-bar {
		display: none !important;
	}
}

/* —— Mobile top logo (phones only) —— */
.mobile-top-logo-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1025;
	display: none;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: var(--mobile-top-logo-h, calc(48px + env(safe-area-inset-top, 0px)));
	padding: max(0px, env(safe-area-inset-top, 0px)) 20px 10px;
	background: var(--white, #fff);
	border-bottom: 1px solid var(--border, #e0ddd8);
}

@media (max-width: 991.98px) {
	.mobile-top-logo-bar.d-lg-none {
		display: flex;
	}
}

.mobile-top-logo-bar__link {
	display: block;
	line-height: 0;
	text-decoration: none;
}

.mobile-top-logo-bar__img {
	display: block;
	height: 30px;
	width: auto;
	max-width: min(160px, 52vw);
	object-fit: contain;
	object-position: center;
}

/* —— Dock —— */
.mobile-bottom-dock {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	/* Higher than PDP sticky CTA so Home / Search stay tappable if layers ever overlap */
	z-index: 1050;
	display: none;
	align-items: stretch;
	justify-content: space-around;
	gap: 0;
	min-height: calc(52px + env(safe-area-inset-bottom, 0px));
	padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
	background: var(--white, #fff);
	border-top: 1px solid var(--border, #e0ddd8);
	box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
}

@media (max-width: 991.98px) {
	.mobile-bottom-dock.d-lg-none {
		display: flex;
	}
}

.mobile-bottom-dock__item {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 4px 2px;
	font-family: var(--font-body, 'Jost', sans-serif);
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--text-muted, #6b6b6b);
	background: transparent;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.15s ease;
}

.mobile-bottom-dock__item:hover,
.mobile-bottom-dock__item:focus-visible {
	color: var(--black, #0a0a0a);
}

.mobile-bottom-dock__item--active {
	color: var(--black, #0a0a0a);
}

.mobile-bottom-dock__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: currentColor;
}

.mobile-bottom-dock__icon--cart {
	position: relative;
}

.mobile-bottom-dock__badge {
	position: absolute;
	top: -4px;
	right: -8px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	font-size: 10px;
	line-height: 16px;
	font-family: var(--font-body, 'Jost', sans-serif);
	font-weight: 500;
	letter-spacing: 0;
	text-align: center;
	border-radius: 999px;
	background: var(--black, #0a0a0a);
	color: var(--white, #fff);
}

.mobile-bottom-dock__label {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* —— Full-screen sheets (search / more) —— */
.mobile-dock-sheet[hidden] {
	display: none !important;
}

.mobile-dock-sheet:not([hidden]) {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 1040;
}

.mobile-dock-sheet__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.45);
}

.mobile-dock-sheet__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	max-height: min(88vh, 640px);
	background: var(--white, #fff);
	border-top-left-radius: 12px;
	border-top-right-radius: 12px;
	box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-dock-sheet__panel--search {
	max-height: 70vh;
}

.mobile-dock-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px 10px;
	border-bottom: 1px solid var(--border, #e0ddd8);
	flex-shrink: 0;
}

.mobile-dock-sheet__title {
	margin: 0;
	font-family: var(--font-heading, Georgia, serif);
	font-size: 18px;
	font-weight: 400;
	color: var(--black, #0a0a0a);
}

.mobile-dock-sheet__close {
	width: 40px;
	height: 40px;
	margin: -8px -8px -8px 0;
	border: none;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: var(--text-muted, #6b6b6b);
	cursor: pointer;
}

.mobile-dock-sheet__body {
	padding: 12px 16px 20px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.mobile-dock-more__section-label {
	font-family: var(--font-body, 'Jost', sans-serif);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--text-muted, #6b6b6b);
	margin: 0 0 8px;
}

.mobile-dock-more__list {
	margin: 0;
	padding: 0;
}

.mobile-dock-more__link {
	display: block;
	padding: 12px 0;
	font-family: var(--font-body, 'Jost', sans-serif);
	font-size: 15px;
	color: var(--black, #0a0a0a);
	text-decoration: none;
	border-bottom: 1px solid var(--border, #f0eeeb);
}

.mobile-dock-more__list li:last-child .mobile-dock-more__link {
	border-bottom: none;
}

.mobile-dock-more__link:active {
	opacity: 0.7;
}

/* PDP sticky bar offset: defined in product.css (loads after this file so it wins over bottom: 0). */
